-
Notifications
You must be signed in to change notification settings - Fork 602
/
api_types.go
710 lines (535 loc) · 19.9 KB
/
api_types.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package workspaces
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
var _ aws.Config
var _ = awsutil.Prettify
// Describes a modification to the configuration of bring your own license (BYOL)
// for the specified account.
type AccountModification struct {
_ struct{} `type:"structure"`
// The IP address range, specified as an IPv4 CIDR block, for the management
// network interface used for the account.
DedicatedTenancyManagementCidrRange *string `type:"string"`
// The status of BYOL (whether BYOL is being enabled or disabled).
DedicatedTenancySupport DedicatedTenancySupportResultEnum `type:"string" enum:"true"`
// The error code that is returned if the configuration of BYOL cannot be modified.
ErrorCode *string `type:"string"`
// The text of the error message that is returned if the configuration of BYOL
// cannot be modified.
ErrorMessage *string `type:"string"`
// The state of the modification to the configuration of BYOL.
ModificationState DedicatedTenancyModificationStateEnum `type:"string" enum:"true"`
// The timestamp when the modification of the BYOL configuration was started.
StartTime *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s AccountModification) String() string {
return awsutil.Prettify(s)
}
// Describes the compute type.
type ComputeType struct {
_ struct{} `type:"structure"`
// The compute type.
Name Compute `type:"string" enum:"true"`
}
// String returns the string representation
func (s ComputeType) String() string {
return awsutil.Prettify(s)
}
// Describes the default values used to create a WorkSpace.
type DefaultWorkspaceCreationProperties struct {
_ struct{} `type:"structure"`
// The identifier of any security groups to apply to WorkSpaces when they are
// created.
CustomSecurityGroupId *string `type:"string"`
// The organizational unit (OU) in the directory for the WorkSpace machine accounts.
DefaultOu *string `type:"string"`
// The public IP address to attach to all WorkSpaces that are created or rebuilt.
EnableInternetAccess *bool `type:"boolean"`
// Specifies whether the directory is enabled for Amazon WorkDocs.
EnableWorkDocs *bool `type:"boolean"`
// Specifies whether the WorkSpace user is an administrator on the WorkSpace.
UserEnabledAsLocalAdministrator *bool `type:"boolean"`
}
// String returns the string representation
func (s DefaultWorkspaceCreationProperties) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace that cannot be created.
type FailedCreateWorkspaceRequest struct {
_ struct{} `type:"structure"`
// The error code that is returned if the WorkSpace cannot be created.
ErrorCode *string `type:"string"`
// The text of the error message that is returned if the WorkSpace cannot be
// created.
ErrorMessage *string `type:"string"`
// Information about the WorkSpace.
WorkspaceRequest *WorkspaceRequest `type:"structure"`
}
// String returns the string representation
func (s FailedCreateWorkspaceRequest) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace that could not be rebooted. (RebootWorkspaces), rebuilt
// (RebuildWorkspaces), restored (RestoreWorkspace), terminated (TerminateWorkspaces),
// started (StartWorkspaces), or stopped (StopWorkspaces).
type FailedWorkspaceChangeRequest struct {
_ struct{} `type:"structure"`
// The error code that is returned if the WorkSpace cannot be rebooted.
ErrorCode *string `type:"string"`
// The text of the error message that is returned if the WorkSpace cannot be
// rebooted.
ErrorMessage *string `type:"string"`
// The identifier of the WorkSpace.
WorkspaceId *string `type:"string"`
}
// String returns the string representation
func (s FailedWorkspaceChangeRequest) String() string {
return awsutil.Prettify(s)
}
// Describes a rule for an IP access control group.
type IpRuleItem struct {
_ struct{} `type:"structure"`
// The IP address range, in CIDR notation.
IpRule *string `locationName:"ipRule" type:"string"`
// The description.
RuleDesc *string `locationName:"ruleDesc" type:"string"`
}
// String returns the string representation
func (s IpRuleItem) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace modification.
type ModificationState struct {
_ struct{} `type:"structure"`
// The resource.
Resource ModificationResourceEnum `type:"string" enum:"true"`
// The modification state.
State ModificationStateEnum `type:"string" enum:"true"`
}
// String returns the string representation
func (s ModificationState) String() string {
return awsutil.Prettify(s)
}
// The operating system that the image is running.
type OperatingSystem struct {
_ struct{} `type:"structure"`
// The operating system.
Type OperatingSystemType `type:"string" enum:"true"`
}
// String returns the string representation
func (s OperatingSystem) String() string {
return awsutil.Prettify(s)
}
// Describes an Amazon WorkSpaces client.
type Properties struct {
_ struct{} `type:"structure"`
// Specifies whether users can cache their credentials on the Amazon WorkSpaces
// client. When enabled, users can choose to reconnect to their WorkSpaces without
// re-entering their credentials.
ReconnectEnabled ReconnectEnum `type:"string" enum:"true"`
}
// String returns the string representation
func (s Properties) String() string {
return awsutil.Prettify(s)
}
// Information about the Amazon WorkSpaces client.
type PropertiesResult struct {
_ struct{} `type:"structure"`
// Information about the Amazon WorkSpaces client.
ClientProperties *Properties `type:"structure"`
// The resource identifier, in the form of a directory ID.
ResourceId *string `min:"1" type:"string"`
}
// String returns the string representation
func (s PropertiesResult) String() string {
return awsutil.Prettify(s)
}
// Describes the information used to reboot a WorkSpace.
type RebootRequest struct {
_ struct{} `type:"structure"`
// The identifier of the WorkSpace.
//
// WorkspaceId is a required field
WorkspaceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RebootRequest) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RebootRequest) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "RebootRequest"}
if s.WorkspaceId == nil {
invalidParams.Add(aws.NewErrParamRequired("WorkspaceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes the information used to rebuild a WorkSpace.
type RebuildRequest struct {
_ struct{} `type:"structure"`
// The identifier of the WorkSpace.
//
// WorkspaceId is a required field
WorkspaceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s RebuildRequest) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *RebuildRequest) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "RebuildRequest"}
if s.WorkspaceId == nil {
invalidParams.Add(aws.NewErrParamRequired("WorkspaceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes the root volume for a WorkSpace bundle.
type RootStorage struct {
_ struct{} `type:"structure"`
// The size of the root volume.
Capacity *string `min:"1" type:"string"`
}
// String returns the string representation
func (s RootStorage) String() string {
return awsutil.Prettify(s)
}
// Describes a snapshot.
type Snapshot struct {
_ struct{} `type:"structure"`
// The time when the snapshot was created.
SnapshotTime *time.Time `type:"timestamp"`
}
// String returns the string representation
func (s Snapshot) String() string {
return awsutil.Prettify(s)
}
// Information used to start a WorkSpace.
type StartRequest struct {
_ struct{} `type:"structure"`
// The identifier of the WorkSpace.
WorkspaceId *string `type:"string"`
}
// String returns the string representation
func (s StartRequest) String() string {
return awsutil.Prettify(s)
}
// Describes the information used to stop a WorkSpace.
type StopRequest struct {
_ struct{} `type:"structure"`
// The identifier of the WorkSpace.
WorkspaceId *string `type:"string"`
}
// String returns the string representation
func (s StopRequest) String() string {
return awsutil.Prettify(s)
}
// Describes a tag.
type Tag struct {
_ struct{} `type:"structure"`
// The key of the tag.
//
// Key is a required field
Key *string `min:"1" type:"string" required:"true"`
// The value of the tag.
Value *string `type:"string"`
}
// String returns the string representation
func (s Tag) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *Tag) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "Tag"}
if s.Key == nil {
invalidParams.Add(aws.NewErrParamRequired("Key"))
}
if s.Key != nil && len(*s.Key) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Key", 1))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes the information used to terminate a WorkSpace.
type TerminateRequest struct {
_ struct{} `type:"structure"`
// The identifier of the WorkSpace.
//
// WorkspaceId is a required field
WorkspaceId *string `type:"string" required:"true"`
}
// String returns the string representation
func (s TerminateRequest) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *TerminateRequest) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "TerminateRequest"}
if s.WorkspaceId == nil {
invalidParams.Add(aws.NewErrParamRequired("WorkspaceId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes the user storage for a WorkSpace bundle.
type UserStorage struct {
_ struct{} `type:"structure"`
// The size of the user storage.
Capacity *string `min:"1" type:"string"`
}
// String returns the string representation
func (s UserStorage) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace.
type Workspace struct {
_ struct{} `type:"structure"`
// The identifier of the bundle used to create the WorkSpace.
BundleId *string `type:"string"`
// The name of the WorkSpace, as seen by the operating system.
ComputerName *string `type:"string"`
// The identifier of the AWS Directory Service directory for the WorkSpace.
DirectoryId *string `type:"string"`
// The error code that is returned if the WorkSpace cannot be created.
ErrorCode *string `type:"string"`
// The text of the error message that is returned if the WorkSpace cannot be
// created.
ErrorMessage *string `type:"string"`
// The IP address of the WorkSpace.
IpAddress *string `type:"string"`
// The modification states of the WorkSpace.
ModificationStates []ModificationState `type:"list"`
// Indicates whether the data stored on the root volume is encrypted.
RootVolumeEncryptionEnabled *bool `type:"boolean"`
// The operational state of the WorkSpace.
State WorkspaceState `type:"string" enum:"true"`
// The identifier of the subnet for the WorkSpace.
SubnetId *string `type:"string"`
// The user for the WorkSpace.
UserName *string `min:"1" type:"string"`
// Indicates whether the data stored on the user volume is encrypted.
UserVolumeEncryptionEnabled *bool `type:"boolean"`
// The KMS key used to encrypt data stored on your WorkSpace.
VolumeEncryptionKey *string `type:"string"`
// The identifier of the WorkSpace.
WorkspaceId *string `type:"string"`
// The properties of the WorkSpace.
WorkspaceProperties *WorkspaceProperties `type:"structure"`
}
// String returns the string representation
func (s Workspace) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace bundle.
type WorkspaceBundle struct {
_ struct{} `type:"structure"`
// The bundle identifier.
BundleId *string `type:"string"`
// The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles).
ComputeType *ComputeType `type:"structure"`
// A description.
Description *string `type:"string"`
// The name of the bundle.
Name *string `min:"1" type:"string"`
// The owner of the bundle. This is the account identifier of the owner, or
// AMAZON if the bundle is provided by AWS.
Owner *string `type:"string"`
// The size of the root volume.
RootStorage *RootStorage `type:"structure"`
// The size of the user storage.
UserStorage *UserStorage `type:"structure"`
}
// String returns the string representation
func (s WorkspaceBundle) String() string {
return awsutil.Prettify(s)
}
// Describes the connection status of a WorkSpace.
type WorkspaceConnectionStatus struct {
_ struct{} `type:"structure"`
// The connection state of the WorkSpace. The connection state is unknown if
// the WorkSpace is stopped.
ConnectionState ConnectionState `type:"string" enum:"true"`
// The timestamp of the connection status check.
ConnectionStateCheckTimestamp *time.Time `type:"timestamp"`
// The timestamp of the last known user connection.
LastKnownUserConnectionTimestamp *time.Time `type:"timestamp"`
// The identifier of the WorkSpace.
WorkspaceId *string `type:"string"`
}
// String returns the string representation
func (s WorkspaceConnectionStatus) String() string {
return awsutil.Prettify(s)
}
// Describes an AWS Directory Service directory that is used with Amazon WorkSpaces.
type WorkspaceDirectory struct {
_ struct{} `type:"structure"`
// The directory alias.
Alias *string `type:"string"`
// The user name for the service account.
CustomerUserName *string `min:"1" type:"string"`
// The directory identifier.
DirectoryId *string `type:"string"`
// The name of the directory.
DirectoryName *string `type:"string"`
// The directory type.
DirectoryType WorkspaceDirectoryType `type:"string" enum:"true"`
// The IP addresses of the DNS servers for the directory.
DnsIpAddresses []string `type:"list"`
// The identifier of the IAM role. This is the role that allows Amazon WorkSpaces
// to make calls to other services, such as Amazon EC2, on your behalf.
IamRoleId *string `type:"string"`
// The identifiers of the IP access control groups associated with the directory.
IpGroupIds []string `locationName:"ipGroupIds" type:"list"`
// The registration code for the directory. This is the code that users enter
// in their Amazon WorkSpaces client application to connect to the directory.
RegistrationCode *string `min:"1" type:"string"`
// The state of the directory's registration with Amazon WorkSpaces
State WorkspaceDirectoryState `type:"string" enum:"true"`
// The identifiers of the subnets used with the directory.
SubnetIds []string `type:"list"`
// The default creation properties for all WorkSpaces in the directory.
WorkspaceCreationProperties *DefaultWorkspaceCreationProperties `type:"structure"`
// The identifier of the security group that is assigned to new WorkSpaces.
WorkspaceSecurityGroupId *string `type:"string"`
}
// String returns the string representation
func (s WorkspaceDirectory) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace image.
type WorkspaceImage struct {
_ struct{} `type:"structure"`
// The description of the image.
Description *string `min:"1" type:"string"`
// The error code that is returned for the image.
ErrorCode *string `type:"string"`
// The text of the error message that is returned for the image.
ErrorMessage *string `type:"string"`
// The identifier of the image.
ImageId *string `type:"string"`
// The name of the image.
Name *string `min:"1" type:"string"`
// The operating system that the image is running.
OperatingSystem *OperatingSystem `type:"structure"`
// Specifies whether the image is running on dedicated hardware. When bring
// your own license (BYOL) is enabled, this value is set to DEDICATED.
RequiredTenancy WorkspaceImageRequiredTenancy `type:"string" enum:"true"`
// The status of the image.
State WorkspaceImageState `type:"string" enum:"true"`
}
// String returns the string representation
func (s WorkspaceImage) String() string {
return awsutil.Prettify(s)
}
// Describes a WorkSpace.
type WorkspaceProperties struct {
_ struct{} `type:"structure"`
// The compute type. For more information, see Amazon WorkSpaces Bundles (http://aws.amazon.com/workspaces/details/#Amazon_WorkSpaces_Bundles).
ComputeTypeName Compute `type:"string" enum:"true"`
// The size of the root volume.
RootVolumeSizeGib *int64 `type:"integer"`
// The running mode. For more information, see Manage the WorkSpace Running
// Mode (https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html).
RunningMode RunningMode `type:"string" enum:"true"`
// The time after a user logs off when WorkSpaces are automatically stopped.
// Configured in 60 minute intervals.
RunningModeAutoStopTimeoutInMinutes *int64 `type:"integer"`
// The size of the user storage.
UserVolumeSizeGib *int64 `type:"integer"`
}
// String returns the string representation
func (s WorkspaceProperties) String() string {
return awsutil.Prettify(s)
}
// Describes the information used to create a WorkSpace.
type WorkspaceRequest struct {
_ struct{} `type:"structure"`
// The identifier of the bundle for the WorkSpace. You can use DescribeWorkspaceBundles
// to list the available bundles.
//
// BundleId is a required field
BundleId *string `type:"string" required:"true"`
// The identifier of the AWS Directory Service directory for the WorkSpace.
// You can use DescribeWorkspaceDirectories to list the available directories.
//
// DirectoryId is a required field
DirectoryId *string `type:"string" required:"true"`
// Indicates whether the data stored on the root volume is encrypted.
RootVolumeEncryptionEnabled *bool `type:"boolean"`
// The tags for the WorkSpace.
Tags []Tag `type:"list"`
// The username of the user for the WorkSpace. This username must exist in the
// AWS Directory Service directory for the WorkSpace.
//
// UserName is a required field
UserName *string `min:"1" type:"string" required:"true"`
// Indicates whether the data stored on the user volume is encrypted.
UserVolumeEncryptionEnabled *bool `type:"boolean"`
// The KMS key used to encrypt data stored on your WorkSpace.
VolumeEncryptionKey *string `type:"string"`
// The WorkSpace properties.
WorkspaceProperties *WorkspaceProperties `type:"structure"`
}
// String returns the string representation
func (s WorkspaceRequest) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *WorkspaceRequest) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "WorkspaceRequest"}
if s.BundleId == nil {
invalidParams.Add(aws.NewErrParamRequired("BundleId"))
}
if s.DirectoryId == nil {
invalidParams.Add(aws.NewErrParamRequired("DirectoryId"))
}
if s.UserName == nil {
invalidParams.Add(aws.NewErrParamRequired("UserName"))
}
if s.UserName != nil && len(*s.UserName) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("UserName", 1))
}
if s.Tags != nil {
for i, v := range s.Tags {
if err := v.Validate(); err != nil {
invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(aws.ErrInvalidParams))
}
}
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Describes an IP access control group.
type WorkspacesIpGroup struct {
_ struct{} `type:"structure"`
// The description of the group.
GroupDesc *string `locationName:"groupDesc" type:"string"`
// The identifier of the group.
GroupId *string `locationName:"groupId" type:"string"`
// The name of the group.
GroupName *string `locationName:"groupName" type:"string"`
// The rules.
UserRules []IpRuleItem `locationName:"userRules" type:"list"`
}
// String returns the string representation
func (s WorkspacesIpGroup) String() string {
return awsutil.Prettify(s)
}