Skip to content
v2.278.0

DataSourceConfigurationProperty Struct ​

Contains details about the configuration of the knowledge store used for the AMAZON.QnAIntent . You must have already created the knowledge store and indexed the documents within it.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const dataSourceConfigurationProperty: lex.CfnBot.DataSourceConfigurationProperty = {
  bedrockKnowledgeStoreConfiguration: {
    bedrockKnowledgeBaseArn: 'bedrockKnowledgeBaseArn',
    bkbExactResponseFields: {
      answerField: 'answerField',
    },
    exactResponse: false,
  },
  kendraConfiguration: {
    exactResponse: false,
    kendraIndex: 'kendraIndex',
    queryFilterStringEnabled: false,

    // the properties below are optional
    queryFilterString: 'queryFilterString',
  },
  opensearchConfiguration: {
    domainEndpoint: 'domainEndpoint',
    exactResponse: false,
    exactResponseFields: {
      answerField: 'answerField',
      questionField: 'questionField',
    },
    includeFields: ['includeFields'],
    indexName: 'indexName',
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lex as lex

data_source_configuration_property = lex.CfnBot.DataSourceConfigurationProperty(
    bedrock_knowledge_store_configuration=lex.CfnBot.BedrockKnowledgeStoreConfigurationProperty(
        bedrock_knowledge_base_arn="bedrockKnowledgeBaseArn",
        bkb_exact_response_fields=lex.CfnBot.BKBExactResponseFieldsProperty(
            answer_field="answerField"
        ),
        exact_response=False
    ),
    kendra_configuration=lex.CfnBot.QnAKendraConfigurationProperty(
        exact_response=False,
        kendra_index="kendraIndex",
        query_filter_string_enabled=False,

        # the properties below are optional
        query_filter_string="queryFilterString"
    ),
    opensearch_configuration=lex.CfnBot.OpensearchConfigurationProperty(
        domain_endpoint="domainEndpoint",
        exact_response=False,
        exact_response_fields=lex.CfnBot.ExactResponseFieldsProperty(
            answer_field="answerField",
            question_field="questionField"
        ),
        include_fields=["includeFields"],
        index_name="indexName"
    )
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lex.*;

DataSourceConfigurationProperty dataSourceConfigurationProperty = DataSourceConfigurationProperty.builder()
        .bedrockKnowledgeStoreConfiguration(BedrockKnowledgeStoreConfigurationProperty.builder()
                .bedrockKnowledgeBaseArn("bedrockKnowledgeBaseArn")
                .bkbExactResponseFields(BKBExactResponseFieldsProperty.builder()
                        .answerField("answerField")
                        .build())
                .exactResponse(false)
                .build())
        .kendraConfiguration(QnAKendraConfigurationProperty.builder()
                .exactResponse(false)
                .kendraIndex("kendraIndex")
                .queryFilterStringEnabled(false)

                // the properties below are optional
                .queryFilterString("queryFilterString")
                .build())
        .opensearchConfiguration(OpensearchConfigurationProperty.builder()
                .domainEndpoint("domainEndpoint")
                .exactResponse(false)
                .exactResponseFields(ExactResponseFieldsProperty.builder()
                        .answerField("answerField")
                        .questionField("questionField")
                        .build())
                .includeFields(List.of("includeFields"))
                .indexName("indexName")
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lex;

var dataSourceConfigurationProperty = new DataSourceConfigurationProperty {
    BedrockKnowledgeStoreConfiguration = new BedrockKnowledgeStoreConfigurationProperty {
        BedrockKnowledgeBaseArn = "bedrockKnowledgeBaseArn",
        BkbExactResponseFields = new BKBExactResponseFieldsProperty {
            AnswerField = "answerField"
        },
        ExactResponse = false
    },
    KendraConfiguration = new QnAKendraConfigurationProperty {
        ExactResponse = false,
        KendraIndex = "kendraIndex",
        QueryFilterStringEnabled = false,

        // the properties below are optional
        QueryFilterString = "queryFilterString"
    },
    OpensearchConfiguration = new OpensearchConfigurationProperty {
        DomainEndpoint = "domainEndpoint",
        ExactResponse = false,
        ExactResponseFields = new ExactResponseFieldsProperty {
            AnswerField = "answerField",
            QuestionField = "questionField"
        },
        IncludeFields = new [] { "includeFields" },
        IndexName = "indexName"
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

dataSourceConfigurationProperty := &DataSourceConfigurationProperty{
	BedrockKnowledgeStoreConfiguration: &BedrockKnowledgeStoreConfigurationProperty{
		BedrockKnowledgeBaseArn: jsii.String("bedrockKnowledgeBaseArn"),
		BkbExactResponseFields: &BKBExactResponseFieldsProperty{
			AnswerField: jsii.String("answerField"),
		},
		ExactResponse: jsii.Boolean(false),
	},
	KendraConfiguration: &QnAKendraConfigurationProperty{
		ExactResponse: jsii.Boolean(false),
		KendraIndex: jsii.String("kendraIndex"),
		QueryFilterStringEnabled: jsii.Boolean(false),

		// the properties below are optional
		QueryFilterString: jsii.String("queryFilterString"),
	},
	OpensearchConfiguration: &OpensearchConfigurationProperty{
		DomainEndpoint: jsii.String("domainEndpoint"),
		ExactResponse: jsii.Boolean(false),
		ExactResponseFields: &ExactResponseFieldsProperty{
			AnswerField: jsii.String("answerField"),
			QuestionField: jsii.String("questionField"),
		},
		IncludeFields: []*string{
			jsii.String("includeFields"),
		},
		IndexName: jsii.String("indexName"),
	},
}

Properties ​

bedrockKnowledgeStoreConfigurationoptionalIResolvable | CfnBot.BedrockKnowledgeStoreConfigurationPropertybedrock_knowledge_store_configurationoptionaltyping.Union[IResolvable, BedrockKnowledgeStoreConfigurationProperty]bedrockKnowledgeStoreConfigurationoptionalIResolvableBedrockKnowledgeStoreConfigurationoptionalIResolvableBedrockKnowledgeStoreConfigurationoptionalinterface{} #
Contains details about the configuration of the Amazon Bedrock knowledge base used for the `AMAZON.QnAIntent` . To set up a knowledge base, follow the steps at Building a knowledge base .
kendraConfigurationoptionalIResolvable | CfnBot.QnAKendraConfigurationPropertykendra_configurationoptionaltyping.Union[IResolvable, QnAKendraConfigurationProperty]kendraConfigurationoptionalIResolvableKendraConfigurationoptionalIResolvableKendraConfigurationoptionalinterface{} #
Contains details about the configuration of the Amazon Kendra index used for the `AMAZON.QnAIntent` . To create a Amazon Kendra index, follow the steps at Creating an index .
opensearchConfigurationoptionalIResolvable | CfnBot.OpensearchConfigurationPropertyopensearch_configurationoptionaltyping.Union[IResolvable, OpensearchConfigurationProperty]opensearchConfigurationoptionalIResolvableOpensearchConfigurationoptionalIResolvableOpensearchConfigurationoptionalinterface{} #
Contains details about the configuration of the Amazon OpenSearch Service database used for the `AMAZON.QnAIntent` . To create a domain, follow the steps at Creating and managing Amazon OpenSearch Service domains .