Skip to content
v2.274.0

Experimental

@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

KnowledgeBaseAttributes Struct Added in v2.274.0-alpha.0 ​

Attributes for referencing an existing knowledge base.

Example ​

ts
declare const role: iam.Role;

const byArn = bedrock.KnowledgeBase.fromKnowledgeBaseArn(this, 'ImportedByArn',
  'arn:aws:bedrock:us-east-1:123456789012:knowledge-base/KB12345678');

// Assumed to be in the same account and region as this stack
const byId = bedrock.KnowledgeBase.fromKnowledgeBaseId(this, 'ImportedById', 'KB12345678');

const withRole = bedrock.KnowledgeBase.fromKnowledgeBaseAttributes(this, 'ImportedWithRole', {
  knowledgeBaseArn: 'arn:aws:bedrock:us-east-1:123456789012:knowledge-base/KB12345678',
  role,
});

Properties ​

knowledgeBaseArnstringknowledge_base_arnstrknowledgeBaseArnStringKnowledgeBaseArnstringKnowledgeBaseArn*stringrequired#
The ARN of the knowledge base.
roleanyroleanyroleanyRoleanyRoleany= the role is unknown#
The service role of the knowledge base.