UpdateKnowledgeBaseTemplateUriCommand

Updates the template URI of a knowledge base. This is only supported for knowledge bases of type EXTERNAL. Include a single variable in ${variable} format; this interpolated by Amazon Q in Connect using ingested content. For example, if you ingest a Salesforce article, it has an Id value, and you can set the template URI to https://myInstanceName.lightning.force.com/lightning/r/Knowledge__kav/*${Id}*/view.

Example Syntax

Use a bare-bones client and the command you need to make an API call.

import { QConnectClient, UpdateKnowledgeBaseTemplateUriCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, UpdateKnowledgeBaseTemplateUriCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // UpdateKnowledgeBaseTemplateUriRequest
  knowledgeBaseId: "STRING_VALUE", // required
  templateUri: "STRING_VALUE", // required
};
const command = new UpdateKnowledgeBaseTemplateUriCommand(input);
const response = await client.send(command);
// { // UpdateKnowledgeBaseTemplateUriResponse
//   knowledgeBase: { // KnowledgeBaseData
//     knowledgeBaseId: "STRING_VALUE", // required
//     knowledgeBaseArn: "STRING_VALUE", // required
//     name: "STRING_VALUE", // required
//     knowledgeBaseType: "STRING_VALUE", // required
//     status: "STRING_VALUE", // required
//     lastContentModificationTime: new Date("TIMESTAMP"),
//     vectorIngestionConfiguration: { // VectorIngestionConfiguration
//       chunkingConfiguration: { // ChunkingConfiguration
//         chunkingStrategy: "STRING_VALUE", // required
//         fixedSizeChunkingConfiguration: { // FixedSizeChunkingConfiguration
//           maxTokens: Number("int"), // required
//           overlapPercentage: Number("int"), // required
//         },
//         hierarchicalChunkingConfiguration: { // HierarchicalChunkingConfiguration
//           levelConfigurations: [ // HierarchicalChunkingLevelConfigurations // required
//             { // HierarchicalChunkingLevelConfiguration
//               maxTokens: Number("int"), // required
//             },
//           ],
//           overlapTokens: Number("int"), // required
//         },
//         semanticChunkingConfiguration: { // SemanticChunkingConfiguration
//           maxTokens: Number("int"), // required
//           bufferSize: Number("int"), // required
//           breakpointPercentileThreshold: Number("int"), // required
//         },
//       },
//       parsingConfiguration: { // ParsingConfiguration
//         parsingStrategy: "STRING_VALUE", // required
//         bedrockFoundationModelConfiguration: { // BedrockFoundationModelConfigurationForParsing
//           modelArn: "STRING_VALUE", // required
//           parsingPrompt: { // ParsingPrompt
//             parsingPromptText: "STRING_VALUE", // required
//           },
//         },
//       },
//     },
//     sourceConfiguration: { // SourceConfiguration Union: only one key present
//       appIntegrations: { // AppIntegrationsConfiguration
//         appIntegrationArn: "STRING_VALUE", // required
//         objectFields: [ // ObjectFieldsList
//           "STRING_VALUE",
//         ],
//       },
//       managedSourceConfiguration: { // ManagedSourceConfiguration Union: only one key present
//         webCrawlerConfiguration: { // WebCrawlerConfiguration
//           urlConfiguration: { // UrlConfiguration
//             seedUrls: [ // SeedUrls
//               { // SeedUrl
//                 url: "STRING_VALUE",
//               },
//             ],
//           },
//           crawlerLimits: { // WebCrawlerLimits
//             rateLimit: Number("int"),
//           },
//           inclusionFilters: [ // UrlFilterList
//             "STRING_VALUE",
//           ],
//           exclusionFilters: [
//             "STRING_VALUE",
//           ],
//           scope: "STRING_VALUE",
//         },
//       },
//     },
//     renderingConfiguration: { // RenderingConfiguration
//       templateUri: "STRING_VALUE",
//     },
//     serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration
//       kmsKeyId: "STRING_VALUE",
//     },
//     description: "STRING_VALUE",
//     tags: { // Tags
//       "<keys>": "STRING_VALUE",
//     },
//     ingestionStatus: "STRING_VALUE",
//     ingestionFailureReasons: [ // FailureReason
//       "STRING_VALUE",
//     ],
//   },
// };

UpdateKnowledgeBaseTemplateUriCommand Input

Parameter
Type
Description
knowledgeBaseId
Required
string | undefined

The identifier of the knowledge base. This should not be a QUICK_RESPONSES type knowledge base. Can be either the ID or the ARN. URLs cannot contain the ARN.

templateUri
Required
string | undefined

The template URI to update.

UpdateKnowledgeBaseTemplateUriCommand Output

Parameter
Type
Description
$metadata
Required
ResponseMetadata
Metadata pertaining to this request.
knowledgeBase
KnowledgeBaseData | undefined

The knowledge base to update.

Throws

Name
Fault
Details
AccessDeniedException
client

You do not have sufficient access to perform this action.

ResourceNotFoundException
client

The specified resource does not exist.

ValidationException
client

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

QConnectServiceException
Base exception class for all service exceptions from QConnect service.