- 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.
ListKnowledgeBasesCommand
Lists the knowledge bases.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { QConnectClient, ListKnowledgeBasesCommand } from "@aws-sdk/client-qconnect"; // ES Modules import
// const { QConnectClient, ListKnowledgeBasesCommand } = require("@aws-sdk/client-qconnect"); // CommonJS import
const client = new QConnectClient(config);
const input = { // ListKnowledgeBasesRequest
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new ListKnowledgeBasesCommand(input);
const response = await client.send(command);
// { // ListKnowledgeBasesResponse
// knowledgeBaseSummaries: [ // KnowledgeBaseList // required
// { // KnowledgeBaseSummary
// knowledgeBaseId: "STRING_VALUE", // required
// knowledgeBaseArn: "STRING_VALUE", // required
// name: "STRING_VALUE", // required
// knowledgeBaseType: "STRING_VALUE", // required
// status: "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",
// },
// },
// },
// 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
// },
// },
// },
// },
// renderingConfiguration: { // RenderingConfiguration
// templateUri: "STRING_VALUE",
// },
// serverSideEncryptionConfiguration: { // ServerSideEncryptionConfiguration
// kmsKeyId: "STRING_VALUE",
// },
// description: "STRING_VALUE",
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// },
// ],
// nextToken: "STRING_VALUE",
// };
ListKnowledgeBasesCommand Input
See ListKnowledgeBasesCommandInput for more details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
maxResults | number | undefined | The maximum number of results to return per page. |
nextToken | string | undefined | 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. |
ListKnowledgeBasesCommand Output
See ListKnowledgeBasesCommandOutput for details
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
knowledgeBaseSummaries Required | KnowledgeBaseSummary[] | undefined | Information about the knowledge bases. |
nextToken | string | undefined | If there are additional results, this is the token for the next set of results. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
AccessDeniedException | client | You do not have sufficient access to perform this action. |
ValidationException | client | The input fails to satisfy the constraints specified by a service. |
QConnectServiceException | Base exception class for all service exceptions from QConnect service. |