aws-sdk-iam 1.0.0.rc7 → 1.0.0.rc8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aws-sdk-iam.rb +1 -1
- data/lib/aws-sdk-iam/client.rb +853 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7672f19f795cc9aca1608faf651f6e9cad291fb7
|
4
|
+
data.tar.gz: ea0a7cb53978b1be85fb91f3f4dc3b0543f2b8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 578feb90db94cabc817b1b66988df7762d397b30534ed2379068447360609b90daeb661a76e6436c87735f913f260874ec4fd9e174c4da7d5b653f447a701740
|
7
|
+
data.tar.gz: 0e6de408a95921c652a9da5113e472699b29a74e981404d009c235e36ecb72cefe2adae8cacef5b8993e1591aa9b5447a1119bb48fc9f889b2d2825e5952655c
|
data/lib/aws-sdk-iam.rb
CHANGED
data/lib/aws-sdk-iam/client.rb
CHANGED
@@ -163,6 +163,16 @@ module Aws::IAM
|
|
163
163
|
#
|
164
164
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
165
165
|
#
|
166
|
+
#
|
167
|
+
# @example Example: To add a client ID (audience) to an Open-ID Connect (OIDC) provider
|
168
|
+
#
|
169
|
+
# # The following add-client-id-to-open-id-connect-provider command adds the client ID my-application-ID to the OIDC provider named server.example.com:
|
170
|
+
#
|
171
|
+
# resp = client.add_client_id_to_open_id_connect_provider({
|
172
|
+
# client_id: "my-application-ID",
|
173
|
+
# open_id_connect_provider_arn: "arn:aws:iam::123456789012:oidc-provider/server.example.com",
|
174
|
+
# })
|
175
|
+
#
|
166
176
|
# @example Request syntax with placeholder values
|
167
177
|
#
|
168
178
|
# resp = client.add_client_id_to_open_id_connect_provider({
|
@@ -223,6 +233,16 @@ module Aws::IAM
|
|
223
233
|
#
|
224
234
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
225
235
|
#
|
236
|
+
#
|
237
|
+
# @example Example: To add a role to an instance profile
|
238
|
+
#
|
239
|
+
# # The following command adds the role named S3Access to the instance profile named Webserver:
|
240
|
+
#
|
241
|
+
# resp = client.add_role_to_instance_profile({
|
242
|
+
# instance_profile_name: "Webserver",
|
243
|
+
# role_name: "S3Access",
|
244
|
+
# })
|
245
|
+
#
|
226
246
|
# @example Request syntax with placeholder values
|
227
247
|
#
|
228
248
|
# resp = client.add_role_to_instance_profile({
|
@@ -267,6 +287,16 @@ module Aws::IAM
|
|
267
287
|
#
|
268
288
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
269
289
|
#
|
290
|
+
#
|
291
|
+
# @example Example: To add a user to an IAM group
|
292
|
+
#
|
293
|
+
# # The following command adds an IAM user named Bob to the IAM group named Admins:
|
294
|
+
#
|
295
|
+
# resp = client.add_user_to_group({
|
296
|
+
# group_name: "Admins",
|
297
|
+
# user_name: "Bob",
|
298
|
+
# })
|
299
|
+
#
|
270
300
|
# @example Request syntax with placeholder values
|
271
301
|
#
|
272
302
|
# resp = client.add_user_to_group({
|
@@ -320,6 +350,16 @@ module Aws::IAM
|
|
320
350
|
#
|
321
351
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
322
352
|
#
|
353
|
+
#
|
354
|
+
# @example Example: To attach a managed policy to an IAM group
|
355
|
+
#
|
356
|
+
# # The following command attaches the AWS managed policy named ReadOnlyAccess to the IAM group named Finance.
|
357
|
+
#
|
358
|
+
# resp = client.attach_group_policy({
|
359
|
+
# group_name: "Finance",
|
360
|
+
# policy_arn: "arn:aws:iam::aws:policy/ReadOnlyAccess",
|
361
|
+
# })
|
362
|
+
#
|
323
363
|
# @example Request syntax with placeholder values
|
324
364
|
#
|
325
365
|
# resp = client.attach_group_policy({
|
@@ -380,6 +420,16 @@ module Aws::IAM
|
|
380
420
|
#
|
381
421
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
382
422
|
#
|
423
|
+
#
|
424
|
+
# @example Example: To attach a managed policy to an IAM role
|
425
|
+
#
|
426
|
+
# # The following command attaches the AWS managed policy named ReadOnlyAccess to the IAM role named ReadOnlyRole.
|
427
|
+
#
|
428
|
+
# resp = client.attach_role_policy({
|
429
|
+
# policy_arn: "arn:aws:iam::aws:policy/ReadOnlyAccess",
|
430
|
+
# role_name: "ReadOnlyRole",
|
431
|
+
# })
|
432
|
+
#
|
383
433
|
# @example Request syntax with placeholder values
|
384
434
|
#
|
385
435
|
# resp = client.attach_role_policy({
|
@@ -433,6 +483,16 @@ module Aws::IAM
|
|
433
483
|
#
|
434
484
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
435
485
|
#
|
486
|
+
#
|
487
|
+
# @example Example: To attach a managed policy to an IAM user
|
488
|
+
#
|
489
|
+
# # The following command attaches the AWS managed policy named AdministratorAccess to the IAM user named Alice.
|
490
|
+
#
|
491
|
+
# resp = client.attach_user_policy({
|
492
|
+
# policy_arn: "arn:aws:iam::aws:policy/AdministratorAccess",
|
493
|
+
# user_name: "Alice",
|
494
|
+
# })
|
495
|
+
#
|
436
496
|
# @example Request syntax with placeholder values
|
437
497
|
#
|
438
498
|
# resp = client.attach_user_policy({
|
@@ -482,6 +542,16 @@ module Aws::IAM
|
|
482
542
|
#
|
483
543
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
484
544
|
#
|
545
|
+
#
|
546
|
+
# @example Example: To change the password for your IAM user
|
547
|
+
#
|
548
|
+
# # The following command changes the password for the current IAM user.
|
549
|
+
#
|
550
|
+
# resp = client.change_password({
|
551
|
+
# new_password: "]35d/{pB9Fo9wJ",
|
552
|
+
# old_password: "3s0K_;xh4~8XXI",
|
553
|
+
# })
|
554
|
+
#
|
485
555
|
# @example Request syntax with placeholder values
|
486
556
|
#
|
487
557
|
# resp = client.change_password({
|
@@ -537,6 +607,26 @@ module Aws::IAM
|
|
537
607
|
#
|
538
608
|
# * {Types::CreateAccessKeyResponse#access_key #access_key} => Types::AccessKey
|
539
609
|
#
|
610
|
+
#
|
611
|
+
# @example Example: To create an access key for an IAM user
|
612
|
+
#
|
613
|
+
# # The following command creates an access key (access key ID and secret access key) for the IAM user named Bob.
|
614
|
+
#
|
615
|
+
# resp = client.create_access_key({
|
616
|
+
# user_name: "Bob",
|
617
|
+
# })
|
618
|
+
#
|
619
|
+
# resp.to_h outputs the following:
|
620
|
+
# {
|
621
|
+
# access_key: {
|
622
|
+
# access_key_id: "AKIAIOSFODNN7EXAMPLE",
|
623
|
+
# create_date: Time.parse("2015-03-09T18:39:23.411Z"),
|
624
|
+
# secret_access_key: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYzEXAMPLEKEY",
|
625
|
+
# status: "Active",
|
626
|
+
# user_name: "Bob",
|
627
|
+
# },
|
628
|
+
# }
|
629
|
+
#
|
540
630
|
# @example Request syntax with placeholder values
|
541
631
|
#
|
542
632
|
# resp = client.create_access_key({
|
@@ -582,6 +672,15 @@ module Aws::IAM
|
|
582
672
|
#
|
583
673
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
584
674
|
#
|
675
|
+
#
|
676
|
+
# @example Example: To create an account alias
|
677
|
+
#
|
678
|
+
# # The following command associates the alias examplecorp to your AWS account.
|
679
|
+
#
|
680
|
+
# resp = client.create_account_alias({
|
681
|
+
# account_alias: "examplecorp",
|
682
|
+
# })
|
683
|
+
#
|
585
684
|
# @example Request syntax with placeholder values
|
586
685
|
#
|
587
686
|
# resp = client.create_account_alias({
|
@@ -644,6 +743,26 @@ module Aws::IAM
|
|
644
743
|
#
|
645
744
|
# * {Types::CreateGroupResponse#group #group} => Types::Group
|
646
745
|
#
|
746
|
+
#
|
747
|
+
# @example Example: To create an IAM group
|
748
|
+
#
|
749
|
+
# # The following command creates an IAM group named Admins.
|
750
|
+
#
|
751
|
+
# resp = client.create_group({
|
752
|
+
# group_name: "Admins",
|
753
|
+
# })
|
754
|
+
#
|
755
|
+
# resp.to_h outputs the following:
|
756
|
+
# {
|
757
|
+
# group: {
|
758
|
+
# arn: "arn:aws:iam::123456789012:group/Admins",
|
759
|
+
# create_date: Time.parse("2015-03-09T20:30:24.940Z"),
|
760
|
+
# group_id: "AIDGPMS9RO4H3FEXAMPLE",
|
761
|
+
# group_name: "Admins",
|
762
|
+
# path: "/",
|
763
|
+
# },
|
764
|
+
# }
|
765
|
+
#
|
647
766
|
# @example Request syntax with placeholder values
|
648
767
|
#
|
649
768
|
# resp = client.create_group({
|
@@ -714,6 +833,28 @@ module Aws::IAM
|
|
714
833
|
#
|
715
834
|
# * {Types::CreateInstanceProfileResponse#instance_profile #instance_profile} => Types::InstanceProfile
|
716
835
|
#
|
836
|
+
#
|
837
|
+
# @example Example: To create an instance profile
|
838
|
+
#
|
839
|
+
# # The following command creates an instance profile named Webserver that is ready to have a role attached and then be associated with an EC2 instance.
|
840
|
+
#
|
841
|
+
# resp = client.create_instance_profile({
|
842
|
+
# instance_profile_name: "Webserver",
|
843
|
+
# })
|
844
|
+
#
|
845
|
+
# resp.to_h outputs the following:
|
846
|
+
# {
|
847
|
+
# instance_profile: {
|
848
|
+
# arn: "arn:aws:iam::123456789012:instance-profile/Webserver",
|
849
|
+
# create_date: Time.parse("2015-03-09T20:33:19.626Z"),
|
850
|
+
# instance_profile_id: "AIPAJMBYC7DLSPEXAMPLE",
|
851
|
+
# instance_profile_name: "Webserver",
|
852
|
+
# path: "/",
|
853
|
+
# roles: [
|
854
|
+
# ],
|
855
|
+
# },
|
856
|
+
# }
|
857
|
+
#
|
717
858
|
# @example Request syntax with placeholder values
|
718
859
|
#
|
719
860
|
# resp = client.create_instance_profile({
|
@@ -792,6 +933,26 @@ module Aws::IAM
|
|
792
933
|
#
|
793
934
|
# * {Types::CreateLoginProfileResponse#login_profile #login_profile} => Types::LoginProfile
|
794
935
|
#
|
936
|
+
#
|
937
|
+
# @example Example: To create an instance profile
|
938
|
+
#
|
939
|
+
# # The following command changes IAM user Bob's password and sets the flag that required Bob to change the password the next time he signs in.
|
940
|
+
#
|
941
|
+
# resp = client.create_login_profile({
|
942
|
+
# password: "h]6EszR}vJ*m",
|
943
|
+
# password_reset_required: true,
|
944
|
+
# user_name: "Bob",
|
945
|
+
# })
|
946
|
+
#
|
947
|
+
# resp.to_h outputs the following:
|
948
|
+
# {
|
949
|
+
# login_profile: {
|
950
|
+
# create_date: Time.parse("2015-03-10T20:55:40.274Z"),
|
951
|
+
# password_reset_required: true,
|
952
|
+
# user_name: "Bob",
|
953
|
+
# },
|
954
|
+
# }
|
955
|
+
#
|
795
956
|
# @example Request syntax with placeholder values
|
796
957
|
#
|
797
958
|
# resp = client.create_login_profile({
|
@@ -898,6 +1059,26 @@ module Aws::IAM
|
|
898
1059
|
#
|
899
1060
|
# * {Types::CreateOpenIDConnectProviderResponse#open_id_connect_provider_arn #open_id_connect_provider_arn} => String
|
900
1061
|
#
|
1062
|
+
#
|
1063
|
+
# @example Example: To create an instance profile
|
1064
|
+
#
|
1065
|
+
# # The following example defines a new OIDC provider in IAM with a client ID of my-application-id and pointing at the server with a URL of https://server.example.com.
|
1066
|
+
#
|
1067
|
+
# resp = client.create_open_id_connect_provider({
|
1068
|
+
# client_id_list: [
|
1069
|
+
# "my-application-id",
|
1070
|
+
# ],
|
1071
|
+
# thumbprint_list: [
|
1072
|
+
# "3768084dfb3d2b68b7897bf5f565da8efEXAMPLE",
|
1073
|
+
# ],
|
1074
|
+
# url: "https://server.example.com",
|
1075
|
+
# })
|
1076
|
+
#
|
1077
|
+
# resp.to_h outputs the following:
|
1078
|
+
# {
|
1079
|
+
# open_id_connect_provider_arn: "arn:aws:iam::123456789012:oidc-provider/server.example.com",
|
1080
|
+
# }
|
1081
|
+
#
|
901
1082
|
# @example Request syntax with placeholder values
|
902
1083
|
#
|
903
1084
|
# resp = client.create_open_id_connect_provider({
|
@@ -1182,6 +1363,29 @@ module Aws::IAM
|
|
1182
1363
|
#
|
1183
1364
|
# * {Types::CreateRoleResponse#role #role} => Types::Role
|
1184
1365
|
#
|
1366
|
+
#
|
1367
|
+
# @example Example: To create an IAM role
|
1368
|
+
#
|
1369
|
+
# # The following command creates a role named Test-Role and attaches a trust policy to it that is provided as a URL-encoded JSON string.
|
1370
|
+
#
|
1371
|
+
# resp = client.create_role({
|
1372
|
+
# assume_role_policy_document: "<URL-encoded-JSON>",
|
1373
|
+
# path: "/",
|
1374
|
+
# role_name: "Test-Role",
|
1375
|
+
# })
|
1376
|
+
#
|
1377
|
+
# resp.to_h outputs the following:
|
1378
|
+
# {
|
1379
|
+
# role: {
|
1380
|
+
# arn: "arn:aws:iam::123456789012:role/Test-Role",
|
1381
|
+
# assume_role_policy_document: "<URL-encoded-JSON>",
|
1382
|
+
# create_date: Time.parse("2013-06-07T20:43:32.821Z"),
|
1383
|
+
# path: "/",
|
1384
|
+
# role_id: "AKIAIOSFODNN7EXAMPLE",
|
1385
|
+
# role_name: "Test-Role",
|
1386
|
+
# },
|
1387
|
+
# }
|
1388
|
+
#
|
1185
1389
|
# @example Request syntax with placeholder values
|
1186
1390
|
#
|
1187
1391
|
# resp = client.create_role({
|
@@ -1469,6 +1673,26 @@ module Aws::IAM
|
|
1469
1673
|
#
|
1470
1674
|
# * {Types::CreateUserResponse#user #user} => Types::User
|
1471
1675
|
#
|
1676
|
+
#
|
1677
|
+
# @example Example: To create an IAM user
|
1678
|
+
#
|
1679
|
+
# # The following create-user command creates an IAM user named Bob in the current account.
|
1680
|
+
#
|
1681
|
+
# resp = client.create_user({
|
1682
|
+
# user_name: "Bob",
|
1683
|
+
# })
|
1684
|
+
#
|
1685
|
+
# resp.to_h outputs the following:
|
1686
|
+
# {
|
1687
|
+
# user: {
|
1688
|
+
# arn: "arn:aws:iam::123456789012:user/Bob",
|
1689
|
+
# create_date: Time.parse("2013-06-08T03:20:41.270Z"),
|
1690
|
+
# path: "/",
|
1691
|
+
# user_id: "AKIAIOSFODNN7EXAMPLE",
|
1692
|
+
# user_name: "Bob",
|
1693
|
+
# },
|
1694
|
+
# }
|
1695
|
+
#
|
1472
1696
|
# @example Request syntax with placeholder values
|
1473
1697
|
#
|
1474
1698
|
# resp = client.create_user({
|
@@ -1667,6 +1891,16 @@ module Aws::IAM
|
|
1667
1891
|
#
|
1668
1892
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1669
1893
|
#
|
1894
|
+
#
|
1895
|
+
# @example Example: To delete an access key for an IAM user
|
1896
|
+
#
|
1897
|
+
# # The following command deletes one access key (access key ID and secret access key) assigned to the IAM user named Bob.
|
1898
|
+
#
|
1899
|
+
# resp = client.delete_access_key({
|
1900
|
+
# access_key_id: "AKIDPMS9RO4H3FEXAMPLE",
|
1901
|
+
# user_name: "Bob",
|
1902
|
+
# })
|
1903
|
+
#
|
1670
1904
|
# @example Request syntax with placeholder values
|
1671
1905
|
#
|
1672
1906
|
# resp = client.delete_access_key({
|
@@ -1705,6 +1939,15 @@ module Aws::IAM
|
|
1705
1939
|
#
|
1706
1940
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1707
1941
|
#
|
1942
|
+
#
|
1943
|
+
# @example Example: To delete an account alias
|
1944
|
+
#
|
1945
|
+
# # The following command removes the alias mycompany from the current AWS account:
|
1946
|
+
#
|
1947
|
+
# resp = client.delete_account_alias({
|
1948
|
+
# account_alias: "mycompany",
|
1949
|
+
# })
|
1950
|
+
#
|
1708
1951
|
# @example Request syntax with placeholder values
|
1709
1952
|
#
|
1710
1953
|
# resp = client.delete_account_alias({
|
@@ -1725,6 +1968,14 @@ module Aws::IAM
|
|
1725
1968
|
#
|
1726
1969
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1727
1970
|
#
|
1971
|
+
#
|
1972
|
+
# @example Example: To delete the current account password policy
|
1973
|
+
#
|
1974
|
+
# # The following command removes the password policy from the current AWS account:
|
1975
|
+
#
|
1976
|
+
# resp = client.delete_account_password_policy({
|
1977
|
+
# })
|
1978
|
+
#
|
1728
1979
|
# @see http://docs.aws.amazon.com/goto/WebAPI/iam-2010-05-08/DeleteAccountPasswordPolicy AWS API Documentation
|
1729
1980
|
#
|
1730
1981
|
# @overload delete_account_password_policy(params = {})
|
@@ -1805,6 +2056,16 @@ module Aws::IAM
|
|
1805
2056
|
#
|
1806
2057
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1807
2058
|
#
|
2059
|
+
#
|
2060
|
+
# @example Example: To delete a policy from an IAM group
|
2061
|
+
#
|
2062
|
+
# # The following command deletes the policy named ExamplePolicy from the group named Admins:
|
2063
|
+
#
|
2064
|
+
# resp = client.delete_group_policy({
|
2065
|
+
# group_name: "Admins",
|
2066
|
+
# policy_name: "ExamplePolicy",
|
2067
|
+
# })
|
2068
|
+
#
|
1808
2069
|
# @example Request syntax with placeholder values
|
1809
2070
|
#
|
1810
2071
|
# resp = client.delete_group_policy({
|
@@ -1850,6 +2111,15 @@ module Aws::IAM
|
|
1850
2111
|
#
|
1851
2112
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1852
2113
|
#
|
2114
|
+
#
|
2115
|
+
# @example Example: To delete an instance profile
|
2116
|
+
#
|
2117
|
+
# # The following command deletes the instance profile named ExampleInstanceProfile
|
2118
|
+
#
|
2119
|
+
# resp = client.delete_instance_profile({
|
2120
|
+
# instance_profile_name: "ExampleInstanceProfile",
|
2121
|
+
# })
|
2122
|
+
#
|
1853
2123
|
# @example Request syntax with placeholder values
|
1854
2124
|
#
|
1855
2125
|
# resp = client.delete_instance_profile({
|
@@ -1889,6 +2159,15 @@ module Aws::IAM
|
|
1889
2159
|
#
|
1890
2160
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
1891
2161
|
#
|
2162
|
+
#
|
2163
|
+
# @example Example: To delete a password for an IAM user
|
2164
|
+
#
|
2165
|
+
# # The following command deletes the password for the IAM user named Bob.
|
2166
|
+
#
|
2167
|
+
# resp = client.delete_login_profile({
|
2168
|
+
# user_name: "Bob",
|
2169
|
+
# })
|
2170
|
+
#
|
1892
2171
|
# @example Request syntax with placeholder values
|
1893
2172
|
#
|
1894
2173
|
# resp = client.delete_login_profile({
|
@@ -2077,6 +2356,15 @@ module Aws::IAM
|
|
2077
2356
|
#
|
2078
2357
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2079
2358
|
#
|
2359
|
+
#
|
2360
|
+
# @example Example: To delete an IAM role
|
2361
|
+
#
|
2362
|
+
# # The following command removes the role named Test-Role.
|
2363
|
+
#
|
2364
|
+
# resp = client.delete_role({
|
2365
|
+
# role_name: "Test-Role",
|
2366
|
+
# })
|
2367
|
+
#
|
2080
2368
|
# @example Request syntax with placeholder values
|
2081
2369
|
#
|
2082
2370
|
# resp = client.delete_role({
|
@@ -2131,6 +2419,16 @@ module Aws::IAM
|
|
2131
2419
|
#
|
2132
2420
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2133
2421
|
#
|
2422
|
+
#
|
2423
|
+
# @example Example: To remove a policy from an IAM role
|
2424
|
+
#
|
2425
|
+
# # The following command removes the policy named ExamplePolicy from the role named Test-Role.
|
2426
|
+
#
|
2427
|
+
# resp = client.delete_role_policy({
|
2428
|
+
# policy_name: "ExamplePolicy",
|
2429
|
+
# role_name: "Test-Role",
|
2430
|
+
# })
|
2431
|
+
#
|
2134
2432
|
# @example Request syntax with placeholder values
|
2135
2433
|
#
|
2136
2434
|
# resp = client.delete_role_policy({
|
@@ -2365,6 +2663,16 @@ module Aws::IAM
|
|
2365
2663
|
#
|
2366
2664
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2367
2665
|
#
|
2666
|
+
#
|
2667
|
+
# @example Example: To delete a signing certificate for an IAM user
|
2668
|
+
#
|
2669
|
+
# # The following command deletes the specified signing certificate for the IAM user named Anika.
|
2670
|
+
#
|
2671
|
+
# resp = client.delete_signing_certificate({
|
2672
|
+
# certificate_id: "TA7SMP42TDN5Z26OBPJE7EXAMPLE",
|
2673
|
+
# user_name: "Anika",
|
2674
|
+
# })
|
2675
|
+
#
|
2368
2676
|
# @example Request syntax with placeholder values
|
2369
2677
|
#
|
2370
2678
|
# resp = client.delete_signing_certificate({
|
@@ -2398,6 +2706,15 @@ module Aws::IAM
|
|
2398
2706
|
#
|
2399
2707
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2400
2708
|
#
|
2709
|
+
#
|
2710
|
+
# @example Example: To delete an IAM user
|
2711
|
+
#
|
2712
|
+
# # The following command removes the IAM user named Bob from the current account.
|
2713
|
+
#
|
2714
|
+
# resp = client.delete_user({
|
2715
|
+
# user_name: "Bob",
|
2716
|
+
# })
|
2717
|
+
#
|
2401
2718
|
# @example Request syntax with placeholder values
|
2402
2719
|
#
|
2403
2720
|
# resp = client.delete_user({
|
@@ -2452,6 +2769,16 @@ module Aws::IAM
|
|
2452
2769
|
#
|
2453
2770
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2454
2771
|
#
|
2772
|
+
#
|
2773
|
+
# @example Example: To remove a policy from an IAM user
|
2774
|
+
#
|
2775
|
+
# # The following delete-user-policy command removes the specified policy from the IAM user named Juan:
|
2776
|
+
#
|
2777
|
+
# resp = client.delete_user_policy({
|
2778
|
+
# policy_name: "ExamplePolicy",
|
2779
|
+
# user_name: "Juan",
|
2780
|
+
# })
|
2781
|
+
#
|
2455
2782
|
# @example Request syntax with placeholder values
|
2456
2783
|
#
|
2457
2784
|
# resp = client.delete_user_policy({
|
@@ -2491,6 +2818,15 @@ module Aws::IAM
|
|
2491
2818
|
#
|
2492
2819
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
2493
2820
|
#
|
2821
|
+
#
|
2822
|
+
# @example Example: To remove a virtual MFA device
|
2823
|
+
#
|
2824
|
+
# # The following delete-virtual-mfa-device command removes the specified MFA device from the current AWS account.
|
2825
|
+
#
|
2826
|
+
# resp = client.delete_virtual_mfa_device({
|
2827
|
+
# serial_number: "arn:aws:iam::123456789012:mfa/ExampleName",
|
2828
|
+
# })
|
2829
|
+
#
|
2494
2830
|
# @example Request syntax with placeholder values
|
2495
2831
|
#
|
2496
2832
|
# resp = client.delete_virtual_mfa_device({
|
@@ -2961,6 +3297,30 @@ module Aws::IAM
|
|
2961
3297
|
#
|
2962
3298
|
# * {Types::GetAccountPasswordPolicyResponse#password_policy #password_policy} => Types::PasswordPolicy
|
2963
3299
|
#
|
3300
|
+
#
|
3301
|
+
# @example Example: To see the current account password policy
|
3302
|
+
#
|
3303
|
+
# # The following command displays details about the password policy for the current AWS account.
|
3304
|
+
#
|
3305
|
+
# resp = client.get_account_password_policy({
|
3306
|
+
# })
|
3307
|
+
#
|
3308
|
+
# resp.to_h outputs the following:
|
3309
|
+
# {
|
3310
|
+
# password_policy: {
|
3311
|
+
# allow_users_to_change_password: false,
|
3312
|
+
# expire_passwords: false,
|
3313
|
+
# hard_expiry: false,
|
3314
|
+
# max_password_age: 90,
|
3315
|
+
# minimum_password_length: 8,
|
3316
|
+
# password_reuse_prevention: 12,
|
3317
|
+
# require_lowercase_characters: false,
|
3318
|
+
# require_numbers: true,
|
3319
|
+
# require_symbols: true,
|
3320
|
+
# require_uppercase_characters: false,
|
3321
|
+
# },
|
3322
|
+
# }
|
3323
|
+
#
|
2964
3324
|
# @example Response structure
|
2965
3325
|
#
|
2966
3326
|
# resp.password_policy.minimum_password_length #=> Integer
|
@@ -2997,6 +3357,45 @@ module Aws::IAM
|
|
2997
3357
|
#
|
2998
3358
|
# * {Types::GetAccountSummaryResponse#summary_map #summary_map} => Hash<String,Integer>
|
2999
3359
|
#
|
3360
|
+
#
|
3361
|
+
# @example Example: To get information about IAM entity quotas and usage in the current account
|
3362
|
+
#
|
3363
|
+
# # The following command returns information about the IAM entity quotas and usage in the current AWS account.
|
3364
|
+
#
|
3365
|
+
# resp = client.get_account_summary({
|
3366
|
+
# })
|
3367
|
+
#
|
3368
|
+
# resp.to_h outputs the following:
|
3369
|
+
# {
|
3370
|
+
# summary_map: {
|
3371
|
+
# "AccessKeysPerUserQuota" => 2,
|
3372
|
+
# "AccountAccessKeysPresent" => 1,
|
3373
|
+
# "AccountMFAEnabled" => 0,
|
3374
|
+
# "AccountSigningCertificatesPresent" => 0,
|
3375
|
+
# "AttachedPoliciesPerGroupQuota" => 10,
|
3376
|
+
# "AttachedPoliciesPerRoleQuota" => 10,
|
3377
|
+
# "AttachedPoliciesPerUserQuota" => 10,
|
3378
|
+
# "GroupPolicySizeQuota" => 5120,
|
3379
|
+
# "Groups" => 15,
|
3380
|
+
# "GroupsPerUserQuota" => 10,
|
3381
|
+
# "GroupsQuota" => 100,
|
3382
|
+
# "MFADevices" => 6,
|
3383
|
+
# "MFADevicesInUse" => 3,
|
3384
|
+
# "Policies" => 8,
|
3385
|
+
# "PoliciesQuota" => 1000,
|
3386
|
+
# "PolicySizeQuota" => 5120,
|
3387
|
+
# "PolicyVersionsInUse" => 22,
|
3388
|
+
# "PolicyVersionsInUseQuota" => 10000,
|
3389
|
+
# "ServerCertificates" => 1,
|
3390
|
+
# "ServerCertificatesQuota" => 20,
|
3391
|
+
# "SigningCertificatesPerUserQuota" => 2,
|
3392
|
+
# "UserPolicySizeQuota" => 2048,
|
3393
|
+
# "Users" => 27,
|
3394
|
+
# "UsersQuota" => 5000,
|
3395
|
+
# "VersionsPerPolicyQuota" => 5,
|
3396
|
+
# },
|
3397
|
+
# }
|
3398
|
+
#
|
3000
3399
|
# @example Response structure
|
3001
3400
|
#
|
3002
3401
|
# resp.summary_map #=> Hash
|
@@ -3348,6 +3747,36 @@ module Aws::IAM
|
|
3348
3747
|
#
|
3349
3748
|
# * {Types::GetInstanceProfileResponse#instance_profile #instance_profile} => Types::InstanceProfile
|
3350
3749
|
#
|
3750
|
+
#
|
3751
|
+
# @example Example: To get information about an instance profile
|
3752
|
+
#
|
3753
|
+
# # The following command gets information about the instance profile named ExampleInstanceProfile.
|
3754
|
+
#
|
3755
|
+
# resp = client.get_instance_profile({
|
3756
|
+
# instance_profile_name: "ExampleInstanceProfile",
|
3757
|
+
# })
|
3758
|
+
#
|
3759
|
+
# resp.to_h outputs the following:
|
3760
|
+
# {
|
3761
|
+
# instance_profile: {
|
3762
|
+
# arn: "arn:aws:iam::336924118301:instance-profile/ExampleInstanceProfile",
|
3763
|
+
# create_date: Time.parse("2013-06-12T23:52:02Z"),
|
3764
|
+
# instance_profile_id: "AID2MAB8DPLSRHEXAMPLE",
|
3765
|
+
# instance_profile_name: "ExampleInstanceProfile",
|
3766
|
+
# path: "/",
|
3767
|
+
# roles: [
|
3768
|
+
# {
|
3769
|
+
# arn: "arn:aws:iam::336924118301:role/Test-Role",
|
3770
|
+
# assume_role_policy_document: "<URL-encoded-JSON>",
|
3771
|
+
# create_date: Time.parse("2013-01-09T06:33:26Z"),
|
3772
|
+
# path: "/",
|
3773
|
+
# role_id: "AIDGPMS9RO4H3FEXAMPLE",
|
3774
|
+
# role_name: "Test-Role",
|
3775
|
+
# },
|
3776
|
+
# ],
|
3777
|
+
# },
|
3778
|
+
# }
|
3779
|
+
#
|
3351
3780
|
# @example Request syntax with placeholder values
|
3352
3781
|
#
|
3353
3782
|
# resp = client.get_instance_profile({
|
@@ -3399,6 +3828,23 @@ module Aws::IAM
|
|
3399
3828
|
#
|
3400
3829
|
# * {Types::GetLoginProfileResponse#login_profile #login_profile} => Types::LoginProfile
|
3401
3830
|
#
|
3831
|
+
#
|
3832
|
+
# @example Example: To get password information for an IAM user
|
3833
|
+
#
|
3834
|
+
# # The following command gets information about the password for the IAM user named Anika.
|
3835
|
+
#
|
3836
|
+
# resp = client.get_login_profile({
|
3837
|
+
# user_name: "Anika",
|
3838
|
+
# })
|
3839
|
+
#
|
3840
|
+
# resp.to_h outputs the following:
|
3841
|
+
# {
|
3842
|
+
# login_profile: {
|
3843
|
+
# create_date: Time.parse("2012-09-21T23:03:39Z"),
|
3844
|
+
# user_name: "Anika",
|
3845
|
+
# },
|
3846
|
+
# }
|
3847
|
+
#
|
3402
3848
|
# @example Request syntax with placeholder values
|
3403
3849
|
#
|
3404
3850
|
# resp = client.get_login_profile({
|
@@ -3642,6 +4088,27 @@ module Aws::IAM
|
|
3642
4088
|
#
|
3643
4089
|
# * {Types::GetRoleResponse#role #role} => Types::Role
|
3644
4090
|
#
|
4091
|
+
#
|
4092
|
+
# @example Example: To get information about an IAM role
|
4093
|
+
#
|
4094
|
+
# # The following command gets information about the role named Test-Role.
|
4095
|
+
#
|
4096
|
+
# resp = client.get_role({
|
4097
|
+
# role_name: "Test-Role",
|
4098
|
+
# })
|
4099
|
+
#
|
4100
|
+
# resp.to_h outputs the following:
|
4101
|
+
# {
|
4102
|
+
# role: {
|
4103
|
+
# arn: "arn:aws:iam::123456789012:role/Test-Role",
|
4104
|
+
# assume_role_policy_document: "<URL-encoded-JSON>",
|
4105
|
+
# create_date: Time.parse("2013-04-18T05:01:58Z"),
|
4106
|
+
# path: "/",
|
4107
|
+
# role_id: "AIDIODR4TAW7CSEXAMPLE",
|
4108
|
+
# role_name: "Test-Role",
|
4109
|
+
# },
|
4110
|
+
# }
|
4111
|
+
#
|
3645
4112
|
# @example Request syntax with placeholder values
|
3646
4113
|
#
|
3647
4114
|
# resp = client.get_role({
|
@@ -3946,6 +4413,26 @@ module Aws::IAM
|
|
3946
4413
|
#
|
3947
4414
|
# * {Types::GetUserResponse#user #user} => Types::User
|
3948
4415
|
#
|
4416
|
+
#
|
4417
|
+
# @example Example: To get information about an IAM user
|
4418
|
+
#
|
4419
|
+
# # The following command gets information about the IAM user named Bob.
|
4420
|
+
#
|
4421
|
+
# resp = client.get_user({
|
4422
|
+
# user_name: "Bob",
|
4423
|
+
# })
|
4424
|
+
#
|
4425
|
+
# resp.to_h outputs the following:
|
4426
|
+
# {
|
4427
|
+
# user: {
|
4428
|
+
# arn: "arn:aws:iam::123456789012:user/Bob",
|
4429
|
+
# create_date: Time.parse("2012-09-21T23:03:13Z"),
|
4430
|
+
# path: "/",
|
4431
|
+
# user_id: "AKIAIOSFODNN7EXAMPLE",
|
4432
|
+
# user_name: "Bob",
|
4433
|
+
# },
|
4434
|
+
# }
|
4435
|
+
#
|
3949
4436
|
# @example Request syntax with placeholder values
|
3950
4437
|
#
|
3951
4438
|
# resp = client.get_user({
|
@@ -4100,6 +4587,33 @@ module Aws::IAM
|
|
4100
4587
|
# * {Types::ListAccessKeysResponse#is_truncated #is_truncated} => Boolean
|
4101
4588
|
# * {Types::ListAccessKeysResponse#marker #marker} => String
|
4102
4589
|
#
|
4590
|
+
#
|
4591
|
+
# @example Example: To list the access key IDs for an IAM user
|
4592
|
+
#
|
4593
|
+
# # The following command lists the access keys IDs for the IAM user named Alice.
|
4594
|
+
#
|
4595
|
+
# resp = client.list_access_keys({
|
4596
|
+
# user_name: "Alice",
|
4597
|
+
# })
|
4598
|
+
#
|
4599
|
+
# resp.to_h outputs the following:
|
4600
|
+
# {
|
4601
|
+
# access_key_metadata: [
|
4602
|
+
# {
|
4603
|
+
# access_key_id: "AKIA111111111EXAMPLE",
|
4604
|
+
# create_date: Time.parse("2016-12-01T22:19:58Z"),
|
4605
|
+
# status: "Active",
|
4606
|
+
# user_name: "Alice",
|
4607
|
+
# },
|
4608
|
+
# {
|
4609
|
+
# access_key_id: "AKIA222222222EXAMPLE",
|
4610
|
+
# create_date: Time.parse("2016-12-01T22:20:01Z"),
|
4611
|
+
# status: "Active",
|
4612
|
+
# user_name: "Alice",
|
4613
|
+
# },
|
4614
|
+
# ],
|
4615
|
+
# }
|
4616
|
+
#
|
4103
4617
|
# @example Request syntax with placeholder values
|
4104
4618
|
#
|
4105
4619
|
# resp = client.list_access_keys({
|
@@ -4159,6 +4673,21 @@ module Aws::IAM
|
|
4159
4673
|
# * {Types::ListAccountAliasesResponse#is_truncated #is_truncated} => Boolean
|
4160
4674
|
# * {Types::ListAccountAliasesResponse#marker #marker} => String
|
4161
4675
|
#
|
4676
|
+
#
|
4677
|
+
# @example Example: To list account aliases
|
4678
|
+
#
|
4679
|
+
# # The following command lists the aliases for the current account.
|
4680
|
+
#
|
4681
|
+
# resp = client.list_account_aliases({
|
4682
|
+
# })
|
4683
|
+
#
|
4684
|
+
# resp.to_h outputs the following:
|
4685
|
+
# {
|
4686
|
+
# account_aliases: [
|
4687
|
+
# "exmaple-corporation",
|
4688
|
+
# ],
|
4689
|
+
# }
|
4690
|
+
#
|
4162
4691
|
# @example Request syntax with placeholder values
|
4163
4692
|
#
|
4164
4693
|
# resp = client.list_account_aliases({
|
@@ -4631,6 +5160,23 @@ module Aws::IAM
|
|
4631
5160
|
# * {Types::ListGroupPoliciesResponse#is_truncated #is_truncated} => Boolean
|
4632
5161
|
# * {Types::ListGroupPoliciesResponse#marker #marker} => String
|
4633
5162
|
#
|
5163
|
+
#
|
5164
|
+
# @example Example: To list the in-line policies for an IAM group
|
5165
|
+
#
|
5166
|
+
# # The following command lists the names of in-line policies that are embedded in the IAM group named Admins.
|
5167
|
+
#
|
5168
|
+
# resp = client.list_group_policies({
|
5169
|
+
# group_name: "Admins",
|
5170
|
+
# })
|
5171
|
+
#
|
5172
|
+
# resp.to_h outputs the following:
|
5173
|
+
# {
|
5174
|
+
# policy_names: [
|
5175
|
+
# "AdminRoot",
|
5176
|
+
# "KeyPolicy",
|
5177
|
+
# ],
|
5178
|
+
# }
|
5179
|
+
#
|
4634
5180
|
# @example Request syntax with placeholder values
|
4635
5181
|
#
|
4636
5182
|
# resp = client.list_group_policies({
|
@@ -4701,6 +5247,41 @@ module Aws::IAM
|
|
4701
5247
|
# * {Types::ListGroupsResponse#is_truncated #is_truncated} => Boolean
|
4702
5248
|
# * {Types::ListGroupsResponse#marker #marker} => String
|
4703
5249
|
#
|
5250
|
+
#
|
5251
|
+
# @example Example: To list the IAM groups for the current account
|
5252
|
+
#
|
5253
|
+
# # The following command lists the IAM groups in the current account:
|
5254
|
+
#
|
5255
|
+
# resp = client.list_groups({
|
5256
|
+
# })
|
5257
|
+
#
|
5258
|
+
# resp.to_h outputs the following:
|
5259
|
+
# {
|
5260
|
+
# groups: [
|
5261
|
+
# {
|
5262
|
+
# arn: "arn:aws:iam::123456789012:group/Admins",
|
5263
|
+
# create_date: Time.parse("2016-12-15T21:40:08.121Z"),
|
5264
|
+
# group_id: "AGPA1111111111EXAMPLE",
|
5265
|
+
# group_name: "Admins",
|
5266
|
+
# path: "/division_abc/subdivision_xyz/",
|
5267
|
+
# },
|
5268
|
+
# {
|
5269
|
+
# arn: "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test",
|
5270
|
+
# create_date: Time.parse("2016-11-30T14:10:01.156Z"),
|
5271
|
+
# group_id: "AGP22222222222EXAMPLE",
|
5272
|
+
# group_name: "Test",
|
5273
|
+
# path: "/division_abc/subdivision_xyz/product_1234/engineering/",
|
5274
|
+
# },
|
5275
|
+
# {
|
5276
|
+
# arn: "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers",
|
5277
|
+
# create_date: Time.parse("2016-06-12T20:14:52.032Z"),
|
5278
|
+
# group_id: "AGPI3333333333EXAMPLE",
|
5279
|
+
# group_name: "Managers",
|
5280
|
+
# path: "/division_abc/subdivision_xyz/product_1234/",
|
5281
|
+
# },
|
5282
|
+
# ],
|
5283
|
+
# }
|
5284
|
+
#
|
4704
5285
|
# @example Request syntax with placeholder values
|
4705
5286
|
#
|
4706
5287
|
# resp = client.list_groups({
|
@@ -4770,6 +5351,35 @@ module Aws::IAM
|
|
4770
5351
|
# * {Types::ListGroupsForUserResponse#is_truncated #is_truncated} => Boolean
|
4771
5352
|
# * {Types::ListGroupsForUserResponse#marker #marker} => String
|
4772
5353
|
#
|
5354
|
+
#
|
5355
|
+
# @example Example: To list the groups that an IAM user belongs to
|
5356
|
+
#
|
5357
|
+
# # The following command displays the groups that the IAM user named Bob belongs to.
|
5358
|
+
#
|
5359
|
+
# resp = client.list_groups_for_user({
|
5360
|
+
# user_name: "Bob",
|
5361
|
+
# })
|
5362
|
+
#
|
5363
|
+
# resp.to_h outputs the following:
|
5364
|
+
# {
|
5365
|
+
# groups: [
|
5366
|
+
# {
|
5367
|
+
# arn: "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/engineering/Test",
|
5368
|
+
# create_date: Time.parse("2016-11-30T14:10:01.156Z"),
|
5369
|
+
# group_id: "AGP2111111111EXAMPLE",
|
5370
|
+
# group_name: "Test",
|
5371
|
+
# path: "/division_abc/subdivision_xyz/product_1234/engineering/",
|
5372
|
+
# },
|
5373
|
+
# {
|
5374
|
+
# arn: "arn:aws:iam::123456789012:group/division_abc/subdivision_xyz/product_1234/Managers",
|
5375
|
+
# create_date: Time.parse("2016-06-12T20:14:52.032Z"),
|
5376
|
+
# group_id: "AGPI222222222SEXAMPLE",
|
5377
|
+
# group_name: "Managers",
|
5378
|
+
# path: "/division_abc/subdivision_xyz/product_1234/",
|
5379
|
+
# },
|
5380
|
+
# ],
|
5381
|
+
# }
|
5382
|
+
#
|
4773
5383
|
# @example Request syntax with placeholder values
|
4774
5384
|
#
|
4775
5385
|
# resp = client.list_groups_for_user({
|
@@ -5714,6 +6324,28 @@ module Aws::IAM
|
|
5714
6324
|
# * {Types::ListSigningCertificatesResponse#is_truncated #is_truncated} => Boolean
|
5715
6325
|
# * {Types::ListSigningCertificatesResponse#marker #marker} => String
|
5716
6326
|
#
|
6327
|
+
#
|
6328
|
+
# @example Example: To list the signing certificates for an IAM user
|
6329
|
+
#
|
6330
|
+
# # The following command lists the signing certificates for the IAM user named Bob.
|
6331
|
+
#
|
6332
|
+
# resp = client.list_signing_certificates({
|
6333
|
+
# user_name: "Bob",
|
6334
|
+
# })
|
6335
|
+
#
|
6336
|
+
# resp.to_h outputs the following:
|
6337
|
+
# {
|
6338
|
+
# certificates: [
|
6339
|
+
# {
|
6340
|
+
# certificate_body: "-----BEGIN CERTIFICATE-----<certificate-body>-----END CERTIFICATE-----",
|
6341
|
+
# certificate_id: "TA7SMP42TDN5Z26OBPJE7EXAMPLE",
|
6342
|
+
# status: "Active",
|
6343
|
+
# upload_date: Time.parse("2013-06-06T21:40:08Z"),
|
6344
|
+
# user_name: "Bob",
|
6345
|
+
# },
|
6346
|
+
# ],
|
6347
|
+
# }
|
6348
|
+
#
|
5717
6349
|
# @example Request syntax with placeholder values
|
5718
6350
|
#
|
5719
6351
|
# resp = client.list_signing_certificates({
|
@@ -5866,6 +6498,36 @@ module Aws::IAM
|
|
5866
6498
|
# * {Types::ListUsersResponse#is_truncated #is_truncated} => Boolean
|
5867
6499
|
# * {Types::ListUsersResponse#marker #marker} => String
|
5868
6500
|
#
|
6501
|
+
#
|
6502
|
+
# @example Example: To list IAM users
|
6503
|
+
#
|
6504
|
+
# # The following command lists the IAM users in the current account.
|
6505
|
+
#
|
6506
|
+
# resp = client.list_users({
|
6507
|
+
# })
|
6508
|
+
#
|
6509
|
+
# resp.to_h outputs the following:
|
6510
|
+
# {
|
6511
|
+
# users: [
|
6512
|
+
# {
|
6513
|
+
# arn: "arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Juan",
|
6514
|
+
# create_date: Time.parse("2012-09-05T19:38:48Z"),
|
6515
|
+
# password_last_used: Time.parse("2016-09-08T21:47:36Z"),
|
6516
|
+
# path: "/division_abc/subdivision_xyz/engineering/",
|
6517
|
+
# user_id: "AID2MAB8DPLSRHEXAMPLE",
|
6518
|
+
# user_name: "Juan",
|
6519
|
+
# },
|
6520
|
+
# {
|
6521
|
+
# arn: "arn:aws:iam::123456789012:user/division_abc/subdivision_xyz/engineering/Anika",
|
6522
|
+
# create_date: Time.parse("2014-04-09T15:43:45Z"),
|
6523
|
+
# password_last_used: Time.parse("2016-09-24T16:18:07Z"),
|
6524
|
+
# path: "/division_abc/subdivision_xyz/engineering/",
|
6525
|
+
# user_id: "AIDIODR4TAW7CSEXAMPLE",
|
6526
|
+
# user_name: "Anika",
|
6527
|
+
# },
|
6528
|
+
# ],
|
6529
|
+
# }
|
6530
|
+
#
|
5869
6531
|
# @example Request syntax with placeholder values
|
5870
6532
|
#
|
5871
6533
|
# resp = client.list_users({
|
@@ -5932,6 +6594,26 @@ module Aws::IAM
|
|
5932
6594
|
# * {Types::ListVirtualMFADevicesResponse#is_truncated #is_truncated} => Boolean
|
5933
6595
|
# * {Types::ListVirtualMFADevicesResponse#marker #marker} => String
|
5934
6596
|
#
|
6597
|
+
#
|
6598
|
+
# @example Example: To list virtual MFA devices
|
6599
|
+
#
|
6600
|
+
# # The following command lists the virtual MFA devices that have been configured for the current account.
|
6601
|
+
#
|
6602
|
+
# resp = client.list_virtual_mfa_devices({
|
6603
|
+
# })
|
6604
|
+
#
|
6605
|
+
# resp.to_h outputs the following:
|
6606
|
+
# {
|
6607
|
+
# virtual_mfa_devices: [
|
6608
|
+
# {
|
6609
|
+
# serial_number: "arn:aws:iam::123456789012:mfa/ExampleMFADevice",
|
6610
|
+
# },
|
6611
|
+
# {
|
6612
|
+
# serial_number: "arn:aws:iam::123456789012:mfa/Juan",
|
6613
|
+
# },
|
6614
|
+
# ],
|
6615
|
+
# }
|
6616
|
+
#
|
5935
6617
|
# @example Request syntax with placeholder values
|
5936
6618
|
#
|
5937
6619
|
# resp = client.list_virtual_mfa_devices({
|
@@ -6031,6 +6713,17 @@ module Aws::IAM
|
|
6031
6713
|
#
|
6032
6714
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6033
6715
|
#
|
6716
|
+
#
|
6717
|
+
# @example Example: To add a policy to a group
|
6718
|
+
#
|
6719
|
+
# # The following command adds a policy named AllPerms to the IAM group named Admins.
|
6720
|
+
#
|
6721
|
+
# resp = client.put_group_policy({
|
6722
|
+
# group_name: "Admins",
|
6723
|
+
# policy_document: "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"*\",\"Resource\":\"*\"}}",
|
6724
|
+
# policy_name: "AllPerms",
|
6725
|
+
# })
|
6726
|
+
#
|
6034
6727
|
# @example Request syntax with placeholder values
|
6035
6728
|
#
|
6036
6729
|
# resp = client.put_group_policy({
|
@@ -6122,6 +6815,17 @@ module Aws::IAM
|
|
6122
6815
|
#
|
6123
6816
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6124
6817
|
#
|
6818
|
+
#
|
6819
|
+
# @example Example: To attach a permissions policy to an IAM role
|
6820
|
+
#
|
6821
|
+
# # The following command adds a permissions policy to the role named Test-Role.
|
6822
|
+
#
|
6823
|
+
# resp = client.put_role_policy({
|
6824
|
+
# policy_document: "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}}",
|
6825
|
+
# policy_name: "S3AccessPolicy",
|
6826
|
+
# role_name: "S3Access",
|
6827
|
+
# })
|
6828
|
+
#
|
6125
6829
|
# @example Request syntax with placeholder values
|
6126
6830
|
#
|
6127
6831
|
# resp = client.put_role_policy({
|
@@ -6205,6 +6909,17 @@ module Aws::IAM
|
|
6205
6909
|
#
|
6206
6910
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6207
6911
|
#
|
6912
|
+
#
|
6913
|
+
# @example Example: To attach a policy to an IAM user
|
6914
|
+
#
|
6915
|
+
# # The following command attaches a policy to the IAM user named Bob.
|
6916
|
+
#
|
6917
|
+
# resp = client.put_user_policy({
|
6918
|
+
# policy_document: "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"*\",\"Resource\":\"*\"}}",
|
6919
|
+
# policy_name: "AllAccessPolicy",
|
6920
|
+
# user_name: "Bob",
|
6921
|
+
# })
|
6922
|
+
#
|
6208
6923
|
# @example Request syntax with placeholder values
|
6209
6924
|
#
|
6210
6925
|
# resp = client.put_user_policy({
|
@@ -6307,6 +7022,16 @@ module Aws::IAM
|
|
6307
7022
|
#
|
6308
7023
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6309
7024
|
#
|
7025
|
+
#
|
7026
|
+
# @example Example: To remove a role from an instance profile
|
7027
|
+
#
|
7028
|
+
# # The following command removes the role named Test-Role from the instance profile named ExampleInstanceProfile.
|
7029
|
+
#
|
7030
|
+
# resp = client.remove_role_from_instance_profile({
|
7031
|
+
# instance_profile_name: "ExampleInstanceProfile",
|
7032
|
+
# role_name: "Test-Role",
|
7033
|
+
# })
|
7034
|
+
#
|
6310
7035
|
# @example Request syntax with placeholder values
|
6311
7036
|
#
|
6312
7037
|
# resp = client.remove_role_from_instance_profile({
|
@@ -6351,6 +7076,16 @@ module Aws::IAM
|
|
6351
7076
|
#
|
6352
7077
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
6353
7078
|
#
|
7079
|
+
#
|
7080
|
+
# @example Example: To remove a user from an IAM group
|
7081
|
+
#
|
7082
|
+
# # The following command removes the user named Bob from the IAM group named Admins.
|
7083
|
+
#
|
7084
|
+
# resp = client.remove_user_from_group({
|
7085
|
+
# group_name: "Admins",
|
7086
|
+
# user_name: "Bob",
|
7087
|
+
# })
|
7088
|
+
#
|
6354
7089
|
# @example Request syntax with placeholder values
|
6355
7090
|
#
|
6356
7091
|
# resp = client.remove_user_from_group({
|
@@ -7131,6 +7866,17 @@ module Aws::IAM
|
|
7131
7866
|
#
|
7132
7867
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7133
7868
|
#
|
7869
|
+
#
|
7870
|
+
# @example Example: To activate or deactivate an access key for an IAM user
|
7871
|
+
#
|
7872
|
+
# # The following command deactivates the specified access key (access key ID and secret access key) for the IAM user named Bob.
|
7873
|
+
#
|
7874
|
+
# resp = client.update_access_key({
|
7875
|
+
# access_key_id: "AKIAIOSFODNN7EXAMPLE",
|
7876
|
+
# status: "Inactive",
|
7877
|
+
# user_name: "Bob",
|
7878
|
+
# })
|
7879
|
+
#
|
7134
7880
|
# @example Request syntax with placeholder values
|
7135
7881
|
#
|
7136
7882
|
# resp = client.update_access_key({
|
@@ -7227,6 +7973,16 @@ module Aws::IAM
|
|
7227
7973
|
#
|
7228
7974
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7229
7975
|
#
|
7976
|
+
#
|
7977
|
+
# @example Example: To set or change the current account password policy
|
7978
|
+
#
|
7979
|
+
# # The following command sets the password policy to require a minimum length of eight characters and to require one or more numbers in the password:
|
7980
|
+
#
|
7981
|
+
# resp = client.update_account_password_policy({
|
7982
|
+
# minimum_password_length: 8,
|
7983
|
+
# require_numbers: true,
|
7984
|
+
# })
|
7985
|
+
#
|
7230
7986
|
# @example Request syntax with placeholder values
|
7231
7987
|
#
|
7232
7988
|
# resp = client.update_account_password_policy({
|
@@ -7288,6 +8044,16 @@ module Aws::IAM
|
|
7288
8044
|
#
|
7289
8045
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7290
8046
|
#
|
8047
|
+
#
|
8048
|
+
# @example Example: To update the trust policy for an IAM role
|
8049
|
+
#
|
8050
|
+
# # The following command updates the role trust policy for the role named Test-Role:
|
8051
|
+
#
|
8052
|
+
# resp = client.update_assume_role_policy({
|
8053
|
+
# policy_document: "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"ec2.amazonaws.com\"]},\"Action\":[\"sts:AssumeRole\"]}]}",
|
8054
|
+
# role_name: "S3AccessForEC2Instances",
|
8055
|
+
# })
|
8056
|
+
#
|
7291
8057
|
# @example Request syntax with placeholder values
|
7292
8058
|
#
|
7293
8059
|
# resp = client.update_assume_role_policy({
|
@@ -7367,6 +8133,16 @@ module Aws::IAM
|
|
7367
8133
|
#
|
7368
8134
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7369
8135
|
#
|
8136
|
+
#
|
8137
|
+
# @example Example: To rename an IAM group
|
8138
|
+
#
|
8139
|
+
# # The following command changes the name of the IAM group Test to Test-1.
|
8140
|
+
#
|
8141
|
+
# resp = client.update_group({
|
8142
|
+
# group_name: "Test",
|
8143
|
+
# new_group_name: "Test-1",
|
8144
|
+
# })
|
8145
|
+
#
|
7370
8146
|
# @example Request syntax with placeholder values
|
7371
8147
|
#
|
7372
8148
|
# resp = client.update_group({
|
@@ -7429,6 +8205,16 @@ module Aws::IAM
|
|
7429
8205
|
#
|
7430
8206
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7431
8207
|
#
|
8208
|
+
#
|
8209
|
+
# @example Example: To change the password for an IAM user
|
8210
|
+
#
|
8211
|
+
# # The following command creates or changes the password for the IAM user named Bob.
|
8212
|
+
#
|
8213
|
+
# resp = client.update_login_profile({
|
8214
|
+
# password: "SomeKindOfPassword123!@#",
|
8215
|
+
# user_name: "Bob",
|
8216
|
+
# })
|
8217
|
+
#
|
7432
8218
|
# @example Request syntax with placeholder values
|
7433
8219
|
#
|
7434
8220
|
# resp = client.update_login_profile({
|
@@ -7837,6 +8623,17 @@ module Aws::IAM
|
|
7837
8623
|
#
|
7838
8624
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7839
8625
|
#
|
8626
|
+
#
|
8627
|
+
# @example Example: To change the active status of a signing certificate for an IAM user
|
8628
|
+
#
|
8629
|
+
# # The following command changes the status of a signing certificate for a user named Bob to Inactive.
|
8630
|
+
#
|
8631
|
+
# resp = client.update_signing_certificate({
|
8632
|
+
# certificate_id: "TA7SMP42TDN5Z26OBPJE7EXAMPLE",
|
8633
|
+
# status: "Inactive",
|
8634
|
+
# user_name: "Bob",
|
8635
|
+
# })
|
8636
|
+
#
|
7840
8637
|
# @example Request syntax with placeholder values
|
7841
8638
|
#
|
7842
8639
|
# resp = client.update_signing_certificate({
|
@@ -7917,6 +8714,16 @@ module Aws::IAM
|
|
7917
8714
|
#
|
7918
8715
|
# @return [Struct] Returns an empty {Seahorse::Client::Response response}.
|
7919
8716
|
#
|
8717
|
+
#
|
8718
|
+
# @example Example: To change an IAM user's name
|
8719
|
+
#
|
8720
|
+
# # The following command changes the name of the IAM user Bob to Robert. It does not change the user's path.
|
8721
|
+
#
|
8722
|
+
# resp = client.update_user({
|
8723
|
+
# new_user_name: "Robert",
|
8724
|
+
# user_name: "Bob",
|
8725
|
+
# })
|
8726
|
+
#
|
7920
8727
|
# @example Request syntax with placeholder values
|
7921
8728
|
#
|
7922
8729
|
# resp = client.update_user({
|
@@ -8130,6 +8937,30 @@ module Aws::IAM
|
|
8130
8937
|
#
|
8131
8938
|
# * {Types::UploadServerCertificateResponse#server_certificate_metadata #server_certificate_metadata} => Types::ServerCertificateMetadata
|
8132
8939
|
#
|
8940
|
+
#
|
8941
|
+
# @example Example: To upload a server certificate to your AWS account
|
8942
|
+
#
|
8943
|
+
# # The following upload-server-certificate command uploads a server certificate to your AWS account:
|
8944
|
+
#
|
8945
|
+
# resp = client.upload_server_certificate({
|
8946
|
+
# certificate_body: "-----BEGIN CERTIFICATE-----<a very long certificate text string>-----END CERTIFICATE-----",
|
8947
|
+
# path: "/company/servercerts/",
|
8948
|
+
# private_key: "-----BEGIN DSA PRIVATE KEY-----<a very long private key string>-----END DSA PRIVATE KEY-----",
|
8949
|
+
# server_certificate_name: "ProdServerCert",
|
8950
|
+
# })
|
8951
|
+
#
|
8952
|
+
# resp.to_h outputs the following:
|
8953
|
+
# {
|
8954
|
+
# server_certificate_metadata: {
|
8955
|
+
# arn: "arn:aws:iam::123456789012:server-certificate/company/servercerts/ProdServerCert",
|
8956
|
+
# expiration: Time.parse("2012-05-08T01:02:03.004Z"),
|
8957
|
+
# path: "/company/servercerts/",
|
8958
|
+
# server_certificate_id: "ASCA1111111111EXAMPLE",
|
8959
|
+
# server_certificate_name: "ProdServerCert",
|
8960
|
+
# upload_date: Time.parse("2010-05-08T01:02:03.004Z"),
|
8961
|
+
# },
|
8962
|
+
# }
|
8963
|
+
#
|
8133
8964
|
# @example Request syntax with placeholder values
|
8134
8965
|
#
|
8135
8966
|
# resp = client.upload_server_certificate({
|
@@ -8214,6 +9045,27 @@ module Aws::IAM
|
|
8214
9045
|
#
|
8215
9046
|
# * {Types::UploadSigningCertificateResponse#certificate #certificate} => Types::SigningCertificate
|
8216
9047
|
#
|
9048
|
+
#
|
9049
|
+
# @example Example: To upload a signing certificate for an IAM user
|
9050
|
+
#
|
9051
|
+
# # The following command uploads a signing certificate for the IAM user named Bob.
|
9052
|
+
#
|
9053
|
+
# resp = client.upload_signing_certificate({
|
9054
|
+
# certificate_body: "-----BEGIN CERTIFICATE-----<certificate-body>-----END CERTIFICATE-----",
|
9055
|
+
# user_name: "Bob",
|
9056
|
+
# })
|
9057
|
+
#
|
9058
|
+
# resp.to_h outputs the following:
|
9059
|
+
# {
|
9060
|
+
# certificate: {
|
9061
|
+
# certificate_body: "-----BEGIN CERTIFICATE-----<certificate-body>-----END CERTIFICATE-----",
|
9062
|
+
# certificate_id: "ID123456789012345EXAMPLE",
|
9063
|
+
# status: "Active",
|
9064
|
+
# upload_date: Time.parse("2015-06-06T21:40:08.121Z"),
|
9065
|
+
# user_name: "Bob",
|
9066
|
+
# },
|
9067
|
+
# }
|
9068
|
+
#
|
8217
9069
|
# @example Request syntax with placeholder values
|
8218
9070
|
#
|
8219
9071
|
# resp = client.upload_signing_certificate({
|
@@ -8251,7 +9103,7 @@ module Aws::IAM
|
|
8251
9103
|
params: params,
|
8252
9104
|
config: config)
|
8253
9105
|
context[:gem_name] = 'aws-sdk-iam'
|
8254
|
-
context[:gem_version] = '1.0.0.
|
9106
|
+
context[:gem_version] = '1.0.0.rc8'
|
8255
9107
|
Seahorse::Client::Request.new(handlers, context)
|
8256
9108
|
end
|
8257
9109
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-iam
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.rc8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.0.
|
19
|
+
version: 3.0.0.rc14
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.0.
|
26
|
+
version: 3.0.0.rc14
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: aws-sigv4
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|