forked from aws/aws-sdk-go-v2
/
api.go
1498 lines (1226 loc) · 47.2 KB
/
api.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
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package cloud9
import (
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
const opCreateEnvironmentEC2 = "CreateEnvironmentEC2"
// CreateEnvironmentEC2Request is a API request type for the CreateEnvironmentEC2 API operation.
type CreateEnvironmentEC2Request struct {
*aws.Request
Input *CreateEnvironmentEC2Input
Copy func(*CreateEnvironmentEC2Input) CreateEnvironmentEC2Request
}
// Send marshals and sends the CreateEnvironmentEC2 API request.
func (r CreateEnvironmentEC2Request) Send() (*CreateEnvironmentEC2Output, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateEnvironmentEC2Output), nil
}
// CreateEnvironmentEC2Request returns a request value for making API operation for
// AWS Cloud9.
//
// Creates an AWS Cloud9 development environment, launches an Amazon Elastic
// Compute Cloud (Amazon EC2) instance, and then connects from the instance
// to the environment.
//
// // Example sending a request using the CreateEnvironmentEC2Request method.
// req := client.CreateEnvironmentEC2Request(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2
func (c *Cloud9) CreateEnvironmentEC2Request(input *CreateEnvironmentEC2Input) CreateEnvironmentEC2Request {
op := &aws.Operation{
Name: opCreateEnvironmentEC2,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEnvironmentEC2Input{}
}
output := &CreateEnvironmentEC2Output{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateEnvironmentEC2Request{Request: req, Input: input, Copy: c.CreateEnvironmentEC2Request}
}
const opCreateEnvironmentMembership = "CreateEnvironmentMembership"
// CreateEnvironmentMembershipRequest is a API request type for the CreateEnvironmentMembership API operation.
type CreateEnvironmentMembershipRequest struct {
*aws.Request
Input *CreateEnvironmentMembershipInput
Copy func(*CreateEnvironmentMembershipInput) CreateEnvironmentMembershipRequest
}
// Send marshals and sends the CreateEnvironmentMembership API request.
func (r CreateEnvironmentMembershipRequest) Send() (*CreateEnvironmentMembershipOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateEnvironmentMembershipOutput), nil
}
// CreateEnvironmentMembershipRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Adds an environment member to an AWS Cloud9 development environment.
//
// // Example sending a request using the CreateEnvironmentMembershipRequest method.
// req := client.CreateEnvironmentMembershipRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembership
func (c *Cloud9) CreateEnvironmentMembershipRequest(input *CreateEnvironmentMembershipInput) CreateEnvironmentMembershipRequest {
op := &aws.Operation{
Name: opCreateEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &CreateEnvironmentMembershipInput{}
}
output := &CreateEnvironmentMembershipOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateEnvironmentMembershipRequest{Request: req, Input: input, Copy: c.CreateEnvironmentMembershipRequest}
}
const opDeleteEnvironment = "DeleteEnvironment"
// DeleteEnvironmentRequest is a API request type for the DeleteEnvironment API operation.
type DeleteEnvironmentRequest struct {
*aws.Request
Input *DeleteEnvironmentInput
Copy func(*DeleteEnvironmentInput) DeleteEnvironmentRequest
}
// Send marshals and sends the DeleteEnvironment API request.
func (r DeleteEnvironmentRequest) Send() (*DeleteEnvironmentOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteEnvironmentOutput), nil
}
// DeleteEnvironmentRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Deletes an AWS Cloud9 development environment. If an Amazon EC2 instance
// is connected to the environment, also terminates the instance.
//
// // Example sending a request using the DeleteEnvironmentRequest method.
// req := client.DeleteEnvironmentRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironment
func (c *Cloud9) DeleteEnvironmentRequest(input *DeleteEnvironmentInput) DeleteEnvironmentRequest {
op := &aws.Operation{
Name: opDeleteEnvironment,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEnvironmentInput{}
}
output := &DeleteEnvironmentOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteEnvironmentRequest{Request: req, Input: input, Copy: c.DeleteEnvironmentRequest}
}
const opDeleteEnvironmentMembership = "DeleteEnvironmentMembership"
// DeleteEnvironmentMembershipRequest is a API request type for the DeleteEnvironmentMembership API operation.
type DeleteEnvironmentMembershipRequest struct {
*aws.Request
Input *DeleteEnvironmentMembershipInput
Copy func(*DeleteEnvironmentMembershipInput) DeleteEnvironmentMembershipRequest
}
// Send marshals and sends the DeleteEnvironmentMembership API request.
func (r DeleteEnvironmentMembershipRequest) Send() (*DeleteEnvironmentMembershipOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteEnvironmentMembershipOutput), nil
}
// DeleteEnvironmentMembershipRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Deletes an environment member from an AWS Cloud9 development environment.
//
// // Example sending a request using the DeleteEnvironmentMembershipRequest method.
// req := client.DeleteEnvironmentMembershipRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembership
func (c *Cloud9) DeleteEnvironmentMembershipRequest(input *DeleteEnvironmentMembershipInput) DeleteEnvironmentMembershipRequest {
op := &aws.Operation{
Name: opDeleteEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DeleteEnvironmentMembershipInput{}
}
output := &DeleteEnvironmentMembershipOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteEnvironmentMembershipRequest{Request: req, Input: input, Copy: c.DeleteEnvironmentMembershipRequest}
}
const opDescribeEnvironmentMemberships = "DescribeEnvironmentMemberships"
// DescribeEnvironmentMembershipsRequest is a API request type for the DescribeEnvironmentMemberships API operation.
type DescribeEnvironmentMembershipsRequest struct {
*aws.Request
Input *DescribeEnvironmentMembershipsInput
Copy func(*DescribeEnvironmentMembershipsInput) DescribeEnvironmentMembershipsRequest
}
// Send marshals and sends the DescribeEnvironmentMemberships API request.
func (r DescribeEnvironmentMembershipsRequest) Send() (*DescribeEnvironmentMembershipsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeEnvironmentMembershipsOutput), nil
}
// DescribeEnvironmentMembershipsRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Gets information about environment members for an AWS Cloud9 development
// environment.
//
// // Example sending a request using the DescribeEnvironmentMembershipsRequest method.
// req := client.DescribeEnvironmentMembershipsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMemberships
func (c *Cloud9) DescribeEnvironmentMembershipsRequest(input *DescribeEnvironmentMembershipsInput) DescribeEnvironmentMembershipsRequest {
op := &aws.Operation{
Name: opDescribeEnvironmentMemberships,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &DescribeEnvironmentMembershipsInput{}
}
output := &DescribeEnvironmentMembershipsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeEnvironmentMembershipsRequest{Request: req, Input: input, Copy: c.DescribeEnvironmentMembershipsRequest}
}
// Paginate pages iterates over the pages of a DescribeEnvironmentMembershipsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a DescribeEnvironmentMemberships operation.
// req := client.DescribeEnvironmentMembershipsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *DescribeEnvironmentMembershipsRequest) Paginate(opts ...aws.Option) DescribeEnvironmentMembershipsPager {
return DescribeEnvironmentMembershipsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *DescribeEnvironmentMembershipsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// DescribeEnvironmentMembershipsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type DescribeEnvironmentMembershipsPager struct {
aws.Pager
}
func (p *DescribeEnvironmentMembershipsPager) CurrentPage() *DescribeEnvironmentMembershipsOutput {
return p.Pager.CurrentPage().(*DescribeEnvironmentMembershipsOutput)
}
const opDescribeEnvironmentStatus = "DescribeEnvironmentStatus"
// DescribeEnvironmentStatusRequest is a API request type for the DescribeEnvironmentStatus API operation.
type DescribeEnvironmentStatusRequest struct {
*aws.Request
Input *DescribeEnvironmentStatusInput
Copy func(*DescribeEnvironmentStatusInput) DescribeEnvironmentStatusRequest
}
// Send marshals and sends the DescribeEnvironmentStatus API request.
func (r DescribeEnvironmentStatusRequest) Send() (*DescribeEnvironmentStatusOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeEnvironmentStatusOutput), nil
}
// DescribeEnvironmentStatusRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Gets status information for an AWS Cloud9 development environment.
//
// // Example sending a request using the DescribeEnvironmentStatusRequest method.
// req := client.DescribeEnvironmentStatusRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentStatus
func (c *Cloud9) DescribeEnvironmentStatusRequest(input *DescribeEnvironmentStatusInput) DescribeEnvironmentStatusRequest {
op := &aws.Operation{
Name: opDescribeEnvironmentStatus,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEnvironmentStatusInput{}
}
output := &DescribeEnvironmentStatusOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeEnvironmentStatusRequest{Request: req, Input: input, Copy: c.DescribeEnvironmentStatusRequest}
}
const opDescribeEnvironments = "DescribeEnvironments"
// DescribeEnvironmentsRequest is a API request type for the DescribeEnvironments API operation.
type DescribeEnvironmentsRequest struct {
*aws.Request
Input *DescribeEnvironmentsInput
Copy func(*DescribeEnvironmentsInput) DescribeEnvironmentsRequest
}
// Send marshals and sends the DescribeEnvironments API request.
func (r DescribeEnvironmentsRequest) Send() (*DescribeEnvironmentsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeEnvironmentsOutput), nil
}
// DescribeEnvironmentsRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Gets information about AWS Cloud9 development environments.
//
// // Example sending a request using the DescribeEnvironmentsRequest method.
// req := client.DescribeEnvironmentsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironments
func (c *Cloud9) DescribeEnvironmentsRequest(input *DescribeEnvironmentsInput) DescribeEnvironmentsRequest {
op := &aws.Operation{
Name: opDescribeEnvironments,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeEnvironmentsInput{}
}
output := &DescribeEnvironmentsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeEnvironmentsRequest{Request: req, Input: input, Copy: c.DescribeEnvironmentsRequest}
}
const opListEnvironments = "ListEnvironments"
// ListEnvironmentsRequest is a API request type for the ListEnvironments API operation.
type ListEnvironmentsRequest struct {
*aws.Request
Input *ListEnvironmentsInput
Copy func(*ListEnvironmentsInput) ListEnvironmentsRequest
}
// Send marshals and sends the ListEnvironments API request.
func (r ListEnvironmentsRequest) Send() (*ListEnvironmentsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ListEnvironmentsOutput), nil
}
// ListEnvironmentsRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Gets a list of AWS Cloud9 development environment identifiers.
//
// // Example sending a request using the ListEnvironmentsRequest method.
// req := client.ListEnvironmentsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/ListEnvironments
func (c *Cloud9) ListEnvironmentsRequest(input *ListEnvironmentsInput) ListEnvironmentsRequest {
op := &aws.Operation{
Name: opListEnvironments,
HTTPMethod: "POST",
HTTPPath: "/",
Paginator: &aws.Paginator{
InputTokens: []string{"nextToken"},
OutputTokens: []string{"nextToken"},
LimitToken: "maxResults",
TruncationToken: "",
},
}
if input == nil {
input = &ListEnvironmentsInput{}
}
output := &ListEnvironmentsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ListEnvironmentsRequest{Request: req, Input: input, Copy: c.ListEnvironmentsRequest}
}
// Paginate pages iterates over the pages of a ListEnvironmentsRequest operation,
// calling the Next method for each page. Using the paginators Next
// method will depict whether or not there are more pages.
//
// Note: This operation can generate multiple requests to a service.
//
// // Example iterating over at most 3 pages of a ListEnvironments operation.
// req := client.ListEnvironmentsRequest(input)
// p := req.Paginate()
// for p.Next() {
// page := p.CurrentPage()
// }
//
// if err := p.Err(); err != nil {
// return err
// }
//
func (p *ListEnvironmentsRequest) Paginate(opts ...aws.Option) ListEnvironmentsPager {
return ListEnvironmentsPager{
Pager: aws.Pager{
NewRequest: func() (*aws.Request, error) {
var inCpy *ListEnvironmentsInput
if p.Input != nil {
tmp := *p.Input
inCpy = &tmp
}
req := p.Copy(inCpy)
req.ApplyOptions(opts...)
return req.Request, nil
},
},
}
}
// ListEnvironmentsPager is used to paginate the request. This can be done by
// calling Next and CurrentPage.
type ListEnvironmentsPager struct {
aws.Pager
}
func (p *ListEnvironmentsPager) CurrentPage() *ListEnvironmentsOutput {
return p.Pager.CurrentPage().(*ListEnvironmentsOutput)
}
const opUpdateEnvironment = "UpdateEnvironment"
// UpdateEnvironmentRequest is a API request type for the UpdateEnvironment API operation.
type UpdateEnvironmentRequest struct {
*aws.Request
Input *UpdateEnvironmentInput
Copy func(*UpdateEnvironmentInput) UpdateEnvironmentRequest
}
// Send marshals and sends the UpdateEnvironment API request.
func (r UpdateEnvironmentRequest) Send() (*UpdateEnvironmentOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateEnvironmentOutput), nil
}
// UpdateEnvironmentRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Changes the settings of an existing AWS Cloud9 development environment.
//
// // Example sending a request using the UpdateEnvironmentRequest method.
// req := client.UpdateEnvironmentRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironment
func (c *Cloud9) UpdateEnvironmentRequest(input *UpdateEnvironmentInput) UpdateEnvironmentRequest {
op := &aws.Operation{
Name: opUpdateEnvironment,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateEnvironmentInput{}
}
output := &UpdateEnvironmentOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateEnvironmentRequest{Request: req, Input: input, Copy: c.UpdateEnvironmentRequest}
}
const opUpdateEnvironmentMembership = "UpdateEnvironmentMembership"
// UpdateEnvironmentMembershipRequest is a API request type for the UpdateEnvironmentMembership API operation.
type UpdateEnvironmentMembershipRequest struct {
*aws.Request
Input *UpdateEnvironmentMembershipInput
Copy func(*UpdateEnvironmentMembershipInput) UpdateEnvironmentMembershipRequest
}
// Send marshals and sends the UpdateEnvironmentMembership API request.
func (r UpdateEnvironmentMembershipRequest) Send() (*UpdateEnvironmentMembershipOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*UpdateEnvironmentMembershipOutput), nil
}
// UpdateEnvironmentMembershipRequest returns a request value for making API operation for
// AWS Cloud9.
//
// Changes the settings of an existing environment member for an AWS Cloud9
// development environment.
//
// // Example sending a request using the UpdateEnvironmentMembershipRequest method.
// req := client.UpdateEnvironmentMembershipRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/UpdateEnvironmentMembership
func (c *Cloud9) UpdateEnvironmentMembershipRequest(input *UpdateEnvironmentMembershipInput) UpdateEnvironmentMembershipRequest {
op := &aws.Operation{
Name: opUpdateEnvironmentMembership,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &UpdateEnvironmentMembershipInput{}
}
output := &UpdateEnvironmentMembershipOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return UpdateEnvironmentMembershipRequest{Request: req, Input: input, Copy: c.UpdateEnvironmentMembershipRequest}
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2Request
type CreateEnvironmentEC2Input struct {
_ struct{} `type:"structure"`
// The number of minutes until the running instance is shut down after the environment
// has last been used.
AutomaticStopTimeMinutes *int64 `locationName:"automaticStopTimeMinutes" type:"integer"`
// A unique, case-sensitive string that helps AWS Cloud9 to ensure this operation
// completes no more than one time.
//
// For more information, see Client Tokens (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html)
// in the Amazon EC2 API Reference.
ClientRequestToken *string `locationName:"clientRequestToken" type:"string"`
// The description of the environment to create.
Description *string `locationName:"description" type:"string"`
// The type of instance to connect to the environment (for example, t2.micro).
//
// InstanceType is a required field
InstanceType *string `locationName:"instanceType" min:"5" type:"string" required:"true"`
// The name of the environment to create.
//
// This name is visible to other AWS IAM users in the same AWS account.
//
// Name is a required field
Name *string `locationName:"name" min:"1" type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the environment owner. This ARN can be
// the ARN of any AWS IAM principal. If this value is not specified, the ARN
// defaults to this environment's creator.
OwnerArn *string `locationName:"ownerArn" type:"string"`
// The ID of the subnet in Amazon VPC that AWS Cloud9 will use to communicate
// with the Amazon EC2 instance.
SubnetId *string `locationName:"subnetId" min:"5" type:"string"`
}
// String returns the string representation
func (s CreateEnvironmentEC2Input) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentEC2Input) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEnvironmentEC2Input) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateEnvironmentEC2Input"}
if s.InstanceType == nil {
invalidParams.Add(aws.NewErrParamRequired("InstanceType"))
}
if s.InstanceType != nil && len(*s.InstanceType) < 5 {
invalidParams.Add(aws.NewErrParamMinLen("InstanceType", 5))
}
if s.Name == nil {
invalidParams.Add(aws.NewErrParamRequired("Name"))
}
if s.Name != nil && len(*s.Name) < 1 {
invalidParams.Add(aws.NewErrParamMinLen("Name", 1))
}
if s.SubnetId != nil && len(*s.SubnetId) < 5 {
invalidParams.Add(aws.NewErrParamMinLen("SubnetId", 5))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentEC2Result
type CreateEnvironmentEC2Output struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// The ID of the environment that was created.
EnvironmentId *string `locationName:"environmentId" type:"string"`
}
// String returns the string representation
func (s CreateEnvironmentEC2Output) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentEC2Output) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s CreateEnvironmentEC2Output) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembershipRequest
type CreateEnvironmentMembershipInput struct {
_ struct{} `type:"structure"`
// The ID of the environment that contains the environment member you want to
// add.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The type of environment member permissions you want to associate with this
// environment member. Available values include:
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// Permissions is a required field
Permissions MemberPermissions `locationName:"permissions" type:"string" required:"true" enum:"true"`
// The Amazon Resource Name (ARN) of the environment member you want to add.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
}
// String returns the string representation
func (s CreateEnvironmentMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *CreateEnvironmentMembershipInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "CreateEnvironmentMembershipInput"}
if s.EnvironmentId == nil {
invalidParams.Add(aws.NewErrParamRequired("EnvironmentId"))
}
if len(s.Permissions) == 0 {
invalidParams.Add(aws.NewErrParamRequired("Permissions"))
}
if s.UserArn == nil {
invalidParams.Add(aws.NewErrParamRequired("UserArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/CreateEnvironmentMembershipResult
type CreateEnvironmentMembershipOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// Information about the environment member that was added.
Membership *EnvironmentMember `locationName:"membership" type:"structure"`
}
// String returns the string representation
func (s CreateEnvironmentMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s CreateEnvironmentMembershipOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s CreateEnvironmentMembershipOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentRequest
type DeleteEnvironmentInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to delete.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteEnvironmentInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEnvironmentInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DeleteEnvironmentInput"}
if s.EnvironmentId == nil {
invalidParams.Add(aws.NewErrParamRequired("EnvironmentId"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembershipRequest
type DeleteEnvironmentMembershipInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to delete the environment member from.
//
// EnvironmentId is a required field
EnvironmentId *string `locationName:"environmentId" type:"string" required:"true"`
// The Amazon Resource Name (ARN) of the environment member to delete from the
// environment.
//
// UserArn is a required field
UserArn *string `locationName:"userArn" type:"string" required:"true"`
}
// String returns the string representation
func (s DeleteEnvironmentMembershipInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentMembershipInput) GoString() string {
return s.String()
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DeleteEnvironmentMembershipInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DeleteEnvironmentMembershipInput"}
if s.EnvironmentId == nil {
invalidParams.Add(aws.NewErrParamRequired("EnvironmentId"))
}
if s.UserArn == nil {
invalidParams.Add(aws.NewErrParamRequired("UserArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentMembershipResult
type DeleteEnvironmentMembershipOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeleteEnvironmentMembershipOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentMembershipOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteEnvironmentMembershipOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DeleteEnvironmentResult
type DeleteEnvironmentOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
}
// String returns the string representation
func (s DeleteEnvironmentOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DeleteEnvironmentOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DeleteEnvironmentOutput) SDKResponseMetadata() aws.Response {
return s.responseMetadata
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMembershipsRequest
type DescribeEnvironmentMembershipsInput struct {
_ struct{} `type:"structure"`
// The ID of the environment to get environment member information about.
EnvironmentId *string `locationName:"environmentId" type:"string"`
// The maximum number of environment members to get information about.
MaxResults *int64 `locationName:"maxResults" type:"integer"`
// During a previous call, if there are more than 25 items in the list, only
// the first 25 items are returned, along with a unique string called a next
// token. To get the next batch of items in the list, call this operation again,
// adding the next token to the call. To get all of the items in the list, keep
// calling this operation with each subsequent next token that is returned,
// until no more next tokens are returned.
NextToken *string `locationName:"nextToken" type:"string"`
// The type of environment member permissions to get information about. Available
// values include:
//
// * owner: Owns the environment.
//
// * read-only: Has read-only access to the environment.
//
// * read-write: Has read-write access to the environment.
//
// If no value is specified, information about all environment members are returned.
Permissions []Permissions `locationName:"permissions" type:"list"`
// The Amazon Resource Name (ARN) of an individual environment member to get
// information about. If no value is specified, information about all environment
// members are returned.
UserArn *string `locationName:"userArn" type:"string"`
}
// String returns the string representation
func (s DescribeEnvironmentMembershipsInput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentMembershipsInput) GoString() string {
return s.String()
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/cloud9-2017-09-23/DescribeEnvironmentMembershipsResult
type DescribeEnvironmentMembershipsOutput struct {
_ struct{} `type:"structure"`
responseMetadata aws.Response
// Information about the environment members for the environment.
Memberships []EnvironmentMember `locationName:"memberships" type:"list"`
// If there are more than 25 items in the list, only the first 25 items are
// returned, along with a unique string called a next token. To get the next
// batch of items in the list, call this operation again, adding the next token
// to the call.
NextToken *string `locationName:"nextToken" type:"string"`
}
// String returns the string representation
func (s DescribeEnvironmentMembershipsOutput) String() string {
return awsutil.Prettify(s)
}
// GoString returns the string representation
func (s DescribeEnvironmentMembershipsOutput) GoString() string {
return s.String()
}
// SDKResponseMetdata return sthe response metadata for the API.
func (s DescribeEnvironmentMembershipsOutput) SDKResponseMetadata() aws.Response {