Skip to content

Commit

Permalink
feat(client-qbusiness): Amazon Q Business now supports embedding the …
Browse files Browse the repository at this point in the history
…Amazon Q Business web experience on third-party websites.
  • Loading branch information
awstools committed Oct 15, 2024
1 parent 3b1ffd3 commit 8f3697f
Show file tree
Hide file tree
Showing 6 changed files with 123 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
67 changes: 60 additions & 7 deletions clients/client-qbusiness/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -760,12 +760,13 @@ export const QAppsControlMode = {
export type QAppsControlMode = (typeof QAppsControlMode)[keyof typeof QAppsControlMode];

/**
* <p>Configuration information about Amazon Q Apps. (preview feature)</p>
* <p>Configuration information about Amazon Q Apps.</p>
* @public
*/
export interface QAppsConfiguration {
/**
* <p>Status information about whether end users can create and use Amazon Q Apps in the web experience.</p>
* <p>Status information about whether end users can create and use Amazon Q Apps in the web
* experience.</p>
* @public
*/
qAppsControlMode: QAppsControlMode | undefined;
Expand Down Expand Up @@ -805,7 +806,8 @@ export interface CreateApplicationRequest {

/**
* <p> The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon
* CloudWatch logs and metrics.</p>
* CloudWatch logs and metrics. If this property is not specified, Amazon Q Business will create a <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions">service linked role (SLR)</a> and use it as the
* application's role.</p>
* @public
*/
roleArn?: string;
Expand Down Expand Up @@ -4135,6 +4137,22 @@ export interface CreateWebExperienceRequest {
*/
samplePromptsControlMode?: WebExperienceSamplePromptsControlMode;

/**
* <p>Sets the website domain origins that
* are allowed to embed the Amazon Q Business web experience.
*
* The <i>domain origin</i> refers to the
* base URL for accessing a website including the protocol
* (<code>http/https</code>), the domain name, and the port number (if specified).
* </p>
* <note>
* <p>You must only submit a <i>base URL</i> and
* not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p>
* </note>
* @public
*/
origins?: string[];

/**
* <p>The Amazon Resource Name (ARN) of the service role attached to your web
* experience.</p>
Expand Down Expand Up @@ -4395,6 +4413,18 @@ export interface GetWebExperienceResponse {
*/
samplePromptsControlMode?: WebExperienceSamplePromptsControlMode;

/**
* <p>Gets the website domain origins that
* are allowed to embed the Amazon Q Business web experience.
*
* The <i>domain origin</i> refers to the
* base URL for accessing a website including the protocol
* (<code>http/https</code>), the domain name, and the port number (if specified).
* </p>
* @public
*/
origins?: string[];

/**
* <p> The Amazon Resource Name (ARN) of the service role attached to your web
* experience.</p>
Expand Down Expand Up @@ -4571,6 +4601,29 @@ export interface UpdateWebExperienceRequest {
* @public
*/
identityProviderConfiguration?: IdentityProviderConfiguration;

/**
* <p>Updates the website domain origins that
* are allowed to embed the Amazon Q Business web experience.
*
* The <i>domain origin</i> refers to the
* <i>base URL</i> for accessing a website including the protocol
* (<code>http/https</code>), the domain name, and the port number (if specified).</p>
* <note>
* <ul>
* <li>
* <p>Any values except <code>null</code> submitted as part of this
* update will replace all previous values.</p>
* </li>
* <li>
* <p>You must only submit a <i>base URL</i> and
* not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p>
* </li>
* </ul>
* </note>
* @public
*/
origins?: string[];
}

/**
Expand Down Expand Up @@ -6010,7 +6063,7 @@ export const ResponseScope = {
export type ResponseScope = (typeof ResponseScope)[keyof typeof ResponseScope];

/**
* <p>Provides information about users and groups associated with a topic control
* <p>Provides information about users and group names associated with a topic control
* rule.</p>
* @public
*/
Expand All @@ -6022,7 +6075,7 @@ export interface UsersAndGroups {
userIds?: string[];

/**
* <p>The user groups associated with a topic control rule.</p>
* <p>The user group names associated with a topic control rule.</p>
* @public
*/
userGroups?: string[];
Expand Down Expand Up @@ -7263,7 +7316,7 @@ export interface ChatSyncInput {
userId?: string;

/**
* <p>The groups that a user associated with the chat input belongs to.</p>
* <p>The group names that a user associated with the chat input belongs to.</p>
* @public
*/
userGroups?: string[];
Expand Down Expand Up @@ -7559,7 +7612,7 @@ export interface ChatInput {
userId?: string;

/**
* <p>The groups that a user associated with the chat input belongs to.</p>
* <p>The group names that a user associated with the chat input belongs to.</p>
* @public
*/
userGroups?: string[];
Expand Down
7 changes: 7 additions & 0 deletions clients/client-qbusiness/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ export const se_CreateWebExperienceCommand = async (
take(input, {
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
identityProviderConfiguration: (_) => _json(_),
origins: (_) => _json(_),
roleArn: [],
samplePromptsControlMode: [],
subtitle: [],
Expand Down Expand Up @@ -1489,6 +1490,7 @@ export const se_UpdateWebExperienceCommand = async (
take(input, {
authenticationConfiguration: (_) => _json(_),
identityProviderConfiguration: (_) => _json(_),
origins: (_) => _json(_),
roleArn: [],
samplePromptsControlMode: [],
subtitle: [],
Expand Down Expand Up @@ -2166,6 +2168,7 @@ export const de_GetWebExperienceCommand = async (
defaultEndpoint: __expectString,
error: _json,
identityProviderConfiguration: (_) => _json(__expectUnion(_)),
origins: _json,
roleArn: __expectString,
samplePromptsControlMode: __expectString,
status: __expectString,
Expand Down Expand Up @@ -3488,6 +3491,8 @@ const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context:

// se_WebExperienceAuthConfiguration omitted.

// se_WebExperienceOrigins omitted.

/**
* deserializeAws_restJson1ActionExecution
*/
Expand Down Expand Up @@ -4158,6 +4163,8 @@ const de_WebExperience = (output: any, context: __SerdeContext): WebExperience =

// de_WebExperienceAuthConfiguration omitted.

// de_WebExperienceOrigins omitted.

/**
* deserializeAws_restJson1WebExperiences
*/
Expand Down
54 changes: 47 additions & 7 deletions codegen/sdk-codegen/aws-models/qbusiness.json
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@
"userGroups": {
"target": "com.amazonaws.qbusiness#UserGroups",
"traits": {
"smithy.api#documentation": "<p>The groups that a user associated with the chat input belongs to.</p>",
"smithy.api#documentation": "<p>The group names that a user associated with the chat input belongs to.</p>",
"smithy.api#httpQuery": "userGroups"
}
},
Expand Down Expand Up @@ -1546,7 +1546,7 @@
"userGroups": {
"target": "com.amazonaws.qbusiness#UserGroups",
"traits": {
"smithy.api#documentation": "<p>The groups that a user associated with the chat input belongs to.</p>",
"smithy.api#documentation": "<p>The group names that a user associated with the chat input belongs to.</p>",
"smithy.api#httpQuery": "userGroups"
}
},
Expand Down Expand Up @@ -1958,7 +1958,7 @@
"roleArn": {
"target": "com.amazonaws.qbusiness#RoleArn",
"traits": {
"smithy.api#documentation": "<p> The Amazon Resource Name (ARN) of an IAM role with permissions to access your Amazon\n CloudWatch logs and metrics.</p>"
"smithy.api#documentation": "<p> 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 <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/using-service-linked-roles.html#slr-permissions\">service linked role (SLR)</a> and use it as the\n application's role.</p>"
}
},
"identityType": {
Expand Down Expand Up @@ -2741,6 +2741,12 @@
"smithy.api#documentation": "<p>Determines whether sample prompts are enabled in the web experience for an end\n user.</p>"
}
},
"origins": {
"target": "com.amazonaws.qbusiness#WebExperienceOrigins",
"traits": {
"smithy.api#documentation": "<p>Sets the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The <i>domain origin</i> refers to the \n base URL for accessing a website including the protocol \n (<code>http/https</code>), the domain name, and the port number (if specified).\n </p>\n <note>\n <p>You must only submit a <i>base URL</i> and \n not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p>\n </note>"
}
},
"roleArn": {
"target": "com.amazonaws.qbusiness#RoleArn",
"traits": {
Expand Down Expand Up @@ -6339,6 +6345,12 @@
"smithy.api#documentation": "<p>Determines whether sample prompts are enabled in the web experience for an end\n user.</p>"
}
},
"origins": {
"target": "com.amazonaws.qbusiness#WebExperienceOrigins",
"traits": {
"smithy.api#documentation": "<p>Gets the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The <i>domain origin</i> refers to the \n base URL for accessing a website including the protocol \n (<code>http/https</code>), the domain name, and the port number (if specified).\n </p>"
}
},
"roleArn": {
"target": "com.amazonaws.qbusiness#RoleArn",
"traits": {
Expand Down Expand Up @@ -8676,6 +8688,16 @@
"smithy.api#documentation": "<p>Information about the OIDC-compliant identity provider (IdP) used to authenticate end\n users of an Amazon Q Business web experience.</p>"
}
},
"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": {
Expand Down Expand Up @@ -9253,13 +9275,13 @@
"qAppsControlMode": {
"target": "com.amazonaws.qbusiness#QAppsControlMode",
"traits": {
"smithy.api#documentation": "<p>Status information about whether end users can create and use Amazon Q Apps in the web experience.</p>",
"smithy.api#documentation": "<p>Status information about whether end users can create and use Amazon Q Apps in the web\n experience.</p>",
"smithy.api#required": {}
}
}
},
"traits": {
"smithy.api#documentation": "<p>Configuration information about Amazon Q Apps. (preview feature)</p>"
"smithy.api#documentation": "<p>Configuration information about Amazon Q Apps.</p>"
}
},
"com.amazonaws.qbusiness#QAppsControlMode": {
Expand Down Expand Up @@ -11402,6 +11424,12 @@
"traits": {
"smithy.api#documentation": "<p>Information about the identity provider (IdP) used to authenticate end users of an\n Amazon Q Business web experience.</p>"
}
},
"origins": {
"target": "com.amazonaws.qbusiness#WebExperienceOrigins",
"traits": {
"smithy.api#documentation": "<p>Updates the website domain origins that \n are allowed to embed the Amazon Q Business web experience.\n \n The <i>domain origin</i> refers to the \n <i>base URL</i> for accessing a website including the protocol \n (<code>http/https</code>), the domain name, and the port number (if specified).</p>\n <note>\n <ul>\n <li>\n <p>Any values except <code>null</code> submitted as part of this \n update will replace all previous values.</p>\n </li>\n <li>\n <p>You must only submit a <i>base URL</i> and \n not a full path. For example, <code>https://docs.aws.amazon.com</code>.</p>\n </li>\n </ul>\n </note>"
}
}
},
"traits": {
Expand Down Expand Up @@ -11501,12 +11529,12 @@
"userGroups": {
"target": "com.amazonaws.qbusiness#UserGroups",
"traits": {
"smithy.api#documentation": "<p>The user groups associated with a topic control rule.</p>"
"smithy.api#documentation": "<p>The user group names associated with a topic control rule.</p>"
}
}
},
"traits": {
"smithy.api#documentation": "<p>Provides information about users and groups associated with a topic control\n rule.</p>"
"smithy.api#documentation": "<p>Provides information about users and group names associated with a topic control\n rule.</p>"
}
},
"com.amazonaws.qbusiness#ValidationException": {
Expand Down Expand Up @@ -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": {
Expand Down

0 comments on commit 8f3697f

Please sign in to comment.