aws-sdk-organizations 1.0.0.rc6 → 1.0.0.rc7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4a0d181b05cdc34b320c3f2629abd85efe2a14e3
4
- data.tar.gz: 518126c1d2804b69d8cb8402f31cbe757f0aad02
3
+ metadata.gz: 77658a47cdf50b2a17ca40cfc2ff318d0ccb408e
4
+ data.tar.gz: 5f19914edc59b3aedb288db34fde73c63266df49
5
5
  SHA512:
6
- metadata.gz: 28ee2ddb016fa0cd94189cbb9ef41e9f8b0e8890a7afaa6482fc0042313f9f46bd56f6df870640b570a6ada036b03a9c088caf435c03da50b4a3035e582049e3
7
- data.tar.gz: dbb0f6c22b5a267f11b0faecbed6003eea47a0bc3d3113b5c620757c6732ce385c85d878826e20283750d30a27c074a8ec245d554e12df15bae38421762b6a4a
6
+ metadata.gz: 46f9128db1df61cbab0f73d0292543fb7122ca02d366ba40372c7eb5ca6bcf0ff4c173bea8a07cea70577ac30d379c67d12828b84904359587e1eb647956a8e5
7
+ data.tar.gz: 82a3855e2bcad0673944e59e743531c1497df22270c4a81a025e242c231f056a07fb8668a5bddd436cba0d684ccc19509a4aab7538a238fe229e3965b4bda994
@@ -42,6 +42,6 @@ require_relative 'aws-sdk-organizations/customizations'
42
42
  # @service
43
43
  module Aws::Organizations
44
44
 
45
- GEM_VERSION = '1.0.0.rc6'
45
+ GEM_VERSION = '1.0.0.rc7'
46
46
 
47
47
  end
@@ -195,6 +195,61 @@ module Aws::Organizations
195
195
  #
196
196
  # * {Types::AcceptHandshakeResponse#handshake #handshake} => Types::Handshake
197
197
  #
198
+ #
199
+ # @example Example: To accept a handshake from another account
200
+ #
201
+ # # Bill is the owner of an organization, and he invites Juan's account (222222222222) to join his organization. The following example shows Juan's account accepting the handshake and thus agreeing to the invitation.
202
+ #
203
+ # resp = client.accept_handshake({
204
+ # handshake_id: "h-examplehandshakeid111",
205
+ # })
206
+ #
207
+ # resp.to_h outputs the following:
208
+ # {
209
+ # handshake: {
210
+ # action: "INVITE",
211
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
212
+ # expiration_timestamp: Time.parse("20170228T1215Z"),
213
+ # id: "h-examplehandshakeid111",
214
+ # parties: [
215
+ # {
216
+ # id: "o-exampleorgid",
217
+ # type: "ORGANIZATION",
218
+ # },
219
+ # {
220
+ # id: "juan@example.com",
221
+ # type: "EMAIL",
222
+ # },
223
+ # ],
224
+ # requested_timestamp: Time.parse("20170214T1215Z"),
225
+ # resources: [
226
+ # {
227
+ # resources: [
228
+ # {
229
+ # type: "MASTER_EMAIL",
230
+ # value: "bill@amazon.com",
231
+ # },
232
+ # {
233
+ # type: "MASTER_NAME",
234
+ # value: "Org Master Account",
235
+ # },
236
+ # {
237
+ # type: "ORGANIZATION_FEATURE_SET",
238
+ # value: "ALL",
239
+ # },
240
+ # ],
241
+ # type: "ORGANIZATION",
242
+ # value: "o-exampleorgid",
243
+ # },
244
+ # {
245
+ # type: "ACCOUNT",
246
+ # value: "222222222222",
247
+ # },
248
+ # ],
249
+ # state: "ACCEPTED",
250
+ # },
251
+ # }
252
+ #
198
253
  # @example Request syntax with placeholder values
199
254
  #
200
255
  # resp = client.accept_handshake({
@@ -312,6 +367,27 @@ module Aws::Organizations
312
367
  #
313
368
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
314
369
  #
370
+ #
371
+ # @example Example: To attach a policy to an OU
372
+ #
373
+ # # The following example shows how to attach a service control policy (SCP) to an OU:
374
+
375
+ #
376
+ # resp = client.attach_policy({
377
+ # policy_id: "p-examplepolicyid111",
378
+ # target_id: "ou-examplerootid111-exampleouid111",
379
+ # })
380
+ #
381
+ # @example Example: To attach a policy to an account
382
+ #
383
+ # # The following example shows how to attach a service control policy (SCP) to an account:
384
+
385
+ #
386
+ # resp = client.attach_policy({
387
+ # policy_id: "p-examplepolicyid111",
388
+ # target_id: "333333333333",
389
+ # })
390
+ #
315
391
  # @example Request syntax with placeholder values
316
392
  #
317
393
  # resp = client.attach_policy({
@@ -354,6 +430,66 @@ module Aws::Organizations
354
430
  #
355
431
  # * {Types::CancelHandshakeResponse#handshake #handshake} => Types::Handshake
356
432
  #
433
+ #
434
+ # @example Example: To cancel a handshake sent to a member account
435
+ #
436
+ # # Bill previously sent an invitation to Susan's account to join his organization. He changes his mind and decides to cancel the invitation before Susan accepts it. The following example shows Bill's cancellation:
437
+
438
+ #
439
+ # resp = client.cancel_handshake({
440
+ # handshake_id: "h-examplehandshakeid111",
441
+ # })
442
+ #
443
+ # resp.to_h outputs the following:
444
+ # {
445
+ # handshake: {
446
+ # action: "INVITE",
447
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
448
+ # expiration_timestamp: Time.parse("20170228T1215Z"),
449
+ # id: "h-examplehandshakeid111",
450
+ # parties: [
451
+ # {
452
+ # id: "o-exampleorgid",
453
+ # type: "ORGANIZATION",
454
+ # },
455
+ # {
456
+ # id: "susan@example.com",
457
+ # type: "EMAIL",
458
+ # },
459
+ # ],
460
+ # requested_timestamp: Time.parse("20170214T1215Z"),
461
+ # resources: [
462
+ # {
463
+ # resources: [
464
+ # {
465
+ # type: "MASTER_EMAIL",
466
+ # value: "bill@example.com",
467
+ # },
468
+ # {
469
+ # type: "MASTER_NAME",
470
+ # value: "Master Account",
471
+ # },
472
+ # {
473
+ # type: "ORGANIZATION_FEATURE_SET",
474
+ # value: "CONSOLIDATED_BILLING",
475
+ # },
476
+ # ],
477
+ # type: "ORGANIZATION",
478
+ # value: "o-exampleorgid",
479
+ # },
480
+ # {
481
+ # type: "ACCOUNT",
482
+ # value: "222222222222",
483
+ # },
484
+ # {
485
+ # type: "NOTES",
486
+ # value: "This is a request for Susan's account to join Bob's organization.",
487
+ # },
488
+ # ],
489
+ # state: "CANCELED",
490
+ # },
491
+ # }
492
+ #
357
493
  # @example Request syntax with placeholder values
358
494
  #
359
495
  # resp = client.cancel_handshake({
@@ -484,6 +620,26 @@ module Aws::Organizations
484
620
  #
485
621
  # * {Types::CreateAccountResponse#create_account_status #create_account_status} => Types::CreateAccountStatus
486
622
  #
623
+ #
624
+ # @example Example: To create a new account that is automatically part of the organization
625
+ #
626
+ # # The owner of an organization creates a member account in the organization. The following example shows that when the organization owner creates the member account, the account is preconfigured with the name "Production Account" and an owner email address of susan@example.com. An IAM role is automatically created using the default name because the roleName parameter is not used. AWS Organizations sends Susan a "Welcome to AWS" email:
627
+
628
+
629
+ #
630
+ # resp = client.create_account({
631
+ # account_name: "Production Account",
632
+ # email: "susan@example.com",
633
+ # })
634
+ #
635
+ # resp.to_h outputs the following:
636
+ # {
637
+ # create_account_status: {
638
+ # id: "car-examplecreateaccountrequestid111",
639
+ # state: "IN_PROGRESS",
640
+ # },
641
+ # }
642
+ #
487
643
  # @example Request syntax with placeholder values
488
644
  #
489
645
  # resp = client.create_account({
@@ -556,6 +712,58 @@ module Aws::Organizations
556
712
  #
557
713
  # * {Types::CreateOrganizationResponse#organization #organization} => Types::Organization
558
714
  #
715
+ #
716
+ # @example Example: To create a new organization with all features enabled
717
+ #
718
+ # # Bill wants to create an organization using credentials from account 111111111111. The following example shows that the account becomes the master account in the new organization. Because he does not specify a feature set, the new organization defaults to all features enabled and service control policies enabled on the root:
719
+
720
+
721
+ #
722
+ # resp = client.create_organization({
723
+ # })
724
+ #
725
+ # resp.to_h outputs the following:
726
+ # {
727
+ # organization: {
728
+ # arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid",
729
+ # available_policy_types: [
730
+ # {
731
+ # status: "ENABLED",
732
+ # type: "SERVICE_CONTROL_POLICY",
733
+ # },
734
+ # ],
735
+ # feature_set: "ALL",
736
+ # id: "o-exampleorgid",
737
+ # master_account_arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
738
+ # master_account_email: "bill@example.com",
739
+ # master_account_id: "111111111111",
740
+ # },
741
+ # }
742
+ #
743
+ # @example Example: To create a new organization with consolidated billing features only
744
+ #
745
+ # # In the following example, Bill creates an organization using credentials from account 111111111111, and configures the organization to support only the consolidated billing feature set:
746
+
747
+
748
+ #
749
+ # resp = client.create_organization({
750
+ # feature_set: "CONSOLIDATED_BILLING",
751
+ # })
752
+ #
753
+ # resp.to_h outputs the following:
754
+ # {
755
+ # organization: {
756
+ # arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid",
757
+ # available_policy_types: [
758
+ # ],
759
+ # feature_set: "CONSOLIDATED_BILLING",
760
+ # id: "o-exampleorgid",
761
+ # master_account_arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
762
+ # master_account_email: "bill@example.com",
763
+ # master_account_id: "111111111111",
764
+ # },
765
+ # }
766
+ #
559
767
  # @example Request syntax with placeholder values
560
768
  #
561
769
  # resp = client.create_organization({
@@ -626,6 +834,27 @@ module Aws::Organizations
626
834
  #
627
835
  # * {Types::CreateOrganizationalUnitResponse#organizational_unit #organizational_unit} => Types::OrganizationalUnit
628
836
  #
837
+ #
838
+ # @example Example: To create a new organization unit
839
+ #
840
+ # # The following example shows how to create an OU that is named AccountingOU. The new OU is directly under the root.:
841
+
842
+
843
+ #
844
+ # resp = client.create_organizational_unit({
845
+ # name: "AccountingOU",
846
+ # parent_id: "r-examplerootid111",
847
+ # })
848
+ #
849
+ # resp.to_h outputs the following:
850
+ # {
851
+ # organizational_unit: {
852
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
853
+ # id: "ou-examplerootid111-exampleouid111",
854
+ # name: "AccountingOU",
855
+ # },
856
+ # }
857
+ #
629
858
  # @example Request syntax with placeholder values
630
859
  #
631
860
  # resp = client.create_organizational_unit({
@@ -699,6 +928,33 @@ module Aws::Organizations
699
928
  #
700
929
  # * {Types::CreatePolicyResponse#policy #policy} => Types::Policy
701
930
  #
931
+ #
932
+ # @example Example: To create a service control policy
933
+ #
934
+ # # The following example shows how to create a service control policy (SCP) that is named AllowAllS3Actions. The JSON string in the content parameter specifies the content in the policy. The parameter string is escaped with backslashes to ensure that the embedded double quotes in the JSON policy are treated as literals in the parameter, which itself is surrounded by double quotes:
935
+
936
+
937
+ #
938
+ # resp = client.create_policy({
939
+ # content: "{\\\"Version\\\":\\\"2012-10-17\\\",\\\"Statement\\\":{\\\"Effect\\\":\\\"Allow\\\",\\\"Action\\\":\\\"s3:*\\\"}}",
940
+ # description: "Enables admins of attached accounts to delegate all S3 permissions",
941
+ # name: "AllowAllS3Actions",
942
+ # type: "SERVICE_CONTROL_POLICY",
943
+ # })
944
+ #
945
+ # resp.to_h outputs the following:
946
+ # {
947
+ # policy: {
948
+ # content: "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\"}}",
949
+ # policy_summary: {
950
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
951
+ # description: "Allows delegation of all S3 actions",
952
+ # name: "AllowAllS3Actions",
953
+ # type: "SERVICE_CONTROL_POLICY",
954
+ # },
955
+ # },
956
+ # }
957
+ #
702
958
  # @example Request syntax with placeholder values
703
959
  #
704
960
  # resp = client.create_policy({
@@ -753,6 +1009,61 @@ module Aws::Organizations
753
1009
  #
754
1010
  # * {Types::DeclineHandshakeResponse#handshake #handshake} => Types::Handshake
755
1011
  #
1012
+ #
1013
+ # @example Example: To decline a handshake sent from the master account
1014
+ #
1015
+ # # The following example shows Susan declining an invitation to join Bill's organization. The DeclineHandshake operation returns a handshake object, showing that the state is now DECLINED:
1016
+ #
1017
+ # resp = client.decline_handshake({
1018
+ # handshake_id: "h-examplehandshakeid111",
1019
+ # })
1020
+ #
1021
+ # resp.to_h outputs the following:
1022
+ # {
1023
+ # handshake: {
1024
+ # action: "INVITE",
1025
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
1026
+ # expiration_timestamp: Time.parse("2016-12-15T19:27:58Z"),
1027
+ # id: "h-examplehandshakeid111",
1028
+ # parties: [
1029
+ # {
1030
+ # id: "222222222222",
1031
+ # type: "ACCOUNT",
1032
+ # },
1033
+ # {
1034
+ # id: "o-exampleorgid",
1035
+ # type: "ORGANIZATION",
1036
+ # },
1037
+ # ],
1038
+ # requested_timestamp: Time.parse("2016-11-30T19:27:58Z"),
1039
+ # resources: [
1040
+ # {
1041
+ # resources: [
1042
+ # {
1043
+ # type: "MASTER_EMAIL",
1044
+ # value: "bill@example.com",
1045
+ # },
1046
+ # {
1047
+ # type: "MASTER_NAME",
1048
+ # value: "Master Account",
1049
+ # },
1050
+ # ],
1051
+ # type: "ORGANIZATION",
1052
+ # value: "o-exampleorgid",
1053
+ # },
1054
+ # {
1055
+ # type: "ACCOUNT",
1056
+ # value: "222222222222",
1057
+ # },
1058
+ # {
1059
+ # type: "NOTES",
1060
+ # value: "This is an invitation to Susan's account to join the Bill's organization.",
1061
+ # },
1062
+ # ],
1063
+ # state: "DECLINED",
1064
+ # },
1065
+ # }
1066
+ #
756
1067
  # @example Request syntax with placeholder values
757
1068
  #
758
1069
  # resp = client.decline_handshake({
@@ -826,6 +1137,17 @@ module Aws::Organizations
826
1137
  #
827
1138
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
828
1139
  #
1140
+ #
1141
+ # @example Example: To delete an organization unit
1142
+ #
1143
+ # # The following example shows how to delete an OU. The example assumes that you previously removed all accounts and other OUs from the OU:
1144
+
1145
+
1146
+ #
1147
+ # resp = client.delete_organizational_unit({
1148
+ # organizational_unit_id: "ou-examplerootid111-exampleouid111",
1149
+ # })
1150
+ #
829
1151
  # @example Request syntax with placeholder values
830
1152
  #
831
1153
  # resp = client.delete_organizational_unit({
@@ -862,6 +1184,17 @@ module Aws::Organizations
862
1184
  #
863
1185
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
864
1186
  #
1187
+ #
1188
+ # @example Example: To delete a policy
1189
+ #
1190
+ # # The following example shows how to delete a policy from an organization. The example assumes that you previously detached the policy from all entities:
1191
+
1192
+
1193
+ #
1194
+ # resp = client.delete_policy({
1195
+ # policy_id: "p-examplepolicyid111",
1196
+ # })
1197
+ #
865
1198
  # @example Request syntax with placeholder values
866
1199
  #
867
1200
  # resp = client.delete_policy({
@@ -899,6 +1232,25 @@ module Aws::Organizations
899
1232
  #
900
1233
  # * {Types::DescribeAccountResponse#account #account} => Types::Account
901
1234
  #
1235
+ #
1236
+ # @example Example: To get the details about an account
1237
+ #
1238
+ # # The following example shows a user in the master account (111111111111) asking for details about account 555555555555:
1239
+ #
1240
+ # resp = client.describe_account({
1241
+ # account_id: "555555555555",
1242
+ # })
1243
+ #
1244
+ # resp.to_h outputs the following:
1245
+ # {
1246
+ # account: {
1247
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/555555555555",
1248
+ # email: "anika@example.com",
1249
+ # id: "555555555555",
1250
+ # name: "Beta Account",
1251
+ # },
1252
+ # }
1253
+ #
902
1254
  # @example Request syntax with placeholder values
903
1255
  #
904
1256
  # resp = client.describe_account({
@@ -947,6 +1299,24 @@ module Aws::Organizations
947
1299
  #
948
1300
  # * {Types::DescribeCreateAccountStatusResponse#create_account_status #create_account_status} => Types::CreateAccountStatus
949
1301
  #
1302
+ #
1303
+ # @example Example: To get information about a request to create an account
1304
+ #
1305
+ # # The following example shows how to request the status about a previous request to create an account in an organization. This operation can be called only by a principal from the organization's master account. In the example, the specified "createAccountRequestId" comes from the response of the original call to "CreateAccount":
1306
+ #
1307
+ # resp = client.describe_create_account_status({
1308
+ # create_account_request_id: "car-exampleaccountcreationrequestid",
1309
+ # })
1310
+ #
1311
+ # resp.to_h outputs the following:
1312
+ # {
1313
+ # create_account_status: {
1314
+ # account_id: "333333333333",
1315
+ # id: "car-exampleaccountcreationrequestid",
1316
+ # state: "SUCCEEDED",
1317
+ # },
1318
+ # }
1319
+ #
950
1320
  # @example Request syntax with placeholder values
951
1321
  #
952
1322
  # resp = client.describe_create_account_status({
@@ -999,6 +1369,57 @@ module Aws::Organizations
999
1369
  #
1000
1370
  # * {Types::DescribeHandshakeResponse#handshake #handshake} => Types::Handshake
1001
1371
  #
1372
+ #
1373
+ # @example Example: To get information about a handshake
1374
+ #
1375
+ # # The following example shows you how to request details about a handshake. The handshake ID comes either from the original call to "InviteAccountToOrganization", or from a call to "ListHandshakesForAccount" or "ListHandshakesForOrganization":
1376
+ #
1377
+ # resp = client.describe_handshake({
1378
+ # handshake_id: "h-examplehandshakeid111",
1379
+ # })
1380
+ #
1381
+ # resp.to_h outputs the following:
1382
+ # {
1383
+ # handshake: {
1384
+ # action: "INVITE",
1385
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
1386
+ # expiration_timestamp: Time.parse("2016-11-30T17:24:58.046Z"),
1387
+ # id: "h-examplehandshakeid111",
1388
+ # parties: [
1389
+ # {
1390
+ # id: "o-exampleorgid",
1391
+ # type: "ORGANIZATION",
1392
+ # },
1393
+ # {
1394
+ # id: "333333333333",
1395
+ # type: "ACCOUNT",
1396
+ # },
1397
+ # ],
1398
+ # requested_timestamp: Time.parse("2016-11-30T17:24:58.046Z"),
1399
+ # resources: [
1400
+ # {
1401
+ # resources: [
1402
+ # {
1403
+ # type: "MASTER_EMAIL",
1404
+ # value: "bill@example.com",
1405
+ # },
1406
+ # {
1407
+ # type: "MASTER_NAME",
1408
+ # value: "Master Account",
1409
+ # },
1410
+ # ],
1411
+ # type: "ORGANIZATION",
1412
+ # value: "o-exampleorgid",
1413
+ # },
1414
+ # {
1415
+ # type: "ACCOUNT",
1416
+ # value: "333333333333",
1417
+ # },
1418
+ # ],
1419
+ # state: "OPEN",
1420
+ # },
1421
+ # }
1422
+ #
1002
1423
  # @example Request syntax with placeholder values
1003
1424
  #
1004
1425
  # resp = client.describe_handshake({
@@ -1039,6 +1460,31 @@ module Aws::Organizations
1039
1460
  #
1040
1461
  # * {Types::DescribeOrganizationResponse#organization #organization} => Types::Organization
1041
1462
  #
1463
+ #
1464
+ # @example Example: To get information about an organization
1465
+ #
1466
+ # # The following example shows how to request information about the current user's organization:/n/n
1467
+ #
1468
+ # resp = client.describe_organization({
1469
+ # })
1470
+ #
1471
+ # resp.to_h outputs the following:
1472
+ # {
1473
+ # organization: {
1474
+ # arn: "arn:aws:organizations::111111111111:organization/o-exampleorgid",
1475
+ # available_policy_types: [
1476
+ # {
1477
+ # status: "ENABLED",
1478
+ # type: "SERVICE_CONTROL_POLICY",
1479
+ # },
1480
+ # ],
1481
+ # feature_set: "ALL",
1482
+ # id: "o-exampleorgid",
1483
+ # master_account_arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
1484
+ # master_account_email: "bill@example.com",
1485
+ # },
1486
+ # }
1487
+ #
1042
1488
  # @example Response structure
1043
1489
  #
1044
1490
  # resp.organization.id #=> String
@@ -1083,6 +1529,24 @@ module Aws::Organizations
1083
1529
  #
1084
1530
  # * {Types::DescribeOrganizationalUnitResponse#organizational_unit #organizational_unit} => Types::OrganizationalUnit
1085
1531
  #
1532
+ #
1533
+ # @example Example: To get information about an organizational unit
1534
+ #
1535
+ # # The following example shows how to request details about an OU:/n/n
1536
+ #
1537
+ # resp = client.describe_organizational_unit({
1538
+ # organizational_unit_id: "ou-examplerootid111-exampleouid111",
1539
+ # })
1540
+ #
1541
+ # resp.to_h outputs the following:
1542
+ # {
1543
+ # organizational_unit: {
1544
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
1545
+ # id: "ou-examplerootid111-exampleouid111",
1546
+ # name: "Accounting Group",
1547
+ # },
1548
+ # }
1549
+ #
1086
1550
  # @example Request syntax with placeholder values
1087
1551
  #
1088
1552
  # resp = client.describe_organizational_unit({
@@ -1125,6 +1589,30 @@ module Aws::Organizations
1125
1589
  #
1126
1590
  # * {Types::DescribePolicyResponse#policy #policy} => Types::Policy
1127
1591
  #
1592
+ #
1593
+ # @example Example: To get information about a policy
1594
+ #
1595
+ # # The following example shows how to request information about a policy:/n/n
1596
+ #
1597
+ # resp = client.describe_policy({
1598
+ # policy_id: "p-examplepolicyid111",
1599
+ # })
1600
+ #
1601
+ # resp.to_h outputs the following:
1602
+ # {
1603
+ # policy: {
1604
+ # content: "{\\n \\\"Version\\\": \\\"2012-10-17\\\",\\n \\\"Statement\\\": [\\n {\\n \\\"Effect\\\": \\\"Allow\\\",\\n \\\"Action\\\": \\\"*\\\",\\n \\\"Resource\\\": \\\"*\\\"\\n }\\n ]\\n}",
1605
+ # policy_summary: {
1606
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
1607
+ # aws_managed: false,
1608
+ # description: "Enables admins to delegate S3 permissions",
1609
+ # id: "p-examplepolicyid111",
1610
+ # name: "AllowAllS3Actions",
1611
+ # type: "SERVICE_CONTROL_POLICY",
1612
+ # },
1613
+ # },
1614
+ # }
1615
+ #
1128
1616
  # @example Request syntax with placeholder values
1129
1617
  #
1130
1618
  # resp = client.describe_policy({
@@ -1209,6 +1697,16 @@ module Aws::Organizations
1209
1697
  #
1210
1698
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1211
1699
  #
1700
+ #
1701
+ # @example Example: To detach a policy from a root, OU, or account
1702
+ #
1703
+ # # The following example shows how to detach a policy from an OU:/n/n
1704
+ #
1705
+ # resp = client.detach_policy({
1706
+ # policy_id: "p-examplepolicyid111",
1707
+ # target_id: "ou-examplerootid111-exampleouid111",
1708
+ # })
1709
+ #
1212
1710
  # @example Request syntax with placeholder values
1213
1711
  #
1214
1712
  # resp = client.detach_policy({
@@ -1253,6 +1751,27 @@ module Aws::Organizations
1253
1751
  #
1254
1752
  # * {Types::DisablePolicyTypeResponse#root #root} => Types::Root
1255
1753
  #
1754
+ #
1755
+ # @example Example: To disable a policy type in a root
1756
+ #
1757
+ # # The following example shows how to disable the service control policy (SCP) policy type in a root. The response shows that the PolicyTypes response element no longer includes SERVICE_CONTROL_POLICY:/n/n
1758
+ #
1759
+ # resp = client.disable_policy_type({
1760
+ # policy_type: "SERVICE_CONTROL_POLICY",
1761
+ # root_id: "r-examplerootid111",
1762
+ # })
1763
+ #
1764
+ # resp.to_h outputs the following:
1765
+ # {
1766
+ # root: {
1767
+ # arn: "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
1768
+ # id: "r-examplerootid111",
1769
+ # name: "Root",
1770
+ # policy_types: [
1771
+ # ],
1772
+ # },
1773
+ # }
1774
+ #
1256
1775
  # @example Request syntax with placeholder values
1257
1776
  #
1258
1777
  # resp = client.disable_policy_type({
@@ -1317,6 +1836,38 @@ module Aws::Organizations
1317
1836
  #
1318
1837
  # * {Types::EnableAllFeaturesResponse#handshake #handshake} => Types::Handshake
1319
1838
  #
1839
+ #
1840
+ # @example Example: To enable all features in an organization
1841
+ #
1842
+ # # This example shows the administrator asking all the invited accounts in the organization to approve enabling all features in the organization. AWS Organizations sends an email to the address that is registered with every invited member account asking the owner to approve the change by accepting the handshake that is sent. After all invited member accounts accept the handshake, the organization administrator can finalize the change to enable all features, and those with appropriate permissions can create policies and apply them to roots, OUs, and accounts:/n/n
1843
+ #
1844
+ # resp = client.enable_all_features({
1845
+ # })
1846
+ #
1847
+ # resp.to_h outputs the following:
1848
+ # {
1849
+ # handshake: {
1850
+ # action: "ENABLE_ALL_FEATURES",
1851
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/enable_all_features/h-examplehandshakeid111",
1852
+ # expiration_timestamp: Time.parse("2017-02-28T09:35:40.05Z"),
1853
+ # id: "h-examplehandshakeid111",
1854
+ # parties: [
1855
+ # {
1856
+ # id: "o-exampleorgid",
1857
+ # type: "ORGANIZATION",
1858
+ # },
1859
+ # ],
1860
+ # requested_timestamp: Time.parse("2017-02-13T09:35:40.05Z"),
1861
+ # resources: [
1862
+ # {
1863
+ # type: "ORGANIZATION",
1864
+ # value: "o-exampleorgid",
1865
+ # },
1866
+ # ],
1867
+ # state: "REQUESTED",
1868
+ # },
1869
+ # }
1870
+ #
1320
1871
  # @example Response structure
1321
1872
  #
1322
1873
  # resp.handshake.id #=> String
@@ -1368,6 +1919,31 @@ module Aws::Organizations
1368
1919
  #
1369
1920
  # * {Types::EnablePolicyTypeResponse#root #root} => Types::Root
1370
1921
  #
1922
+ #
1923
+ # @example Example: To enable a policy type in a root
1924
+ #
1925
+ # # The following example shows how to enable the service control policy (SCP) policy type in a root. The output shows a root object with a PolicyTypes response element showing that SCPs are now enabled:/n/n
1926
+ #
1927
+ # resp = client.enable_policy_type({
1928
+ # policy_type: "SERVICE_CONTROL_POLICY",
1929
+ # root_id: "r-examplerootid111",
1930
+ # })
1931
+ #
1932
+ # resp.to_h outputs the following:
1933
+ # {
1934
+ # root: {
1935
+ # arn: "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
1936
+ # id: "r-examplerootid111",
1937
+ # name: "Root",
1938
+ # policy_types: [
1939
+ # {
1940
+ # status: "ENABLED",
1941
+ # type: "SERVICE_CONTROL_POLICY",
1942
+ # },
1943
+ # ],
1944
+ # },
1945
+ # }
1946
+ #
1371
1947
  # @example Request syntax with placeholder values
1372
1948
  #
1373
1949
  # resp = client.enable_policy_type({
@@ -1440,6 +2016,65 @@ module Aws::Organizations
1440
2016
  #
1441
2017
  # * {Types::InviteAccountToOrganizationResponse#handshake #handshake} => Types::Handshake
1442
2018
  #
2019
+ #
2020
+ # @example Example: To invite an account to join an organization
2021
+ #
2022
+ # # The following example shows the admin of the master account owned by bill@example.com inviting the account owned by juan@example.com to join an organization.
2023
+ #
2024
+ # resp = client.invite_account_to_organization({
2025
+ # notes: "This is a request for Juan's account to join Bill's organization",
2026
+ # target: {
2027
+ # id: "juan@example.com",
2028
+ # type: "EMAIL",
2029
+ # },
2030
+ # })
2031
+ #
2032
+ # resp.to_h outputs the following:
2033
+ # {
2034
+ # handshake: {
2035
+ # action: "INVITE",
2036
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
2037
+ # expiration_timestamp: Time.parse("2017-02-16T09:36:05.02Z"),
2038
+ # id: "h-examplehandshakeid111",
2039
+ # parties: [
2040
+ # {
2041
+ # id: "o-exampleorgid",
2042
+ # type: "ORGANIZATION",
2043
+ # },
2044
+ # {
2045
+ # id: "juan@example.com",
2046
+ # type: "EMAIL",
2047
+ # },
2048
+ # ],
2049
+ # requested_timestamp: Time.parse("2017-02-01T09:36:05.02Z"),
2050
+ # resources: [
2051
+ # {
2052
+ # resources: [
2053
+ # {
2054
+ # type: "MASTER_EMAIL",
2055
+ # value: "bill@amazon.com",
2056
+ # },
2057
+ # {
2058
+ # type: "MASTER_NAME",
2059
+ # value: "Org Master Account",
2060
+ # },
2061
+ # {
2062
+ # type: "ORGANIZATION_FEATURE_SET",
2063
+ # value: "FULL",
2064
+ # },
2065
+ # ],
2066
+ # type: "ORGANIZATION",
2067
+ # value: "o-exampleorgid",
2068
+ # },
2069
+ # {
2070
+ # type: "EMAIL",
2071
+ # value: "juan@example.com",
2072
+ # },
2073
+ # ],
2074
+ # state: "OPEN",
2075
+ # },
2076
+ # }
2077
+ #
1443
2078
  # @example Request syntax with placeholder values
1444
2079
  #
1445
2080
  # resp = client.invite_account_to_organization({
@@ -1504,6 +2139,14 @@ module Aws::Organizations
1504
2139
  #
1505
2140
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
1506
2141
  #
2142
+ #
2143
+ # @example Example: To leave an organization as a member account
2144
+ #
2145
+ # # TThe following example shows how to remove your member account from an organization:
2146
+ #
2147
+ # resp = client.leave_organization({
2148
+ # })
2149
+ #
1507
2150
  # @see http://docs.aws.amazon.com/goto/WebAPI/organizations-2016-11-28/LeaveOrganization AWS API Documentation
1508
2151
  #
1509
2152
  # @overload leave_organization(params = {})
@@ -1543,6 +2186,56 @@ module Aws::Organizations
1543
2186
  # * {Types::ListAccountsResponse#accounts #accounts} => Array<Types::Account>
1544
2187
  # * {Types::ListAccountsResponse#next_token #next_token} => String
1545
2188
  #
2189
+ #
2190
+ # @example Example: To retrieve a list of all of the accounts in an organization
2191
+ #
2192
+ # # The following example shows you how to request a list of the accounts in an organization:
2193
+ #
2194
+ # resp = client.list_accounts({
2195
+ # })
2196
+ #
2197
+ # resp.to_h outputs the following:
2198
+ # {
2199
+ # accounts: [
2200
+ # {
2201
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
2202
+ # email: "bill@example.com",
2203
+ # id: "111111111111",
2204
+ # joined_method: "INVITED",
2205
+ # joined_timestamp: Time.parse("20161215T193015Z"),
2206
+ # name: "Master Account",
2207
+ # status: "ACTIVE",
2208
+ # },
2209
+ # {
2210
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/222222222222",
2211
+ # email: "alice@example.com",
2212
+ # id: "222222222222",
2213
+ # joined_method: "INVITED",
2214
+ # joined_timestamp: Time.parse("20161215T210221Z"),
2215
+ # name: "Developer Account",
2216
+ # status: "ACTIVE",
2217
+ # },
2218
+ # {
2219
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
2220
+ # email: "juan@example.com",
2221
+ # id: "333333333333",
2222
+ # joined_method: "INVITED",
2223
+ # joined_timestamp: Time.parse("20161215T210347Z"),
2224
+ # name: "Test Account",
2225
+ # status: "ACTIVE",
2226
+ # },
2227
+ # {
2228
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
2229
+ # email: "anika@example.com",
2230
+ # id: "444444444444",
2231
+ # joined_method: "INVITED",
2232
+ # joined_timestamp: Time.parse("20161215T210332Z"),
2233
+ # name: "Production Account",
2234
+ # status: "ACTIVE",
2235
+ # },
2236
+ # ],
2237
+ # }
2238
+ #
1546
2239
  # @example Request syntax with placeholder values
1547
2240
  #
1548
2241
  # resp = client.list_accounts({
@@ -1605,6 +2298,39 @@ module Aws::Organizations
1605
2298
  # * {Types::ListAccountsForParentResponse#accounts #accounts} => Array<Types::Account>
1606
2299
  # * {Types::ListAccountsForParentResponse#next_token #next_token} => String
1607
2300
  #
2301
+ #
2302
+ # @example Example: To retrieve a list of all of the accounts in a root or OU
2303
+ #
2304
+ # # The following example shows how to request a list of the accounts in an OU:/n/n
2305
+ #
2306
+ # resp = client.list_accounts_for_parent({
2307
+ # parent_id: "ou-examplerootid111-exampleouid111",
2308
+ # })
2309
+ #
2310
+ # resp.to_h outputs the following:
2311
+ # {
2312
+ # accounts: [
2313
+ # {
2314
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
2315
+ # email: "juan@example.com",
2316
+ # id: "333333333333",
2317
+ # joined_method: "INVITED",
2318
+ # joined_timestamp: Time.parse(1481835795.536),
2319
+ # name: "Development Account",
2320
+ # status: "ACTIVE",
2321
+ # },
2322
+ # {
2323
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
2324
+ # email: "anika@example.com",
2325
+ # id: "444444444444",
2326
+ # joined_method: "INVITED",
2327
+ # joined_timestamp: Time.parse(1481835812.143),
2328
+ # name: "Test Account",
2329
+ # status: "ACTIVE",
2330
+ # },
2331
+ # ],
2332
+ # }
2333
+ #
1608
2334
  # @example Request syntax with placeholder values
1609
2335
  #
1610
2336
  # resp = client.list_accounts_for_parent({
@@ -1683,6 +2409,30 @@ module Aws::Organizations
1683
2409
  # * {Types::ListChildrenResponse#children #children} => Array<Types::Child>
1684
2410
  # * {Types::ListChildrenResponse#next_token #next_token} => String
1685
2411
  #
2412
+ #
2413
+ # @example Example: To retrieve a list of all of the child accounts and OUs in a parent root or OU
2414
+ #
2415
+ # # The following example shows how to request a list of the child OUs in a parent root or OU:/n/n
2416
+ #
2417
+ # resp = client.list_children({
2418
+ # child_type: "ORGANIZATIONAL_UNIT",
2419
+ # parent_id: "ou-examplerootid111-exampleouid111",
2420
+ # })
2421
+ #
2422
+ # resp.to_h outputs the following:
2423
+ # {
2424
+ # children: [
2425
+ # {
2426
+ # id: "ou-examplerootid111-exampleouid111",
2427
+ # type: "ORGANIZATIONAL_UNIT",
2428
+ # },
2429
+ # {
2430
+ # id: "ou-examplerootid111-exampleouid222",
2431
+ # type: "ORGANIZATIONAL_UNIT",
2432
+ # },
2433
+ # ],
2434
+ # }
2435
+ #
1686
2436
  # @example Request syntax with placeholder values
1687
2437
  #
1688
2438
  # resp = client.list_children({
@@ -1742,6 +2492,53 @@ module Aws::Organizations
1742
2492
  # * {Types::ListCreateAccountStatusResponse#create_account_statuses #create_account_statuses} => Array<Types::CreateAccountStatus>
1743
2493
  # * {Types::ListCreateAccountStatusResponse#next_token #next_token} => String
1744
2494
  #
2495
+ #
2496
+ # @example Example: To get a list of completed account creation requests made in the organization
2497
+ #
2498
+ # # The following example shows a user requesting a list of only the completed account creation requests made for the current organization:
2499
+ #
2500
+ # resp = client.list_create_account_status({
2501
+ # states: [
2502
+ # "SUCCEEDED",
2503
+ # ],
2504
+ # })
2505
+ #
2506
+ # resp.to_h outputs the following:
2507
+ # {
2508
+ # create_account_statuses: [
2509
+ # {
2510
+ # account_id: "444444444444",
2511
+ # account_name: "Developer Test Account",
2512
+ # completed_timestamp: Time.parse("2017-01-15T13:45:23.6Z"),
2513
+ # id: "car-exampleaccountcreationrequestid1",
2514
+ # requested_timestamp: Time.parse("2017-01-15T13:45:23.01Z"),
2515
+ # state: "SUCCEEDED",
2516
+ # },
2517
+ # ],
2518
+ # }
2519
+ #
2520
+ # @example Example: To get a list of all account creation requests made in the organization
2521
+ #
2522
+ # # The following example shows a user requesting a list of only the in-progress account creation requests made for the current organization:
2523
+ #
2524
+ # resp = client.list_create_account_status({
2525
+ # states: [
2526
+ # "IN_PROGRESS",
2527
+ # ],
2528
+ # })
2529
+ #
2530
+ # resp.to_h outputs the following:
2531
+ # {
2532
+ # create_account_statuses: [
2533
+ # {
2534
+ # account_name: "Production Account",
2535
+ # id: "car-exampleaccountcreationrequestid2",
2536
+ # requested_timestamp: Time.parse("2017-01-15T13:45:23.01Z"),
2537
+ # state: "IN_PROGRESS",
2538
+ # },
2539
+ # ],
2540
+ # }
2541
+ #
1745
2542
  # @example Request syntax with placeholder values
1746
2543
  #
1747
2544
  # resp = client.list_create_account_status({
@@ -1812,6 +2609,62 @@ module Aws::Organizations
1812
2609
  # * {Types::ListHandshakesForAccountResponse#handshakes #handshakes} => Array<Types::Handshake>
1813
2610
  # * {Types::ListHandshakesForAccountResponse#next_token #next_token} => String
1814
2611
  #
2612
+ #
2613
+ # @example Example: To retrieve a list of the handshakes sent to an account
2614
+ #
2615
+ # # The following example shows you how to get a list of handshakes that are associated with the account of the credentials used to call the operation:
2616
+ #
2617
+ # resp = client.list_handshakes_for_account({
2618
+ # })
2619
+ #
2620
+ # resp.to_h outputs the following:
2621
+ # {
2622
+ # handshakes: [
2623
+ # {
2624
+ # action: "INVITE",
2625
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
2626
+ # expiration_timestamp: Time.parse("2017-01-28T14:35:23.3Z"),
2627
+ # id: "h-examplehandshakeid111",
2628
+ # parties: [
2629
+ # {
2630
+ # id: "o-exampleorgid",
2631
+ # type: "ORGANIZATION",
2632
+ # },
2633
+ # {
2634
+ # id: "juan@example.com",
2635
+ # type: "EMAIL",
2636
+ # },
2637
+ # ],
2638
+ # requested_timestamp: Time.parse("2017-01-13T14:35:23.3Z"),
2639
+ # resources: [
2640
+ # {
2641
+ # resources: [
2642
+ # {
2643
+ # type: "MASTER_EMAIL",
2644
+ # value: "bill@amazon.com",
2645
+ # },
2646
+ # {
2647
+ # type: "MASTER_NAME",
2648
+ # value: "Org Master Account",
2649
+ # },
2650
+ # {
2651
+ # type: "ORGANIZATION_FEATURE_SET",
2652
+ # value: "FULL",
2653
+ # },
2654
+ # ],
2655
+ # type: "ORGANIZATION",
2656
+ # value: "o-exampleorgid",
2657
+ # },
2658
+ # {
2659
+ # type: "EMAIL",
2660
+ # value: "juan@example.com",
2661
+ # },
2662
+ # ],
2663
+ # state: "OPEN",
2664
+ # },
2665
+ # ],
2666
+ # }
2667
+ #
1815
2668
  # @example Request syntax with placeholder values
1816
2669
  #
1817
2670
  # resp = client.list_handshakes_for_account({
@@ -1894,6 +2747,104 @@ module Aws::Organizations
1894
2747
  # * {Types::ListHandshakesForOrganizationResponse#handshakes #handshakes} => Array<Types::Handshake>
1895
2748
  # * {Types::ListHandshakesForOrganizationResponse#next_token #next_token} => String
1896
2749
  #
2750
+ #
2751
+ # @example Example: To retrieve a list of the handshakes associated with an organization
2752
+ #
2753
+ # # The following example shows you how to get a list of handshakes associated with the current organization:
2754
+ #
2755
+ # resp = client.list_handshakes_for_organization({
2756
+ # })
2757
+ #
2758
+ # resp.to_h outputs the following:
2759
+ # {
2760
+ # handshakes: [
2761
+ # {
2762
+ # action: "INVITE",
2763
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
2764
+ # expiration_timestamp: Time.parse("2017-01-28T14:35:23.3Z"),
2765
+ # id: "h-examplehandshakeid111",
2766
+ # parties: [
2767
+ # {
2768
+ # id: "o-exampleorgid",
2769
+ # type: "ORGANIZATION",
2770
+ # },
2771
+ # {
2772
+ # id: "juan@example.com",
2773
+ # type: "EMAIL",
2774
+ # },
2775
+ # ],
2776
+ # requested_timestamp: Time.parse("2017-01-13T14:35:23.3Z"),
2777
+ # resources: [
2778
+ # {
2779
+ # resources: [
2780
+ # {
2781
+ # type: "MASTER_EMAIL",
2782
+ # value: "bill@amazon.com",
2783
+ # },
2784
+ # {
2785
+ # type: "MASTER_NAME",
2786
+ # value: "Org Master Account",
2787
+ # },
2788
+ # {
2789
+ # type: "ORGANIZATION_FEATURE_SET",
2790
+ # value: "FULL",
2791
+ # },
2792
+ # ],
2793
+ # type: "ORGANIZATION",
2794
+ # value: "o-exampleorgid",
2795
+ # },
2796
+ # {
2797
+ # type: "EMAIL",
2798
+ # value: "juan@example.com",
2799
+ # },
2800
+ # ],
2801
+ # state: "OPEN",
2802
+ # },
2803
+ # {
2804
+ # action: "INVITE",
2805
+ # arn: "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
2806
+ # expiration_timestamp: Time.parse("2017-01-28T14:35:23.3Z"),
2807
+ # id: "h-examplehandshakeid222",
2808
+ # parties: [
2809
+ # {
2810
+ # id: "o-exampleorgid",
2811
+ # type: "ORGANIZATION",
2812
+ # },
2813
+ # {
2814
+ # id: "anika@example.com",
2815
+ # type: "EMAIL",
2816
+ # },
2817
+ # ],
2818
+ # requested_timestamp: Time.parse("2017-01-13T14:35:23.3Z"),
2819
+ # resources: [
2820
+ # {
2821
+ # resources: [
2822
+ # {
2823
+ # type: "MASTER_EMAIL",
2824
+ # value: "bill@example.com",
2825
+ # },
2826
+ # {
2827
+ # type: "MASTER_NAME",
2828
+ # value: "Master Account",
2829
+ # },
2830
+ # ],
2831
+ # type: "ORGANIZATION",
2832
+ # value: "o-exampleorgid",
2833
+ # },
2834
+ # {
2835
+ # type: "EMAIL",
2836
+ # value: "anika@example.com",
2837
+ # },
2838
+ # {
2839
+ # type: "NOTES",
2840
+ # value: "This is an invitation to Anika's account to join Bill's organization.",
2841
+ # },
2842
+ # ],
2843
+ # state: "ACCEPTED",
2844
+ # },
2845
+ # ],
2846
+ # }
2847
+ #
1897
2848
  # @example Request syntax with placeholder values
1898
2849
  #
1899
2850
  # resp = client.list_handshakes_for_organization({
@@ -1980,6 +2931,31 @@ module Aws::Organizations
1980
2931
  # * {Types::ListOrganizationalUnitsForParentResponse#organizational_units #organizational_units} => Array<Types::OrganizationalUnit>
1981
2932
  # * {Types::ListOrganizationalUnitsForParentResponse#next_token #next_token} => String
1982
2933
  #
2934
+ #
2935
+ # @example Example: To retrieve a list of all of the child OUs in a parent root or OU
2936
+ #
2937
+ # # The following example shows how to get a list of OUs in a specified root:/n/n
2938
+ #
2939
+ # resp = client.list_organizational_units_for_parent({
2940
+ # parent_id: "r-examplerootid111",
2941
+ # })
2942
+ #
2943
+ # resp.to_h outputs the following:
2944
+ # {
2945
+ # organizational_units: [
2946
+ # {
2947
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examlerootid111-exampleouid111",
2948
+ # id: "ou-examplerootid111-exampleouid111",
2949
+ # name: "Development",
2950
+ # },
2951
+ # {
2952
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examlerootid111-exampleouid222",
2953
+ # id: "ou-examplerootid111-exampleouid222",
2954
+ # name: "Production",
2955
+ # },
2956
+ # ],
2957
+ # }
2958
+ #
1983
2959
  # @example Request syntax with placeholder values
1984
2960
  #
1985
2961
  # resp = client.list_organizational_units_for_parent({
@@ -2058,6 +3034,25 @@ module Aws::Organizations
2058
3034
  # * {Types::ListParentsResponse#parents #parents} => Array<Types::Parent>
2059
3035
  # * {Types::ListParentsResponse#next_token #next_token} => String
2060
3036
  #
3037
+ #
3038
+ # @example Example: To retrieve a list of all of the parents of a child OU or account
3039
+ #
3040
+ # # The following example shows how to list the root or OUs that contain account 444444444444:/n/n
3041
+ #
3042
+ # resp = client.list_parents({
3043
+ # child_id: "444444444444",
3044
+ # })
3045
+ #
3046
+ # resp.to_h outputs the following:
3047
+ # {
3048
+ # parents: [
3049
+ # {
3050
+ # id: "ou-examplerootid111-exampleouid111",
3051
+ # type: "ORGANIZATIONAL_UNIT",
3052
+ # },
3053
+ # ],
3054
+ # }
3055
+ #
2061
3056
  # @example Request syntax with placeholder values
2062
3057
  #
2063
3058
  # resp = client.list_parents({
@@ -2114,6 +3109,45 @@ module Aws::Organizations
2114
3109
  # * {Types::ListPoliciesResponse#policies #policies} => Array<Types::PolicySummary>
2115
3110
  # * {Types::ListPoliciesResponse#next_token #next_token} => String
2116
3111
  #
3112
+ #
3113
+ # @example Example: To retrieve a list policies in the organization
3114
+ #
3115
+ # # The following example shows how to get a list of service control policies (SCPs):/n/n
3116
+ #
3117
+ # resp = client.list_policies({
3118
+ # filter: "SERVICE_CONTROL_POLICY",
3119
+ # })
3120
+ #
3121
+ # resp.to_h outputs the following:
3122
+ # {
3123
+ # policies: [
3124
+ # {
3125
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
3126
+ # aws_managed: false,
3127
+ # description: "Enables account admins to delegate permissions for any S3 actions to users and roles in their accounts.",
3128
+ # id: "p-examplepolicyid111",
3129
+ # name: "AllowAllS3Actions",
3130
+ # type: "SERVICE_CONTROL_POLICY",
3131
+ # },
3132
+ # {
3133
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid222",
3134
+ # aws_managed: false,
3135
+ # description: "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts.",
3136
+ # id: "p-examplepolicyid222",
3137
+ # name: "AllowAllEC2Actions",
3138
+ # type: "SERVICE_CONTROL_POLICY",
3139
+ # },
3140
+ # {
3141
+ # arn: "arn:aws:organizations::aws:policy/service_control_policy/p-FullAWSAccess",
3142
+ # aws_managed: true,
3143
+ # description: "Allows access to every operation",
3144
+ # id: "p-FullAWSAccess",
3145
+ # name: "FullAWSAccess",
3146
+ # type: "SERVICE_CONTROL_POLICY",
3147
+ # },
3148
+ # ],
3149
+ # }
3150
+ #
2117
3151
  # @example Request syntax with placeholder values
2118
3152
  #
2119
3153
  # resp = client.list_policies({
@@ -2196,6 +3230,30 @@ module Aws::Organizations
2196
3230
  # * {Types::ListPoliciesForTargetResponse#policies #policies} => Array<Types::PolicySummary>
2197
3231
  # * {Types::ListPoliciesForTargetResponse#next_token #next_token} => String
2198
3232
  #
3233
+ #
3234
+ # @example Example: To retrieve a list policies attached to a root, OU, or account
3235
+ #
3236
+ # # The following example shows how to get a list of all service control policies (SCPs) of the type specified by the Filter parameter, that are directly attached to an account. The returned list does not include policies that apply to the account because of inheritance from its location in an OU hierarchy:/n/n
3237
+ #
3238
+ # resp = client.list_policies_for_target({
3239
+ # filter: "SERVICE_CONTROL_POLICY",
3240
+ # target_id: "444444444444",
3241
+ # })
3242
+ #
3243
+ # resp.to_h outputs the following:
3244
+ # {
3245
+ # policies: [
3246
+ # {
3247
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid222",
3248
+ # aws_managed: false,
3249
+ # description: "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts.",
3250
+ # id: "p-examplepolicyid222",
3251
+ # name: "AllowAllEC2Actions",
3252
+ # type: "SERVICE_CONTROL_POLICY",
3253
+ # },
3254
+ # ],
3255
+ # }
3256
+ #
2199
3257
  # @example Request syntax with placeholder values
2200
3258
  #
2201
3259
  # resp = client.list_policies_for_target({
@@ -2253,6 +3311,31 @@ module Aws::Organizations
2253
3311
  # * {Types::ListRootsResponse#roots #roots} => Array<Types::Root>
2254
3312
  # * {Types::ListRootsResponse#next_token #next_token} => String
2255
3313
  #
3314
+ #
3315
+ # @example Example: To retrieve a list of roots in the organization
3316
+ #
3317
+ # # The following example shows how to get the list of the roots in the current organization:/n/n
3318
+ #
3319
+ # resp = client.list_roots({
3320
+ # })
3321
+ #
3322
+ # resp.to_h outputs the following:
3323
+ # {
3324
+ # roots: [
3325
+ # {
3326
+ # arn: "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
3327
+ # id: "r-examplerootid111",
3328
+ # name: "Root",
3329
+ # policy_types: [
3330
+ # {
3331
+ # status: "ENABLED",
3332
+ # type: "SERVICE_CONTROL_POLICY",
3333
+ # },
3334
+ # ],
3335
+ # },
3336
+ # ],
3337
+ # }
3338
+ #
2256
3339
  # @example Request syntax with placeholder values
2257
3340
  #
2258
3341
  # resp = client.list_roots({
@@ -2320,6 +3403,39 @@ module Aws::Organizations
2320
3403
  # * {Types::ListTargetsForPolicyResponse#targets #targets} => Array<Types::PolicyTargetSummary>
2321
3404
  # * {Types::ListTargetsForPolicyResponse#next_token #next_token} => String
2322
3405
  #
3406
+ #
3407
+ # @example Example: To retrieve a list of roots, OUs, and accounts to which a policy is attached
3408
+ #
3409
+ # # The following example shows how to get the list of roots, OUs, and accounts to which the specified policy is attached:/n/n
3410
+ #
3411
+ # resp = client.list_targets_for_policy({
3412
+ # policy_id: "p-FullAWSAccess",
3413
+ # })
3414
+ #
3415
+ # resp.to_h outputs the following:
3416
+ # {
3417
+ # targets: [
3418
+ # {
3419
+ # arn: "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
3420
+ # name: "Root",
3421
+ # target_id: "r-examplerootid111",
3422
+ # type: "ROOT",
3423
+ # },
3424
+ # {
3425
+ # arn: "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333;",
3426
+ # name: "Developer Test Account",
3427
+ # target_id: "333333333333",
3428
+ # type: "ACCOUNT",
3429
+ # },
3430
+ # {
3431
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
3432
+ # name: "Accounting",
3433
+ # target_id: "ou-examplerootid111-exampleouid111",
3434
+ # type: "ORGANIZATIONAL_UNIT",
3435
+ # },
3436
+ # ],
3437
+ # }
3438
+ #
2323
3439
  # @example Request syntax with placeholder values
2324
3440
  #
2325
3441
  # resp = client.list_targets_for_policy({
@@ -2402,6 +3518,17 @@ module Aws::Organizations
2402
3518
  #
2403
3519
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2404
3520
  #
3521
+ #
3522
+ # @example Example: To move an OU or account to another OU or the root
3523
+ #
3524
+ # # The following example shows how to move a member account from the root to an OU:/n/n
3525
+ #
3526
+ # resp = client.move_account({
3527
+ # account_id: "333333333333",
3528
+ # destination_parent_id: "ou-examplerootid111-exampleouid111",
3529
+ # source_parent_id: "r-examplerootid111",
3530
+ # })
3531
+ #
2405
3532
  # @example Request syntax with placeholder values
2406
3533
  #
2407
3534
  # resp = client.move_account({
@@ -2458,6 +3585,15 @@ module Aws::Organizations
2458
3585
  #
2459
3586
  # @return [Struct] Returns an empty {Seahorse::Client::Response response}.
2460
3587
  #
3588
+ #
3589
+ # @example Example: To remove an account from an organization as the master account
3590
+ #
3591
+ # # The following example shows you how to remove an account from an organization:
3592
+ #
3593
+ # resp = client.remove_account_from_organization({
3594
+ # account_id: "333333333333",
3595
+ # })
3596
+ #
2461
3597
  # @example Request syntax with placeholder values
2462
3598
  #
2463
3599
  # resp = client.remove_account_from_organization({
@@ -2507,6 +3643,25 @@ module Aws::Organizations
2507
3643
  #
2508
3644
  # * {Types::UpdateOrganizationalUnitResponse#organizational_unit #organizational_unit} => Types::OrganizationalUnit
2509
3645
  #
3646
+ #
3647
+ # @example Example: To rename an organizational unit
3648
+ #
3649
+ # # The following example shows how to rename an OU. The output confirms the new name:/n/n
3650
+ #
3651
+ # resp = client.update_organizational_unit({
3652
+ # name: "AccountingOU",
3653
+ # organizational_unit_id: "ou-examplerootid111-exampleouid111",
3654
+ # })
3655
+ #
3656
+ # resp.to_h outputs the following:
3657
+ # {
3658
+ # organizational_unit: {
3659
+ # arn: "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
3660
+ # id: "ou-examplerootid111-exampleouid111",
3661
+ # name: "AccountingOU",
3662
+ # },
3663
+ # }
3664
+ #
2510
3665
  # @example Request syntax with placeholder values
2511
3666
  #
2512
3667
  # resp = client.update_organizational_unit({
@@ -2573,6 +3728,56 @@ module Aws::Organizations
2573
3728
  #
2574
3729
  # * {Types::UpdatePolicyResponse#policy #policy} => Types::Policy
2575
3730
  #
3731
+ #
3732
+ # @example Example: To update the details of a policy
3733
+ #
3734
+ # # The following example shows how to rename a policy and give it a new description and new content. The output confirms the new name and description text:/n/n
3735
+ #
3736
+ # resp = client.update_policy({
3737
+ # description: "This description replaces the original.",
3738
+ # name: "Renamed-Policy",
3739
+ # policy_id: "p-examplepolicyid111",
3740
+ # })
3741
+ #
3742
+ # resp.to_h outputs the following:
3743
+ # {
3744
+ # policy: {
3745
+ # content: "{ \"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"ec2:*\", \"Resource\": \"*\" } }",
3746
+ # policy_summary: {
3747
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
3748
+ # aws_managed: false,
3749
+ # description: "This description replaces the original.",
3750
+ # id: "p-examplepolicyid111",
3751
+ # name: "Renamed-Policy",
3752
+ # type: "SERVICE_CONTROL_POLICY",
3753
+ # },
3754
+ # },
3755
+ # }
3756
+ #
3757
+ # @example Example: To update the content of a policy
3758
+ #
3759
+ # # The following example shows how to replace the JSON text of the SCP from the preceding example with a new JSON policy text string that allows S3 actions instead of EC2 actions:/n/n
3760
+ #
3761
+ # resp = client.update_policy({
3762
+ # content: "{ \\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\": {\\\"Effect\\\": \\\"Allow\\\", \\\"Action\\\": \\\"s3:*\\\", \\\"Resource\\\": \\\"*\\\" } }",
3763
+ # policy_id: "p-examplepolicyid111",
3764
+ # })
3765
+ #
3766
+ # resp.to_h outputs the following:
3767
+ # {
3768
+ # policy: {
3769
+ # content: "{ \\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\": { \\\"Effect\\\": \\\"Allow\\\", \\\"Action\\\": \\\"s3:*\\\", \\\"Resource\\\": \\\"*\\\" } }",
3770
+ # policy_summary: {
3771
+ # arn: "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
3772
+ # aws_managed: false,
3773
+ # description: "This description replaces the original.",
3774
+ # id: "p-examplepolicyid111",
3775
+ # name: "Renamed-Policy",
3776
+ # type: "SERVICE_CONTROL_POLICY",
3777
+ # },
3778
+ # },
3779
+ # }
3780
+ #
2576
3781
  # @example Request syntax with placeholder values
2577
3782
  #
2578
3783
  # resp = client.update_policy({
@@ -2614,7 +3819,7 @@ module Aws::Organizations
2614
3819
  params: params,
2615
3820
  config: config)
2616
3821
  context[:gem_name] = 'aws-sdk-organizations'
2617
- context[:gem_version] = '1.0.0.rc6'
3822
+ context[:gem_version] = '1.0.0.rc7'
2618
3823
  Seahorse::Client::Request.new(handlers, context)
2619
3824
  end
2620
3825