forked from aws/aws-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
8587 lines (6989 loc) · 286 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
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.
// Package iam provides a client for AWS Identity and Access Management.
package iam
import (
"sync"
"time"
"github.com/aws/aws-sdk-go/aws"
)
var oprw sync.Mutex
// AddClientIDToOpenIDConnectProviderRequest generates a request for the AddClientIDToOpenIDConnectProvider operation.
func (c *IAM) AddClientIDToOpenIDConnectProviderRequest(input *AddClientIDToOpenIDConnectProviderInput) (req *aws.Request, output *AddClientIDToOpenIDConnectProviderOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAddClientIDToOpenIDConnectProvider == nil {
opAddClientIDToOpenIDConnectProvider = &aws.Operation{
Name: "AddClientIDToOpenIDConnectProvider",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AddClientIDToOpenIDConnectProviderInput{}
}
req = c.newRequest(opAddClientIDToOpenIDConnectProvider, input, output)
output = &AddClientIDToOpenIDConnectProviderOutput{}
req.Data = output
return
}
// Adds a new client ID (also known as audience) to the list of client IDs already
// registered for the specified IAM OpenID Connect provider.
//
// This action is idempotent; it does not fail or return an error if you add
// an existing client ID to the provider.
func (c *IAM) AddClientIDToOpenIDConnectProvider(input *AddClientIDToOpenIDConnectProviderInput) (*AddClientIDToOpenIDConnectProviderOutput, error) {
req, out := c.AddClientIDToOpenIDConnectProviderRequest(input)
err := req.Send()
return out, err
}
var opAddClientIDToOpenIDConnectProvider *aws.Operation
// AddRoleToInstanceProfileRequest generates a request for the AddRoleToInstanceProfile operation.
func (c *IAM) AddRoleToInstanceProfileRequest(input *AddRoleToInstanceProfileInput) (req *aws.Request, output *AddRoleToInstanceProfileOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAddRoleToInstanceProfile == nil {
opAddRoleToInstanceProfile = &aws.Operation{
Name: "AddRoleToInstanceProfile",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AddRoleToInstanceProfileInput{}
}
req = c.newRequest(opAddRoleToInstanceProfile, input, output)
output = &AddRoleToInstanceProfileOutput{}
req.Data = output
return
}
// Adds the specified role to the specified instance profile. For more information
// about roles, go to Working with Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html).
// For more information about instance profiles, go to About Instance Profiles
// (http://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html).
func (c *IAM) AddRoleToInstanceProfile(input *AddRoleToInstanceProfileInput) (*AddRoleToInstanceProfileOutput, error) {
req, out := c.AddRoleToInstanceProfileRequest(input)
err := req.Send()
return out, err
}
var opAddRoleToInstanceProfile *aws.Operation
// AddUserToGroupRequest generates a request for the AddUserToGroup operation.
func (c *IAM) AddUserToGroupRequest(input *AddUserToGroupInput) (req *aws.Request, output *AddUserToGroupOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAddUserToGroup == nil {
opAddUserToGroup = &aws.Operation{
Name: "AddUserToGroup",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AddUserToGroupInput{}
}
req = c.newRequest(opAddUserToGroup, input, output)
output = &AddUserToGroupOutput{}
req.Data = output
return
}
// Adds the specified user to the specified group.
func (c *IAM) AddUserToGroup(input *AddUserToGroupInput) (*AddUserToGroupOutput, error) {
req, out := c.AddUserToGroupRequest(input)
err := req.Send()
return out, err
}
var opAddUserToGroup *aws.Operation
// AttachGroupPolicyRequest generates a request for the AttachGroupPolicy operation.
func (c *IAM) AttachGroupPolicyRequest(input *AttachGroupPolicyInput) (req *aws.Request, output *AttachGroupPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAttachGroupPolicy == nil {
opAttachGroupPolicy = &aws.Operation{
Name: "AttachGroupPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AttachGroupPolicyInput{}
}
req = c.newRequest(opAttachGroupPolicy, input, output)
output = &AttachGroupPolicyOutput{}
req.Data = output
return
}
// Attaches the specified managed policy to the specified group.
//
// You use this API to attach a managed policy to a group. To embed an inline
// policy in a group, use PutGroupPolicy.
//
// For more information about policies, refer to Managed Policies and Inline
// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
// in the Using IAM guide.
func (c *IAM) AttachGroupPolicy(input *AttachGroupPolicyInput) (*AttachGroupPolicyOutput, error) {
req, out := c.AttachGroupPolicyRequest(input)
err := req.Send()
return out, err
}
var opAttachGroupPolicy *aws.Operation
// AttachRolePolicyRequest generates a request for the AttachRolePolicy operation.
func (c *IAM) AttachRolePolicyRequest(input *AttachRolePolicyInput) (req *aws.Request, output *AttachRolePolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAttachRolePolicy == nil {
opAttachRolePolicy = &aws.Operation{
Name: "AttachRolePolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AttachRolePolicyInput{}
}
req = c.newRequest(opAttachRolePolicy, input, output)
output = &AttachRolePolicyOutput{}
req.Data = output
return
}
// Attaches the specified managed policy to the specified role.
//
// When you attach a managed policy to a role, the managed policy is used as
// the role's access (permissions) policy. You cannot use a managed policy as
// the role's trust policy. The role's trust policy is created at the same time
// as the role, using CreateRole. You can update a role's trust policy using
// UpdateAssumeRolePolicy.
//
// Use this API to attach a managed policy to a role. To embed an inline policy
// in a role, use PutRolePolicy. For more information about policies, refer
// to Managed Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
// in the Using IAM guide.
func (c *IAM) AttachRolePolicy(input *AttachRolePolicyInput) (*AttachRolePolicyOutput, error) {
req, out := c.AttachRolePolicyRequest(input)
err := req.Send()
return out, err
}
var opAttachRolePolicy *aws.Operation
// AttachUserPolicyRequest generates a request for the AttachUserPolicy operation.
func (c *IAM) AttachUserPolicyRequest(input *AttachUserPolicyInput) (req *aws.Request, output *AttachUserPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opAttachUserPolicy == nil {
opAttachUserPolicy = &aws.Operation{
Name: "AttachUserPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &AttachUserPolicyInput{}
}
req = c.newRequest(opAttachUserPolicy, input, output)
output = &AttachUserPolicyOutput{}
req.Data = output
return
}
// Attaches the specified managed policy to the specified user.
//
// You use this API to attach a managed policy to a user. To embed an inline
// policy in a user, use PutUserPolicy.
//
// For more information about policies, refer to Managed Policies and Inline
// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
// in the Using IAM guide.
func (c *IAM) AttachUserPolicy(input *AttachUserPolicyInput) (*AttachUserPolicyOutput, error) {
req, out := c.AttachUserPolicyRequest(input)
err := req.Send()
return out, err
}
var opAttachUserPolicy *aws.Operation
// ChangePasswordRequest generates a request for the ChangePassword operation.
func (c *IAM) ChangePasswordRequest(input *ChangePasswordInput) (req *aws.Request, output *ChangePasswordOutput) {
oprw.Lock()
defer oprw.Unlock()
if opChangePassword == nil {
opChangePassword = &aws.Operation{
Name: "ChangePassword",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &ChangePasswordInput{}
}
req = c.newRequest(opChangePassword, input, output)
output = &ChangePasswordOutput{}
req.Data = output
return
}
// Changes the password of the IAM user who is calling this action. The root
// account password is not affected by this action.
//
// To change the password for a different user, see UpdateLoginProfile. For
// more information about modifying passwords, see Managing Passwords (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html)
// in the Using IAM guide.
func (c *IAM) ChangePassword(input *ChangePasswordInput) (*ChangePasswordOutput, error) {
req, out := c.ChangePasswordRequest(input)
err := req.Send()
return out, err
}
var opChangePassword *aws.Operation
// CreateAccessKeyRequest generates a request for the CreateAccessKey operation.
func (c *IAM) CreateAccessKeyRequest(input *CreateAccessKeyInput) (req *aws.Request, output *CreateAccessKeyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateAccessKey == nil {
opCreateAccessKey = &aws.Operation{
Name: "CreateAccessKey",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateAccessKeyInput{}
}
req = c.newRequest(opCreateAccessKey, input, output)
output = &CreateAccessKeyOutput{}
req.Data = output
return
}
// Creates a new AWS secret access key and corresponding AWS access key ID for
// the specified user. The default status for new keys is Active.
//
// If you do not specify a user name, IAM determines the user name implicitly
// based on the AWS access key ID signing the request. Because this action works
// for access keys under the AWS account, you can use this action to manage
// root credentials even if the AWS account has no associated users.
//
// For information about limits on the number of keys you can create, see
// Limitations on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
//
// To ensure the security of your AWS account, the secret access key is accessible
// only during key and user creation. You must save the key (for example, in
// a text file) if you want to be able to access it again. If a secret key is
// lost, you can delete the access keys for the associated user and then create
// new keys.
func (c *IAM) CreateAccessKey(input *CreateAccessKeyInput) (*CreateAccessKeyOutput, error) {
req, out := c.CreateAccessKeyRequest(input)
err := req.Send()
return out, err
}
var opCreateAccessKey *aws.Operation
// CreateAccountAliasRequest generates a request for the CreateAccountAlias operation.
func (c *IAM) CreateAccountAliasRequest(input *CreateAccountAliasInput) (req *aws.Request, output *CreateAccountAliasOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateAccountAlias == nil {
opCreateAccountAlias = &aws.Operation{
Name: "CreateAccountAlias",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateAccountAliasInput{}
}
req = c.newRequest(opCreateAccountAlias, input, output)
output = &CreateAccountAliasOutput{}
req.Data = output
return
}
// Creates an alias for your AWS account. For information about using an AWS
// account alias, see Using an Alias for Your AWS Account ID (http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html)
// in the Using IAM guide.
func (c *IAM) CreateAccountAlias(input *CreateAccountAliasInput) (*CreateAccountAliasOutput, error) {
req, out := c.CreateAccountAliasRequest(input)
err := req.Send()
return out, err
}
var opCreateAccountAlias *aws.Operation
// CreateGroupRequest generates a request for the CreateGroup operation.
func (c *IAM) CreateGroupRequest(input *CreateGroupInput) (req *aws.Request, output *CreateGroupOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateGroup == nil {
opCreateGroup = &aws.Operation{
Name: "CreateGroup",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateGroupInput{}
}
req = c.newRequest(opCreateGroup, input, output)
output = &CreateGroupOutput{}
req.Data = output
return
}
// Creates a new group.
//
// For information about the number of groups you can create, see Limitations
// on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
func (c *IAM) CreateGroup(input *CreateGroupInput) (*CreateGroupOutput, error) {
req, out := c.CreateGroupRequest(input)
err := req.Send()
return out, err
}
var opCreateGroup *aws.Operation
// CreateInstanceProfileRequest generates a request for the CreateInstanceProfile operation.
func (c *IAM) CreateInstanceProfileRequest(input *CreateInstanceProfileInput) (req *aws.Request, output *CreateInstanceProfileOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateInstanceProfile == nil {
opCreateInstanceProfile = &aws.Operation{
Name: "CreateInstanceProfile",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateInstanceProfileInput{}
}
req = c.newRequest(opCreateInstanceProfile, input, output)
output = &CreateInstanceProfileOutput{}
req.Data = output
return
}
// Creates a new instance profile. For information about instance profiles,
// go to About Instance Profiles (http://docs.aws.amazon.com/IAM/latest/UserGuide/AboutInstanceProfiles.html).
//
// For information about the number of instance profiles you can create, see
// Limitations on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
func (c *IAM) CreateInstanceProfile(input *CreateInstanceProfileInput) (*CreateInstanceProfileOutput, error) {
req, out := c.CreateInstanceProfileRequest(input)
err := req.Send()
return out, err
}
var opCreateInstanceProfile *aws.Operation
// CreateLoginProfileRequest generates a request for the CreateLoginProfile operation.
func (c *IAM) CreateLoginProfileRequest(input *CreateLoginProfileInput) (req *aws.Request, output *CreateLoginProfileOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateLoginProfile == nil {
opCreateLoginProfile = &aws.Operation{
Name: "CreateLoginProfile",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateLoginProfileInput{}
}
req = c.newRequest(opCreateLoginProfile, input, output)
output = &CreateLoginProfileOutput{}
req.Data = output
return
}
// Creates a password for the specified user, giving the user the ability to
// access AWS services through the AWS Management Console. For more information
// about managing passwords, see Managing Passwords (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_ManagingLogins.html)
// in the Using IAM guide.
func (c *IAM) CreateLoginProfile(input *CreateLoginProfileInput) (*CreateLoginProfileOutput, error) {
req, out := c.CreateLoginProfileRequest(input)
err := req.Send()
return out, err
}
var opCreateLoginProfile *aws.Operation
// CreateOpenIDConnectProviderRequest generates a request for the CreateOpenIDConnectProvider operation.
func (c *IAM) CreateOpenIDConnectProviderRequest(input *CreateOpenIDConnectProviderInput) (req *aws.Request, output *CreateOpenIDConnectProviderOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateOpenIDConnectProvider == nil {
opCreateOpenIDConnectProvider = &aws.Operation{
Name: "CreateOpenIDConnectProvider",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateOpenIDConnectProviderInput{}
}
req = c.newRequest(opCreateOpenIDConnectProvider, input, output)
output = &CreateOpenIDConnectProviderOutput{}
req.Data = output
return
}
// Creates an IAM entity to describe an identity provider (IdP) that supports
// OpenID Connect (OIDC) (http://openid.net/connect/).
//
// The OIDC provider that you create with this operation can be used as a principal
// in a role's trust policy to establish a trust relationship between AWS and
// the OIDC provider.
//
// When you create the IAM OIDC provider, you specify the URL of the OIDC identity
// provider (IdP) to trust, a list of client IDs (also known as audiences) that
// identify the application or applications that are allowed to authenticate
// using the OIDC provider, and a list of thumbprints of the server certificate(s)
// that the IdP uses. You get all of this information from the OIDC IdP that
// you want to use for access to AWS.
//
// Because trust for the OIDC provider is ultimately derived from the IAM provider
// that this action creates, it is a best practice to limit access to the CreateOpenIDConnectProvider
// action to highly-privileged users.
func (c *IAM) CreateOpenIDConnectProvider(input *CreateOpenIDConnectProviderInput) (*CreateOpenIDConnectProviderOutput, error) {
req, out := c.CreateOpenIDConnectProviderRequest(input)
err := req.Send()
return out, err
}
var opCreateOpenIDConnectProvider *aws.Operation
// CreatePolicyRequest generates a request for the CreatePolicy operation.
func (c *IAM) CreatePolicyRequest(input *CreatePolicyInput) (req *aws.Request, output *CreatePolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreatePolicy == nil {
opCreatePolicy = &aws.Operation{
Name: "CreatePolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreatePolicyInput{}
}
req = c.newRequest(opCreatePolicy, input, output)
output = &CreatePolicyOutput{}
req.Data = output
return
}
// Creates a new managed policy for your AWS account.
//
// This operation creates a policy version with a version identifier of v1
// and sets v1 as the policy's default version. For more information about policy
// versions, see Versioning for Managed Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html)
// in the Using IAM guide.
//
// For more information about managed policies in general, refer to Managed
// Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
// in the Using IAM guide.
func (c *IAM) CreatePolicy(input *CreatePolicyInput) (*CreatePolicyOutput, error) {
req, out := c.CreatePolicyRequest(input)
err := req.Send()
return out, err
}
var opCreatePolicy *aws.Operation
// CreatePolicyVersionRequest generates a request for the CreatePolicyVersion operation.
func (c *IAM) CreatePolicyVersionRequest(input *CreatePolicyVersionInput) (req *aws.Request, output *CreatePolicyVersionOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreatePolicyVersion == nil {
opCreatePolicyVersion = &aws.Operation{
Name: "CreatePolicyVersion",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreatePolicyVersionInput{}
}
req = c.newRequest(opCreatePolicyVersion, input, output)
output = &CreatePolicyVersionOutput{}
req.Data = output
return
}
// Creates a new version of the specified managed policy. To update a managed
// policy, you create a new policy version. A managed policy can have up to
// five versions. If the policy has five versions, you must delete an existing
// version using DeletePolicyVersion before you create a new version.
//
// Optionally, you can set the new version as the policy's default version.
// The default version is the operative version; that is, the version that is
// in effect for the IAM users, groups, and roles that the policy is attached
// to.
//
// For more information about managed policy versions, see Versioning for Managed
// Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-versions.html)
// in the Using IAM guide.
func (c *IAM) CreatePolicyVersion(input *CreatePolicyVersionInput) (*CreatePolicyVersionOutput, error) {
req, out := c.CreatePolicyVersionRequest(input)
err := req.Send()
return out, err
}
var opCreatePolicyVersion *aws.Operation
// CreateRoleRequest generates a request for the CreateRole operation.
func (c *IAM) CreateRoleRequest(input *CreateRoleInput) (req *aws.Request, output *CreateRoleOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateRole == nil {
opCreateRole = &aws.Operation{
Name: "CreateRole",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateRoleInput{}
}
req = c.newRequest(opCreateRole, input, output)
output = &CreateRoleOutput{}
req.Data = output
return
}
// Creates a new role for your AWS account. For more information about roles,
// go to Working with Roles (http://docs.aws.amazon.com/IAM/latest/UserGuide/WorkingWithRoles.html).
// For information about limitations on role names and the number of roles you
// can create, go to Limitations on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
//
// The policy in the following example grants permission to an EC2 instance
// to assume the role.
func (c *IAM) CreateRole(input *CreateRoleInput) (*CreateRoleOutput, error) {
req, out := c.CreateRoleRequest(input)
err := req.Send()
return out, err
}
var opCreateRole *aws.Operation
// CreateSAMLProviderRequest generates a request for the CreateSAMLProvider operation.
func (c *IAM) CreateSAMLProviderRequest(input *CreateSAMLProviderInput) (req *aws.Request, output *CreateSAMLProviderOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateSAMLProvider == nil {
opCreateSAMLProvider = &aws.Operation{
Name: "CreateSAMLProvider",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateSAMLProviderInput{}
}
req = c.newRequest(opCreateSAMLProvider, input, output)
output = &CreateSAMLProviderOutput{}
req.Data = output
return
}
// Creates an IAM entity to describe an identity provider (IdP) that supports
// SAML 2.0.
//
// The SAML provider that you create with this operation can be used as a
// principal in a role's trust policy to establish a trust relationship between
// AWS and a SAML identity provider. You can create an IAM role that supports
// Web-based single sign-on (SSO) to the AWS Management Console or one that
// supports API access to AWS.
//
// When you create the SAML provider, you upload an a SAML metadata document
// that you get from your IdP and that includes the issuer's name, expiration
// information, and keys that can be used to validate the SAML authentication
// response (assertions) that are received from the IdP. You must generate the
// metadata document using the identity management software that is used as
// your organization's IdP.
//
// This operation requires Signature Version 4 (http://docs.aws.amazon.com/general/latest/gr/signature-version-4.html).
// For more information, see Giving Console Access Using SAML (http://docs.aws.amazon.com/STS/latest/UsingSTS/STSMgmtConsole-SAML.html)
// and Creating Temporary Security Credentials for SAML Federation (http://docs.aws.amazon.com/STS/latest/UsingSTS/CreatingSAML.html)
// in the Using Temporary Credentials guide.
func (c *IAM) CreateSAMLProvider(input *CreateSAMLProviderInput) (*CreateSAMLProviderOutput, error) {
req, out := c.CreateSAMLProviderRequest(input)
err := req.Send()
return out, err
}
var opCreateSAMLProvider *aws.Operation
// CreateUserRequest generates a request for the CreateUser operation.
func (c *IAM) CreateUserRequest(input *CreateUserInput) (req *aws.Request, output *CreateUserOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateUser == nil {
opCreateUser = &aws.Operation{
Name: "CreateUser",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateUserInput{}
}
req = c.newRequest(opCreateUser, input, output)
output = &CreateUserOutput{}
req.Data = output
return
}
// Creates a new user for your AWS account.
//
// For information about limitations on the number of users you can create,
// see Limitations on IAM Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
func (c *IAM) CreateUser(input *CreateUserInput) (*CreateUserOutput, error) {
req, out := c.CreateUserRequest(input)
err := req.Send()
return out, err
}
var opCreateUser *aws.Operation
// CreateVirtualMFADeviceRequest generates a request for the CreateVirtualMFADevice operation.
func (c *IAM) CreateVirtualMFADeviceRequest(input *CreateVirtualMFADeviceInput) (req *aws.Request, output *CreateVirtualMFADeviceOutput) {
oprw.Lock()
defer oprw.Unlock()
if opCreateVirtualMFADevice == nil {
opCreateVirtualMFADevice = &aws.Operation{
Name: "CreateVirtualMFADevice",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &CreateVirtualMFADeviceInput{}
}
req = c.newRequest(opCreateVirtualMFADevice, input, output)
output = &CreateVirtualMFADeviceOutput{}
req.Data = output
return
}
// Creates a new virtual MFA device for the AWS account. After creating the
// virtual MFA, use EnableMFADevice to attach the MFA device to an IAM user.
// For more information about creating and working with virtual MFA devices,
// go to Using a Virtual MFA Device (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html)
// in the Using IAM guide.
//
// For information about limits on the number of MFA devices you can create,
// see Limitations on Entities (http://docs.aws.amazon.com/IAM/latest/UserGuide/LimitationsOnEntities.html)
// in the Using IAM guide.
//
// The seed information contained in the QR code and the Base32 string should
// be treated like any other secret access information, such as your AWS access
// keys or your passwords. After you provision your virtual device, you should
// ensure that the information is destroyed following secure procedures.
func (c *IAM) CreateVirtualMFADevice(input *CreateVirtualMFADeviceInput) (*CreateVirtualMFADeviceOutput, error) {
req, out := c.CreateVirtualMFADeviceRequest(input)
err := req.Send()
return out, err
}
var opCreateVirtualMFADevice *aws.Operation
// DeactivateMFADeviceRequest generates a request for the DeactivateMFADevice operation.
func (c *IAM) DeactivateMFADeviceRequest(input *DeactivateMFADeviceInput) (req *aws.Request, output *DeactivateMFADeviceOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeactivateMFADevice == nil {
opDeactivateMFADevice = &aws.Operation{
Name: "DeactivateMFADevice",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeactivateMFADeviceInput{}
}
req = c.newRequest(opDeactivateMFADevice, input, output)
output = &DeactivateMFADeviceOutput{}
req.Data = output
return
}
// Deactivates the specified MFA device and removes it from association with
// the user name for which it was originally enabled.
//
// For more information about creating and working with virtual MFA devices,
// go to Using a Virtual MFA Device (http://docs.aws.amazon.com/IAM/latest/UserGuide/Using_VirtualMFA.html)
// in the Using IAM guide.
func (c *IAM) DeactivateMFADevice(input *DeactivateMFADeviceInput) (*DeactivateMFADeviceOutput, error) {
req, out := c.DeactivateMFADeviceRequest(input)
err := req.Send()
return out, err
}
var opDeactivateMFADevice *aws.Operation
// DeleteAccessKeyRequest generates a request for the DeleteAccessKey operation.
func (c *IAM) DeleteAccessKeyRequest(input *DeleteAccessKeyInput) (req *aws.Request, output *DeleteAccessKeyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteAccessKey == nil {
opDeleteAccessKey = &aws.Operation{
Name: "DeleteAccessKey",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteAccessKeyInput{}
}
req = c.newRequest(opDeleteAccessKey, input, output)
output = &DeleteAccessKeyOutput{}
req.Data = output
return
}
// Deletes the access key associated with the specified user.
//
// If you do not specify a user name, IAM determines the user name implicitly
// based on the AWS access key ID signing the request. Because this action works
// for access keys under the AWS account, you can use this action to manage
// root credentials even if the AWS account has no associated users.
func (c *IAM) DeleteAccessKey(input *DeleteAccessKeyInput) (*DeleteAccessKeyOutput, error) {
req, out := c.DeleteAccessKeyRequest(input)
err := req.Send()
return out, err
}
var opDeleteAccessKey *aws.Operation
// DeleteAccountAliasRequest generates a request for the DeleteAccountAlias operation.
func (c *IAM) DeleteAccountAliasRequest(input *DeleteAccountAliasInput) (req *aws.Request, output *DeleteAccountAliasOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteAccountAlias == nil {
opDeleteAccountAlias = &aws.Operation{
Name: "DeleteAccountAlias",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteAccountAliasInput{}
}
req = c.newRequest(opDeleteAccountAlias, input, output)
output = &DeleteAccountAliasOutput{}
req.Data = output
return
}
// Deletes the specified AWS account alias. For information about using an AWS
// account alias, see Using an Alias for Your AWS Account ID (http://docs.aws.amazon.com/IAM/latest/UserGuide/AccountAlias.html)
// in the Using IAM guide.
func (c *IAM) DeleteAccountAlias(input *DeleteAccountAliasInput) (*DeleteAccountAliasOutput, error) {
req, out := c.DeleteAccountAliasRequest(input)
err := req.Send()
return out, err
}
var opDeleteAccountAlias *aws.Operation
// DeleteAccountPasswordPolicyRequest generates a request for the DeleteAccountPasswordPolicy operation.
func (c *IAM) DeleteAccountPasswordPolicyRequest(input *DeleteAccountPasswordPolicyInput) (req *aws.Request, output *DeleteAccountPasswordPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteAccountPasswordPolicy == nil {
opDeleteAccountPasswordPolicy = &aws.Operation{
Name: "DeleteAccountPasswordPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteAccountPasswordPolicyInput{}
}
req = c.newRequest(opDeleteAccountPasswordPolicy, input, output)
output = &DeleteAccountPasswordPolicyOutput{}
req.Data = output
return
}
// Deletes the password policy for the AWS account.
func (c *IAM) DeleteAccountPasswordPolicy(input *DeleteAccountPasswordPolicyInput) (*DeleteAccountPasswordPolicyOutput, error) {
req, out := c.DeleteAccountPasswordPolicyRequest(input)
err := req.Send()
return out, err
}
var opDeleteAccountPasswordPolicy *aws.Operation
// DeleteGroupRequest generates a request for the DeleteGroup operation.
func (c *IAM) DeleteGroupRequest(input *DeleteGroupInput) (req *aws.Request, output *DeleteGroupOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteGroup == nil {
opDeleteGroup = &aws.Operation{
Name: "DeleteGroup",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteGroupInput{}
}
req = c.newRequest(opDeleteGroup, input, output)
output = &DeleteGroupOutput{}
req.Data = output
return
}
// Deletes the specified group. The group must not contain any users or have
// any attached policies.
func (c *IAM) DeleteGroup(input *DeleteGroupInput) (*DeleteGroupOutput, error) {
req, out := c.DeleteGroupRequest(input)
err := req.Send()
return out, err
}
var opDeleteGroup *aws.Operation
// DeleteGroupPolicyRequest generates a request for the DeleteGroupPolicy operation.
func (c *IAM) DeleteGroupPolicyRequest(input *DeleteGroupPolicyInput) (req *aws.Request, output *DeleteGroupPolicyOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteGroupPolicy == nil {
opDeleteGroupPolicy = &aws.Operation{
Name: "DeleteGroupPolicy",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteGroupPolicyInput{}
}
req = c.newRequest(opDeleteGroupPolicy, input, output)
output = &DeleteGroupPolicyOutput{}
req.Data = output
return
}
// Deletes the specified inline policy that is embedded in the specified group.
//
// A group can also have managed policies attached to it. To detach a managed
// policy from a group, use DetachGroupPolicy. For more information about policies,
// refer to Managed Policies and Inline Policies (http://docs.aws.amazon.com/IAM/latest/UserGuide/policies-managed-vs-inline.html)
// in the Using IAM guide.
func (c *IAM) DeleteGroupPolicy(input *DeleteGroupPolicyInput) (*DeleteGroupPolicyOutput, error) {
req, out := c.DeleteGroupPolicyRequest(input)
err := req.Send()
return out, err
}
var opDeleteGroupPolicy *aws.Operation
// DeleteInstanceProfileRequest generates a request for the DeleteInstanceProfile operation.
func (c *IAM) DeleteInstanceProfileRequest(input *DeleteInstanceProfileInput) (req *aws.Request, output *DeleteInstanceProfileOutput) {
oprw.Lock()
defer oprw.Unlock()
if opDeleteInstanceProfile == nil {
opDeleteInstanceProfile = &aws.Operation{
Name: "DeleteInstanceProfile",
HTTPMethod: "POST",
HTTPPath: "/",
}
}
if input == nil {
input = &DeleteInstanceProfileInput{}
}
req = c.newRequest(opDeleteInstanceProfile, input, output)
output = &DeleteInstanceProfileOutput{}
req.Data = output
return