From 8f3697f4029fd285d4bd93ae7a83ff78e26547f1 Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 15 Oct 2024 18:12:24 +0000 Subject: [PATCH] feat(client-qbusiness): Amazon Q Business now supports embedding the Amazon Q Business web experience on third-party websites. --- .../commands/CreateWebExperienceCommand.ts | 3 + .../src/commands/GetWebExperienceCommand.ts | 3 + .../commands/UpdateWebExperienceCommand.ts | 3 + .../client-qbusiness/src/models/models_0.ts | 67 +++++++++++++++++-- .../src/protocols/Aws_restJson1.ts | 7 ++ codegen/sdk-codegen/aws-models/qbusiness.json | 54 +++++++++++++-- 6 files changed, 123 insertions(+), 14 deletions(-) diff --git a/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts index c0abc51e7285..81e54be41103 100644 --- a/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts +++ b/clients/client-qbusiness/src/commands/CreateWebExperienceCommand.ts @@ -41,6 +41,9 @@ export interface CreateWebExperienceCommandOutput extends CreateWebExperienceRes * subtitle: "STRING_VALUE", * welcomeMessage: "STRING_VALUE", * samplePromptsControlMode: "ENABLED" || "DISABLED", + * origins: [ // WebExperienceOrigins + * "STRING_VALUE", + * ], * roleArn: "STRING_VALUE", * tags: [ // Tags * { // Tag diff --git a/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts index d9403a590257..b652515f1024 100644 --- a/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts +++ b/clients/client-qbusiness/src/commands/GetWebExperienceCommand.ts @@ -53,6 +53,9 @@ export interface GetWebExperienceCommandOutput extends GetWebExperienceResponse, * // subtitle: "STRING_VALUE", * // welcomeMessage: "STRING_VALUE", * // samplePromptsControlMode: "ENABLED" || "DISABLED", + * // origins: [ // WebExperienceOrigins + * // "STRING_VALUE", + * // ], * // roleArn: "STRING_VALUE", * // identityProviderConfiguration: { // IdentityProviderConfiguration Union: only one key present * // samlConfiguration: { // SamlProviderConfiguration diff --git a/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts index ff1f65cc5dde..2da36292d33d 100644 --- a/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts +++ b/clients/client-qbusiness/src/commands/UpdateWebExperienceCommand.ts @@ -60,6 +60,9 @@ export interface UpdateWebExperienceCommandOutput extends UpdateWebExperienceRes * secretsRole: "STRING_VALUE", // required * }, * }, + * origins: [ // WebExperienceOrigins + * "STRING_VALUE", + * ], * }; * const command = new UpdateWebExperienceCommand(input); * const response = await client.send(command); diff --git a/clients/client-qbusiness/src/models/models_0.ts b/clients/client-qbusiness/src/models/models_0.ts index 3dcb925dd322..61c1e14995d2 100644 --- a/clients/client-qbusiness/src/models/models_0.ts +++ b/clients/client-qbusiness/src/models/models_0.ts @@ -760,12 +760,13 @@ export const QAppsControlMode = { export type QAppsControlMode = (typeof QAppsControlMode)[keyof typeof QAppsControlMode]; /** - *

Configuration information about Amazon Q Apps. (preview feature)

+ *

Configuration information about Amazon Q Apps.

* @public */ export interface QAppsConfiguration { /** - *

Status information about whether end users can create and use Amazon Q Apps in the web experience.

+ *

Status information about whether end users can create and use Amazon Q Apps in the web + * experience.

* @public */ qAppsControlMode: QAppsControlMode | undefined; @@ -805,7 +806,8 @@ export interface CreateApplicationRequest { /** *

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon - * CloudWatch logs and metrics.

+ * CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a service linked role (SLR) and use it as the + * application's role.

* @public */ roleArn?: string; @@ -4135,6 +4137,22 @@ export interface CreateWebExperienceRequest { */ samplePromptsControlMode?: WebExperienceSamplePromptsControlMode; + /** + *

Sets the website domain origins that + * are allowed to embed the Amazon Q Business web experience. + * + * The domain origin refers to the + * base URL for accessing a website including the protocol + * (http/https), the domain name, and the port number (if specified). + *

+ * + *

You must only submit a base URL and + * not a full path. For example, https://docs.aws.amazon.com.

+ *
+ * @public + */ + origins?: string[]; + /** *

The Amazon Resource Name (ARN) of the service role attached to your web * experience.

@@ -4395,6 +4413,18 @@ export interface GetWebExperienceResponse { */ samplePromptsControlMode?: WebExperienceSamplePromptsControlMode; + /** + *

Gets the website domain origins that + * are allowed to embed the Amazon Q Business web experience. + * + * The domain origin refers to the + * base URL for accessing a website including the protocol + * (http/https), the domain name, and the port number (if specified). + *

+ * @public + */ + origins?: string[]; + /** *

The Amazon Resource Name (ARN) of the service role attached to your web * experience.

@@ -4571,6 +4601,29 @@ export interface UpdateWebExperienceRequest { * @public */ identityProviderConfiguration?: IdentityProviderConfiguration; + + /** + *

Updates the website domain origins that + * are allowed to embed the Amazon Q Business web experience. + * + * The domain origin refers to the + * base URL for accessing a website including the protocol + * (http/https), the domain name, and the port number (if specified).

+ * + * + * + * @public + */ + origins?: string[]; } /** @@ -6010,7 +6063,7 @@ export const ResponseScope = { export type ResponseScope = (typeof ResponseScope)[keyof typeof ResponseScope]; /** - *

Provides information about users and groups associated with a topic control + *

Provides information about users and group names associated with a topic control * rule.

* @public */ @@ -6022,7 +6075,7 @@ export interface UsersAndGroups { userIds?: string[]; /** - *

The user groups associated with a topic control rule.

+ *

The user group names associated with a topic control rule.

* @public */ userGroups?: string[]; @@ -7263,7 +7316,7 @@ export interface ChatSyncInput { userId?: string; /** - *

The groups that a user associated with the chat input belongs to.

+ *

The group names that a user associated with the chat input belongs to.

* @public */ userGroups?: string[]; @@ -7559,7 +7612,7 @@ export interface ChatInput { userId?: string; /** - *

The groups that a user associated with the chat input belongs to.

+ *

The group names that a user associated with the chat input belongs to.

* @public */ userGroups?: string[]; diff --git a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts index bd1d4a616670..d7778395b194 100644 --- a/clients/client-qbusiness/src/protocols/Aws_restJson1.ts +++ b/clients/client-qbusiness/src/protocols/Aws_restJson1.ts @@ -541,6 +541,7 @@ export const se_CreateWebExperienceCommand = async ( take(input, { clientToken: [true, (_) => _ ?? generateIdempotencyToken()], identityProviderConfiguration: (_) => _json(_), + origins: (_) => _json(_), roleArn: [], samplePromptsControlMode: [], subtitle: [], @@ -1489,6 +1490,7 @@ export const se_UpdateWebExperienceCommand = async ( take(input, { authenticationConfiguration: (_) => _json(_), identityProviderConfiguration: (_) => _json(_), + origins: (_) => _json(_), roleArn: [], samplePromptsControlMode: [], subtitle: [], @@ -2166,6 +2168,7 @@ export const de_GetWebExperienceCommand = async ( defaultEndpoint: __expectString, error: _json, identityProviderConfiguration: (_) => _json(__expectUnion(_)), + origins: _json, roleArn: __expectString, samplePromptsControlMode: __expectString, status: __expectString, @@ -3488,6 +3491,8 @@ const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context: // se_WebExperienceAuthConfiguration omitted. +// se_WebExperienceOrigins omitted. + /** * deserializeAws_restJson1ActionExecution */ @@ -4158,6 +4163,8 @@ const de_WebExperience = (output: any, context: __SerdeContext): WebExperience = // de_WebExperienceAuthConfiguration omitted. +// de_WebExperienceOrigins omitted. + /** * deserializeAws_restJson1WebExperiences */ diff --git a/codegen/sdk-codegen/aws-models/qbusiness.json b/codegen/sdk-codegen/aws-models/qbusiness.json index 27353f982af8..34dfb1a1749a 100644 --- a/codegen/sdk-codegen/aws-models/qbusiness.json +++ b/codegen/sdk-codegen/aws-models/qbusiness.json @@ -1312,7 +1312,7 @@ "userGroups": { "target": "com.amazonaws.qbusiness#UserGroups", "traits": { - "smithy.api#documentation": "

The groups that a user associated with the chat input belongs to.

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

The group names that a user associated with the chat input belongs to.

", "smithy.api#httpQuery": "userGroups" } }, @@ -1546,7 +1546,7 @@ "userGroups": { "target": "com.amazonaws.qbusiness#UserGroups", "traits": { - "smithy.api#documentation": "

The groups that a user associated with the chat input belongs to.

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

The group names that a user associated with the chat input belongs to.

", "smithy.api#httpQuery": "userGroups" } }, @@ -1958,7 +1958,7 @@ "roleArn": { "target": "com.amazonaws.qbusiness#RoleArn", "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics.

" + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a service linked role (SLR) and use it as the\n application's role.

" } }, "identityType": { @@ -2741,6 +2741,12 @@ "smithy.api#documentation": "

Determines whether sample prompts are enabled in the web experience for an end\n user.

" } }, + "origins": { + "target": "com.amazonaws.qbusiness#WebExperienceOrigins", + "traits": { + "smithy.api#documentation": "

Sets the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The domain origin refers to the \n base URL for accessing a website including the protocol \n (http/https), the domain name, and the port number (if specified).\n

\n \n

You must only submit a base URL and \n not a full path. For example, https://docs.aws.amazon.com.

\n
" + } + }, "roleArn": { "target": "com.amazonaws.qbusiness#RoleArn", "traits": { @@ -6339,6 +6345,12 @@ "smithy.api#documentation": "

Determines whether sample prompts are enabled in the web experience for an end\n user.

" } }, + "origins": { + "target": "com.amazonaws.qbusiness#WebExperienceOrigins", + "traits": { + "smithy.api#documentation": "

Gets the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The domain origin refers to the \n base URL for accessing a website including the protocol \n (http/https), the domain name, and the port number (if specified).\n

" + } + }, "roleArn": { "target": "com.amazonaws.qbusiness#RoleArn", "traits": { @@ -8676,6 +8688,16 @@ "smithy.api#documentation": "

Information about the OIDC-compliant identity provider (IdP) used to authenticate end\n users of an Amazon Q Business web experience.

" } }, + "com.amazonaws.qbusiness#Origin": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 256 + }, + "smithy.api#pattern": "^(http://|https://)[a-zA-Z0-9-_.]+(?::[0-9]{1,5})?$" + } + }, "com.amazonaws.qbusiness#Payload": { "type": "string", "traits": { @@ -9253,13 +9275,13 @@ "qAppsControlMode": { "target": "com.amazonaws.qbusiness#QAppsControlMode", "traits": { - "smithy.api#documentation": "

Status information about whether end users can create and use Amazon Q Apps in the web experience.

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

Status information about whether end users can create and use Amazon Q Apps in the web\n experience.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Configuration information about Amazon Q Apps. (preview feature)

" + "smithy.api#documentation": "

Configuration information about Amazon Q Apps.

" } }, "com.amazonaws.qbusiness#QAppsControlMode": { @@ -11402,6 +11424,12 @@ "traits": { "smithy.api#documentation": "

Information about the identity provider (IdP) used to authenticate end users of an\n Amazon Q Business web experience.

" } + }, + "origins": { + "target": "com.amazonaws.qbusiness#WebExperienceOrigins", + "traits": { + "smithy.api#documentation": "

Updates the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The domain origin refers to the \n base URL for accessing a website including the protocol \n (http/https), the domain name, and the port number (if specified).

\n \n \n " + } } }, "traits": { @@ -11501,12 +11529,12 @@ "userGroups": { "target": "com.amazonaws.qbusiness#UserGroups", "traits": { - "smithy.api#documentation": "

The user groups associated with a topic control rule.

" + "smithy.api#documentation": "

The user group names associated with a topic control rule.

" } } }, "traits": { - "smithy.api#documentation": "

Provides information about users and groups associated with a topic control\n rule.

" + "smithy.api#documentation": "

Provides information about users and group names associated with a topic control\n rule.

" } }, "com.amazonaws.qbusiness#ValidationException": { @@ -11659,6 +11687,18 @@ "smithy.api#pattern": "^[a-zA-Z0-9][a-zA-Z0-9-]*$" } }, + "com.amazonaws.qbusiness#WebExperienceOrigins": { + "type": "list", + "member": { + "target": "com.amazonaws.qbusiness#Origin" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 10 + } + } + }, "com.amazonaws.qbusiness#WebExperienceResource": { "type": "resource", "identifiers": {