- 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.
UpdateAIAgentCommand
Updates an AI Agent.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, UpdateAIAgentCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, UpdateAIAgentCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // UpdateAIAgentRequest
clientToken: "STRING_VALUE",
assistantId: "STRING_VALUE", // required
aiAgentId: "STRING_VALUE", // required
visibilityStatus: "STRING_VALUE", // required
configuration: { // AIAgentConfiguration Union: only one key present
manualSearchAIAgentConfiguration: { // ManualSearchAIAgentConfiguration
answerGenerationAIPromptId: "STRING_VALUE",
answerGenerationAIGuardrailId: "STRING_VALUE",
associationConfigurations: [ // AssociationConfigurationList
{ // AssociationConfiguration
associationId: "STRING_VALUE",
associationType: "STRING_VALUE",
associationConfigurationData: { // AssociationConfigurationData Union: only one key present
knowledgeBaseAssociationConfigurationData: { // KnowledgeBaseAssociationConfigurationData
contentTagFilter: { // TagFilter Union: only one key present
tagCondition: { // TagCondition
key: "STRING_VALUE", // required
value: "STRING_VALUE",
},
andConditions: [ // AndConditions
{
key: "STRING_VALUE", // required
value: "STRING_VALUE",
},
],
orConditions: [ // OrConditions
{ // OrCondition Union: only one key present
andConditions: [
"<TagCondition>",
],
tagCondition: "<TagCondition>",
},
],
},
maxResults: Number("int"),
overrideKnowledgeBaseSearchType: "STRING_VALUE",
},
},
},
],
locale: "STRING_VALUE",
},
answerRecommendationAIAgentConfiguration: { // AnswerRecommendationAIAgentConfiguration
intentLabelingGenerationAIPromptId: "STRING_VALUE",
queryReformulationAIPromptId: "STRING_VALUE",
answerGenerationAIPromptId: "STRING_VALUE",
answerGenerationAIGuardrailId: "STRING_VALUE",
associationConfigurations: [
{
associationId: "STRING_VALUE",
associationType: "STRING_VALUE",
associationConfigurationData: {// Union: only one key present
knowledgeBaseAssociationConfigurationData: {
contentTagFilter: {// Union: only one key present
tagCondition: "<TagCondition>",
andConditions: [
"<TagCondition>",
],
orConditions: [
{// Union: only one key present
andConditions: [
"<TagCondition>",
],
tagCondition: "<TagCondition>",
},
],
},
maxResults: Number("int"),
overrideKnowledgeBaseSearchType: "STRING_VALUE",
},
},
},
],
locale: "STRING_VALUE",
},
selfServiceAIAgentConfiguration: { // SelfServiceAIAgentConfiguration
selfServicePreProcessingAIPromptId: "STRING_VALUE",
selfServiceAnswerGenerationAIPromptId: "STRING_VALUE",
selfServiceAIGuardrailId: "STRING_VALUE",
associationConfigurations: [
{
associationId: "STRING_VALUE",
associationType: "STRING_VALUE",
associationConfigurationData: {// Union: only one key present
knowledgeBaseAssociationConfigurationData: {
contentTagFilter: {// Union: only one key present
tagCondition: "<TagCondition>",
andConditions: [
"<TagCondition>",
],
orConditions: [
{// Union: only one key present
andConditions: "<AndConditions>",
tagCondition: "<TagCondition>",
},
],
},
maxResults: Number("int"),
overrideKnowledgeBaseSearchType: "STRING_VALUE",
},
},
},
],
},
},
description: "STRING_VALUE",
};
const command = new UpdateAIAgentCommand(input);
const response = await client.send(command);
// { // UpdateAIAgentResponse
// aiAgent: { // AIAgentData
// assistantId: "STRING_VALUE", // required
// assistantArn: "STRING_VALUE", // required
// aiAgentId: "STRING_VALUE", // required
// aiAgentArn: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// type: "STRING_VALUE", // required
// configuration: { // AIAgentConfiguration Union: only one key present
// manualSearchAIAgentConfiguration: { // ManualSearchAIAgentConfiguration
// answerGenerationAIPromptId: "STRING_VALUE",
// answerGenerationAIGuardrailId: "STRING_VALUE",
// associationConfigurations: [ // AssociationConfigurationList
// { // AssociationConfiguration
// associationId: "STRING_VALUE",
// associationType: "STRING_VALUE",
// associationConfigurationData: { // AssociationConfigurationData Union: only one key present
// knowledgeBaseAssociationConfigurationData: { // KnowledgeBaseAssociationConfigurationData
// contentTagFilter: { // TagFilter Union: only one key present
// tagCondition: { // TagCondition
// key: "STRING_VALUE", // required
// value: "STRING_VALUE",
// },
// andConditions: [ // AndConditions
// {
// key: "STRING_VALUE", // required
// value: "STRING_VALUE",
// },
// ],
// orConditions: [ // OrConditions
// { // OrCondition Union: only one key present
// andConditions: [
// "<TagCondition>",
// ],
// tagCondition: "<TagCondition>",
// },
// ],
// },
// maxResults: Number("int"),
// overrideKnowledgeBaseSearchType: "STRING_VALUE",
// },
// },
// },
// ],
// locale: "STRING_VALUE",
// },
// answerRecommendationAIAgentConfiguration: { // AnswerRecommendationAIAgentConfiguration
// intentLabelingGenerationAIPromptId: "STRING_VALUE",
// queryReformulationAIPromptId: "STRING_VALUE",
// answerGenerationAIPromptId: "STRING_VALUE",
// answerGenerationAIGuardrailId: "STRING_VALUE",
// associationConfigurations: [
// {
// associationId: "STRING_VALUE",
// associationType: "STRING_VALUE",
// associationConfigurationData: {// Union: only one key present
// knowledgeBaseAssociationConfigurationData: {
// contentTagFilter: {// Union: only one key present
// tagCondition: "<TagCondition>",
// andConditions: [
// "<TagCondition>",
// ],
// orConditions: [
// {// Union: only one key present
// andConditions: [
// "<TagCondition>",
// ],
// tagCondition: "<TagCondition>",
// },
// ],
// },
// maxResults: Number("int"),
// overrideKnowledgeBaseSearchType: "STRING_VALUE",
// },
// },
// },
// ],
// locale: "STRING_VALUE",
// },
// selfServiceAIAgentConfiguration: { // SelfServiceAIAgentConfiguration
// selfServicePreProcessingAIPromptId: "STRING_VALUE",
// selfServiceAnswerGenerationAIPromptId: "STRING_VALUE",
// selfServiceAIGuardrailId: "STRING_VALUE",
// associationConfigurations: [
// {
// associationId: "STRING_VALUE",
// associationType: "STRING_VALUE",
// associationConfigurationData: {// Union: only one key present
// knowledgeBaseAssociationConfigurationData: {
// contentTagFilter: {// Union: only one key present
// tagCondition: "<TagCondition>",
// andConditions: [
// "<TagCondition>",
// ],
// orConditions: [
// {// Union: only one key present
// andConditions: "<AndConditions>",
// tagCondition: "<TagCondition>",
// },
// ],
// },
// maxResults: Number("int"),
// overrideKnowledgeBaseSearchType: "STRING_VALUE",
// },
// },
// },
// ],
// },
// },
// modifiedTime: new Date("TIMESTAMP"),
// description: "STRING_VALUE",
// visibilityStatus: "STRING_VALUE", // required
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// origin: "STRING_VALUE",
// status: "STRING_VALUE",
// },
// };
UpdateAIAgentCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
aiAgentId Required | string | undefined | The identifier of the Amazon Q in Connect AI Agent. |
assistantId Required | string | undefined | The identifier of the Amazon Q in Connect assistant. Can be either the ID or the ARN. URLs cannot contain the ARN. |
visibilityStatus Required | VisibilityStatus | undefined | The visbility status of the Amazon Q in Connect AI Agent. |
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 .. |
configuration | AIAgentConfiguration | undefined | The configuration of the Amazon Q in Connect AI Agent. |
description | string | undefined | The description of the Amazon Q in Connect AI Agent. |
UpdateAIAgentCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
aiAgent | AIAgentData | undefined | The data of the updated Amazon Q in Connect AI Agent. |
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. |
ThrottlingException | client | The throttling limit has been exceeded. |
ValidationException | client | The input fails to satisfy the constraints specified by a service. |
QConnectServiceException | Base exception class for all service exceptions from QConnect service. |