From 0e7794005574f232f5e63ba8680ff7dfa25197dd Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 26 Sep 2024 18:19:53 +0000 Subject: [PATCH] feat(client-organizations): Add support for policy operations on the CHATBOT_POLICY policy type. --- .../src/commands/AttachPolicyCommand.ts | 11 ++- .../src/commands/CreateOrganizationCommand.ts | 2 +- .../src/commands/CreatePolicyCommand.ts | 4 +- .../DescribeEffectivePolicyCommand.ts | 4 +- .../commands/DescribeOrganizationCommand.ts | 2 +- .../src/commands/DescribePolicyCommand.ts | 2 +- .../src/commands/DisablePolicyTypeCommand.ts | 4 +- .../src/commands/EnablePolicyTypeCommand.ts | 4 +- .../src/commands/ListPoliciesCommand.ts | 4 +- .../commands/ListPoliciesForTargetCommand.ts | 4 +- .../src/commands/ListRootsCommand.ts | 2 +- .../src/commands/UpdatePolicyCommand.ts | 2 +- .../src/models/models_0.ts | 68 ++++++++++++++----- .../sdk-codegen/aws-models/organizations.json | 26 +++++-- 14 files changed, 94 insertions(+), 45 deletions(-) diff --git a/clients/client-organizations/src/commands/AttachPolicyCommand.ts b/clients/client-organizations/src/commands/AttachPolicyCommand.ts index 6172648c78cb..1bdcb3f5676e 100644 --- a/clients/client-organizations/src/commands/AttachPolicyCommand.ts +++ b/clients/client-organizations/src/commands/AttachPolicyCommand.ts @@ -34,7 +34,7 @@ export interface AttachPolicyCommandOutput extends __MetadataBearer {} * diff --git a/clients/client-organizations/src/commands/CreateOrganizationCommand.ts b/clients/client-organizations/src/commands/CreateOrganizationCommand.ts index 4a967f75962d..2ab59fc48f8d 100644 --- a/clients/client-organizations/src/commands/CreateOrganizationCommand.ts +++ b/clients/client-organizations/src/commands/CreateOrganizationCommand.ts @@ -64,7 +64,7 @@ export interface CreateOrganizationCommandOutput extends CreateOrganizationRespo * // MasterAccountEmail: "STRING_VALUE", * // AvailablePolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], diff --git a/clients/client-organizations/src/commands/CreatePolicyCommand.ts b/clients/client-organizations/src/commands/CreatePolicyCommand.ts index 1e0d5499d02a..7c7c2e0c2ce8 100644 --- a/clients/client-organizations/src/commands/CreatePolicyCommand.ts +++ b/clients/client-organizations/src/commands/CreatePolicyCommand.ts @@ -46,7 +46,7 @@ export interface CreatePolicyCommandOutput extends CreatePolicyResponse, __Metad * Content: "STRING_VALUE", // required * Description: "STRING_VALUE", // required * Name: "STRING_VALUE", // required - * Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * Tags: [ // Tags * { // Tag * Key: "STRING_VALUE", // required @@ -63,7 +63,7 @@ export interface CreatePolicyCommandOutput extends CreatePolicyResponse, __Metad * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // AwsManaged: true || false, * // }, * // Content: "STRING_VALUE", diff --git a/clients/client-organizations/src/commands/DescribeEffectivePolicyCommand.ts b/clients/client-organizations/src/commands/DescribeEffectivePolicyCommand.ts index 7aaef84f6aaf..7c773b0a8f07 100644 --- a/clients/client-organizations/src/commands/DescribeEffectivePolicyCommand.ts +++ b/clients/client-organizations/src/commands/DescribeEffectivePolicyCommand.ts @@ -45,7 +45,7 @@ export interface DescribeEffectivePolicyCommandOutput extends DescribeEffectiveP * // const { OrganizationsClient, DescribeEffectivePolicyCommand } = require("@aws-sdk/client-organizations"); // CommonJS import * const client = new OrganizationsClient(config); * const input = { // DescribeEffectivePolicyRequest - * PolicyType: "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * PolicyType: "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * TargetId: "STRING_VALUE", * }; * const command = new DescribeEffectivePolicyCommand(input); @@ -55,7 +55,7 @@ export interface DescribeEffectivePolicyCommandOutput extends DescribeEffectiveP * // PolicyContent: "STRING_VALUE", * // LastUpdatedTimestamp: new Date("TIMESTAMP"), * // TargetId: "STRING_VALUE", - * // PolicyType: "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // PolicyType: "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // }, * // }; * diff --git a/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts b/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts index 939ec24a739d..03a5352b1b6e 100644 --- a/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts +++ b/clients/client-organizations/src/commands/DescribeOrganizationCommand.ts @@ -55,7 +55,7 @@ export interface DescribeOrganizationCommandOutput extends DescribeOrganizationR * // MasterAccountEmail: "STRING_VALUE", * // AvailablePolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], diff --git a/clients/client-organizations/src/commands/DescribePolicyCommand.ts b/clients/client-organizations/src/commands/DescribePolicyCommand.ts index 0185b5df2f73..a319a44d0805 100644 --- a/clients/client-organizations/src/commands/DescribePolicyCommand.ts +++ b/clients/client-organizations/src/commands/DescribePolicyCommand.ts @@ -49,7 +49,7 @@ export interface DescribePolicyCommandOutput extends DescribePolicyResponse, __M * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // AwsManaged: true || false, * // }, * // Content: "STRING_VALUE", diff --git a/clients/client-organizations/src/commands/DisablePolicyTypeCommand.ts b/clients/client-organizations/src/commands/DisablePolicyTypeCommand.ts index 6497cdcedef9..9a54b8c8e233 100644 --- a/clients/client-organizations/src/commands/DisablePolicyTypeCommand.ts +++ b/clients/client-organizations/src/commands/DisablePolicyTypeCommand.ts @@ -48,7 +48,7 @@ export interface DisablePolicyTypeCommandOutput extends DisablePolicyTypeRespons * const client = new OrganizationsClient(config); * const input = { // DisablePolicyTypeRequest * RootId: "STRING_VALUE", // required - * PolicyType: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * PolicyType: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * }; * const command = new DisablePolicyTypeCommand(input); * const response = await client.send(command); @@ -59,7 +59,7 @@ export interface DisablePolicyTypeCommandOutput extends DisablePolicyTypeRespons * // Name: "STRING_VALUE", * // PolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], diff --git a/clients/client-organizations/src/commands/EnablePolicyTypeCommand.ts b/clients/client-organizations/src/commands/EnablePolicyTypeCommand.ts index f00dc918a138..ce52e8a2c2c5 100644 --- a/clients/client-organizations/src/commands/EnablePolicyTypeCommand.ts +++ b/clients/client-organizations/src/commands/EnablePolicyTypeCommand.ts @@ -48,7 +48,7 @@ export interface EnablePolicyTypeCommandOutput extends EnablePolicyTypeResponse, * const client = new OrganizationsClient(config); * const input = { // EnablePolicyTypeRequest * RootId: "STRING_VALUE", // required - * PolicyType: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * PolicyType: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * }; * const command = new EnablePolicyTypeCommand(input); * const response = await client.send(command); @@ -59,7 +59,7 @@ export interface EnablePolicyTypeCommandOutput extends EnablePolicyTypeResponse, * // Name: "STRING_VALUE", * // PolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], diff --git a/clients/client-organizations/src/commands/ListPoliciesCommand.ts b/clients/client-organizations/src/commands/ListPoliciesCommand.ts index 329169583b14..9b52a083c5d8 100644 --- a/clients/client-organizations/src/commands/ListPoliciesCommand.ts +++ b/clients/client-organizations/src/commands/ListPoliciesCommand.ts @@ -46,7 +46,7 @@ export interface ListPoliciesCommandOutput extends ListPoliciesResponse, __Metad * // const { OrganizationsClient, ListPoliciesCommand } = require("@aws-sdk/client-organizations"); // CommonJS import * const client = new OrganizationsClient(config); * const input = { // ListPoliciesRequest - * Filter: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * Filter: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * NextToken: "STRING_VALUE", * MaxResults: Number("int"), * }; @@ -59,7 +59,7 @@ export interface ListPoliciesCommandOutput extends ListPoliciesResponse, __Metad * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // AwsManaged: true || false, * // }, * // ], diff --git a/clients/client-organizations/src/commands/ListPoliciesForTargetCommand.ts b/clients/client-organizations/src/commands/ListPoliciesForTargetCommand.ts index e4597606f3e1..9a0e9ee5bda4 100644 --- a/clients/client-organizations/src/commands/ListPoliciesForTargetCommand.ts +++ b/clients/client-organizations/src/commands/ListPoliciesForTargetCommand.ts @@ -49,7 +49,7 @@ export interface ListPoliciesForTargetCommandOutput extends ListPoliciesForTarge * const client = new OrganizationsClient(config); * const input = { // ListPoliciesForTargetRequest * TargetId: "STRING_VALUE", // required - * Filter: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", // required + * Filter: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", // required * NextToken: "STRING_VALUE", * MaxResults: Number("int"), * }; @@ -62,7 +62,7 @@ export interface ListPoliciesForTargetCommandOutput extends ListPoliciesForTarge * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // AwsManaged: true || false, * // }, * // ], diff --git a/clients/client-organizations/src/commands/ListRootsCommand.ts b/clients/client-organizations/src/commands/ListRootsCommand.ts index b79d060c8a45..7678dcdd0a45 100644 --- a/clients/client-organizations/src/commands/ListRootsCommand.ts +++ b/clients/client-organizations/src/commands/ListRootsCommand.ts @@ -66,7 +66,7 @@ export interface ListRootsCommandOutput extends ListRootsResponse, __MetadataBea * // Name: "STRING_VALUE", * // PolicyTypes: [ // PolicyTypes * // { // PolicyTypeSummary - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // Status: "ENABLED" || "PENDING_ENABLE" || "PENDING_DISABLE", * // }, * // ], diff --git a/clients/client-organizations/src/commands/UpdatePolicyCommand.ts b/clients/client-organizations/src/commands/UpdatePolicyCommand.ts index 3c959c2cd9cb..4062da7518b0 100644 --- a/clients/client-organizations/src/commands/UpdatePolicyCommand.ts +++ b/clients/client-organizations/src/commands/UpdatePolicyCommand.ts @@ -54,7 +54,7 @@ export interface UpdatePolicyCommandOutput extends UpdatePolicyResponse, __Metad * // Arn: "STRING_VALUE", * // Name: "STRING_VALUE", * // Description: "STRING_VALUE", - * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY", + * // Type: "SERVICE_CONTROL_POLICY" || "TAG_POLICY" || "BACKUP_POLICY" || "AISERVICES_OPT_OUT_POLICY" || "CHATBOT_POLICY", * // AwsManaged: true || false, * // }, * // Content: "STRING_VALUE", diff --git a/clients/client-organizations/src/models/models_0.ts b/clients/client-organizations/src/models/models_0.ts index 2e609828fbe6..60b90b18ce1c 100644 --- a/clients/client-organizations/src/models/models_0.ts +++ b/clients/client-organizations/src/models/models_0.ts @@ -1892,6 +1892,7 @@ export type PolicyTypeStatus = (typeof PolicyTypeStatus)[keyof typeof PolicyType export const PolicyType = { AISERVICES_OPT_OUT_POLICY: "AISERVICES_OPT_OUT_POLICY", BACKUP_POLICY: "BACKUP_POLICY", + CHATBOT_POLICY: "CHATBOT_POLICY", SERVICE_CONTROL_POLICY: "SERVICE_CONTROL_POLICY", TAG_POLICY: "TAG_POLICY", } as const; @@ -2172,7 +2173,7 @@ export interface CreatePolicyRequest { * @@ -2628,6 +2634,7 @@ export interface DescribeCreateAccountStatusResponse { export const EffectivePolicyType = { AISERVICES_OPT_OUT_POLICY: "AISERVICES_OPT_OUT_POLICY", BACKUP_POLICY: "BACKUP_POLICY", + CHATBOT_POLICY: "CHATBOT_POLICY", TAG_POLICY: "TAG_POLICY", } as const; @@ -2646,17 +2653,22 @@ export interface DescribeEffectivePolicyRequest { * @@ -2974,7 +2986,7 @@ export interface DisablePolicyTypeRequest { * @@ -3115,7 +3132,7 @@ export interface EnablePolicyTypeRequest { * @@ -4153,7 +4175,7 @@ export interface ListPoliciesRequest { * @@ -4257,7 +4284,7 @@ export interface ListPoliciesForTargetRequest { * diff --git a/codegen/sdk-codegen/aws-models/organizations.json b/codegen/sdk-codegen/aws-models/organizations.json index 94e1eae5f93d..0ea13a02d5bf 100644 --- a/codegen/sdk-codegen/aws-models/organizations.json +++ b/codegen/sdk-codegen/aws-models/organizations.json @@ -1902,7 +1902,7 @@ } ], "traits": { - "smithy.api#documentation": "

Attaches a policy to a root, an organizational unit (OU), or an individual account.\n How the policy affects accounts depends on the type of policy. Refer to the\n Organizations User Guide for information about each policy type:

\n \n

This operation can be called only from the organization's\nmanagement account or by a member account that is a delegated administrator for an Amazon Web Services service.

", + "smithy.api#documentation": "

Attaches a policy to a root, an organizational unit (OU), or an individual account.\n How the policy affects accounts depends on the type of policy. Refer to the\n Organizations User Guide for information about each policy type:

\n \n

This operation can be called only from the organization's\nmanagement account or by a member account that is a delegated administrator for an Amazon Web Services service.

", "smithy.api#examples": [ { "title": "To attach a policy to an account", @@ -3129,7 +3129,7 @@ "Type": { "target": "com.amazonaws.organizations#PolicyType", "traits": { - "smithy.api#documentation": "

The type of policy to create. You can specify one of the following values:

\n ", + "smithy.api#documentation": "

The type of policy to create. You can specify one of the following values:

\n ", "smithy.api#required": {} } }, @@ -3837,7 +3837,7 @@ "PolicyType": { "target": "com.amazonaws.organizations#EffectivePolicyType", "traits": { - "smithy.api#documentation": "

The type of policy that you want information about. You can specify one of the\n following values:

\n ", + "smithy.api#documentation": "

The type of policy that you want information about. You can specify one of the\n following values:

\n ", "smithy.api#required": {} } }, @@ -4478,7 +4478,7 @@ "PolicyType": { "target": "com.amazonaws.organizations#PolicyType", "traits": { - "smithy.api#documentation": "

The policy type that you want to disable in this root. You can specify one of the\n following values:

\n ", + "smithy.api#documentation": "

The policy type that you want to disable in this root. You can specify one of the\n following values:

\n ", "smithy.api#required": {} } } @@ -4630,6 +4630,12 @@ "traits": { "smithy.api#enumValue": "AISERVICES_OPT_OUT_POLICY" } + }, + "CHATBOT_POLICY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHATBOT_POLICY" + } } } }, @@ -4867,7 +4873,7 @@ "PolicyType": { "target": "com.amazonaws.organizations#PolicyType", "traits": { - "smithy.api#documentation": "

The policy type that you want to enable. You can specify one of the following\n values:

\n ", + "smithy.api#documentation": "

The policy type that you want to enable. You can specify one of the following\n values:

\n ", "smithy.api#required": {} } } @@ -7112,7 +7118,7 @@ "Filter": { "target": "com.amazonaws.organizations#PolicyType", "traits": { - "smithy.api#documentation": "

The type of policy that you want to include in the returned list. You must specify one\n of the following values:

\n ", + "smithy.api#documentation": "

The type of policy that you want to include in the returned list. You must specify one\n of the following values:

\n ", "smithy.api#required": {} } }, @@ -7159,7 +7165,7 @@ "Filter": { "target": "com.amazonaws.organizations#PolicyType", "traits": { - "smithy.api#documentation": "

Specifies the type of policy that you want to include in the response. You must\n specify one of the following values:

\n ", + "smithy.api#documentation": "

Specifies the type of policy that you want to include in the response. You must\n specify one of the following values:

\n ", "smithy.api#required": {} } }, @@ -8103,6 +8109,12 @@ "traits": { "smithy.api#enumValue": "AISERVICES_OPT_OUT_POLICY" } + }, + "CHATBOT_POLICY": { + "target": "smithy.api#Unit", + "traits": { + "smithy.api#enumValue": "CHATBOT_POLICY" + } } } },