CfnKnowledgeBase

class aws_cdk.aws_bedrock.CfnKnowledgeBase(scope, id, *, knowledge_base_configuration, name, role_arn, description=None, storage_configuration=None, tags=None)

Bases: CfnResource

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 AWS 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.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-knowledgebase.html

CloudformationResource:

AWS::Bedrock::KnowledgeBase

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

cfn_knowledge_base = bedrock.CfnKnowledgeBase(self, "MyCfnKnowledgeBase",
    knowledge_base_configuration=bedrock.CfnKnowledgeBase.KnowledgeBaseConfigurationProperty(
        type="type",

        # the properties below are optional
        kendra_knowledge_base_configuration=bedrock.CfnKnowledgeBase.KendraKnowledgeBaseConfigurationProperty(
            kendra_index_arn="kendraIndexArn"
        ),
        sql_knowledge_base_configuration=bedrock.CfnKnowledgeBase.SqlKnowledgeBaseConfigurationProperty(
            type="type",

            # the properties below are optional
            redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftConfigurationProperty(
                query_engine_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(
                    type="type",

                    # the properties below are optional
                    provisioned_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
                        auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
                            type="type",

                            # the properties below are optional
                            database_user="databaseUser",
                            username_password_secret_arn="usernamePasswordSecretArn"
                        ),
                        cluster_identifier="clusterIdentifier"
                    ),
                    serverless_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
                        auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
                            type="type",

                            # the properties below are optional
                            username_password_secret_arn="usernamePasswordSecretArn"
                        ),
                        workgroup_arn="workgroupArn"
                    )
                ),
                storage_configurations=[bedrock.CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(
                    type="type",

                    # the properties below are optional
                    aws_data_catalog_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
                        table_names=["tableNames"]
                    ),
                    redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
                        database_name="databaseName"
                    )
                )],

                # the properties below are optional
                query_generation_configuration=bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
                    execution_timeout_seconds=123,
                    generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
                        curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
                            natural_language="naturalLanguage",
                            sql="sql"
                        )],
                        tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
                            name="name",

                            # the properties below are optional
                            columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
                                description="description",
                                inclusion="inclusion",
                                name="name"
                            )],
                            description="description",
                            inclusion="inclusion"
                        )]
                    )
                )
            )
        ),
        vector_knowledge_base_configuration=bedrock.CfnKnowledgeBase.VectorKnowledgeBaseConfigurationProperty(
            embedding_model_arn="embeddingModelArn",

            # the properties below are optional
            embedding_model_configuration=bedrock.CfnKnowledgeBase.EmbeddingModelConfigurationProperty(
                bedrock_embedding_model_configuration=bedrock.CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(
                    dimensions=123,
                    embedding_data_type="embeddingDataType"
                )
            ),
            supplemental_data_storage_configuration=bedrock.CfnKnowledgeBase.SupplementalDataStorageConfigurationProperty(
                supplemental_data_storage_locations=[bedrock.CfnKnowledgeBase.SupplementalDataStorageLocationProperty(
                    supplemental_data_storage_location_type="supplementalDataStorageLocationType",

                    # the properties below are optional
                    s3_location=bedrock.CfnKnowledgeBase.S3LocationProperty(
                        uri="uri"
                    )
                )]
            )
        )
    ),
    name="name",
    role_arn="roleArn",

    # the properties below are optional
    description="description",
    storage_configuration=bedrock.CfnKnowledgeBase.StorageConfigurationProperty(
        type="type",

        # the properties below are optional
        opensearch_serverless_configuration=bedrock.CfnKnowledgeBase.OpenSearchServerlessConfigurationProperty(
            collection_arn="collectionArn",
            field_mapping=bedrock.CfnKnowledgeBase.OpenSearchServerlessFieldMappingProperty(
                metadata_field="metadataField",
                text_field="textField",
                vector_field="vectorField"
            ),
            vector_index_name="vectorIndexName"
        ),
        pinecone_configuration=bedrock.CfnKnowledgeBase.PineconeConfigurationProperty(
            connection_string="connectionString",
            credentials_secret_arn="credentialsSecretArn",
            field_mapping=bedrock.CfnKnowledgeBase.PineconeFieldMappingProperty(
                metadata_field="metadataField",
                text_field="textField"
            ),

            # the properties below are optional
            namespace="namespace"
        ),
        rds_configuration=bedrock.CfnKnowledgeBase.RdsConfigurationProperty(
            credentials_secret_arn="credentialsSecretArn",
            database_name="databaseName",
            field_mapping=bedrock.CfnKnowledgeBase.RdsFieldMappingProperty(
                metadata_field="metadataField",
                primary_key_field="primaryKeyField",
                text_field="textField",
                vector_field="vectorField"
            ),
            resource_arn="resourceArn",
            table_name="tableName"
        )
    ),
    tags={
        "tags_key": "tags"
    }
)
Parameters:
  • scope (Construct) – Scope in which this resource is defined.

  • id (str) – Construct identifier for this resource (unique in its scope).

  • knowledge_base_configuration (Union[IResolvable, KnowledgeBaseConfigurationProperty, Dict[str, Any]]) – Contains details about the embeddings configuration of the knowledge base.

  • name (str) – The name of the knowledge base.

  • role_arn (str) – The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

  • description (Optional[str]) – The description of the knowledge base associated with the inline agent.

  • storage_configuration (Union[IResolvable, StorageConfigurationProperty, Dict[str, Any], None]) – Contains details about the storage configuration of the knowledge base.

  • tags (Optional[Mapping[str, str]]) – Metadata that you can assign to a resource as key-value pairs. For more information, see the following resources:. - Tag naming limits and requirements - Tagging best practices

Methods

add_deletion_override(path)

Syntactic sugar for addOverride(path, undefined).

Parameters:

path (str) – The path of the value to delete.

Return type:

None

add_dependency(target)

Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

This can be used for resources across stacks (or nested stack) boundaries and the dependency will automatically be transferred to the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

add_depends_on(target)

(deprecated) Indicates that this resource depends on another resource and cannot be provisioned unless the other resource has been successfully provisioned.

Parameters:

target (CfnResource) –

Deprecated:

use addDependency

Stability:

deprecated

Return type:

None

add_metadata(key, value)

Add a value to the CloudFormation Resource Metadata.

Parameters:
  • key (str) –

  • value (Any) –

See:

Return type:

None

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

add_override(path, value)

Adds an override to the synthesized CloudFormation resource.

To add a property override, either use addPropertyOverride or prefix path with “Properties.” (i.e. Properties.TopicName).

If the override is nested, separate each nested level using a dot (.) in the path parameter. If there is an array as part of the nesting, specify the index in the path.

To include a literal . in the property name, prefix with a \. In most programming languages you will need to write this as "\\." because the \ itself will need to be escaped.

For example:

cfn_resource.add_override("Properties.GlobalSecondaryIndexes.0.Projection.NonKeyAttributes", ["myattribute"])
cfn_resource.add_override("Properties.GlobalSecondaryIndexes.1.ProjectionType", "INCLUDE")

would add the overrides Example:

"Properties": {
  "GlobalSecondaryIndexes": [
    {
      "Projection": {
        "NonKeyAttributes": [ "myattribute" ]
        ...
      }
      ...
    },
    {
      "ProjectionType": "INCLUDE"
      ...
    },
  ]
  ...
}

The value argument to addOverride will not be processed or translated in any way. Pass raw JSON values in here with the correct capitalization for CloudFormation. If you pass CDK classes or structs, they will be rendered with lowercased key names, and CloudFormation will reject the template.

Parameters:
  • path (str) –

    • The path of the property, you can use dot notation to override values in complex types. Any intermediate keys will be created as needed.

  • value (Any) –

    • The value. Could be primitive or complex.

Return type:

None

add_property_deletion_override(property_path)

Adds an override that deletes the value of a property from the resource definition.

Parameters:

property_path (str) – The path to the property.

Return type:

None

add_property_override(property_path, value)

Adds an override to a resource property.

Syntactic sugar for addOverride("Properties.<...>", value).

Parameters:
  • property_path (str) – The path of the property.

  • value (Any) – The value.

Return type:

None

apply_removal_policy(policy=None, *, apply_to_update_replace_policy=None, default=None)

Sets the deletion policy of the resource based on the removal policy specified.

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). In some cases, a snapshot can be taken of the resource prior to deletion (RemovalPolicy.SNAPSHOT). A list of resources that support this policy can be found in the following link:

Parameters:
  • policy (Optional[RemovalPolicy]) –

  • apply_to_update_replace_policy (Optional[bool]) – Apply the same deletion policy to the resource’s “UpdateReplacePolicy”. Default: true

  • default (Optional[RemovalPolicy]) – The default policy to apply in case the removal policy is not defined. Default: - Default value is resource specific. To determine the default value for a resource, please consult that specific resource’s documentation.

See:

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html#aws-attribute-deletionpolicy-options

Return type:

None

get_att(attribute_name, type_hint=None)

Returns a token for an runtime attribute of this resource.

Ideally, use generated attribute accessors (e.g. resource.arn), but this can be used for future compatibility in case there is no generated attribute.

Parameters:
  • attribute_name (str) – The name of the attribute.

  • type_hint (Optional[ResolutionTypeHint]) –

Return type:

Reference

get_metadata(key)

Retrieve a value value from the CloudFormation Resource Metadata.

Parameters:

key (str) –

See:

Return type:

Any

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/metadata-section-structure.html

Note that this is a different set of metadata from CDK node metadata; this metadata ends up in the stack template under the resource, whereas CDK node metadata ends up in the Cloud Assembly.

inspect(inspector)

Examines the CloudFormation resource and discloses attributes.

Parameters:

inspector (TreeInspector) – tree inspector to collect and process attributes.

Return type:

None

obtain_dependencies()

Retrieves an array of resources this resource depends on.

This assembles dependencies on resources across stacks (including nested stacks) automatically.

Return type:

List[Union[Stack, CfnResource]]

obtain_resource_dependencies()

Get a shallow copy of dependencies between this resource and other resources in the same stack.

Return type:

List[CfnResource]

override_logical_id(new_logical_id)

Overrides the auto-generated logical ID with a specific ID.

Parameters:

new_logical_id (str) – The new logical ID to use for this stack element.

Return type:

None

remove_dependency(target)

Indicates that this resource no longer depends on another resource.

This can be used for resources across stacks (including nested stacks) and the dependency will automatically be removed from the relevant scope.

Parameters:

target (CfnResource) –

Return type:

None

replace_dependency(target, new_target)

Replaces one dependency with another.

Parameters:
Return type:

None

to_string()

Returns a string representation of this construct.

Return type:

str

Returns:

a string representation of this resource

Attributes

CFN_RESOURCE_TYPE_NAME = 'AWS::Bedrock::KnowledgeBase'
attr_created_at

The time the knowledge base was created.

CloudformationAttribute:

CreatedAt

attr_failure_reasons

A list of reasons that the API operation on the knowledge base failed.

CloudformationAttribute:

FailureReasons

attr_knowledge_base_arn

The Amazon Resource Name (ARN) of the knowledge base.

CloudformationAttribute:

KnowledgeBaseArn

attr_knowledge_base_id

The unique identifier for a knowledge base associated with the inline agent.

CloudformationAttribute:

KnowledgeBaseId

attr_status

The status of the knowledge base.

CloudformationAttribute:

Status

attr_updated_at

The time the knowledge base was last updated.

CloudformationAttribute:

UpdatedAt

cdk_tag_manager

Tag Manager which manages the tags for this resource.

cfn_options

Options for this resource, such as condition, update policy etc.

cfn_resource_type

AWS resource type.

creation_stack

return:

the stack trace of the point where this Resource was created from, sourced from the +metadata+ entry typed +aws:cdk:logicalId+, and with the bottom-most node +internal+ entries filtered.

description

The description of the knowledge base associated with the inline agent.

knowledge_base_configuration

Contains details about the embeddings configuration of the knowledge base.

logical_id

The logical ID for this CloudFormation stack element.

The logical ID of the element is calculated from the path of the resource node in the construct tree.

To override this value, use overrideLogicalId(newLogicalId).

Returns:

the logical ID as a stringified token. This value will only get resolved during synthesis.

name

The name of the knowledge base.

node

The tree node.

ref

Return a string that will be resolved to a CloudFormation { Ref } for this element.

If, by any chance, the intrinsic reference of a resource is not a string, you could coerce it to an IResolvable through Lazy.any({ produce: resource.ref }).

role_arn

The Amazon Resource Name (ARN) of the IAM role with permissions to invoke API operations on the knowledge base.

stack

The stack in which this element is defined.

CfnElements must be defined within a stack scope (directly or indirectly).

storage_configuration

Contains details about the storage configuration of the knowledge base.

tags

Metadata that you can assign to a resource as key-value pairs.

For more information, see the following resources:.

Static Methods

classmethod is_cfn_element(x)

Returns true if a construct is a stack element (i.e. part of the synthesized cloudformation template).

Uses duck-typing instead of instanceof to allow stack elements from different versions of this library to be included in the same stack.

Parameters:

x (Any) –

Return type:

bool

Returns:

The construct as a stack element or undefined if it is not a stack element.

classmethod is_cfn_resource(x)

Check whether the given object is a CfnResource.

Parameters:

x (Any) –

Return type:

bool

classmethod is_construct(x)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Construct.

BedrockEmbeddingModelConfigurationProperty

class CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(*, dimensions=None, embedding_data_type=None)

Bases: object

The vector configuration details for the Bedrock embeddings model.

Parameters:
  • dimensions (Union[int, float, None]) – The dimensions details for the vector configuration used on the Bedrock embeddings model.

  • embedding_data_type (Optional[str]) – The data type for the vectors when using a model to convert text into vector embeddings. The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-bedrockembeddingmodelconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

bedrock_embedding_model_configuration_property = bedrock.CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(
    dimensions=123,
    embedding_data_type="embeddingDataType"
)

Attributes

dimensions

The dimensions details for the vector configuration used on the Bedrock embeddings model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-bedrockembeddingmodelconfiguration.html#cfn-bedrock-knowledgebase-bedrockembeddingmodelconfiguration-dimensions

embedding_data_type

The data type for the vectors when using a model to convert text into vector embeddings.

The model must support the specified data type for vector embeddings. Floating-point (float32) is the default data type, and is supported by most models for vector embeddings. See Supported embeddings models for information on the available models and their vector data types.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-bedrockembeddingmodelconfiguration.html#cfn-bedrock-knowledgebase-bedrockembeddingmodelconfiguration-embeddingdatatype

CuratedQueryProperty

class CfnKnowledgeBase.CuratedQueryProperty(*, natural_language, sql)

Bases: object

Contains configurations for a query, each of which defines information about example queries to help the query engine generate appropriate SQL queries.

Parameters:
  • natural_language (str) – An example natural language query.

  • sql (str) – The SQL equivalent of the natural language query.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-curatedquery.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

curated_query_property = bedrock.CfnKnowledgeBase.CuratedQueryProperty(
    natural_language="naturalLanguage",
    sql="sql"
)

Attributes

natural_language

An example natural language query.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-curatedquery.html#cfn-bedrock-knowledgebase-curatedquery-naturallanguage

sql

The SQL equivalent of the natural language query.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-curatedquery.html#cfn-bedrock-knowledgebase-curatedquery-sql

EmbeddingModelConfigurationProperty

class CfnKnowledgeBase.EmbeddingModelConfigurationProperty(*, bedrock_embedding_model_configuration=None)

Bases: object

The configuration details for the embeddings model.

Parameters:

bedrock_embedding_model_configuration (Union[IResolvable, BedrockEmbeddingModelConfigurationProperty, Dict[str, Any], None]) – The vector configuration details on the Bedrock embeddings model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-embeddingmodelconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

embedding_model_configuration_property = bedrock.CfnKnowledgeBase.EmbeddingModelConfigurationProperty(
    bedrock_embedding_model_configuration=bedrock.CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(
        dimensions=123,
        embedding_data_type="embeddingDataType"
    )
)

Attributes

bedrock_embedding_model_configuration

The vector configuration details on the Bedrock embeddings model.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-embeddingmodelconfiguration.html#cfn-bedrock-knowledgebase-embeddingmodelconfiguration-bedrockembeddingmodelconfiguration

KendraKnowledgeBaseConfigurationProperty

class CfnKnowledgeBase.KendraKnowledgeBaseConfigurationProperty(*, kendra_index_arn)

Bases: object

Settings for an Amazon Kendra knowledge base.

Parameters:

kendra_index_arn (str) – The ARN of the Amazon Kendra index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-kendraknowledgebaseconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

kendra_knowledge_base_configuration_property = bedrock.CfnKnowledgeBase.KendraKnowledgeBaseConfigurationProperty(
    kendra_index_arn="kendraIndexArn"
)

Attributes

kendra_index_arn

The ARN of the Amazon Kendra index.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-kendraknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-kendraknowledgebaseconfiguration-kendraindexarn

KnowledgeBaseConfigurationProperty

class CfnKnowledgeBase.KnowledgeBaseConfigurationProperty(*, type, kendra_knowledge_base_configuration=None, sql_knowledge_base_configuration=None, vector_knowledge_base_configuration=None)

Bases: object

Configurations to apply to a knowledge base attached to the agent during query.

For more information, see Knowledge base retrieval configurations .

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

knowledge_base_configuration_property = bedrock.CfnKnowledgeBase.KnowledgeBaseConfigurationProperty(
    type="type",

    # the properties below are optional
    kendra_knowledge_base_configuration=bedrock.CfnKnowledgeBase.KendraKnowledgeBaseConfigurationProperty(
        kendra_index_arn="kendraIndexArn"
    ),
    sql_knowledge_base_configuration=bedrock.CfnKnowledgeBase.SqlKnowledgeBaseConfigurationProperty(
        type="type",

        # the properties below are optional
        redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftConfigurationProperty(
            query_engine_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(
                type="type",

                # the properties below are optional
                provisioned_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
                    auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
                        type="type",

                        # the properties below are optional
                        database_user="databaseUser",
                        username_password_secret_arn="usernamePasswordSecretArn"
                    ),
                    cluster_identifier="clusterIdentifier"
                ),
                serverless_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
                    auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
                        type="type",

                        # the properties below are optional
                        username_password_secret_arn="usernamePasswordSecretArn"
                    ),
                    workgroup_arn="workgroupArn"
                )
            ),
            storage_configurations=[bedrock.CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(
                type="type",

                # the properties below are optional
                aws_data_catalog_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
                    table_names=["tableNames"]
                ),
                redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
                    database_name="databaseName"
                )
            )],

            # the properties below are optional
            query_generation_configuration=bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
                execution_timeout_seconds=123,
                generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
                    curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
                        natural_language="naturalLanguage",
                        sql="sql"
                    )],
                    tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
                        name="name",

                        # the properties below are optional
                        columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
                            description="description",
                            inclusion="inclusion",
                            name="name"
                        )],
                        description="description",
                        inclusion="inclusion"
                    )]
                )
            )
        )
    ),
    vector_knowledge_base_configuration=bedrock.CfnKnowledgeBase.VectorKnowledgeBaseConfigurationProperty(
        embedding_model_arn="embeddingModelArn",

        # the properties below are optional
        embedding_model_configuration=bedrock.CfnKnowledgeBase.EmbeddingModelConfigurationProperty(
            bedrock_embedding_model_configuration=bedrock.CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(
                dimensions=123,
                embedding_data_type="embeddingDataType"
            )
        ),
        supplemental_data_storage_configuration=bedrock.CfnKnowledgeBase.SupplementalDataStorageConfigurationProperty(
            supplemental_data_storage_locations=[bedrock.CfnKnowledgeBase.SupplementalDataStorageLocationProperty(
                supplemental_data_storage_location_type="supplementalDataStorageLocationType",

                # the properties below are optional
                s3_location=bedrock.CfnKnowledgeBase.S3LocationProperty(
                    uri="uri"
                )
            )]
        )
    )
)

Attributes

kendra_knowledge_base_configuration

Settings for an Amazon Kendra knowledge base.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-knowledgebaseconfiguration-kendraknowledgebaseconfiguration

sql_knowledge_base_configuration

Specifies configurations for a knowledge base connected to an SQL database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-knowledgebaseconfiguration-sqlknowledgebaseconfiguration

type

The type of data that the data source is converted into for the knowledge base.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-knowledgebaseconfiguration-type

vector_knowledge_base_configuration

Contains details about the model that’s used to convert the data source into vector embeddings.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-knowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-knowledgebaseconfiguration-vectorknowledgebaseconfiguration

OpenSearchServerlessConfigurationProperty

class CfnKnowledgeBase.OpenSearchServerlessConfigurationProperty(*, collection_arn, field_mapping, vector_index_name)

Bases: object

Contains details about the storage configuration of the knowledge base in Amazon OpenSearch Service.

For more information, see Create a vector index in Amazon OpenSearch Service .

Parameters:
  • collection_arn (str) – The Amazon Resource Name (ARN) of the OpenSearch Service vector store.

  • field_mapping (Union[IResolvable, OpenSearchServerlessFieldMappingProperty, Dict[str, Any]]) – Contains the names of the fields to which to map information about the vector store.

  • vector_index_name (str) – The name of the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

open_search_serverless_configuration_property = bedrock.CfnKnowledgeBase.OpenSearchServerlessConfigurationProperty(
    collection_arn="collectionArn",
    field_mapping=bedrock.CfnKnowledgeBase.OpenSearchServerlessFieldMappingProperty(
        metadata_field="metadataField",
        text_field="textField",
        vector_field="vectorField"
    ),
    vector_index_name="vectorIndexName"
)

Attributes

collection_arn

The Amazon Resource Name (ARN) of the OpenSearch Service vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessconfiguration.html#cfn-bedrock-knowledgebase-opensearchserverlessconfiguration-collectionarn

field_mapping

Contains the names of the fields to which to map information about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessconfiguration.html#cfn-bedrock-knowledgebase-opensearchserverlessconfiguration-fieldmapping

vector_index_name

The name of the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessconfiguration.html#cfn-bedrock-knowledgebase-opensearchserverlessconfiguration-vectorindexname

OpenSearchServerlessFieldMappingProperty

class CfnKnowledgeBase.OpenSearchServerlessFieldMappingProperty(*, metadata_field, text_field, vector_field)

Bases: object

Contains the names of the fields to which to map information about the vector store.

Parameters:
  • metadata_field (str) – The name of the field in which Amazon Bedrock stores metadata about the vector store.

  • text_field (str) – The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.

  • vector_field (str) – The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessfieldmapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

open_search_serverless_field_mapping_property = bedrock.CfnKnowledgeBase.OpenSearchServerlessFieldMappingProperty(
    metadata_field="metadataField",
    text_field="textField",
    vector_field="vectorField"
)

Attributes

metadata_field

The name of the field in which Amazon Bedrock stores metadata about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessfieldmapping.html#cfn-bedrock-knowledgebase-opensearchserverlessfieldmapping-metadatafield

text_field

The name of the field in which Amazon Bedrock stores the raw text from your data.

The text is split according to the chunking strategy you choose.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessfieldmapping.html#cfn-bedrock-knowledgebase-opensearchserverlessfieldmapping-textfield

vector_field

The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-opensearchserverlessfieldmapping.html#cfn-bedrock-knowledgebase-opensearchserverlessfieldmapping-vectorfield

PineconeConfigurationProperty

class CfnKnowledgeBase.PineconeConfigurationProperty(*, connection_string, credentials_secret_arn, field_mapping, namespace=None)

Bases: object

Contains details about the storage configuration of the knowledge base in Pinecone.

For more information, see Create a vector index in Pinecone .

Parameters:
  • connection_string (str) – The endpoint URL for your index management page.

  • credentials_secret_arn (str) – The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Pinecone API key.

  • field_mapping (Union[IResolvable, PineconeFieldMappingProperty, Dict[str, Any]]) – Contains the names of the fields to which to map information about the vector store.

  • namespace (Optional[str]) – The namespace to be used to write new data to your database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

pinecone_configuration_property = bedrock.CfnKnowledgeBase.PineconeConfigurationProperty(
    connection_string="connectionString",
    credentials_secret_arn="credentialsSecretArn",
    field_mapping=bedrock.CfnKnowledgeBase.PineconeFieldMappingProperty(
        metadata_field="metadataField",
        text_field="textField"
    ),

    # the properties below are optional
    namespace="namespace"
)

Attributes

connection_string

The endpoint URL for your index management page.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html#cfn-bedrock-knowledgebase-pineconeconfiguration-connectionstring

credentials_secret_arn

The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Pinecone API key.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html#cfn-bedrock-knowledgebase-pineconeconfiguration-credentialssecretarn

field_mapping

Contains the names of the fields to which to map information about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html#cfn-bedrock-knowledgebase-pineconeconfiguration-fieldmapping

namespace

The namespace to be used to write new data to your database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconeconfiguration.html#cfn-bedrock-knowledgebase-pineconeconfiguration-namespace

PineconeFieldMappingProperty

class CfnKnowledgeBase.PineconeFieldMappingProperty(*, metadata_field, text_field)

Bases: object

Contains the names of the fields to which to map information about the vector store.

Parameters:
  • metadata_field (str) – The name of the field in which Amazon Bedrock stores metadata about the vector store.

  • text_field (str) – The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconefieldmapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

pinecone_field_mapping_property = bedrock.CfnKnowledgeBase.PineconeFieldMappingProperty(
    metadata_field="metadataField",
    text_field="textField"
)

Attributes

metadata_field

The name of the field in which Amazon Bedrock stores metadata about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconefieldmapping.html#cfn-bedrock-knowledgebase-pineconefieldmapping-metadatafield

text_field

The name of the field in which Amazon Bedrock stores the raw text from your data.

The text is split according to the chunking strategy you choose.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-pineconefieldmapping.html#cfn-bedrock-knowledgebase-pineconefieldmapping-textfield

QueryGenerationColumnProperty

class CfnKnowledgeBase.QueryGenerationColumnProperty(*, description=None, inclusion=None, name=None)

Bases: object

Contains information about a column in the current table for the query engine to consider.

Parameters:
  • description (Optional[str]) – A description of the column that helps the query engine understand the contents of the column.

  • inclusion (Optional[str]) – Specifies whether to include or exclude the column during query generation. If you specify EXCLUDE , the column will be ignored. If you specify INCLUDE , all other columns in the table will be ignored.

  • name (Optional[str]) – The name of the column for which the other fields in this object apply.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcolumn.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

query_generation_column_property = bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
    description="description",
    inclusion="inclusion",
    name="name"
)

Attributes

description

A description of the column that helps the query engine understand the contents of the column.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcolumn.html#cfn-bedrock-knowledgebase-querygenerationcolumn-description

inclusion

Specifies whether to include or exclude the column during query generation.

If you specify EXCLUDE , the column will be ignored. If you specify INCLUDE , all other columns in the table will be ignored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcolumn.html#cfn-bedrock-knowledgebase-querygenerationcolumn-inclusion

name

The name of the column for which the other fields in this object apply.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcolumn.html#cfn-bedrock-knowledgebase-querygenerationcolumn-name

QueryGenerationConfigurationProperty

class CfnKnowledgeBase.QueryGenerationConfigurationProperty(*, execution_timeout_seconds=None, generation_context=None)

Bases: object

Contains configurations for query generation.

For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide..

Parameters:
  • execution_timeout_seconds (Union[int, float, None]) – The time after which query generation will time out.

  • generation_context (Union[IResolvable, QueryGenerationContextProperty, Dict[str, Any], None]) – Specifies configurations for context to use during query generation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

query_generation_configuration_property = bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
    execution_timeout_seconds=123,
    generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
        curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
            natural_language="naturalLanguage",
            sql="sql"
        )],
        tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
            name="name",

            # the properties below are optional
            columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
                description="description",
                inclusion="inclusion",
                name="name"
            )],
            description="description",
            inclusion="inclusion"
        )]
    )
)

Attributes

execution_timeout_seconds

The time after which query generation will time out.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationconfiguration.html#cfn-bedrock-knowledgebase-querygenerationconfiguration-executiontimeoutseconds

generation_context

Specifies configurations for context to use during query generation.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationconfiguration.html#cfn-bedrock-knowledgebase-querygenerationconfiguration-generationcontext

QueryGenerationContextProperty

class CfnKnowledgeBase.QueryGenerationContextProperty(*, curated_queries=None, tables=None)

Bases: object

Contains configurations for context to use during query generation.

Attributes

curated_queries

An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcontext.html#cfn-bedrock-knowledgebase-querygenerationcontext-curatedqueries

tables

An array of objects, each of which defines information about a table in the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationcontext.html#cfn-bedrock-knowledgebase-querygenerationcontext-tables

QueryGenerationTableProperty

class CfnKnowledgeBase.QueryGenerationTableProperty(*, name, columns=None, description=None, inclusion=None)

Bases: object

Contains information about a table for the query engine to consider.

Parameters:
  • name (str) – The name of the table for which the other fields in this object apply.

  • columns (Union[IResolvable, Sequence[Union[IResolvable, QueryGenerationColumnProperty, Dict[str, Any]]], None]) – An array of objects, each of which defines information about a column in the table.

  • description (Optional[str]) – A description of the table that helps the query engine understand the contents of the table.

  • inclusion (Optional[str]) – Specifies whether to include or exclude the table during query generation. If you specify EXCLUDE , the table will be ignored. If you specify INCLUDE , all other tables will be ignored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationtable.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

query_generation_table_property = bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
    name="name",

    # the properties below are optional
    columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
        description="description",
        inclusion="inclusion",
        name="name"
    )],
    description="description",
    inclusion="inclusion"
)

Attributes

columns

An array of objects, each of which defines information about a column in the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationtable.html#cfn-bedrock-knowledgebase-querygenerationtable-columns

description

A description of the table that helps the query engine understand the contents of the table.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationtable.html#cfn-bedrock-knowledgebase-querygenerationtable-description

inclusion

Specifies whether to include or exclude the table during query generation.

If you specify EXCLUDE , the table will be ignored. If you specify INCLUDE , all other tables will be ignored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationtable.html#cfn-bedrock-knowledgebase-querygenerationtable-inclusion

name

The name of the table for which the other fields in this object apply.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-querygenerationtable.html#cfn-bedrock-knowledgebase-querygenerationtable-name

RdsConfigurationProperty

class CfnKnowledgeBase.RdsConfigurationProperty(*, credentials_secret_arn, database_name, field_mapping, resource_arn, table_name)

Bases: object

Contains details about the storage configuration of the knowledge base in Amazon RDS.

For more information, see Create a vector index in Amazon RDS .

Parameters:
  • credentials_secret_arn (str) – The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Amazon RDS database.

  • database_name (str) – The name of your Amazon RDS database.

  • field_mapping (Union[IResolvable, RdsFieldMappingProperty, Dict[str, Any]]) – Contains the names of the fields to which to map information about the vector store.

  • resource_arn (str) – The Amazon Resource Name (ARN) of the vector store.

  • table_name (str) – The name of the table in the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

rds_configuration_property = bedrock.CfnKnowledgeBase.RdsConfigurationProperty(
    credentials_secret_arn="credentialsSecretArn",
    database_name="databaseName",
    field_mapping=bedrock.CfnKnowledgeBase.RdsFieldMappingProperty(
        metadata_field="metadataField",
        primary_key_field="primaryKeyField",
        text_field="textField",
        vector_field="vectorField"
    ),
    resource_arn="resourceArn",
    table_name="tableName"
)

Attributes

credentials_secret_arn

The Amazon Resource Name (ARN) of the secret that you created in AWS Secrets Manager that is linked to your Amazon RDS database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html#cfn-bedrock-knowledgebase-rdsconfiguration-credentialssecretarn

database_name

The name of your Amazon RDS database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html#cfn-bedrock-knowledgebase-rdsconfiguration-databasename

field_mapping

Contains the names of the fields to which to map information about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html#cfn-bedrock-knowledgebase-rdsconfiguration-fieldmapping

resource_arn

The Amazon Resource Name (ARN) of the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html#cfn-bedrock-knowledgebase-rdsconfiguration-resourcearn

table_name

The name of the table in the database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsconfiguration.html#cfn-bedrock-knowledgebase-rdsconfiguration-tablename

RdsFieldMappingProperty

class CfnKnowledgeBase.RdsFieldMappingProperty(*, metadata_field, primary_key_field, text_field, vector_field)

Bases: object

Contains the names of the fields to which to map information about the vector store.

Parameters:
  • metadata_field (str) – The name of the field in which Amazon Bedrock stores metadata about the vector store.

  • primary_key_field (str) – The name of the field in which Amazon Bedrock stores the ID for each entry.

  • text_field (str) – The name of the field in which Amazon Bedrock stores the raw text from your data. The text is split according to the chunking strategy you choose.

  • vector_field (str) – The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

rds_field_mapping_property = bedrock.CfnKnowledgeBase.RdsFieldMappingProperty(
    metadata_field="metadataField",
    primary_key_field="primaryKeyField",
    text_field="textField",
    vector_field="vectorField"
)

Attributes

metadata_field

The name of the field in which Amazon Bedrock stores metadata about the vector store.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html#cfn-bedrock-knowledgebase-rdsfieldmapping-metadatafield

primary_key_field

The name of the field in which Amazon Bedrock stores the ID for each entry.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html#cfn-bedrock-knowledgebase-rdsfieldmapping-primarykeyfield

text_field

The name of the field in which Amazon Bedrock stores the raw text from your data.

The text is split according to the chunking strategy you choose.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html#cfn-bedrock-knowledgebase-rdsfieldmapping-textfield

vector_field

The name of the field in which Amazon Bedrock stores the vector embeddings for your data sources.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-rdsfieldmapping.html#cfn-bedrock-knowledgebase-rdsfieldmapping-vectorfield

RedshiftConfigurationProperty

class CfnKnowledgeBase.RedshiftConfigurationProperty(*, query_engine_configuration, storage_configurations, query_generation_configuration=None)

Bases: object

Contains configurations for an Amazon Redshift database.

For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_configuration_property = bedrock.CfnKnowledgeBase.RedshiftConfigurationProperty(
    query_engine_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(
        type="type",

        # the properties below are optional
        provisioned_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
            auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
                type="type",

                # the properties below are optional
                database_user="databaseUser",
                username_password_secret_arn="usernamePasswordSecretArn"
            ),
            cluster_identifier="clusterIdentifier"
        ),
        serverless_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
            auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
                type="type",

                # the properties below are optional
                username_password_secret_arn="usernamePasswordSecretArn"
            ),
            workgroup_arn="workgroupArn"
        )
    ),
    storage_configurations=[bedrock.CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(
        type="type",

        # the properties below are optional
        aws_data_catalog_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
            table_names=["tableNames"]
        ),
        redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
            database_name="databaseName"
        )
    )],

    # the properties below are optional
    query_generation_configuration=bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
        execution_timeout_seconds=123,
        generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
            curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
                natural_language="naturalLanguage",
                sql="sql"
            )],
            tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
                name="name",

                # the properties below are optional
                columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
                    description="description",
                    inclusion="inclusion",
                    name="name"
                )],
                description="description",
                inclusion="inclusion"
            )]
        )
    )
)

Attributes

query_engine_configuration

Specifies configurations for an Amazon Redshift query engine.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftconfiguration.html#cfn-bedrock-knowledgebase-redshiftconfiguration-queryengineconfiguration

query_generation_configuration

Specifies configurations for generating queries.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftconfiguration.html#cfn-bedrock-knowledgebase-redshiftconfiguration-querygenerationconfiguration

storage_configurations

Specifies configurations for Amazon Redshift database storage.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftconfiguration.html#cfn-bedrock-knowledgebase-redshiftconfiguration-storageconfigurations

RedshiftProvisionedAuthConfigurationProperty

class CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(*, type, database_user=None, username_password_secret_arn=None)

Bases: object

Contains configurations for authentication to an Amazon Redshift provisioned data warehouse.

Specify the type of authentication to use in the type field and include the corresponding field. If you specify IAM authentication, you don’t need to include another field.

Parameters:
  • type (str) – The type of authentication to use.

  • database_user (Optional[str]) – The database username for authentication to an Amazon Redshift provisioned data warehouse.

  • username_password_secret_arn (Optional[str]) – The ARN of an Secrets Manager secret for authentication.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedauthconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_provisioned_auth_configuration_property = bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
    type="type",

    # the properties below are optional
    database_user="databaseUser",
    username_password_secret_arn="usernamePasswordSecretArn"
)

Attributes

database_user

The database username for authentication to an Amazon Redshift provisioned data warehouse.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedauthconfiguration.html#cfn-bedrock-knowledgebase-redshiftprovisionedauthconfiguration-databaseuser

type

The type of authentication to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedauthconfiguration.html#cfn-bedrock-knowledgebase-redshiftprovisionedauthconfiguration-type

username_password_secret_arn

The ARN of an Secrets Manager secret for authentication.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedauthconfiguration.html#cfn-bedrock-knowledgebase-redshiftprovisionedauthconfiguration-usernamepasswordsecretarn

RedshiftProvisionedConfigurationProperty

class CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(*, auth_configuration, cluster_identifier)

Bases: object

Contains configurations for a provisioned Amazon Redshift query engine.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_provisioned_configuration_property = bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
    auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
        type="type",

        # the properties below are optional
        database_user="databaseUser",
        username_password_secret_arn="usernamePasswordSecretArn"
    ),
    cluster_identifier="clusterIdentifier"
)

Attributes

auth_configuration

Specifies configurations for authentication to Amazon Redshift.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedconfiguration.html#cfn-bedrock-knowledgebase-redshiftprovisionedconfiguration-authconfiguration

cluster_identifier

The ID of the Amazon Redshift cluster.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftprovisionedconfiguration.html#cfn-bedrock-knowledgebase-redshiftprovisionedconfiguration-clusteridentifier

RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty

class CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(*, table_names)

Bases: object

Contains configurations for storage in AWS Glue Data Catalog.

Parameters:

table_names (Sequence[str]) – A list of names of the tables to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineawsdatacatalogstorageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_query_engine_aws_data_catalog_storage_configuration_property = bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
    table_names=["tableNames"]
)

Attributes

table_names

A list of names of the tables to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineawsdatacatalogstorageconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryengineawsdatacatalogstorageconfiguration-tablenames

RedshiftQueryEngineConfigurationProperty

class CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(*, type, provisioned_configuration=None, serverless_configuration=None)

Bases: object

Contains configurations for an Amazon Redshift query engine.

Specify the type of query engine in type and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_query_engine_configuration_property = bedrock.CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(
    type="type",

    # the properties below are optional
    provisioned_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
        auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
            type="type",

            # the properties below are optional
            database_user="databaseUser",
            username_password_secret_arn="usernamePasswordSecretArn"
        ),
        cluster_identifier="clusterIdentifier"
    ),
    serverless_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
        auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
            type="type",

            # the properties below are optional
            username_password_secret_arn="usernamePasswordSecretArn"
        ),
        workgroup_arn="workgroupArn"
    )
)

Attributes

provisioned_configuration

Specifies configurations for a provisioned Amazon Redshift query engine.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryengineconfiguration-provisionedconfiguration

serverless_configuration

Specifies configurations for a serverless Amazon Redshift query engine.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryengineconfiguration-serverlessconfiguration

type

The type of query engine.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryengineconfiguration-type

RedshiftQueryEngineRedshiftStorageConfigurationProperty

class CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(*, database_name)

Bases: object

Contains configurations for storage in Amazon Redshift.

Parameters:

database_name (str) – The name of the Amazon Redshift database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineredshiftstorageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_query_engine_redshift_storage_configuration_property = bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
    database_name="databaseName"
)

Attributes

database_name

The name of the Amazon Redshift database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryengineredshiftstorageconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryengineredshiftstorageconfiguration-databasename

RedshiftQueryEngineStorageConfigurationProperty

class CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(*, type, aws_data_catalog_configuration=None, redshift_configuration=None)

Bases: object

Contains configurations for Amazon Redshift data storage.

Specify the data storage service to use in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_query_engine_storage_configuration_property = bedrock.CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(
    type="type",

    # the properties below are optional
    aws_data_catalog_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
        table_names=["tableNames"]
    ),
    redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
        database_name="databaseName"
    )
)

Attributes

aws_data_catalog_configuration

Specifies configurations for storage in AWS Glue Data Catalog.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration-awsdatacatalogconfiguration

redshift_configuration

Specifies configurations for storage in Amazon Redshift.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration-redshiftconfiguration

type

The data storage service to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration.html#cfn-bedrock-knowledgebase-redshiftqueryenginestorageconfiguration-type

RedshiftServerlessAuthConfigurationProperty

class CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(*, type, username_password_secret_arn=None)

Bases: object

Specifies configurations for authentication to a Redshift Serverless.

Specify the type of authentication to use in the type field and include the corresponding field. If you specify IAM authentication, you don’t need to include another field.

Parameters:
  • type (str) – The type of authentication to use.

  • username_password_secret_arn (Optional[str]) – The ARN of an Secrets Manager secret for authentication.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessauthconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_serverless_auth_configuration_property = bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
    type="type",

    # the properties below are optional
    username_password_secret_arn="usernamePasswordSecretArn"
)

Attributes

type

The type of authentication to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessauthconfiguration.html#cfn-bedrock-knowledgebase-redshiftserverlessauthconfiguration-type

username_password_secret_arn

The ARN of an Secrets Manager secret for authentication.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessauthconfiguration.html#cfn-bedrock-knowledgebase-redshiftserverlessauthconfiguration-usernamepasswordsecretarn

RedshiftServerlessConfigurationProperty

class CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(*, auth_configuration, workgroup_arn)

Bases: object

Contains configurations for authentication to Amazon Redshift Serverless.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

redshift_serverless_configuration_property = bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
    auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
        type="type",

        # the properties below are optional
        username_password_secret_arn="usernamePasswordSecretArn"
    ),
    workgroup_arn="workgroupArn"
)

Attributes

auth_configuration

Specifies configurations for authentication to an Amazon Redshift provisioned data warehouse.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessconfiguration.html#cfn-bedrock-knowledgebase-redshiftserverlessconfiguration-authconfiguration

workgroup_arn

The ARN of the Amazon Redshift workgroup.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-redshiftserverlessconfiguration.html#cfn-bedrock-knowledgebase-redshiftserverlessconfiguration-workgrouparn

S3LocationProperty

class CfnKnowledgeBase.S3LocationProperty(*, uri)

Bases: object

A storage location in an S3 bucket.

Parameters:

uri (str) – An object URI starting with s3:// .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-s3location.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

s3_location_property = bedrock.CfnKnowledgeBase.S3LocationProperty(
    uri="uri"
)

Attributes

uri

An object URI starting with s3:// .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-s3location.html#cfn-bedrock-knowledgebase-s3location-uri

SqlKnowledgeBaseConfigurationProperty

class CfnKnowledgeBase.SqlKnowledgeBaseConfigurationProperty(*, type, redshift_configuration=None)

Bases: object

Contains configurations for a knowledge base connected to an SQL database.

Specify the SQL database type in the type field and include the corresponding field. For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide.

Parameters:
  • type (str) – The type of SQL database to connect to the knowledge base.

  • redshift_configuration (Union[IResolvable, RedshiftConfigurationProperty, Dict[str, Any], None]) – Specifies configurations for a knowledge base connected to an Amazon Redshift database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-sqlknowledgebaseconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

sql_knowledge_base_configuration_property = bedrock.CfnKnowledgeBase.SqlKnowledgeBaseConfigurationProperty(
    type="type",

    # the properties below are optional
    redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftConfigurationProperty(
        query_engine_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineConfigurationProperty(
            type="type",

            # the properties below are optional
            provisioned_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedConfigurationProperty(
                auth_configuration=bedrock.CfnKnowledgeBase.RedshiftProvisionedAuthConfigurationProperty(
                    type="type",

                    # the properties below are optional
                    database_user="databaseUser",
                    username_password_secret_arn="usernamePasswordSecretArn"
                ),
                cluster_identifier="clusterIdentifier"
            ),
            serverless_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessConfigurationProperty(
                auth_configuration=bedrock.CfnKnowledgeBase.RedshiftServerlessAuthConfigurationProperty(
                    type="type",

                    # the properties below are optional
                    username_password_secret_arn="usernamePasswordSecretArn"
                ),
                workgroup_arn="workgroupArn"
            )
        ),
        storage_configurations=[bedrock.CfnKnowledgeBase.RedshiftQueryEngineStorageConfigurationProperty(
            type="type",

            # the properties below are optional
            aws_data_catalog_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineAwsDataCatalogStorageConfigurationProperty(
                table_names=["tableNames"]
            ),
            redshift_configuration=bedrock.CfnKnowledgeBase.RedshiftQueryEngineRedshiftStorageConfigurationProperty(
                database_name="databaseName"
            )
        )],

        # the properties below are optional
        query_generation_configuration=bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
            execution_timeout_seconds=123,
            generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
                curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
                    natural_language="naturalLanguage",
                    sql="sql"
                )],
                tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
                    name="name",

                    # the properties below are optional
                    columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
                        description="description",
                        inclusion="inclusion",
                        name="name"
                    )],
                    description="description",
                    inclusion="inclusion"
                )]
            )
        )
    )
)

Attributes

redshift_configuration

Specifies configurations for a knowledge base connected to an Amazon Redshift database.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-sqlknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-sqlknowledgebaseconfiguration-redshiftconfiguration

type

The type of SQL database to connect to the knowledge base.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-sqlknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-sqlknowledgebaseconfiguration-type

StorageConfigurationProperty

class CfnKnowledgeBase.StorageConfigurationProperty(*, type, opensearch_serverless_configuration=None, pinecone_configuration=None, rds_configuration=None)

Bases: object

Contains the storage configuration of the knowledge base.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

storage_configuration_property = bedrock.CfnKnowledgeBase.StorageConfigurationProperty(
    type="type",

    # the properties below are optional
    opensearch_serverless_configuration=bedrock.CfnKnowledgeBase.OpenSearchServerlessConfigurationProperty(
        collection_arn="collectionArn",
        field_mapping=bedrock.CfnKnowledgeBase.OpenSearchServerlessFieldMappingProperty(
            metadata_field="metadataField",
            text_field="textField",
            vector_field="vectorField"
        ),
        vector_index_name="vectorIndexName"
    ),
    pinecone_configuration=bedrock.CfnKnowledgeBase.PineconeConfigurationProperty(
        connection_string="connectionString",
        credentials_secret_arn="credentialsSecretArn",
        field_mapping=bedrock.CfnKnowledgeBase.PineconeFieldMappingProperty(
            metadata_field="metadataField",
            text_field="textField"
        ),

        # the properties below are optional
        namespace="namespace"
    ),
    rds_configuration=bedrock.CfnKnowledgeBase.RdsConfigurationProperty(
        credentials_secret_arn="credentialsSecretArn",
        database_name="databaseName",
        field_mapping=bedrock.CfnKnowledgeBase.RdsFieldMappingProperty(
            metadata_field="metadataField",
            primary_key_field="primaryKeyField",
            text_field="textField",
            vector_field="vectorField"
        ),
        resource_arn="resourceArn",
        table_name="tableName"
    )
)

Attributes

opensearch_serverless_configuration

Contains the storage configuration of the knowledge base in Amazon OpenSearch Service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html#cfn-bedrock-knowledgebase-storageconfiguration-opensearchserverlessconfiguration

pinecone_configuration

Contains the storage configuration of the knowledge base in Pinecone.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html#cfn-bedrock-knowledgebase-storageconfiguration-pineconeconfiguration

rds_configuration

Contains details about the storage configuration of the knowledge base in Amazon RDS.

For more information, see Create a vector index in Amazon RDS .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html#cfn-bedrock-knowledgebase-storageconfiguration-rdsconfiguration

type

The vector store service in which the knowledge base is stored.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-storageconfiguration.html#cfn-bedrock-knowledgebase-storageconfiguration-type

SupplementalDataStorageConfigurationProperty

class CfnKnowledgeBase.SupplementalDataStorageConfigurationProperty(*, supplemental_data_storage_locations)

Bases: object

Specifies configurations for the storage location of the images extracted from multimodal documents in your data source.

These images can be retrieved and returned to the end user.

Parameters:

supplemental_data_storage_locations (Union[IResolvable, Sequence[Union[IResolvable, SupplementalDataStorageLocationProperty, Dict[str, Any]]]]) – List of supplemental data storage locations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-supplementaldatastorageconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

supplemental_data_storage_configuration_property = bedrock.CfnKnowledgeBase.SupplementalDataStorageConfigurationProperty(
    supplemental_data_storage_locations=[bedrock.CfnKnowledgeBase.SupplementalDataStorageLocationProperty(
        supplemental_data_storage_location_type="supplementalDataStorageLocationType",

        # the properties below are optional
        s3_location=bedrock.CfnKnowledgeBase.S3LocationProperty(
            uri="uri"
        )
    )]
)

Attributes

supplemental_data_storage_locations

List of supplemental data storage locations.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-supplementaldatastorageconfiguration.html#cfn-bedrock-knowledgebase-supplementaldatastorageconfiguration-supplementaldatastoragelocations

SupplementalDataStorageLocationProperty

class CfnKnowledgeBase.SupplementalDataStorageLocationProperty(*, supplemental_data_storage_location_type, s3_location=None)

Bases: object

Contains information about a storage location for images extracted from multimodal documents in your data source.

Parameters:
  • supplemental_data_storage_location_type (str) – Supplemental data storage location type.

  • s3_location (Union[IResolvable, S3LocationProperty, Dict[str, Any], None]) – Contains information about the Amazon S3 location for the extracted images.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-supplementaldatastoragelocation.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

supplemental_data_storage_location_property = bedrock.CfnKnowledgeBase.SupplementalDataStorageLocationProperty(
    supplemental_data_storage_location_type="supplementalDataStorageLocationType",

    # the properties below are optional
    s3_location=bedrock.CfnKnowledgeBase.S3LocationProperty(
        uri="uri"
    )
)

Attributes

s3_location

Contains information about the Amazon S3 location for the extracted images.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-supplementaldatastoragelocation.html#cfn-bedrock-knowledgebase-supplementaldatastoragelocation-s3location

supplemental_data_storage_location_type

Supplemental data storage location type.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-supplementaldatastoragelocation.html#cfn-bedrock-knowledgebase-supplementaldatastoragelocation-supplementaldatastoragelocationtype

VectorKnowledgeBaseConfigurationProperty

class CfnKnowledgeBase.VectorKnowledgeBaseConfigurationProperty(*, embedding_model_arn, embedding_model_configuration=None, supplemental_data_storage_configuration=None)

Bases: object

Contains details about the model used to create vector embeddings for the knowledge base.

Parameters:
  • embedding_model_arn (str) – The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.

  • embedding_model_configuration (Union[IResolvable, EmbeddingModelConfigurationProperty, Dict[str, Any], None]) – The embeddings model configuration details for the vector model used in Knowledge Base.

  • supplemental_data_storage_configuration (Union[IResolvable, SupplementalDataStorageConfigurationProperty, Dict[str, Any], None]) – If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents. These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-vectorknowledgebaseconfiguration.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

vector_knowledge_base_configuration_property = bedrock.CfnKnowledgeBase.VectorKnowledgeBaseConfigurationProperty(
    embedding_model_arn="embeddingModelArn",

    # the properties below are optional
    embedding_model_configuration=bedrock.CfnKnowledgeBase.EmbeddingModelConfigurationProperty(
        bedrock_embedding_model_configuration=bedrock.CfnKnowledgeBase.BedrockEmbeddingModelConfigurationProperty(
            dimensions=123,
            embedding_data_type="embeddingDataType"
        )
    ),
    supplemental_data_storage_configuration=bedrock.CfnKnowledgeBase.SupplementalDataStorageConfigurationProperty(
        supplemental_data_storage_locations=[bedrock.CfnKnowledgeBase.SupplementalDataStorageLocationProperty(
            supplemental_data_storage_location_type="supplementalDataStorageLocationType",

            # the properties below are optional
            s3_location=bedrock.CfnKnowledgeBase.S3LocationProperty(
                uri="uri"
            )
        )]
    )
)

Attributes

embedding_model_arn

The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-vectorknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-vectorknowledgebaseconfiguration-embeddingmodelarn

embedding_model_configuration

The embeddings model configuration details for the vector model used in Knowledge Base.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-vectorknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-vectorknowledgebaseconfiguration-embeddingmodelconfiguration

supplemental_data_storage_configuration

If you include multimodal data from your data source, use this object to specify configurations for the storage location of the images extracted from your documents.

These images can be retrieved and returned to the end user. They can also be used in generation when using RetrieveAndGenerate .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-bedrock-knowledgebase-vectorknowledgebaseconfiguration.html#cfn-bedrock-knowledgebase-vectorknowledgebaseconfiguration-supplementaldatastorageconfiguration