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.

IKnowledgeBase Interface Added in v2.274.0-alpha.0 ​

Represents an Amazon Bedrock knowledge base of any type, either created with the CDK or imported.

Properties ​

The environment this resource belongs to.
notes

For resources that are created and managed in a Stack (those created by creating new class instances like new Role(), new Bucket(), etc.), this is always the same as the environment of the stack they belong to.

For referenced resources (those obtained from referencing methods like Role.fromRoleArn(), Bucket.fromBucketName(), etc.), they might be different than the stack they were imported into.

grantPrincipalIPrincipalgrant_principalIPrincipalgrantPrincipalIPrincipalGrantPrincipalIPrincipalGrantPrincipalIPrincipalrequired#
The principal to grant permissions to.
Grant permissions on this knowledge base to IAM principals.
knowledgeBaseArnstringknowledge_base_arnstrknowledgeBaseArnStringKnowledgeBaseArnstringKnowledgeBaseArn*stringrequired#
The ARN of the knowledge base.
knowledgeBaseIdstringknowledge_base_idstrknowledgeBaseIdStringKnowledgeBaseIdstringKnowledgeBaseId*stringrequired#
The unique identifier of the knowledge base.
knowledgeBaseRefKnowledgeBaseReferenceknowledge_base_refKnowledgeBaseReferenceknowledgeBaseRefKnowledgeBaseReferenceKnowledgeBaseRefKnowledgeBaseReferenceKnowledgeBaseRefKnowledgeBaseReferencerequired#
A reference to a KnowledgeBase resource.
nodeNodenodeNodenodeNodeNodeNodeNodeNoderequired#
The tree node.
Resolves the underlying `CfnKnowledgeBase` from the construct tree.
The service role that Amazon Bedrock assumes to operate the knowledge base.

To add permissions to the role, use addToRolePolicy() or grant to the knowledge base itself, which is an IGrantable.

Undefined for imported knowledge bases whose role was not provided.

stackStackstackStackstackStackStackStackStackStackrequired#
The stack in which this resource is defined.

Methods ​

addToRolePolicy(statement: PolicyStatement): voiddef add_to_role_policy(self, statement: PolicyStatement) -> Nonepublic void addToRolePolicy(PolicyStatement statement)public void AddToRolePolicy(PolicyStatement statement)func AddToRolePolicy(Statement PolicyStatement)#
Adds a statement to the IAM policy of the knowledge base service role.

For a referenced knowledge base whose role was not provided, the statement cannot be applied; a warning is emitted with the statement to add to the role manually.

applyRemovalPolicy(policy: RemovalPolicy): voiddef apply_removal_policy(self, policy: RemovalPolicy) -> Nonepublic void applyRemovalPolicy(RemovalPolicy policy)public void ApplyRemovalPolicy(RemovalPolicy policy)func ApplyRemovalPolicy(Policy RemovalPolicy)#
Apply the given removal policy to this resource.
notes

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

with(...mixins: IMixin[]): IConstructdef with(self, mixins: IMixin) -> IConstructpublic IConstruct with(IMixin mixins)public IConstruct With(IMixin mixins)func With(Mixins IMixin) IConstruct#
Applies one or more mixins to this construct.

Mixins are applied in order. The list of constructs is captured at the start of the call, so constructs added by a mixin will not be visited.

1 parameter · returns

Parameters

  • mixinsmixinsmixinsmixinsMixins — The mixins to apply.

Returns: This construct for chaining