Skip to content

Commit

Permalink
feat(client-qbusiness): Allow enable/disable Q Apps when creating/upd…
Browse files Browse the repository at this point in the history
…ating a Q application; Return the Q Apps enablement information when getting a Q application.
  • Loading branch information
awstools committed Jun 24, 2024
1 parent 08e7ceb commit 55c8f49
Show file tree
Hide file tree
Showing 6 changed files with 120 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are
* also available in Amazon Q Business Lite. For information on what's included in
* Amazon Q Business Lite and what's included in
* Amazon Q Business Pro, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers">Amazon Q Business tiers</a>.
* Amazon Q Business Pro, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#user-sub-tiers">Amazon Q Business tiers</a>.
* You must use the Amazon Q Business console to assign subscription tiers to users.</p>
* </note>
* @example
Expand All @@ -64,6 +64,9 @@ export interface CreateApplicationCommandOutput extends CreateApplicationRespons
* attachmentsConfiguration: { // AttachmentsConfiguration
* attachmentsControlMode: "ENABLED" || "DISABLED", // required
* },
* qAppsConfiguration: { // QAppsConfiguration
* qAppsControlMode: "ENABLED" || "DISABLED", // required
* },
* };
* const command = new CreateApplicationCommand(input);
* const response = await client.send(command);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ export interface GetApplicationCommandOutput extends GetApplicationResponse, __M
* // attachmentsConfiguration: { // AppliedAttachmentsConfiguration
* // attachmentsControlMode: "ENABLED" || "DISABLED",
* // },
* // qAppsConfiguration: { // QAppsConfiguration
* // qAppsControlMode: "ENABLED" || "DISABLED", // required
* // },
* // };
*
* ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export interface UpdateApplicationCommandOutput extends UpdateApplicationRespons
* attachmentsConfiguration: { // AttachmentsConfiguration
* attachmentsControlMode: "ENABLED" || "DISABLED", // required
* },
* qAppsConfiguration: { // QAppsConfiguration
* qAppsControlMode: "ENABLED" || "DISABLED", // required
* },
* };
* const command = new UpdateApplicationCommand(input);
* const response = await client.send(command);
Expand Down
53 changes: 48 additions & 5 deletions clients/client-qbusiness/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,32 @@ export interface EncryptionConfiguration {
kmsKeyId?: string;
}

/**
* @public
* @enum
*/
export const QAppsControlMode = {
DISABLED: "DISABLED",
ENABLED: "ENABLED",
} as const;

/**
* @public
*/
export type QAppsControlMode = (typeof QAppsControlMode)[keyof typeof QAppsControlMode];

/**
* <p>Configuration information about Amazon Q Apps. (preview feature)</p>
* @public
*/
export interface QAppsConfiguration {
/**
* <p>Status information about whether end users can create and use Amazon Q Apps in the web experience.</p>
* @public
*/
qAppsControlMode: QAppsControlMode | undefined;
}

/**
* <p>A list of key/value pairs that identify an index, FAQ, or data source. Tag keys and
* values can consist of Unicode letters, digits, white space, and any of the following
Expand Down Expand Up @@ -775,6 +801,12 @@ export interface CreateApplicationRequest {
* @public
*/
attachmentsConfiguration?: AttachmentsConfiguration;

/**
* <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
* @public
*/
qAppsConfiguration?: QAppsConfiguration;
}

/**
Expand Down Expand Up @@ -1130,6 +1162,12 @@ export interface GetApplicationResponse {
* @public
*/
attachmentsConfiguration?: AppliedAttachmentsConfiguration;

/**
* <p>Settings for whether end users can create and use Amazon Q Apps in the web experience.</p>
* @public
*/
qAppsConfiguration?: QAppsConfiguration;
}

/**
Expand Down Expand Up @@ -1176,7 +1214,7 @@ export interface CreateIndexRequest {

/**
* <p>The index type that's suitable for your needs. For more information on what's included
* in each type of index or index tier, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers">Amazon Q Business
* in each type of index, see <a href="https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#index-tiers">Amazon Q Business
* tiers</a>.</p>
* @public
*/
Expand Down Expand Up @@ -3736,6 +3774,12 @@ export interface UpdateApplicationRequest {
* @public
*/
attachmentsConfiguration?: AttachmentsConfiguration;

/**
* <p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>
* @public
*/
qAppsConfiguration?: QAppsConfiguration;
}

/**
Expand Down Expand Up @@ -6843,9 +6887,8 @@ export interface AttributeFilter {

/**
* <p>Returns <code>true</code> when a document contains any of the specified document
* attributes or metadata fields. Supported for the following <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeValue.html">document attribute value types</a>: <code>dateValue</code>,
* <code>longValue</code>, <code>stringListValue</code> and
* <code>stringValue</code>.</p>
* attributes or metadata fields. Supported for the following <a href="https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeValue.html">document attribute value types</a>:
* <code>stringListValue</code>.</p>
* @public
*/
containsAny?: DocumentAttribute;
Expand Down Expand Up @@ -6939,7 +6982,7 @@ export interface ChatSyncInput {
conversationId?: string;

/**
* <p>The identifier of the previous end user text input message in a conversation.</p>
* <p>The identifier of the previous system message in a conversation.</p>
* @public
*/
parentMessageId?: string;
Expand Down
8 changes: 8 additions & 0 deletions clients/client-qbusiness/src/protocols/Aws_restJson1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ import {
Principal,
PrincipalGroup,
PrincipalUser,
QAppsConfiguration,
ResourceNotFoundException,
RetrieverConfiguration,
Rule,
Expand Down Expand Up @@ -360,6 +361,7 @@ export const se_CreateApplicationCommand = async (
displayName: [],
encryptionConfiguration: (_) => _json(_),
identityCenterInstanceArn: [],
qAppsConfiguration: (_) => _json(_),
roleArn: [],
tags: (_) => _json(_),
})
Expand Down Expand Up @@ -1284,6 +1286,7 @@ export const se_UpdateApplicationCommand = async (
description: [],
displayName: [],
identityCenterInstanceArn: [],
qAppsConfiguration: (_) => _json(_),
roleArn: [],
})
);
Expand Down Expand Up @@ -1917,6 +1920,7 @@ export const de_GetApplicationCommand = async (
encryptionConfiguration: _json,
error: _json,
identityCenterApplicationArn: __expectString,
qAppsConfiguration: _json,
roleArn: __expectString,
status: __expectString,
updatedAt: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
Expand Down Expand Up @@ -3408,6 +3412,8 @@ const se_MessageUsefulnessFeedback = (input: MessageUsefulnessFeedback, context:

// se_PrincipalUser omitted.

// se_QAppsConfiguration omitted.

// se_RetrieverConfiguration omitted.

// se_Rule omitted.
Expand Down Expand Up @@ -4007,6 +4013,8 @@ const de_Plugins = (output: any, context: __SerdeContext): Plugin[] => {
return retVal;
};

// de_QAppsConfiguration omitted.

// de_Retriever omitted.

// de_RetrieverConfiguration omitted.
Expand Down
58 changes: 54 additions & 4 deletions codegen/sdk-codegen/aws-models/qbusiness.json
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@
"containsAny": {
"target": "com.amazonaws.qbusiness#DocumentAttribute",
"traits": {
"smithy.api#documentation": "<p>Returns <code>true</code> when a document contains any of the specified document\n attributes or metadata fields. Supported for the following <a href=\"https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeValue.html\">document attribute value types</a>: <code>dateValue</code>,\n <code>longValue</code>, <code>stringListValue</code> and\n <code>stringValue</code>.</p>"
"smithy.api#documentation": "<p>Returns <code>true</code> when a document contains any of the specified document\n attributes or metadata fields. Supported for the following <a href=\"https://docs.aws.amazon.com/amazonq/latest/api-reference/API_DocumentAttributeValue.html\">document attribute value types</a>:\n <code>stringListValue</code>.</p>"
}
},
"greaterThan": {
Expand Down Expand Up @@ -1539,7 +1539,7 @@
"parentMessageId": {
"target": "com.amazonaws.qbusiness#MessageId",
"traits": {
"smithy.api#documentation": "<p>The identifier of the previous end user text input message in a conversation.</p>"
"smithy.api#documentation": "<p>The identifier of the previous system message in a conversation.</p>"
}
},
"attributeFilter": {
Expand Down Expand Up @@ -1878,7 +1878,7 @@
"kms:DescribeKey",
"kms:CreateGrant"
],
"smithy.api#documentation": "<p>Creates an Amazon Q Business application.</p>\n <note>\n <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are \n also available in Amazon Q Business Lite. For information on what's included in \n Amazon Q Business Lite and what's included in \n Amazon Q Business Pro, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers\">Amazon Q Business tiers</a>. \n You must use the Amazon Q Business console to assign subscription tiers to users.</p>\n </note>",
"smithy.api#documentation": "<p>Creates an Amazon Q Business application.</p>\n <note>\n <p>There are new tiers for Amazon Q Business. Not all features in Amazon Q Business Pro are \n also available in Amazon Q Business Lite. For information on what's included in \n Amazon Q Business Lite and what's included in \n Amazon Q Business Pro, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#user-sub-tiers\">Amazon Q Business tiers</a>. \n You must use the Amazon Q Business console to assign subscription tiers to users.</p>\n </note>",
"smithy.api#http": {
"uri": "/applications",
"method": "POST"
Expand Down Expand Up @@ -1940,6 +1940,12 @@
"aws.cloudformation#cfnMutability": "full",
"smithy.api#documentation": "<p>An option to allow end users to upload files directly during chat.</p>"
}
},
"qAppsConfiguration": {
"target": "com.amazonaws.qbusiness#QAppsConfiguration",
"traits": {
"smithy.api#documentation": "<p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -2174,7 +2180,7 @@
"type": {
"target": "com.amazonaws.qbusiness#IndexType",
"traits": {
"smithy.api#documentation": "<p>The index type that's suitable for your needs. For more information on what's included\n in each type of index or index tier, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/what-is.html#tiers\">Amazon Q Business\n tiers</a>.</p>"
"smithy.api#documentation": "<p>The index type that's suitable for your needs. For more information on what's included\n in each type of index, see <a href=\"https://docs.aws.amazon.com/amazonq/latest/qbusiness-ug/tiers.html#index-tiers\">Amazon Q Business\n tiers</a>.</p>"
}
},
"description": {
Expand Down Expand Up @@ -5219,6 +5225,12 @@
"aws.cloudformation#cfnExcludeProperty": {},
"smithy.api#documentation": "<p>Settings for whether end users can upload files directly during chat.</p>"
}
},
"qAppsConfiguration": {
"target": "com.amazonaws.qbusiness#QAppsConfiguration",
"traits": {
"smithy.api#documentation": "<p>Settings for whether end users can create and use Amazon Q Apps in the web experience.</p>"
}
}
},
"traits": {
Expand Down Expand Up @@ -9009,6 +9021,38 @@
"smithy.api#output": {}
}
},
"com.amazonaws.qbusiness#QAppsConfiguration": {
"type": "structure",
"members": {
"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#required": {}
}
}
},
"traits": {
"smithy.api#documentation": "<p>Configuration information about Amazon Q Apps. (preview feature)</p>"
}
},
"com.amazonaws.qbusiness#QAppsControlMode": {
"type": "enum",
"members": {
"ENABLED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "ENABLED"
}
},
"DISABLED": {
"target": "smithy.api#Unit",
"traits": {
"smithy.api#enumValue": "DISABLED"
}
}
}
},
"com.amazonaws.qbusiness#ReadAccessType": {
"type": "enum",
"members": {
Expand Down Expand Up @@ -10334,6 +10378,12 @@
"traits": {
"smithy.api#documentation": "<p>An option to allow end users to upload files directly during chat.</p>"
}
},
"qAppsConfiguration": {
"target": "com.amazonaws.qbusiness#QAppsConfiguration",
"traits": {
"smithy.api#documentation": "<p>An option to allow end users to create and use Amazon Q Apps in the web experience.</p>"
}
}
},
"traits": {
Expand Down

0 comments on commit 55c8f49

Please sign in to comment.