- 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.
CreateQuickResponseCommand
Creates an Amazon Q in Connect quick response.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, CreateQuickResponseCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, CreateQuickResponseCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // CreateQuickResponseRequest
knowledgeBaseId: "STRING_VALUE", // required
name: "STRING_VALUE", // required
content: { // QuickResponseDataProvider Union: only one key present
content: "STRING_VALUE",
},
contentType: "STRING_VALUE",
groupingConfiguration: { // GroupingConfiguration
criteria: "STRING_VALUE",
values: [ // GroupingValues
"STRING_VALUE",
],
},
description: "STRING_VALUE",
shortcutKey: "STRING_VALUE",
isActive: true || false,
channels: [ // Channels
"STRING_VALUE",
],
language: "STRING_VALUE",
clientToken: "STRING_VALUE",
tags: { // Tags
"<keys>": "STRING_VALUE",
},
};
const command = new CreateQuickResponseCommand(input);
const response = await client.send(command);
// { // CreateQuickResponseResponse
// quickResponse: { // QuickResponseData
// quickResponseArn: "STRING_VALUE", // required
// quickResponseId: "STRING_VALUE", // required
// knowledgeBaseArn: "STRING_VALUE", // required
// knowledgeBaseId: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// contentType: "STRING_VALUE", // required
// status: "STRING_VALUE", // required
// createdTime: new Date("TIMESTAMP"), // required
// lastModifiedTime: new Date("TIMESTAMP"), // required
// contents: { // QuickResponseContents
// plainText: { // QuickResponseContentProvider Union: only one key present
// content: "STRING_VALUE",
// },
// markdown: {// Union: only one key present
// content: "STRING_VALUE",
// },
// },
// description: "STRING_VALUE",
// groupingConfiguration: { // GroupingConfiguration
// criteria: "STRING_VALUE",
// values: [ // GroupingValues
// "STRING_VALUE",
// ],
// },
// shortcutKey: "STRING_VALUE",
// lastModifiedBy: "STRING_VALUE",
// isActive: true || false,
// channels: [ // Channels
// "STRING_VALUE",
// ],
// language: "STRING_VALUE",
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// },
// };
CreateQuickResponseCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
content Required | QuickResponseDataProvider | undefined | The content of the quick response. |
knowledgeBaseId Required | string | undefined | The identifier of the knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN. |
name Required | string | undefined | The name of the quick response. |
channels | string[] | undefined | The Amazon Connect channels this quick response applies to. |
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 . |
contentType | string | undefined | The media type of the quick response content.
|
description | string | undefined | The description of the quick response. |
groupingConfiguration | GroupingConfiguration | undefined | The configuration information of the user groups that the quick response is accessible to. |
isActive | boolean | undefined | Whether the quick response is active. |
language | string | undefined | The language code value for the language in which the quick response is written. The supported language codes include |
shortcutKey | string | undefined | The shortcut key of the quick response. The value should be unique across the knowledge base. |
tags | Record<string, string> | undefined | The tags used to organize, track, or control access for this resource. |
CreateQuickResponseCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
quickResponse | QuickResponseData | undefined | The quick response. |
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 |
ResourceNotFoundException | client | The specified resource does not exist. |
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. |