Skip to content
v2.275.0

Experimental

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

KnowledgeBaseSupplementalDataStorage Mixin ​

Stores the images, audio and video a vector knowledge base extracts from multimodal documents in an Amazon S3 bucket.

Merges SupplementalDataStorageConfiguration into the existing vector configuration, replacing any location already set. Grants the role referenced by the knowledge base's roleArn s3:ListBucket on the bucket and s3:GetObject, s3:PutObject and s3:DeleteObject on its objects, and makes the knowledge base depend on that policy.

Example ​

ts
declare const knowledgeBase: aws_bedrock_cfn.CfnKnowledgeBase;
declare const bucket: s3.IBucket;

knowledgeBase.with(new bedrock.mixins.KnowledgeBaseSupplementalDataStorage({
  bucket,
}));
python
# knowledge_base: aws_bedrock_cfn.CfnKnowledgeBase
# bucket: s3.IBucket


knowledge_base.with(bedrock.mixins.KnowledgeBaseSupplementalDataStorage(
    bucket=bucket
))
java
CfnKnowledgeBase knowledgeBase;
IBucket bucket;


knowledgeBase.with(KnowledgeBaseSupplementalDataStorage.Builder.create()
        .bucket(bucket)
        .build());
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
CfnKnowledgeBase knowledgeBase;
IBucket bucket;


knowledgeBase.With(new Mixins.KnowledgeBaseSupplementalDataStorage(new KnowledgeBaseSupplementalDataStorageProps {
    Bucket = bucket
}));
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
var knowledgeBase CfnKnowledgeBase
var bucket IBucket


knowledgeBase.With(mixins.NewKnowledgeBaseSupplementalDataStorage(&KnowledgeBaseSupplementalDataStorageProps{
	Bucket: Bucket,
}))

Initializer ​

ts
new KnowledgeBaseSupplementalDataStorage(props: KnowledgeBaseSupplementalDataStorageProps)
python
KnowledgeBaseSupplementalDataStorage(props: KnowledgeBaseSupplementalDataStorageProps)
java
new KnowledgeBaseSupplementalDataStorage(KnowledgeBaseSupplementalDataStorageProps props)
csharp
new KnowledgeBaseSupplementalDataStorage(KnowledgeBaseSupplementalDataStorageProps props)
go
NewKnowledgeBaseSupplementalDataStorage(Props KnowledgeBaseSupplementalDataStorageProps)

Methods ​

applyTo(construct: IConstruct): voiddef apply_to(self, construct: IConstruct) -> Nonepublic void applyTo(IConstruct construct)public void ApplyTo(IConstruct construct)func ApplyTo(Construct IConstruct)#
Applies the mixin functionality to the target construct.
isMixin(x: any): boolean@staticmethod def is_mixin(x: Any) -> boolpublic static Boolean isMixin(Object x)public static bool IsMixin(object x)func IsMixin(X interface{}) *boolstatic#
Checks if `x` is a Mixin.
1 parameter · returns

Parameters

  • xxxxX — Any object.

Returns: true if x is an object created from a class which extends Mixin.

supports(construct: IConstruct): booleandef supports(self, construct: IConstruct) -> boolpublic Boolean supports(IConstruct construct)public bool Supports(IConstruct construct)func Supports(Construct IConstruct) *bool#
Determines whether this mixin can be applied to the given construct.