From c6917b443550d1fe140021103d6807aaac11d00a Mon Sep 17 00:00:00 2001 From: awstools Date: Thu, 27 Jun 2024 18:14:02 +0000 Subject: [PATCH] feat(client-qconnect): Adds CreateContentAssociation, ListContentAssociations, GetContentAssociation, and DeleteContentAssociation APIs. --- clients/client-qconnect/README.md | 32 + clients/client-qconnect/src/QConnect.ts | 92 +++ clients/client-qconnect/src/QConnectClient.ts | 24 + .../CreateContentAssociationCommand.ts | 150 +++++ .../DeleteContentAssociationCommand.ts | 94 +++ .../commands/GetContentAssociationCommand.ts | 112 ++++ .../ListContentAssociationsCommand.ts | 116 ++++ .../src/commands/UpdateSessionCommand.ts | 6 +- clients/client-qconnect/src/commands/index.ts | 4 + .../client-qconnect/src/models/models_0.ts | 389 +++++++++++- .../ListContentAssociationsPaginator.ts | 24 + .../client-qconnect/src/pagination/index.ts | 1 + .../src/protocols/Aws_restJson1.ts | 218 +++++++ codegen/sdk-codegen/aws-models/qconnect.json | 600 +++++++++++++++++- 14 files changed, 1843 insertions(+), 19 deletions(-) create mode 100644 clients/client-qconnect/src/commands/CreateContentAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/DeleteContentAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/GetContentAssociationCommand.ts create mode 100644 clients/client-qconnect/src/commands/ListContentAssociationsCommand.ts create mode 100644 clients/client-qconnect/src/pagination/ListContentAssociationsPaginator.ts diff --git a/clients/client-qconnect/README.md b/clients/client-qconnect/README.md index 7567d1df3f05..3aecd3ae1d0f 100644 --- a/clients/client-qconnect/README.md +++ b/clients/client-qconnect/README.md @@ -245,6 +245,14 @@ CreateContent [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentCommandOutput/) + +
+ +CreateContentAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/CreateContentAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/CreateContentAssociationCommandOutput/) +
@@ -293,6 +301,14 @@ DeleteContent [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentCommandOutput/) +
+
+ +DeleteContentAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/DeleteContentAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/DeleteContentAssociationCommandOutput/) +
@@ -341,6 +357,14 @@ GetContent [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetContentCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentCommandOutput/) +
+
+ +GetContentAssociation + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/GetContentAssociationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentAssociationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/GetContentAssociationCommandOutput/) +
@@ -405,6 +429,14 @@ ListAssistants [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListAssistantsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListAssistantsCommandOutput/) +
+
+ +ListContentAssociations + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/qconnect/command/ListContentAssociationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListContentAssociationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-qconnect/Interface/ListContentAssociationsCommandOutput/) +
diff --git a/clients/client-qconnect/src/QConnect.ts b/clients/client-qconnect/src/QConnect.ts index 4c510c4d1e3b..ee9367c1bbfe 100644 --- a/clients/client-qconnect/src/QConnect.ts +++ b/clients/client-qconnect/src/QConnect.ts @@ -12,6 +12,11 @@ import { CreateAssistantCommandInput, CreateAssistantCommandOutput, } from "./commands/CreateAssistantCommand"; +import { + CreateContentAssociationCommand, + CreateContentAssociationCommandInput, + CreateContentAssociationCommandOutput, +} from "./commands/CreateContentAssociationCommand"; import { CreateContentCommand, CreateContentCommandInput, @@ -42,6 +47,11 @@ import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput, } from "./commands/DeleteAssistantCommand"; +import { + DeleteContentAssociationCommand, + DeleteContentAssociationCommandInput, + DeleteContentAssociationCommandOutput, +} from "./commands/DeleteContentAssociationCommand"; import { DeleteContentCommand, DeleteContentCommandInput, @@ -72,6 +82,11 @@ import { GetAssistantCommandInput, GetAssistantCommandOutput, } from "./commands/GetAssistantCommand"; +import { + GetContentAssociationCommand, + GetContentAssociationCommandInput, + GetContentAssociationCommandOutput, +} from "./commands/GetContentAssociationCommand"; import { GetContentCommand, GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; import { GetContentSummaryCommand, @@ -109,6 +124,11 @@ import { ListAssistantsCommandInput, ListAssistantsCommandOutput, } from "./commands/ListAssistantsCommand"; +import { + ListContentAssociationsCommand, + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput, +} from "./commands/ListContentAssociationsCommand"; import { ListContentsCommand, ListContentsCommandInput, @@ -207,18 +227,21 @@ const commands = { CreateAssistantCommand, CreateAssistantAssociationCommand, CreateContentCommand, + CreateContentAssociationCommand, CreateKnowledgeBaseCommand, CreateQuickResponseCommand, CreateSessionCommand, DeleteAssistantCommand, DeleteAssistantAssociationCommand, DeleteContentCommand, + DeleteContentAssociationCommand, DeleteImportJobCommand, DeleteKnowledgeBaseCommand, DeleteQuickResponseCommand, GetAssistantCommand, GetAssistantAssociationCommand, GetContentCommand, + GetContentAssociationCommand, GetContentSummaryCommand, GetImportJobCommand, GetKnowledgeBaseCommand, @@ -227,6 +250,7 @@ const commands = { GetSessionCommand, ListAssistantAssociationsCommand, ListAssistantsCommand, + ListContentAssociationsCommand, ListContentsCommand, ListImportJobsCommand, ListKnowledgeBasesCommand, @@ -292,6 +316,23 @@ export interface QConnect { cb: (err: any, data?: CreateContentCommandOutput) => void ): void; + /** + * @see {@link CreateContentAssociationCommand} + */ + createContentAssociation( + args: CreateContentAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + createContentAssociation( + args: CreateContentAssociationCommandInput, + cb: (err: any, data?: CreateContentAssociationCommandOutput) => void + ): void; + createContentAssociation( + args: CreateContentAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateContentAssociationCommandOutput) => void + ): void; + /** * @see {@link CreateKnowledgeBaseCommand} */ @@ -379,6 +420,23 @@ export interface QConnect { cb: (err: any, data?: DeleteContentCommandOutput) => void ): void; + /** + * @see {@link DeleteContentAssociationCommand} + */ + deleteContentAssociation( + args: DeleteContentAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + deleteContentAssociation( + args: DeleteContentAssociationCommandInput, + cb: (err: any, data?: DeleteContentAssociationCommandOutput) => void + ): void; + deleteContentAssociation( + args: DeleteContentAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteContentAssociationCommandOutput) => void + ): void; + /** * @see {@link DeleteImportJobCommand} */ @@ -466,6 +524,23 @@ export interface QConnect { cb: (err: any, data?: GetContentCommandOutput) => void ): void; + /** + * @see {@link GetContentAssociationCommand} + */ + getContentAssociation( + args: GetContentAssociationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + getContentAssociation( + args: GetContentAssociationCommandInput, + cb: (err: any, data?: GetContentAssociationCommandOutput) => void + ): void; + getContentAssociation( + args: GetContentAssociationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetContentAssociationCommandOutput) => void + ): void; + /** * @see {@link GetContentSummaryCommand} */ @@ -588,6 +663,23 @@ export interface QConnect { cb: (err: any, data?: ListAssistantsCommandOutput) => void ): void; + /** + * @see {@link ListContentAssociationsCommand} + */ + listContentAssociations( + args: ListContentAssociationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + listContentAssociations( + args: ListContentAssociationsCommandInput, + cb: (err: any, data?: ListContentAssociationsCommandOutput) => void + ): void; + listContentAssociations( + args: ListContentAssociationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListContentAssociationsCommandOutput) => void + ): void; + /** * @see {@link ListContentsCommand} */ diff --git a/clients/client-qconnect/src/QConnectClient.ts b/clients/client-qconnect/src/QConnectClient.ts index 3c03183289b6..b2b8c3a0a276 100644 --- a/clients/client-qconnect/src/QConnectClient.ts +++ b/clients/client-qconnect/src/QConnectClient.ts @@ -58,6 +58,10 @@ import { CreateAssistantAssociationCommandOutput, } from "./commands/CreateAssistantAssociationCommand"; import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "./commands/CreateAssistantCommand"; +import { + CreateContentAssociationCommandInput, + CreateContentAssociationCommandOutput, +} from "./commands/CreateContentAssociationCommand"; import { CreateContentCommandInput, CreateContentCommandOutput } from "./commands/CreateContentCommand"; import { CreateKnowledgeBaseCommandInput, @@ -73,6 +77,10 @@ import { DeleteAssistantAssociationCommandOutput, } from "./commands/DeleteAssistantAssociationCommand"; import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "./commands/DeleteAssistantCommand"; +import { + DeleteContentAssociationCommandInput, + DeleteContentAssociationCommandOutput, +} from "./commands/DeleteContentAssociationCommand"; import { DeleteContentCommandInput, DeleteContentCommandOutput } from "./commands/DeleteContentCommand"; import { DeleteImportJobCommandInput, DeleteImportJobCommandOutput } from "./commands/DeleteImportJobCommand"; import { @@ -88,6 +96,10 @@ import { GetAssistantAssociationCommandOutput, } from "./commands/GetAssistantAssociationCommand"; import { GetAssistantCommandInput, GetAssistantCommandOutput } from "./commands/GetAssistantCommand"; +import { + GetContentAssociationCommandInput, + GetContentAssociationCommandOutput, +} from "./commands/GetContentAssociationCommand"; import { GetContentCommandInput, GetContentCommandOutput } from "./commands/GetContentCommand"; import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "./commands/GetContentSummaryCommand"; import { GetImportJobCommandInput, GetImportJobCommandOutput } from "./commands/GetImportJobCommand"; @@ -100,6 +112,10 @@ import { ListAssistantAssociationsCommandOutput, } from "./commands/ListAssistantAssociationsCommand"; import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "./commands/ListAssistantsCommand"; +import { + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput, +} from "./commands/ListContentAssociationsCommand"; import { ListContentsCommandInput, ListContentsCommandOutput } from "./commands/ListContentsCommand"; import { ListImportJobsCommandInput, ListImportJobsCommandOutput } from "./commands/ListImportJobsCommand"; import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "./commands/ListKnowledgeBasesCommand"; @@ -155,18 +171,21 @@ export { __Client }; export type ServiceInputTypes = | CreateAssistantAssociationCommandInput | CreateAssistantCommandInput + | CreateContentAssociationCommandInput | CreateContentCommandInput | CreateKnowledgeBaseCommandInput | CreateQuickResponseCommandInput | CreateSessionCommandInput | DeleteAssistantAssociationCommandInput | DeleteAssistantCommandInput + | DeleteContentAssociationCommandInput | DeleteContentCommandInput | DeleteImportJobCommandInput | DeleteKnowledgeBaseCommandInput | DeleteQuickResponseCommandInput | GetAssistantAssociationCommandInput | GetAssistantCommandInput + | GetContentAssociationCommandInput | GetContentCommandInput | GetContentSummaryCommandInput | GetImportJobCommandInput @@ -176,6 +195,7 @@ export type ServiceInputTypes = | GetSessionCommandInput | ListAssistantAssociationsCommandInput | ListAssistantsCommandInput + | ListContentAssociationsCommandInput | ListContentsCommandInput | ListImportJobsCommandInput | ListKnowledgeBasesCommandInput @@ -203,18 +223,21 @@ export type ServiceInputTypes = export type ServiceOutputTypes = | CreateAssistantAssociationCommandOutput | CreateAssistantCommandOutput + | CreateContentAssociationCommandOutput | CreateContentCommandOutput | CreateKnowledgeBaseCommandOutput | CreateQuickResponseCommandOutput | CreateSessionCommandOutput | DeleteAssistantAssociationCommandOutput | DeleteAssistantCommandOutput + | DeleteContentAssociationCommandOutput | DeleteContentCommandOutput | DeleteImportJobCommandOutput | DeleteKnowledgeBaseCommandOutput | DeleteQuickResponseCommandOutput | GetAssistantAssociationCommandOutput | GetAssistantCommandOutput + | GetContentAssociationCommandOutput | GetContentCommandOutput | GetContentSummaryCommandOutput | GetImportJobCommandOutput @@ -224,6 +247,7 @@ export type ServiceOutputTypes = | GetSessionCommandOutput | ListAssistantAssociationsCommandOutput | ListAssistantsCommandOutput + | ListContentAssociationsCommandOutput | ListContentsCommandOutput | ListImportJobsCommandOutput | ListKnowledgeBasesCommandOutput diff --git a/clients/client-qconnect/src/commands/CreateContentAssociationCommand.ts b/clients/client-qconnect/src/commands/CreateContentAssociationCommand.ts new file mode 100644 index 000000000000..21271261146d --- /dev/null +++ b/clients/client-qconnect/src/commands/CreateContentAssociationCommand.ts @@ -0,0 +1,150 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { CreateContentAssociationRequest, CreateContentAssociationResponse } from "../models/models_0"; +import { de_CreateContentAssociationCommand, se_CreateContentAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link CreateContentAssociationCommand}. + */ +export interface CreateContentAssociationCommandInput extends CreateContentAssociationRequest {} +/** + * @public + * + * The output of {@link CreateContentAssociationCommand}. + */ +export interface CreateContentAssociationCommandOutput extends CreateContentAssociationResponse, __MetadataBearer {} + +/** + *

Creates an association between a content resource in a knowledge base and step-by-step + * guides. Step-by-step guides offer instructions to agents for resolving common + * customer issues. You create a content association to integrate Amazon Q in Connect and step-by-step + * guides.

+ *

After you integrate Amazon Q and step-by-step guides, when Amazon Q provides a + * recommendation to an agent based on the intent that it's detected, it also provides them with + * the option to start the step-by-step guide that you have associated with the content.

+ *

Note the following limitations:

+ *
    + *
  • + *

    You can create only one content association for each + * content resource in a knowledge base.

    + *
  • + *
  • + *

    You can associate a step-by-step guide with multiple content resources.

    + *
  • + *
+ *

For more information, see Integrate Amazon Q in Connect with + * step-by-step guides in the Amazon Connect Administrator + * Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, CreateContentAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, CreateContentAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // CreateContentAssociationRequest + * clientToken: "STRING_VALUE", + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * associationType: "STRING_VALUE", // required + * association: { // ContentAssociationContents Union: only one key present + * amazonConnectGuideAssociation: { // AmazonConnectGuideAssociationData + * flowId: "STRING_VALUE", + * }, + * }, + * tags: { // Tags + * "": "STRING_VALUE", + * }, + * }; + * const command = new CreateContentAssociationCommand(input); + * const response = await client.send(command); + * // { // CreateContentAssociationResponse + * // contentAssociation: { // ContentAssociationData + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // contentArn: "STRING_VALUE", // required + * // contentAssociationId: "STRING_VALUE", // required + * // contentAssociationArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // ContentAssociationContents Union: only one key present + * // amazonConnectGuideAssociation: { // AmazonConnectGuideAssociationData + * // flowId: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param CreateContentAssociationCommandInput - {@link CreateContentAssociationCommandInput} + * @returns {@link CreateContentAssociationCommandOutput} + * @see {@link CreateContentAssociationCommandInput} for command's `input` shape. + * @see {@link CreateContentAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ConflictException} (client fault) + *

The request could not be processed because of conflict in the current state of the + * resource. For example, if you're using a Create API (such as + * CreateAssistant) that accepts name, a conflicting resource (usually with the + * same name) is being created or mutated.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ServiceQuotaExceededException} (client fault) + *

You've exceeded your service quota. To perform the requested action, remove some of the + * relevant resources, or use service quotas to request a service quota increase.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The throttling limit has been exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + * @public + */ +export class CreateContentAssociationCommand extends $Command + .classBuilder< + CreateContentAssociationCommandInput, + CreateContentAssociationCommandOutput, + QConnectClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: QConnectClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("WisdomService", "CreateContentAssociation", {}) + .n("QConnectClient", "CreateContentAssociationCommand") + .f(void 0, void 0) + .ser(se_CreateContentAssociationCommand) + .de(de_CreateContentAssociationCommand) + .build() {} diff --git a/clients/client-qconnect/src/commands/DeleteContentAssociationCommand.ts b/clients/client-qconnect/src/commands/DeleteContentAssociationCommand.ts new file mode 100644 index 000000000000..da622c7d381e --- /dev/null +++ b/clients/client-qconnect/src/commands/DeleteContentAssociationCommand.ts @@ -0,0 +1,94 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { DeleteContentAssociationRequest, DeleteContentAssociationResponse } from "../models/models_0"; +import { de_DeleteContentAssociationCommand, se_DeleteContentAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link DeleteContentAssociationCommand}. + */ +export interface DeleteContentAssociationCommandInput extends DeleteContentAssociationRequest {} +/** + * @public + * + * The output of {@link DeleteContentAssociationCommand}. + */ +export interface DeleteContentAssociationCommandOutput extends DeleteContentAssociationResponse, __MetadataBearer {} + +/** + *

Deletes the content association.

+ *

For more information about content associations--what they are and when they are used--see + * Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect + * Administrator Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, DeleteContentAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, DeleteContentAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // DeleteContentAssociationRequest + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * contentAssociationId: "STRING_VALUE", // required + * }; + * const command = new DeleteContentAssociationCommand(input); + * const response = await client.send(command); + * // {}; + * + * ``` + * + * @param DeleteContentAssociationCommandInput - {@link DeleteContentAssociationCommandInput} + * @returns {@link DeleteContentAssociationCommandOutput} + * @see {@link DeleteContentAssociationCommandInput} for command's `input` shape. + * @see {@link DeleteContentAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + * @public + */ +export class DeleteContentAssociationCommand extends $Command + .classBuilder< + DeleteContentAssociationCommandInput, + DeleteContentAssociationCommandOutput, + QConnectClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: QConnectClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("WisdomService", "DeleteContentAssociation", {}) + .n("QConnectClient", "DeleteContentAssociationCommand") + .f(void 0, void 0) + .ser(se_DeleteContentAssociationCommand) + .de(de_DeleteContentAssociationCommand) + .build() {} diff --git a/clients/client-qconnect/src/commands/GetContentAssociationCommand.ts b/clients/client-qconnect/src/commands/GetContentAssociationCommand.ts new file mode 100644 index 000000000000..1b6d73117cae --- /dev/null +++ b/clients/client-qconnect/src/commands/GetContentAssociationCommand.ts @@ -0,0 +1,112 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { GetContentAssociationRequest, GetContentAssociationResponse } from "../models/models_0"; +import { de_GetContentAssociationCommand, se_GetContentAssociationCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link GetContentAssociationCommand}. + */ +export interface GetContentAssociationCommandInput extends GetContentAssociationRequest {} +/** + * @public + * + * The output of {@link GetContentAssociationCommand}. + */ +export interface GetContentAssociationCommandOutput extends GetContentAssociationResponse, __MetadataBearer {} + +/** + *

Returns the content association.

+ *

For more information about content associations--what they are and when they are used--see + * Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect + * Administrator Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, GetContentAssociationCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, GetContentAssociationCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // GetContentAssociationRequest + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * contentAssociationId: "STRING_VALUE", // required + * }; + * const command = new GetContentAssociationCommand(input); + * const response = await client.send(command); + * // { // GetContentAssociationResponse + * // contentAssociation: { // ContentAssociationData + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // contentArn: "STRING_VALUE", // required + * // contentAssociationId: "STRING_VALUE", // required + * // contentAssociationArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // ContentAssociationContents Union: only one key present + * // amazonConnectGuideAssociation: { // AmazonConnectGuideAssociationData + * // flowId: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // }; + * + * ``` + * + * @param GetContentAssociationCommandInput - {@link GetContentAssociationCommandInput} + * @returns {@link GetContentAssociationCommandOutput} + * @see {@link GetContentAssociationCommandInput} for command's `input` shape. + * @see {@link GetContentAssociationCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + * @public + */ +export class GetContentAssociationCommand extends $Command + .classBuilder< + GetContentAssociationCommandInput, + GetContentAssociationCommandOutput, + QConnectClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: QConnectClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("WisdomService", "GetContentAssociation", {}) + .n("QConnectClient", "GetContentAssociationCommand") + .f(void 0, void 0) + .ser(se_GetContentAssociationCommand) + .de(de_GetContentAssociationCommand) + .build() {} diff --git a/clients/client-qconnect/src/commands/ListContentAssociationsCommand.ts b/clients/client-qconnect/src/commands/ListContentAssociationsCommand.ts new file mode 100644 index 000000000000..761101368c67 --- /dev/null +++ b/clients/client-qconnect/src/commands/ListContentAssociationsCommand.ts @@ -0,0 +1,116 @@ +// smithy-typescript generated code +import { getEndpointPlugin } from "@smithy/middleware-endpoint"; +import { getSerdePlugin } from "@smithy/middleware-serde"; +import { Command as $Command } from "@smithy/smithy-client"; +import { MetadataBearer as __MetadataBearer } from "@smithy/types"; + +import { commonParams } from "../endpoint/EndpointParameters"; +import { ListContentAssociationsRequest, ListContentAssociationsResponse } from "../models/models_0"; +import { de_ListContentAssociationsCommand, se_ListContentAssociationsCommand } from "../protocols/Aws_restJson1"; +import { QConnectClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../QConnectClient"; + +/** + * @public + */ +export type { __MetadataBearer }; +export { $Command }; +/** + * @public + * + * The input for {@link ListContentAssociationsCommand}. + */ +export interface ListContentAssociationsCommandInput extends ListContentAssociationsRequest {} +/** + * @public + * + * The output of {@link ListContentAssociationsCommand}. + */ +export interface ListContentAssociationsCommandOutput extends ListContentAssociationsResponse, __MetadataBearer {} + +/** + *

Lists the content associations.

+ *

For more information about content associations--what they are and when they are used--see + * Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect + * Administrator Guide.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { QConnectClient, ListContentAssociationsCommand } from "@aws-sdk/client-qconnect"; // ES Modules import + * // const { QConnectClient, ListContentAssociationsCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import + * const client = new QConnectClient(config); + * const input = { // ListContentAssociationsRequest + * nextToken: "STRING_VALUE", + * maxResults: Number("int"), + * knowledgeBaseId: "STRING_VALUE", // required + * contentId: "STRING_VALUE", // required + * }; + * const command = new ListContentAssociationsCommand(input); + * const response = await client.send(command); + * // { // ListContentAssociationsResponse + * // contentAssociationSummaries: [ // ContentAssociationSummaryList // required + * // { // ContentAssociationSummary + * // knowledgeBaseId: "STRING_VALUE", // required + * // knowledgeBaseArn: "STRING_VALUE", // required + * // contentId: "STRING_VALUE", // required + * // contentArn: "STRING_VALUE", // required + * // contentAssociationId: "STRING_VALUE", // required + * // contentAssociationArn: "STRING_VALUE", // required + * // associationType: "STRING_VALUE", // required + * // associationData: { // ContentAssociationContents Union: only one key present + * // amazonConnectGuideAssociation: { // AmazonConnectGuideAssociationData + * // flowId: "STRING_VALUE", + * // }, + * // }, + * // tags: { // Tags + * // "": "STRING_VALUE", + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param ListContentAssociationsCommandInput - {@link ListContentAssociationsCommandInput} + * @returns {@link ListContentAssociationsCommandOutput} + * @see {@link ListContentAssociationsCommandInput} for command's `input` shape. + * @see {@link ListContentAssociationsCommandOutput} for command's `response` shape. + * @see {@link QConnectClientResolvedConfig | config} for QConnectClient's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link ResourceNotFoundException} (client fault) + *

The specified resource does not exist.

+ * + * @throws {@link ValidationException} (client fault) + *

The input fails to satisfy the constraints specified by a service.

+ * + * @throws {@link QConnectServiceException} + *

Base exception class for all service exceptions from QConnect service.

+ * + * @public + */ +export class ListContentAssociationsCommand extends $Command + .classBuilder< + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput, + QConnectClientResolvedConfig, + ServiceInputTypes, + ServiceOutputTypes + >() + .ep({ + ...commonParams, + }) + .m(function (this: any, Command: any, cs: any, config: QConnectClientResolvedConfig, o: any) { + return [ + getSerdePlugin(config, this.serialize, this.deserialize), + getEndpointPlugin(config, Command.getEndpointParameterInstructions()), + ]; + }) + .s("WisdomService", "ListContentAssociations", {}) + .n("QConnectClient", "ListContentAssociationsCommand") + .f(void 0, void 0) + .ser(se_ListContentAssociationsCommand) + .de(de_ListContentAssociationsCommand) + .build() {} diff --git a/clients/client-qconnect/src/commands/UpdateSessionCommand.ts b/clients/client-qconnect/src/commands/UpdateSessionCommand.ts index 2d79e16c1cc6..e4e0c5094e45 100644 --- a/clients/client-qconnect/src/commands/UpdateSessionCommand.ts +++ b/clients/client-qconnect/src/commands/UpdateSessionCommand.ts @@ -28,9 +28,9 @@ export interface UpdateSessionCommandInput extends UpdateSessionRequest {} export interface UpdateSessionCommandOutput extends UpdateSessionResponse, __MetadataBearer {} /** - *

Updates a session. A session is a contextual container used for generating recommendations. - * Amazon Connect updates the existing Amazon Q in Connect session for each contact on which Amazon Q in Connect - * is enabled.

+ *

Updates a session. A session is a contextual container used for generating + * recommendations. Amazon Connect updates the existing Amazon Q in Connect session for each contact on + * which Amazon Q in Connect is enabled.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript diff --git a/clients/client-qconnect/src/commands/index.ts b/clients/client-qconnect/src/commands/index.ts index 084f8c132b80..dbcdab39842e 100644 --- a/clients/client-qconnect/src/commands/index.ts +++ b/clients/client-qconnect/src/commands/index.ts @@ -1,18 +1,21 @@ export * from "./CreateAssistantAssociationCommand"; // smithy-typescript generated code export * from "./CreateAssistantCommand"; +export * from "./CreateContentAssociationCommand"; export * from "./CreateContentCommand"; export * from "./CreateKnowledgeBaseCommand"; export * from "./CreateQuickResponseCommand"; export * from "./CreateSessionCommand"; export * from "./DeleteAssistantAssociationCommand"; export * from "./DeleteAssistantCommand"; +export * from "./DeleteContentAssociationCommand"; export * from "./DeleteContentCommand"; export * from "./DeleteImportJobCommand"; export * from "./DeleteKnowledgeBaseCommand"; export * from "./DeleteQuickResponseCommand"; export * from "./GetAssistantAssociationCommand"; export * from "./GetAssistantCommand"; +export * from "./GetContentAssociationCommand"; export * from "./GetContentCommand"; export * from "./GetContentSummaryCommand"; export * from "./GetImportJobCommand"; @@ -22,6 +25,7 @@ export * from "./GetRecommendationsCommand"; export * from "./GetSessionCommand"; export * from "./ListAssistantAssociationsCommand"; export * from "./ListAssistantsCommand"; +export * from "./ListContentAssociationsCommand"; export * from "./ListContentsCommand"; export * from "./ListImportJobsCommand"; export * from "./ListKnowledgeBasesCommand"; diff --git a/clients/client-qconnect/src/models/models_0.ts b/clients/client-qconnect/src/models/models_0.ts index c1e13e0c8226..e69697653d53 100644 --- a/clients/client-qconnect/src/models/models_0.ts +++ b/clients/client-qconnect/src/models/models_0.ts @@ -24,8 +24,20 @@ export class AccessDeniedException extends __BaseException { } /** - *

A leaf node condition which can be used to specify a tag condition. - *

+ *

Content association data for a step-by-step + * guide.

+ * @public + */ +export interface AmazonConnectGuideAssociationData { + /** + *

The Amazon Resource Name (ARN) of an Amazon Connect flow. Step-by-step guides are a type of flow.

+ * @public + */ + flowId?: string; +} + +/** + *

A leaf node condition which can be used to specify a tag condition.

* @public */ export interface TagCondition { @@ -1891,7 +1903,8 @@ export interface SearchSessionsResponse { } /** - *

A list of conditions which would be applied together with an OR condition.

+ *

A list of conditions which would be applied together with an OR + * condition.

* @public */ export type OrCondition = OrCondition.AndConditionsMember | OrCondition.TagConditionMember | OrCondition.$UnknownMember; @@ -1901,7 +1914,8 @@ export type OrCondition = OrCondition.AndConditionsMember | OrCondition.TagCondi */ export namespace OrCondition { /** - *

A list of conditions which would be applied together with an AND condition.

+ *

A list of conditions which would be applied together with an AND + * condition.

* @public */ export interface AndConditionsMember { @@ -1968,7 +1982,8 @@ export namespace TagFilter { } /** - *

A list of conditions which would be applied together with an AND condition.

+ *

A list of conditions which would be applied together with an AND + * condition.

* @public */ export interface AndConditionsMember { @@ -1979,7 +1994,8 @@ export namespace TagFilter { } /** - *

A list of conditions which would be applied together with an OR condition.

+ *

A list of conditions which would be applied together with an OR + * condition.

* @public */ export interface OrConditionsMember { @@ -2247,6 +2263,365 @@ export namespace Configuration { }; } +/** + *

The contents of a content association.

+ * @public + */ +export type ContentAssociationContents = + | ContentAssociationContents.AmazonConnectGuideAssociationMember + | ContentAssociationContents.$UnknownMember; + +/** + * @public + */ +export namespace ContentAssociationContents { + /** + *

The data of the step-by-step guide association.

+ * @public + */ + export interface AmazonConnectGuideAssociationMember { + amazonConnectGuideAssociation: AmazonConnectGuideAssociationData; + $unknown?: never; + } + + /** + * @public + */ + export interface $UnknownMember { + amazonConnectGuideAssociation?: never; + $unknown: [string, any]; + } + + export interface Visitor { + amazonConnectGuideAssociation: (value: AmazonConnectGuideAssociationData) => T; + _: (name: string, value: any) => T; + } + + export const visit = (value: ContentAssociationContents, visitor: Visitor): T => { + if (value.amazonConnectGuideAssociation !== undefined) + return visitor.amazonConnectGuideAssociation(value.amazonConnectGuideAssociation); + return visitor._(value.$unknown[0], value.$unknown[1]); + }; +} + +/** + * @public + * @enum + */ +export const ContentAssociationType = { + AMAZON_CONNECT_GUIDE: "AMAZON_CONNECT_GUIDE", +} as const; + +/** + * @public + */ +export type ContentAssociationType = (typeof ContentAssociationType)[keyof typeof ContentAssociationType]; + +/** + * @public + */ +export interface CreateContentAssociationRequest { + /** + *

A unique, case-sensitive identifier that you provide to ensure the idempotency of the + * request. If not provided, the Amazon Web Services + * SDK populates this field. For more information about idempotency, see + * Making retries safe with idempotent APIs.

+ * @public + */ + clientToken?: string; + + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; + + /** + *

The type of association.

+ * @public + */ + associationType: ContentAssociationType | undefined; + + /** + *

The identifier of the associated resource.

+ * @public + */ + association: ContentAssociationContents | undefined; + + /** + *

The tags used to organize, track, or control access for this resource.

+ * @public + */ + tags?: Record; +} + +/** + *

Information about the content association.

+ * @public + */ +export interface ContentAssociationData { + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the knowledge base.

+ * @public + */ + knowledgeBaseArn: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the content.

+ * @public + */ + contentArn: string | undefined; + + /** + *

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ * @public + */ + contentAssociationId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the content association.

+ * @public + */ + contentAssociationArn: string | undefined; + + /** + *

The type of association.

+ * @public + */ + associationType: ContentAssociationType | undefined; + + /** + *

The content association.

+ * @public + */ + associationData: ContentAssociationContents | undefined; + + /** + *

The tags used to organize, track, or control access for this resource.

+ * @public + */ + tags?: Record; +} + +/** + * @public + */ +export interface CreateContentAssociationResponse { + /** + *

The association between Amazon Q in Connect content and another resource.

+ * @public + */ + contentAssociation?: ContentAssociationData; +} + +/** + *

The throttling limit has been exceeded.

+ * @public + */ +export class ThrottlingException extends __BaseException { + readonly name: "ThrottlingException" = "ThrottlingException"; + readonly $fault: "client" = "client"; + $retryable = {}; + /** + * @internal + */ + constructor(opts: __ExceptionOptionType) { + super({ + name: "ThrottlingException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ThrottlingException.prototype); + } +} + +/** + * @public + */ +export interface DeleteContentAssociationRequest { + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; + + /** + *

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ * @public + */ + contentAssociationId: string | undefined; +} + +/** + * @public + */ +export interface DeleteContentAssociationResponse {} + +/** + * @public + */ +export interface GetContentAssociationRequest { + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; + + /** + *

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ * @public + */ + contentAssociationId: string | undefined; +} + +/** + * @public + */ +export interface GetContentAssociationResponse { + /** + *

The association between Amazon Q in Connect content and another resource.

+ * @public + */ + contentAssociation?: ContentAssociationData; +} + +/** + * @public + */ +export interface ListContentAssociationsRequest { + /** + *

The token for the next set of results. Use the value returned in the previous + * response in the next request to retrieve the next set of results.

+ * @public + */ + nextToken?: string; + + /** + *

The maximum number of results to return per page.

+ * @public + */ + maxResults?: number; + + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; +} + +/** + *

Summary information about a content association.

+ * @public + */ +export interface ContentAssociationSummary { + /** + *

The identifier of the knowledge base.

+ * @public + */ + knowledgeBaseId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the knowledge base.

+ * @public + */ + knowledgeBaseArn: string | undefined; + + /** + *

The identifier of the content.

+ * @public + */ + contentId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the content.

+ * @public + */ + contentArn: string | undefined; + + /** + *

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

+ * @public + */ + contentAssociationId: string | undefined; + + /** + *

The Amazon Resource Name (ARN) of the content association.

+ * @public + */ + contentAssociationArn: string | undefined; + + /** + *

The type of association.

+ * @public + */ + associationType: ContentAssociationType | undefined; + + /** + *

The content association.

+ * @public + */ + associationData: ContentAssociationContents | undefined; + + /** + *

The tags used to organize, track, or control access for this resource.

+ * @public + */ + tags?: Record; +} + +/** + * @public + */ +export interface ListContentAssociationsResponse { + /** + *

Summary information about content associations.

+ * @public + */ + contentAssociationSummaries: ContentAssociationSummary[] | undefined; + + /** + *

If there are additional results, this is the token for the next set of results.

+ * @public + */ + nextToken?: string; +} + /** * @public */ @@ -3544,7 +3919,7 @@ export interface ImportJobData { url: string | undefined; /** - *

The link to donwload the information of resource data that failed to be imported.

+ *

The link to download the information of resource data that failed to be imported.

* @public */ failedRecordReport?: string; diff --git a/clients/client-qconnect/src/pagination/ListContentAssociationsPaginator.ts b/clients/client-qconnect/src/pagination/ListContentAssociationsPaginator.ts new file mode 100644 index 000000000000..681187c5daec --- /dev/null +++ b/clients/client-qconnect/src/pagination/ListContentAssociationsPaginator.ts @@ -0,0 +1,24 @@ +// smithy-typescript generated code +import { createPaginator } from "@smithy/core"; +import { Paginator } from "@smithy/types"; + +import { + ListContentAssociationsCommand, + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput, +} from "../commands/ListContentAssociationsCommand"; +import { QConnectClient } from "../QConnectClient"; +import { QConnectPaginationConfiguration } from "./Interfaces"; + +/** + * @public + */ +export const paginateListContentAssociations: ( + config: QConnectPaginationConfiguration, + input: ListContentAssociationsCommandInput, + ...rest: any[] +) => Paginator = createPaginator< + QConnectPaginationConfiguration, + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput +>(QConnectClient, ListContentAssociationsCommand, "nextToken", "nextToken", "maxResults"); diff --git a/clients/client-qconnect/src/pagination/index.ts b/clients/client-qconnect/src/pagination/index.ts index a68c79acdfbe..01ebe3b95648 100644 --- a/clients/client-qconnect/src/pagination/index.ts +++ b/clients/client-qconnect/src/pagination/index.ts @@ -2,6 +2,7 @@ export * from "./Interfaces"; export * from "./ListAssistantAssociationsPaginator"; export * from "./ListAssistantsPaginator"; +export * from "./ListContentAssociationsPaginator"; export * from "./ListContentsPaginator"; export * from "./ListImportJobsPaginator"; export * from "./ListKnowledgeBasesPaginator"; diff --git a/clients/client-qconnect/src/protocols/Aws_restJson1.ts b/clients/client-qconnect/src/protocols/Aws_restJson1.ts index 6677fc8f06b0..a9fd3b0b8716 100644 --- a/clients/client-qconnect/src/protocols/Aws_restJson1.ts +++ b/clients/client-qconnect/src/protocols/Aws_restJson1.ts @@ -36,6 +36,10 @@ import { CreateAssistantAssociationCommandOutput, } from "../commands/CreateAssistantAssociationCommand"; import { CreateAssistantCommandInput, CreateAssistantCommandOutput } from "../commands/CreateAssistantCommand"; +import { + CreateContentAssociationCommandInput, + CreateContentAssociationCommandOutput, +} from "../commands/CreateContentAssociationCommand"; import { CreateContentCommandInput, CreateContentCommandOutput } from "../commands/CreateContentCommand"; import { CreateKnowledgeBaseCommandInput, @@ -51,6 +55,10 @@ import { DeleteAssistantAssociationCommandOutput, } from "../commands/DeleteAssistantAssociationCommand"; import { DeleteAssistantCommandInput, DeleteAssistantCommandOutput } from "../commands/DeleteAssistantCommand"; +import { + DeleteContentAssociationCommandInput, + DeleteContentAssociationCommandOutput, +} from "../commands/DeleteContentAssociationCommand"; import { DeleteContentCommandInput, DeleteContentCommandOutput } from "../commands/DeleteContentCommand"; import { DeleteImportJobCommandInput, DeleteImportJobCommandOutput } from "../commands/DeleteImportJobCommand"; import { @@ -66,6 +74,10 @@ import { GetAssistantAssociationCommandOutput, } from "../commands/GetAssistantAssociationCommand"; import { GetAssistantCommandInput, GetAssistantCommandOutput } from "../commands/GetAssistantCommand"; +import { + GetContentAssociationCommandInput, + GetContentAssociationCommandOutput, +} from "../commands/GetContentAssociationCommand"; import { GetContentCommandInput, GetContentCommandOutput } from "../commands/GetContentCommand"; import { GetContentSummaryCommandInput, GetContentSummaryCommandOutput } from "../commands/GetContentSummaryCommand"; import { GetImportJobCommandInput, GetImportJobCommandOutput } from "../commands/GetImportJobCommand"; @@ -78,6 +90,10 @@ import { ListAssistantAssociationsCommandOutput, } from "../commands/ListAssistantAssociationsCommand"; import { ListAssistantsCommandInput, ListAssistantsCommandOutput } from "../commands/ListAssistantsCommand"; +import { + ListContentAssociationsCommandInput, + ListContentAssociationsCommandOutput, +} from "../commands/ListContentAssociationsCommand"; import { ListContentsCommandInput, ListContentsCommandOutput } from "../commands/ListContentsCommand"; import { ListImportJobsCommandInput, ListImportJobsCommandOutput } from "../commands/ListImportJobsCommand"; import { ListKnowledgeBasesCommandInput, ListKnowledgeBasesCommandOutput } from "../commands/ListKnowledgeBasesCommand"; @@ -118,11 +134,13 @@ import { import { UpdateSessionCommandInput, UpdateSessionCommandOutput } from "../commands/UpdateSessionCommand"; import { AccessDeniedException, + AmazonConnectGuideAssociationData, AppIntegrationsConfiguration, AssistantAssociationInputData, Configuration, ConflictException, ConnectConfiguration, + ContentAssociationContents, ContentData, ContentDataDetails, ContentFeedbackData, @@ -161,6 +179,7 @@ import { SourceContentDataDetails, TagCondition, TagFilter, + ThrottlingException, TooManyTagsException, ValidationException, } from "../models/models_0"; @@ -248,6 +267,33 @@ export const se_CreateContentCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1CreateContentAssociationCommand + */ +export const se_CreateContentAssociationCommand = async ( + input: CreateContentAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = { + "content-type": "application/json", + }; + b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations"); + b.p("knowledgeBaseId", () => input.knowledgeBaseId!, "{knowledgeBaseId}", false); + b.p("contentId", () => input.contentId!, "{contentId}", false); + let body: any; + body = JSON.stringify( + take(input, { + association: (_) => _json(_), + associationType: [], + clientToken: [true, (_) => _ ?? generateIdempotencyToken()], + tags: (_) => _json(_), + }) + ); + b.m("POST").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1CreateKnowledgeBaseCommand */ @@ -387,6 +433,24 @@ export const se_DeleteContentCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1DeleteContentAssociationCommand + */ +export const se_DeleteContentAssociationCommand = async ( + input: DeleteContentAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations/{contentAssociationId}"); + b.p("knowledgeBaseId", () => input.knowledgeBaseId!, "{knowledgeBaseId}", false); + b.p("contentId", () => input.contentId!, "{contentId}", false); + b.p("contentAssociationId", () => input.contentAssociationId!, "{contentAssociationId}", false); + let body: any; + b.m("DELETE").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1DeleteImportJobCommand */ @@ -487,6 +551,24 @@ export const se_GetContentCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1GetContentAssociationCommand + */ +export const se_GetContentAssociationCommand = async ( + input: GetContentAssociationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations/{contentAssociationId}"); + b.p("knowledgeBaseId", () => input.knowledgeBaseId!, "{knowledgeBaseId}", false); + b.p("contentId", () => input.contentId!, "{contentId}", false); + b.p("contentAssociationId", () => input.contentAssociationId!, "{contentAssociationId}", false); + let body: any; + b.m("GET").h(headers).b(body); + return b.build(); +}; + /** * serializeAws_restJson1GetContentSummaryCommand */ @@ -631,6 +713,27 @@ export const se_ListAssistantsCommand = async ( return b.build(); }; +/** + * serializeAws_restJson1ListContentAssociationsCommand + */ +export const se_ListContentAssociationsCommand = async ( + input: ListContentAssociationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const b = rb(input, context); + const headers: any = {}; + b.bp("/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations"); + b.p("knowledgeBaseId", () => input.knowledgeBaseId!, "{knowledgeBaseId}", false); + b.p("contentId", () => input.contentId!, "{contentId}", false); + const query: any = map({ + [_nT]: [, input[_nT]!], + [_mR]: [() => input.maxResults !== void 0, () => input[_mR]!.toString()], + }); + let body: any; + b.m("GET").h(headers).q(query).b(body); + return b.build(); +}; + /** * serializeAws_restJson1ListContentsCommand */ @@ -1171,6 +1274,27 @@ export const de_CreateContentCommand = async ( return contents; }; +/** + * deserializeAws_restJson1CreateContentAssociationCommand + */ +export const de_CreateContentAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentAssociation: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1CreateKnowledgeBaseCommand */ @@ -1285,6 +1409,23 @@ export const de_DeleteContentCommand = async ( return contents; }; +/** + * deserializeAws_restJson1DeleteContentAssociationCommand + */ +export const de_DeleteContentAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 204 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + await collectBody(output.body, context); + return contents; +}; + /** * deserializeAws_restJson1DeleteImportJobCommand */ @@ -1399,6 +1540,27 @@ export const de_GetContentCommand = async ( return contents; }; +/** + * deserializeAws_restJson1GetContentAssociationCommand + */ +export const de_GetContentAssociationCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentAssociation: _json, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1GetContentSummaryCommand */ @@ -1570,6 +1732,28 @@ export const de_ListAssistantsCommand = async ( return contents; }; +/** + * deserializeAws_restJson1ListContentAssociationsCommand + */ +export const de_ListContentAssociationsCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_CommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + contentAssociationSummaries: _json, + nextToken: __expectString, + }); + Object.assign(contents, doc); + return contents; +}; + /** * deserializeAws_restJson1ListContentsCommand */ @@ -2019,6 +2203,9 @@ const de_CommandError = async (output: __HttpResponse, context: __SerdeContext): case "ResourceNotFoundException": case "com.amazonaws.qconnect#ResourceNotFoundException": throw await de_ResourceNotFoundExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.qconnect#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); case "RequestTimeoutException": case "com.amazonaws.qconnect#RequestTimeoutException": throw await de_RequestTimeoutExceptionRes(parsedOutput, context); @@ -2157,6 +2344,23 @@ const de_ServiceQuotaExceededExceptionRes = async ( return __decorateServiceException(exception, parsedOutput.body); }; +/** + * deserializeAws_restJson1ThrottlingExceptionRes + */ +const de_ThrottlingExceptionRes = async (parsedOutput: any, context: __SerdeContext): Promise => { + const contents: any = map({}); + const data: any = parsedOutput.body; + const doc = take(data, { + message: __expectString, + }); + Object.assign(contents, doc); + const exception = new ThrottlingException({ + $metadata: deserializeMetadata(parsedOutput), + ...contents, + }); + return __decorateServiceException(exception, parsedOutput.body); +}; + /** * deserializeAws_restJson1TooManyTagsExceptionRes */ @@ -2195,6 +2399,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont return __decorateServiceException(exception, parsedOutput.body); }; +// se_AmazonConnectGuideAssociationData omitted. + // se_AndConditions omitted. // se_AppIntegrationsConfiguration omitted. @@ -2209,6 +2415,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_ContactAttributes omitted. +// se_ContentAssociationContents omitted. + // se_ContentFeedbackData omitted. // se_ContentMetadata omitted. @@ -2271,6 +2479,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_Tags omitted. +// de_AmazonConnectGuideAssociationData omitted. + // de_AndConditions omitted. // de_AppIntegrationsConfiguration omitted. @@ -2301,6 +2511,14 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // de_ContactAttributeKeys omitted. +// de_ContentAssociationContents omitted. + +// de_ContentAssociationData omitted. + +// de_ContentAssociationSummary omitted. + +// de_ContentAssociationSummaryList omitted. + /** * deserializeAws_restJson1ContentData */ diff --git a/codegen/sdk-codegen/aws-models/qconnect.json b/codegen/sdk-codegen/aws-models/qconnect.json index fd2e320c0839..7c01641acb9e 100644 --- a/codegen/sdk-codegen/aws-models/qconnect.json +++ b/codegen/sdk-codegen/aws-models/qconnect.json @@ -14,6 +14,20 @@ "smithy.api#httpError": 403 } }, + "com.amazonaws.qconnect#AmazonConnectGuideAssociationData": { + "type": "structure", + "members": { + "flowId": { + "target": "com.amazonaws.qconnect#GenericArn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of an Amazon Connect flow. Step-by-step guides are a type of flow.

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

Content association data for a step-by-step\n guide.

" + } + }, "com.amazonaws.qconnect#AndConditions": { "type": "list", "member": { @@ -44,7 +58,7 @@ "com.amazonaws.qconnect#Arn": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + "smithy.api#pattern": "^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}$" } }, "com.amazonaws.qconnect#Assistant": { @@ -660,6 +674,11 @@ "target": "com.amazonaws.qconnect#GetContentSummary" } ], + "resources": [ + { + "target": "com.amazonaws.qconnect#ContentAssociation" + } + ], "traits": { "aws.api#arn": { "template": "content/{knowledgeBaseId}/{contentId}" @@ -667,6 +686,219 @@ "aws.iam#disableConditionKeyInference": {} } }, + "com.amazonaws.qconnect#ContentAssociation": { + "type": "resource", + "identifiers": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + }, + "contentAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn" + } + }, + "create": { + "target": "com.amazonaws.qconnect#CreateContentAssociation" + }, + "read": { + "target": "com.amazonaws.qconnect#GetContentAssociation" + }, + "delete": { + "target": "com.amazonaws.qconnect#DeleteContentAssociation" + }, + "list": { + "target": "com.amazonaws.qconnect#ListContentAssociations" + }, + "traits": { + "aws.api#arn": { + "template": "content-association/{knowledgeBaseId}/{contentId}/{contentAssociationId}" + }, + "aws.iam#disableConditionKeyInference": {} + } + }, + "com.amazonaws.qconnect#ContentAssociationContents": { + "type": "union", + "members": { + "amazonConnectGuideAssociation": { + "target": "com.amazonaws.qconnect#AmazonConnectGuideAssociationData", + "traits": { + "smithy.api#documentation": "

The data of the step-by-step guide association.

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

The contents of a content association.

" + } + }, + "com.amazonaws.qconnect#ContentAssociationData": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#required": {} + } + }, + "contentArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content.

", + "smithy.api#required": {} + } + }, + "contentAssociationId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#required": {} + } + }, + "contentAssociationArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content association.

", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#ContentAssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.qconnect#ContentAssociationContents", + "traits": { + "smithy.api#documentation": "

The content association.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

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

Information about the content association.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#ContentAssociation" + } + ] + } + }, + "com.amazonaws.qconnect#ContentAssociationSummary": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#required": {} + } + }, + "knowledgeBaseArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the knowledge base.

", + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#required": {} + } + }, + "contentArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content.

", + "smithy.api#required": {} + } + }, + "contentAssociationId": { + "target": "com.amazonaws.qconnect#Uuid", + "traits": { + "smithy.api#documentation": "

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#required": {} + } + }, + "contentAssociationArn": { + "target": "com.amazonaws.qconnect#Arn", + "traits": { + "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the content association.

", + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#ContentAssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "associationData": { + "target": "com.amazonaws.qconnect#ContentAssociationContents", + "traits": { + "smithy.api#documentation": "

The content association.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

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

Summary information about a content association.

", + "smithy.api#references": [ + { + "resource": "com.amazonaws.qconnect#ContentAssociation" + } + ] + } + }, + "com.amazonaws.qconnect#ContentAssociationSummaryList": { + "type": "list", + "member": { + "target": "com.amazonaws.qconnect#ContentAssociationSummary" + } + }, + "com.amazonaws.qconnect#ContentAssociationType": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "AMAZON_CONNECT_GUIDE", + "name": "AMAZON_CONNECT_GUIDE" + } + ] + } + }, "com.amazonaws.qconnect#ContentData": { "type": "structure", "members": { @@ -1216,6 +1448,107 @@ "smithy.api#idempotent": {} } }, + "com.amazonaws.qconnect#CreateContentAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#CreateContentAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#CreateContentAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ConflictException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ServiceQuotaExceededException" + }, + { + "target": "com.amazonaws.qconnect#ThrottlingException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Creates an association between a content resource in a knowledge base and step-by-step\n guides. Step-by-step guides offer instructions to agents for resolving common\n customer issues. You create a content association to integrate Amazon Q in Connect and step-by-step\n guides.

\n

After you integrate Amazon Q and step-by-step guides, when Amazon Q provides a\n recommendation to an agent based on the intent that it's detected, it also provides them with\n the option to start the step-by-step guide that you have associated with the content.

\n

Note the following limitations:

\n
    \n
  • \n

    You can create only one content association for each\n content resource in a knowledge base.

    \n
  • \n
  • \n

    You can associate a step-by-step guide with multiple content resources.

    \n
  • \n
\n

For more information, see Integrate Amazon Q in Connect with\n step-by-step guides in the Amazon Connect Administrator\n Guide.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations", + "method": "POST" + } + } + }, + "com.amazonaws.qconnect#CreateContentAssociationRequest": { + "type": "structure", + "members": { + "clientToken": { + "target": "com.amazonaws.qconnect#ClientToken", + "traits": { + "smithy.api#documentation": "

A unique, case-sensitive identifier that you provide to ensure the idempotency of the\n request. If not provided, the Amazon Web Services\n SDK populates this field. For more information about idempotency, see\n Making retries safe with idempotent APIs.

", + "smithy.api#idempotencyToken": {} + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "associationType": { + "target": "com.amazonaws.qconnect#ContentAssociationType", + "traits": { + "smithy.api#documentation": "

The type of association.

", + "smithy.api#required": {} + } + }, + "association": { + "target": "com.amazonaws.qconnect#ContentAssociationContents", + "traits": { + "smithy.api#documentation": "

The identifier of the associated resource.

", + "smithy.api#required": {} + } + }, + "tags": { + "target": "com.amazonaws.qconnect#Tags", + "traits": { + "smithy.api#documentation": "

The tags used to organize, track, or control access for this resource.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#CreateContentAssociationResponse": { + "type": "structure", + "members": { + "contentAssociation": { + "target": "com.amazonaws.qconnect#ContentAssociationData", + "traits": { + "smithy.api#documentation": "

The association between Amazon Q in Connect content and another resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qconnect#CreateContentRequest": { "type": "structure", "members": { @@ -1803,6 +2136,74 @@ "smithy.api#idempotent": {} } }, + "com.amazonaws.qconnect#DeleteContentAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#DeleteContentAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#DeleteContentAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Deletes the content association.

\n

For more information about content associations--what they are and when they are used--see\n Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect\n Administrator Guide.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations/{contentAssociationId}", + "method": "DELETE", + "code": 204 + }, + "smithy.api#idempotent": {} + } + }, + "com.amazonaws.qconnect#DeleteContentAssociationRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#DeleteContentAssociationResponse": { + "type": "structure", + "members": {}, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qconnect#DeleteContentRequest": { "type": "structure", "members": { @@ -2361,6 +2762,80 @@ "smithy.api#readonly": {} } }, + "com.amazonaws.qconnect#GetContentAssociation": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#GetContentAssociationRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#GetContentAssociationResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Returns the content association.

\n

For more information about content associations--what they are and when they are used--see\n Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect\n Administrator Guide.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations/{contentAssociationId}", + "method": "GET" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#GetContentAssociationRequest": { + "type": "structure", + "members": { + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentAssociationId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content association. Can be either the ID or the ARN. URLs cannot contain the ARN.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#GetContentAssociationResponse": { + "type": "structure", + "members": { + "contentAssociation": { + "target": "com.amazonaws.qconnect#ContentAssociationData", + "traits": { + "smithy.api#documentation": "

The association between Amazon Q in Connect content and another resource.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qconnect#GetContentRequest": { "type": "structure", "members": { @@ -2929,7 +3404,7 @@ "failedRecordReport": { "target": "com.amazonaws.qconnect#Url", "traits": { - "smithy.api#documentation": "

The link to donwload the information of resource data that failed to be imported.

" + "smithy.api#documentation": "

The link to download the information of resource data that failed to be imported.

" } }, "urlExpiry": { @@ -3555,6 +4030,99 @@ } } }, + "com.amazonaws.qconnect#ListContentAssociations": { + "type": "operation", + "input": { + "target": "com.amazonaws.qconnect#ListContentAssociationsRequest" + }, + "output": { + "target": "com.amazonaws.qconnect#ListContentAssociationsResponse" + }, + "errors": [ + { + "target": "com.amazonaws.qconnect#AccessDeniedException" + }, + { + "target": "com.amazonaws.qconnect#ResourceNotFoundException" + }, + { + "target": "com.amazonaws.qconnect#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists the content associations.

\n

For more information about content associations--what they are and when they are used--see\n Integrate Amazon Q in Connect with step-by-step guides in the Amazon Connect\n Administrator Guide.

", + "smithy.api#http": { + "uri": "/knowledgeBases/{knowledgeBaseId}/contents/{contentId}/associations", + "method": "GET" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "pageSize": "maxResults", + "items": "contentAssociationSummaries" + }, + "smithy.api#readonly": {} + } + }, + "com.amazonaws.qconnect#ListContentAssociationsRequest": { + "type": "structure", + "members": { + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

The token for the next set of results. Use the value returned in the previous \nresponse in the next request to retrieve the next set of results.

", + "smithy.api#httpQuery": "nextToken" + } + }, + "maxResults": { + "target": "com.amazonaws.qconnect#MaxResults", + "traits": { + "smithy.api#documentation": "

The maximum number of results to return per page.

", + "smithy.api#httpQuery": "maxResults" + } + }, + "knowledgeBaseId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the knowledge base.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + }, + "contentId": { + "target": "com.amazonaws.qconnect#UuidOrArn", + "traits": { + "smithy.api#documentation": "

The identifier of the content.

", + "smithy.api#httpLabel": {}, + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.qconnect#ListContentAssociationsResponse": { + "type": "structure", + "members": { + "contentAssociationSummaries": { + "target": "com.amazonaws.qconnect#ContentAssociationSummaryList", + "traits": { + "smithy.api#documentation": "

Summary information about content associations.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.qconnect#NextToken", + "traits": { + "smithy.api#documentation": "

If there are additional results, this is the token for the next set of results.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.qconnect#ListContents": { "type": "operation", "input": { @@ -4081,7 +4649,7 @@ "andConditions": { "target": "com.amazonaws.qconnect#AndConditions", "traits": { - "smithy.api#documentation": "

A list of conditions which would be applied together with an AND condition.

" + "smithy.api#documentation": "

A list of conditions which would be applied together with an AND\n condition.

" } }, "tagCondition": { @@ -4092,7 +4660,7 @@ } }, "traits": { - "smithy.api#documentation": "

A list of conditions which would be applied together with an OR condition.

" + "smithy.api#documentation": "

A list of conditions which would be applied together with an OR\n condition.

" } }, "com.amazonaws.qconnect#OrConditions": { @@ -6367,7 +6935,7 @@ } }, "traits": { - "smithy.api#documentation": "

A leaf node condition which can be used to specify a tag condition.\n

" + "smithy.api#documentation": "

A leaf node condition which can be used to specify a tag condition.

" } }, "com.amazonaws.qconnect#TagFilter": { @@ -6382,13 +6950,13 @@ "andConditions": { "target": "com.amazonaws.qconnect#AndConditions", "traits": { - "smithy.api#documentation": "

A list of conditions which would be applied together with an AND condition.

" + "smithy.api#documentation": "

A list of conditions which would be applied together with an AND\n condition.

" } }, "orConditions": { "target": "com.amazonaws.qconnect#OrConditions", "traits": { - "smithy.api#documentation": "

A list of conditions which would be applied together with an OR condition.

" + "smithy.api#documentation": "

A list of conditions which would be applied together with an OR\n condition.

" } } }, @@ -6514,6 +7082,20 @@ "smithy.api#documentation": "

Details about the source content text data.

" } }, + "com.amazonaws.qconnect#ThrottlingException": { + "type": "structure", + "members": { + "message": { + "target": "smithy.api#String" + } + }, + "traits": { + "smithy.api#documentation": "

The throttling limit has been exceeded.

", + "smithy.api#error": "client", + "smithy.api#httpError": 400, + "smithy.api#retryable": {} + } + }, "com.amazonaws.qconnect#TimeToLive": { "type": "integer", "traits": { @@ -6909,7 +7491,7 @@ } ], "traits": { - "smithy.api#documentation": "

Updates a session. A session is a contextual container used for generating recommendations.\n Amazon Connect updates the existing Amazon Q in Connect session for each contact on which Amazon Q in Connect\n is enabled.

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

Updates a session. A session is a contextual container used for generating\n recommendations. Amazon Connect updates the existing Amazon Q in Connect session for each contact on\n which Amazon Q in Connect is enabled.

", "smithy.api#http": { "uri": "/assistants/{assistantId}/sessions/{sessionId}", "method": "POST" @@ -7000,7 +7582,7 @@ "com.amazonaws.qconnect#UuidOrArn": { "type": "string", "traits": { - "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12})?$" + "smithy.api#pattern": "^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$|^arn:[a-z-]*?:wisdom:[a-z0-9-]*?:[0-9]{12}:[a-z-]*?/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}(?:/[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}){0,2}$" } }, "com.amazonaws.qconnect#ValidationException": {