@aws-sdk/client-organizations 3.287.0 → 3.289.0

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.
Files changed (39) hide show
  1. package/dist-types/commands/AcceptHandshakeCommand.d.ts +57 -0
  2. package/dist-types/commands/AttachPolicyCommand.d.ts +26 -0
  3. package/dist-types/commands/CancelHandshakeCommand.d.ts +62 -0
  4. package/dist-types/commands/CreateAccountCommand.d.ts +22 -0
  5. package/dist-types/commands/CreateOrganizationCommand.d.ts +55 -0
  6. package/dist-types/commands/CreateOrganizationalUnitCommand.d.ts +23 -0
  7. package/dist-types/commands/CreatePolicyCommand.d.ts +29 -0
  8. package/dist-types/commands/DeclineHandshakeCommand.d.ts +57 -0
  9. package/dist-types/commands/DeleteOrganizationalUnitCommand.d.ts +13 -0
  10. package/dist-types/commands/DeletePolicyCommand.d.ts +13 -0
  11. package/dist-types/commands/DescribeAccountCommand.d.ts +21 -0
  12. package/dist-types/commands/DescribeCreateAccountStatusCommand.d.ts +20 -0
  13. package/dist-types/commands/DescribeHandshakeCommand.d.ts +53 -0
  14. package/dist-types/commands/DescribeOrganizationCommand.d.ts +26 -0
  15. package/dist-types/commands/DescribeOrganizationalUnitCommand.d.ts +20 -0
  16. package/dist-types/commands/DescribePolicyCommand.d.ts +26 -0
  17. package/dist-types/commands/DetachPolicyCommand.d.ts +12 -0
  18. package/dist-types/commands/DisablePolicyTypeCommand.d.ts +22 -0
  19. package/dist-types/commands/EnableAllFeaturesCommand.d.ts +33 -0
  20. package/dist-types/commands/EnablePolicyTypeCommand.d.ts +27 -0
  21. package/dist-types/commands/InviteAccountToOrganizationCommand.d.ts +61 -0
  22. package/dist-types/commands/LeaveOrganizationCommand.d.ts +9 -0
  23. package/dist-types/commands/ListAccountsCommand.d.ts +51 -0
  24. package/dist-types/commands/ListAccountsForParentCommand.d.ts +35 -0
  25. package/dist-types/commands/ListChildrenCommand.d.ts +26 -0
  26. package/dist-types/commands/ListCreateAccountStatusCommand.d.ts +52 -0
  27. package/dist-types/commands/ListHandshakesForAccountCommand.d.ts +57 -0
  28. package/dist-types/commands/ListHandshakesForOrganizationCommand.d.ts +99 -0
  29. package/dist-types/commands/ListOrganizationalUnitsForParentCommand.d.ts +27 -0
  30. package/dist-types/commands/ListParentsCommand.d.ts +21 -0
  31. package/dist-types/commands/ListPoliciesCommand.d.ts +41 -0
  32. package/dist-types/commands/ListPoliciesForTargetCommand.d.ts +26 -0
  33. package/dist-types/commands/ListRootsCommand.d.ts +26 -0
  34. package/dist-types/commands/ListTargetsForPolicyCommand.d.ts +35 -0
  35. package/dist-types/commands/MoveAccountCommand.d.ts +13 -0
  36. package/dist-types/commands/RemoveAccountFromOrganizationCommand.d.ts +11 -0
  37. package/dist-types/commands/UpdateOrganizationalUnitCommand.d.ts +21 -0
  38. package/dist-types/commands/UpdatePolicyCommand.d.ts +55 -0
  39. package/package.json +29 -29
@@ -41,6 +41,32 @@ export interface ListPoliciesForTargetCommandOutput extends ListPoliciesForTarge
41
41
  * @see {@link ListPoliciesForTargetCommandOutput} for command's `response` shape.
42
42
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
43
43
  *
44
+ * @example To retrieve a list policies attached to a root, OU, or account
45
+ * ```javascript
46
+ * // 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
47
+ * const input = {
48
+ * "Filter": "SERVICE_CONTROL_POLICY",
49
+ * "TargetId": "444444444444"
50
+ * };
51
+ * const command = new ListPoliciesForTargetCommand(input);
52
+ * const response = await client.send(command);
53
+ * /* response ==
54
+ * {
55
+ * "Policies": [
56
+ * {
57
+ * "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid222",
58
+ * "AwsManaged": false,
59
+ * "Description": "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts.",
60
+ * "Id": "p-examplepolicyid222",
61
+ * "Name": "AllowAllEC2Actions",
62
+ * "Type": "SERVICE_CONTROL_POLICY"
63
+ * }
64
+ * ]
65
+ * }
66
+ * *\/
67
+ * // example id: to-retrieve-a-list-of-policies-attached-to-a-root-ou-or-account
68
+ * ```
69
+ *
44
70
  */
45
71
  export declare class ListPoliciesForTargetCommand extends $Command<ListPoliciesForTargetCommandInput, ListPoliciesForTargetCommandOutput, OrganizationsClientResolvedConfig> {
46
72
  readonly input: ListPoliciesForTargetCommandInput;
@@ -46,6 +46,32 @@ export interface ListRootsCommandOutput extends ListRootsResponse, __MetadataBea
46
46
  * @see {@link ListRootsCommandOutput} for command's `response` shape.
47
47
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
48
48
  *
49
+ * @example To retrieve a list of roots in the organization
50
+ * ```javascript
51
+ * // The following example shows how to get the list of the roots in the current organization:/n/n
52
+ * const input = {};
53
+ * const command = new ListRootsCommand(input);
54
+ * const response = await client.send(command);
55
+ * /* response ==
56
+ * {
57
+ * "Roots": [
58
+ * {
59
+ * "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
60
+ * "Id": "r-examplerootid111",
61
+ * "Name": "Root",
62
+ * "PolicyTypes": [
63
+ * {
64
+ * "Status": "ENABLED",
65
+ * "Type": "SERVICE_CONTROL_POLICY"
66
+ * }
67
+ * ]
68
+ * }
69
+ * ]
70
+ * }
71
+ * *\/
72
+ * // example id: to-retrieve-a-list-of-roots-in-the-organization
73
+ * ```
74
+ *
49
75
  */
50
76
  export declare class ListRootsCommand extends $Command<ListRootsCommandInput, ListRootsCommandOutput, OrganizationsClientResolvedConfig> {
51
77
  readonly input: ListRootsCommandInput;
@@ -40,6 +40,41 @@ export interface ListTargetsForPolicyCommandOutput extends ListTargetsForPolicyR
40
40
  * @see {@link ListTargetsForPolicyCommandOutput} for command's `response` shape.
41
41
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
42
42
  *
43
+ * @example To retrieve a list of roots, OUs, and accounts to which a policy is attached
44
+ * ```javascript
45
+ * // The following example shows how to get the list of roots, OUs, and accounts to which the specified policy is attached:/n/n
46
+ * const input = {
47
+ * "PolicyId": "p-FullAWSAccess"
48
+ * };
49
+ * const command = new ListTargetsForPolicyCommand(input);
50
+ * const response = await client.send(command);
51
+ * /* response ==
52
+ * {
53
+ * "Targets": [
54
+ * {
55
+ * "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
56
+ * "Name": "Root",
57
+ * "TargetId": "r-examplerootid111",
58
+ * "Type": "ROOT"
59
+ * },
60
+ * {
61
+ * "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333;",
62
+ * "Name": "Developer Test Account",
63
+ * "TargetId": "333333333333",
64
+ * "Type": "ACCOUNT"
65
+ * },
66
+ * {
67
+ * "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
68
+ * "Name": "Accounting",
69
+ * "TargetId": "ou-examplerootid111-exampleouid111",
70
+ * "Type": "ORGANIZATIONAL_UNIT"
71
+ * }
72
+ * ]
73
+ * }
74
+ * *\/
75
+ * // example id: to-retrieve-a-list-of-roots-ous-and-accounts-to-which-a-policy-is-attached
76
+ * ```
77
+ *
43
78
  */
44
79
  export declare class ListTargetsForPolicyCommand extends $Command<ListTargetsForPolicyCommandInput, ListTargetsForPolicyCommandOutput, OrganizationsClientResolvedConfig> {
45
80
  readonly input: ListTargetsForPolicyCommandInput;
@@ -31,6 +31,19 @@ export interface MoveAccountCommandOutput extends __MetadataBearer {
31
31
  * @see {@link MoveAccountCommandOutput} for command's `response` shape.
32
32
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
33
33
  *
34
+ * @example To move an OU or account to another OU or the root
35
+ * ```javascript
36
+ * // The following example shows how to move a member account from the root to an OU:/n/n
37
+ * const input = {
38
+ * "AccountId": "333333333333",
39
+ * "DestinationParentId": "ou-examplerootid111-exampleouid111",
40
+ * "SourceParentId": "r-examplerootid111"
41
+ * };
42
+ * const command = new MoveAccountCommand(input);
43
+ * await client.send(command);
44
+ * // example id: to-move-an-ou-or-account-to-another-ou-or-the-root
45
+ * ```
46
+ *
34
47
  */
35
48
  export declare class MoveAccountCommand extends $Command<MoveAccountCommandInput, MoveAccountCommandOutput, OrganizationsClientResolvedConfig> {
36
49
  readonly input: MoveAccountCommandInput;
@@ -66,6 +66,17 @@ export interface RemoveAccountFromOrganizationCommandOutput extends __MetadataBe
66
66
  * @see {@link RemoveAccountFromOrganizationCommandOutput} for command's `response` shape.
67
67
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
68
68
  *
69
+ * @example To remove an account from an organization as the master account
70
+ * ```javascript
71
+ * // The following example shows you how to remove an account from an organization:
72
+ * const input = {
73
+ * "AccountId": "333333333333"
74
+ * };
75
+ * const command = new RemoveAccountFromOrganizationCommand(input);
76
+ * await client.send(command);
77
+ * // example id: to-remove-an-account-from-an-organization-as-the-master-account
78
+ * ```
79
+ *
69
80
  */
70
81
  export declare class RemoveAccountFromOrganizationCommand extends $Command<RemoveAccountFromOrganizationCommandInput, RemoveAccountFromOrganizationCommandOutput, OrganizationsClientResolvedConfig> {
71
82
  readonly input: RemoveAccountFromOrganizationCommandInput;
@@ -32,6 +32,27 @@ export interface UpdateOrganizationalUnitCommandOutput extends UpdateOrganizatio
32
32
  * @see {@link UpdateOrganizationalUnitCommandOutput} for command's `response` shape.
33
33
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
34
34
  *
35
+ * @example To rename an organizational unit
36
+ * ```javascript
37
+ * // The following example shows how to rename an OU. The output confirms the new name:/n/n
38
+ * const input = {
39
+ * "Name": "AccountingOU",
40
+ * "OrganizationalUnitId": "ou-examplerootid111-exampleouid111"
41
+ * };
42
+ * const command = new UpdateOrganizationalUnitCommand(input);
43
+ * const response = await client.send(command);
44
+ * /* response ==
45
+ * {
46
+ * "OrganizationalUnit": {
47
+ * "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
48
+ * "Id": "ou-examplerootid111-exampleouid111",
49
+ * "Name": "AccountingOU"
50
+ * }
51
+ * }
52
+ * *\/
53
+ * // example id: to-rename-an-organizational-unit
54
+ * ```
55
+ *
35
56
  */
36
57
  export declare class UpdateOrganizationalUnitCommand extends $Command<UpdateOrganizationalUnitCommandInput, UpdateOrganizationalUnitCommandOutput, OrganizationsClientResolvedConfig> {
37
58
  readonly input: UpdateOrganizationalUnitCommandInput;
@@ -32,6 +32,61 @@ export interface UpdatePolicyCommandOutput extends UpdatePolicyResponse, __Metad
32
32
  * @see {@link UpdatePolicyCommandOutput} for command's `response` shape.
33
33
  * @see {@link OrganizationsClientResolvedConfig | config} for OrganizationsClient's `config` shape.
34
34
  *
35
+ * @example To update the details of a policy
36
+ * ```javascript
37
+ * // 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
38
+ * const input = {
39
+ * "Description": "This description replaces the original.",
40
+ * "Name": "Renamed-Policy",
41
+ * "PolicyId": "p-examplepolicyid111"
42
+ * };
43
+ * const command = new UpdatePolicyCommand(input);
44
+ * const response = await client.send(command);
45
+ * /* response ==
46
+ * {
47
+ * "Policy": {
48
+ * "Content": "{ \"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"ec2:*\", \"Resource\": \"*\" } }",
49
+ * "PolicySummary": {
50
+ * "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
51
+ * "AwsManaged": false,
52
+ * "Description": "This description replaces the original.",
53
+ * "Id": "p-examplepolicyid111",
54
+ * "Name": "Renamed-Policy",
55
+ * "Type": "SERVICE_CONTROL_POLICY"
56
+ * }
57
+ * }
58
+ * }
59
+ * *\/
60
+ * // example id: to-update-the-details-of-a-policy
61
+ * ```
62
+ *
63
+ * @example To update the content of a policy
64
+ * ```javascript
65
+ * // 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
66
+ * const input = {
67
+ * "Content": "{ \\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\": {\\\"Effect\\\": \\\"Allow\\\", \\\"Action\\\": \\\"s3:*\\\", \\\"Resource\\\": \\\"*\\\" } }",
68
+ * "PolicyId": "p-examplepolicyid111"
69
+ * };
70
+ * const command = new UpdatePolicyCommand(input);
71
+ * const response = await client.send(command);
72
+ * /* response ==
73
+ * {
74
+ * "Policy": {
75
+ * "Content": "{ \\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\": { \\\"Effect\\\": \\\"Allow\\\", \\\"Action\\\": \\\"s3:*\\\", \\\"Resource\\\": \\\"*\\\" } }",
76
+ * "PolicySummary": {
77
+ * "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
78
+ * "AwsManaged": false,
79
+ * "Description": "This description replaces the original.",
80
+ * "Id": "p-examplepolicyid111",
81
+ * "Name": "Renamed-Policy",
82
+ * "Type": "SERVICE_CONTROL_POLICY"
83
+ * }
84
+ * }
85
+ * }
86
+ * *\/
87
+ * // example id: to-update-the-content-of-a-policy
88
+ * ```
89
+ *
35
90
  */
36
91
  export declare class UpdatePolicyCommand extends $Command<UpdatePolicyCommandInput, UpdatePolicyCommandOutput, OrganizationsClientResolvedConfig> {
37
92
  readonly input: UpdatePolicyCommandInput;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-organizations",
3
3
  "description": "AWS SDK for JavaScript Organizations Client for Node.js, Browser and React Native",
4
- "version": "3.287.0",
4
+ "version": "3.289.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -20,37 +20,37 @@
20
20
  "dependencies": {
21
21
  "@aws-crypto/sha256-browser": "3.0.0",
22
22
  "@aws-crypto/sha256-js": "3.0.0",
23
- "@aws-sdk/client-sts": "3.287.0",
24
- "@aws-sdk/config-resolver": "3.287.0",
25
- "@aws-sdk/credential-provider-node": "3.287.0",
26
- "@aws-sdk/fetch-http-handler": "3.282.0",
27
- "@aws-sdk/hash-node": "3.272.0",
28
- "@aws-sdk/invalid-dependency": "3.272.0",
29
- "@aws-sdk/middleware-content-length": "3.282.0",
30
- "@aws-sdk/middleware-endpoint": "3.282.0",
31
- "@aws-sdk/middleware-host-header": "3.282.0",
32
- "@aws-sdk/middleware-logger": "3.287.0",
33
- "@aws-sdk/middleware-recursion-detection": "3.282.0",
34
- "@aws-sdk/middleware-retry": "3.287.0",
35
- "@aws-sdk/middleware-serde": "3.272.0",
36
- "@aws-sdk/middleware-signing": "3.282.0",
37
- "@aws-sdk/middleware-stack": "3.272.0",
38
- "@aws-sdk/middleware-user-agent": "3.282.0",
39
- "@aws-sdk/node-config-provider": "3.287.0",
40
- "@aws-sdk/node-http-handler": "3.282.0",
41
- "@aws-sdk/protocol-http": "3.282.0",
42
- "@aws-sdk/smithy-client": "3.279.0",
43
- "@aws-sdk/types": "3.272.0",
44
- "@aws-sdk/url-parser": "3.272.0",
23
+ "@aws-sdk/client-sts": "3.289.0",
24
+ "@aws-sdk/config-resolver": "3.289.0",
25
+ "@aws-sdk/credential-provider-node": "3.289.0",
26
+ "@aws-sdk/fetch-http-handler": "3.289.0",
27
+ "@aws-sdk/hash-node": "3.289.0",
28
+ "@aws-sdk/invalid-dependency": "3.289.0",
29
+ "@aws-sdk/middleware-content-length": "3.289.0",
30
+ "@aws-sdk/middleware-endpoint": "3.289.0",
31
+ "@aws-sdk/middleware-host-header": "3.289.0",
32
+ "@aws-sdk/middleware-logger": "3.289.0",
33
+ "@aws-sdk/middleware-recursion-detection": "3.289.0",
34
+ "@aws-sdk/middleware-retry": "3.289.0",
35
+ "@aws-sdk/middleware-serde": "3.289.0",
36
+ "@aws-sdk/middleware-signing": "3.289.0",
37
+ "@aws-sdk/middleware-stack": "3.289.0",
38
+ "@aws-sdk/middleware-user-agent": "3.289.0",
39
+ "@aws-sdk/node-config-provider": "3.289.0",
40
+ "@aws-sdk/node-http-handler": "3.289.0",
41
+ "@aws-sdk/protocol-http": "3.289.0",
42
+ "@aws-sdk/smithy-client": "3.289.0",
43
+ "@aws-sdk/types": "3.289.0",
44
+ "@aws-sdk/url-parser": "3.289.0",
45
45
  "@aws-sdk/util-base64": "3.208.0",
46
46
  "@aws-sdk/util-body-length-browser": "3.188.0",
47
47
  "@aws-sdk/util-body-length-node": "3.208.0",
48
- "@aws-sdk/util-defaults-mode-browser": "3.279.0",
49
- "@aws-sdk/util-defaults-mode-node": "3.287.0",
50
- "@aws-sdk/util-endpoints": "3.272.0",
51
- "@aws-sdk/util-retry": "3.272.0",
52
- "@aws-sdk/util-user-agent-browser": "3.282.0",
53
- "@aws-sdk/util-user-agent-node": "3.287.0",
48
+ "@aws-sdk/util-defaults-mode-browser": "3.289.0",
49
+ "@aws-sdk/util-defaults-mode-node": "3.289.0",
50
+ "@aws-sdk/util-endpoints": "3.289.0",
51
+ "@aws-sdk/util-retry": "3.289.0",
52
+ "@aws-sdk/util-user-agent-browser": "3.289.0",
53
+ "@aws-sdk/util-user-agent-node": "3.289.0",
54
54
  "@aws-sdk/util-utf8": "3.254.0",
55
55
  "tslib": "^2.3.1"
56
56
  },