- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
CreateAssistantCommand
Creates an Amazon Q in Connect assistant.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, CreateAssistantCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, CreateAssistantCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // CreateAssistantRequest
clientToken: "STRING_VALUE",
name: "STRING_VALUE", // required
type: "STRING_VALUE", // required
description: "STRING_VALUE",
tags: { // Tags
"<keys>": "STRING_VALUE",
},
serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration
kmsKeyId: "STRING_VALUE",
},
};
const command = new CreateAssistantCommand(input);
const response = await client.send(command);
// { // CreateAssistantResponse
// assistant: { // AssistantData
// assistantId: "STRING_VALUE", // required
// assistantArn: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// type: "STRING_VALUE", // required
// status: "STRING_VALUE", // required
// description: "STRING_VALUE",
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration
// kmsKeyId: "STRING_VALUE",
// },
// integrationConfiguration: { // AssistantIntegrationConfiguration
// topicIntegrationArn: "STRING_VALUE",
// },
// capabilityConfiguration: { // AssistantCapabilityConfiguration
// type: "STRING_VALUE",
// },
// aiAgentConfiguration: { // AIAgentConfigurationMap
// "<keys>": { // AIAgentConfigurationData
// aiAgentId: "STRING_VALUE", // required
// },
// },
// },
// };
CreateAssistantCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
name Required | string | undefined | The name of the assistant. |
type Required | AssistantType | undefined | The type of assistant. |
clientToken | string | undefined | 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 . |
description | string | undefined | The description of the assistant. |
serverSideEncryptionConfiguration | ServerSideEncryptionConfiguration | undefined | The configuration information for the customer managed key used for encryption. The customer managed key must have a policy that allows For more information about setting up a customer managed key for Amazon Q in Connect, see Enable Amazon Q in Connect for your instance . |
tags | Record<string, string> | undefined | The tags used to organize, track, or control access for this resource. |
CreateAssistantCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
assistant | AssistantData | undefined | Information about the assistant. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ConflictException | client | The request could not be processed because of conflict in the current state of the resource. For example, if you're using a |
ServiceQuotaExceededException | client | 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. |
ValidationException | client | The input fails to satisfy the constraints specified by a service. |
QConnectServiceException | Base exception class for all service exceptions from QConnect service. |