Class CfnKnowledgeBasePropsMixin

java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.Mixin
software.amazon.awscdk.cfnpropertymixins.services.bedrock.CfnKnowledgeBasePropsMixin
All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable, software.constructs.IMixin

@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)", date="2026-03-11T13:19:56.607Z") @Stability(Stable) public class CfnKnowledgeBasePropsMixin extends Mixin implements software.constructs.IMixin
Specifies a knowledge base as a resource in a top-level template. Minimally, you must specify the following properties:.

  • Name – Specify a name for the knowledge base.
  • RoleArn – Specify the Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base. For more information, see Create a service role for Knowledge base for Amazon Bedrock .
  • KnowledgeBaseConfiguration – Specify the embeddings configuration of the knowledge base. The following sub-properties are required:
  • Type – Specify the value VECTOR .
  • StorageConfiguration – Specify information about the vector store in which the data source is stored. The following sub-properties are required:
  • Type – Specify the vector store service that you are using.

Redis Enterprise Cloud vector stores are currently unsupported in CloudFormation .

For more information about using knowledge bases in Amazon Bedrock , see Knowledge base for Amazon Bedrock .

See the Properties section below for descriptions of both the required and optional properties.

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.cfnpropertymixins.services.bedrock.*;
 import software.amazon.awscdk.*;
 IMergeStrategy mergeStrategy;
 CfnKnowledgeBasePropsMixin cfnKnowledgeBasePropsMixin = CfnKnowledgeBasePropsMixin.Builder.create(CfnKnowledgeBaseMixinProps.builder()
         .description("description")
         .knowledgeBaseConfiguration(KnowledgeBaseConfigurationProperty.builder()
                 .kendraKnowledgeBaseConfiguration(KendraKnowledgeBaseConfigurationProperty.builder()
                         .kendraIndexArn("kendraIndexArn")
                         .build())
                 .sqlKnowledgeBaseConfiguration(SqlKnowledgeBaseConfigurationProperty.builder()
                         .redshiftConfiguration(RedshiftConfigurationProperty.builder()
                                 .queryEngineConfiguration(RedshiftQueryEngineConfigurationProperty.builder()
                                         .provisionedConfiguration(RedshiftProvisionedConfigurationProperty.builder()
                                                 .authConfiguration(RedshiftProvisionedAuthConfigurationProperty.builder()
                                                         .databaseUser("databaseUser")
                                                         .type("type")
                                                         .usernamePasswordSecretArn("usernamePasswordSecretArn")
                                                         .build())
                                                 .clusterIdentifier("clusterIdentifier")
                                                 .build())
                                         .serverlessConfiguration(RedshiftServerlessConfigurationProperty.builder()
                                                 .authConfiguration(RedshiftServerlessAuthConfigurationProperty.builder()
                                                         .type("type")
                                                         .usernamePasswordSecretArn("usernamePasswordSecretArn")
                                                         .build())
                                                 .workgroupArn("workgroupArn")
                                                 .build())
                                         .type("type")
                                         .build())
                                 .queryGenerationConfiguration(QueryGenerationConfigurationProperty.builder()
                                         .executionTimeoutSeconds(123)
                                         .generationContext(QueryGenerationContextProperty.builder()
                                                 .curatedQueries(List.of(CuratedQueryProperty.builder()
                                                         .naturalLanguage("naturalLanguage")
                                                         .sql("sql")
                                                         .build()))
                                                 .tables(List.of(QueryGenerationTableProperty.builder()
                                                         .columns(List.of(QueryGenerationColumnProperty.builder()
                                                                 .description("description")
                                                                 .inclusion("inclusion")
                                                                 .name("name")
                                                                 .build()))
                                                         .description("description")
                                                         .inclusion("inclusion")
                                                         .name("name")
                                                         .build()))
                                                 .build())
                                         .build())
                                 .storageConfigurations(List.of(RedshiftQueryEngineStorageConfigurationProperty.builder()
                                         .awsDataCatalogConfiguration(RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty.builder()
                                                 .tableNames(List.of("tableNames"))
                                                 .build())
                                         .redshiftConfiguration(RedshiftQueryEngineRedshiftStorageConfigurationProperty.builder()
                                                 .databaseName("databaseName")
                                                 .build())
                                         .type("type")
                                         .build()))
                                 .build())
                         .type("type")
                         .build())
                 .type("type")
                 .vectorKnowledgeBaseConfiguration(VectorKnowledgeBaseConfigurationProperty.builder()
                         .embeddingModelArn("embeddingModelArn")
                         .embeddingModelConfiguration(EmbeddingModelConfigurationProperty.builder()
                                 .bedrockEmbeddingModelConfiguration(BedrockEmbeddingModelConfigurationProperty.builder()
                                         .audio(List.of(AudioConfigurationProperty.builder()
                                                 .segmentationConfiguration(AudioSegmentationConfigurationProperty.builder()
                                                         .fixedLengthDuration(123)
                                                         .build())
                                                 .build()))
                                         .dimensions(123)
                                         .embeddingDataType("embeddingDataType")
                                         .video(List.of(VideoConfigurationProperty.builder()
                                                 .segmentationConfiguration(VideoSegmentationConfigurationProperty.builder()
                                                         .fixedLengthDuration(123)
                                                         .build())
                                                 .build()))
                                         .build())
                                 .build())
                         .supplementalDataStorageConfiguration(SupplementalDataStorageConfigurationProperty.builder()
                                 .supplementalDataStorageLocations(List.of(SupplementalDataStorageLocationProperty.builder()
                                         .s3Location(S3LocationProperty.builder()
                                                 .uri("uri")
                                                 .build())
                                         .supplementalDataStorageLocationType("supplementalDataStorageLocationType")
                                         .build()))
                                 .build())
                         .build())
                 .build())
         .name("name")
         .roleArn("roleArn")
         .storageConfiguration(StorageConfigurationProperty.builder()
                 .mongoDbAtlasConfiguration(MongoDbAtlasConfigurationProperty.builder()
                         .collectionName("collectionName")
                         .credentialsSecretArn("credentialsSecretArn")
                         .databaseName("databaseName")
                         .endpoint("endpoint")
                         .endpointServiceName("endpointServiceName")
                         .fieldMapping(MongoDbAtlasFieldMappingProperty.builder()
                                 .metadataField("metadataField")
                                 .textField("textField")
                                 .vectorField("vectorField")
                                 .build())
                         .textIndexName("textIndexName")
                         .vectorIndexName("vectorIndexName")
                         .build())
                 .neptuneAnalyticsConfiguration(NeptuneAnalyticsConfigurationProperty.builder()
                         .fieldMapping(NeptuneAnalyticsFieldMappingProperty.builder()
                                 .metadataField("metadataField")
                                 .textField("textField")
                                 .build())
                         .graphArn("graphArn")
                         .build())
                 .opensearchManagedClusterConfiguration(OpenSearchManagedClusterConfigurationProperty.builder()
                         .domainArn("domainArn")
                         .domainEndpoint("domainEndpoint")
                         .fieldMapping(OpenSearchManagedClusterFieldMappingProperty.builder()
                                 .metadataField("metadataField")
                                 .textField("textField")
                                 .vectorField("vectorField")
                                 .build())
                         .vectorIndexName("vectorIndexName")
                         .build())
                 .opensearchServerlessConfiguration(OpenSearchServerlessConfigurationProperty.builder()
                         .collectionArn("collectionArn")
                         .fieldMapping(OpenSearchServerlessFieldMappingProperty.builder()
                                 .metadataField("metadataField")
                                 .textField("textField")
                                 .vectorField("vectorField")
                                 .build())
                         .vectorIndexName("vectorIndexName")
                         .build())
                 .pineconeConfiguration(PineconeConfigurationProperty.builder()
                         .connectionString("connectionString")
                         .credentialsSecretArn("credentialsSecretArn")
                         .fieldMapping(PineconeFieldMappingProperty.builder()
                                 .metadataField("metadataField")
                                 .textField("textField")
                                 .build())
                         .namespace("namespace")
                         .build())
                 .rdsConfiguration(RdsConfigurationProperty.builder()
                         .credentialsSecretArn("credentialsSecretArn")
                         .databaseName("databaseName")
                         .fieldMapping(RdsFieldMappingProperty.builder()
                                 .customMetadataField("customMetadataField")
                                 .metadataField("metadataField")
                                 .primaryKeyField("primaryKeyField")
                                 .textField("textField")
                                 .vectorField("vectorField")
                                 .build())
                         .resourceArn("resourceArn")
                         .tableName("tableName")
                         .build())
                 .s3VectorsConfiguration(S3VectorsConfigurationProperty.builder()
                         .indexArn("indexArn")
                         .indexName("indexName")
                         .vectorBucketArn("vectorBucketArn")
                         .build())
                 .type("type")
                 .build())
         .tags(Map.of(
                 "tagsKey", "tags"))
         .build())
 .strategy(mergeStrategy)
 .build();
 

See Also:
  • Field Details

    • CFN_PROPERTY_KEYS

      @Stability(Stable) protected static final List<String> CFN_PROPERTY_KEYS
  • Constructor Details

    • CfnKnowledgeBasePropsMixin

      protected CfnKnowledgeBasePropsMixin(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnKnowledgeBasePropsMixin

      protected CfnKnowledgeBasePropsMixin(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnKnowledgeBasePropsMixin

      @Stability(Stable) public CfnKnowledgeBasePropsMixin(@NotNull CfnKnowledgeBaseMixinProps props, @Nullable CfnPropertyMixinOptions options)
      Create a mixin to apply properties to AWS::Bedrock::KnowledgeBase.

      Parameters:
      props - L1 properties to apply. This parameter is required.
      options - Mixin options.
    • CfnKnowledgeBasePropsMixin

      @Stability(Stable) public CfnKnowledgeBasePropsMixin(@NotNull CfnKnowledgeBaseMixinProps props)
      Create a mixin to apply properties to AWS::Bedrock::KnowledgeBase.

      Parameters:
      props - L1 properties to apply. This parameter is required.
  • Method Details

    • applyTo

      @Stability(Stable) public void applyTo(@NotNull software.constructs.IConstruct construct)
      Apply the mixin properties to the construct.

      Specified by:
      applyTo in interface software.constructs.IMixin
      Specified by:
      applyTo in class Mixin
      Parameters:
      construct - This parameter is required.
    • supports

      @Stability(Stable) @NotNull public Boolean supports(@NotNull software.constructs.IConstruct construct)
      Check if this mixin supports the given construct.

      Specified by:
      supports in interface software.constructs.IMixin
      Overrides:
      supports in class Mixin
      Parameters:
      construct - This parameter is required.
    • getProps

      @Stability(Stable) @NotNull protected CfnKnowledgeBaseMixinProps getProps()
    • getStrategy

      @Stability(Stable) @NotNull protected IMergeStrategy getStrategy()