CfnDataSourcePropsMixin
- class aws_cdk.mixins_preview.aws_bedrock.mixins.CfnDataSourcePropsMixin(props, *, strategy=None)
Bases:
MixinProperties with
__Update requires: Replacement__can result in the creation of a new data source and deletion of the old one.This can happen if you also change the Name of the data source.
Specifies a data source as a resource in a top-level template. Minimally, you must specify the following properties:
Name – Specify a name for the data source.
KnowledgeBaseId – Specify the ID of the knowledge base for the data source to belong to.
DataSourceConfiguration – Specify information about the Amazon S3 bucket containing the data source. The following sub-properties are required:
Type – Specify the value
S3.
For more information about setting up data sources in Amazon Bedrock , see Set up a data source for your knowledge base .
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-datasource.html
- cloudformationResource:
AWS::Bedrock::DataSource
- mixin:
true
- 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.mixins_preview import mixins from aws_cdk.mixins_preview.aws_bedrock import mixins as bedrock_mixins cfn_data_source_props_mixin = bedrock_mixins.CfnDataSourcePropsMixin(bedrock_mixins.CfnDataSourceMixinProps( data_deletion_policy="dataDeletionPolicy", data_source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.DataSourceConfigurationProperty( confluence_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_type="hostType", host_url="hostUrl" ) ), s3_configuration=bedrock_mixins.CfnDataSourcePropsMixin.S3DataSourceConfigurationProperty( bucket_arn="bucketArn", bucket_owner_account_id="bucketOwnerAccountId", inclusion_prefixes=["inclusionPrefixes"] ), salesforce_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_url="hostUrl" ) ), share_point_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", domain="domain", host_type="hostType", site_urls=["siteUrls"], tenant_id="tenantId" ) ), type="type", web_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerConfigurationProperty( crawler_limits=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerLimitsProperty( max_pages=123, rate_limit=123 ), exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], scope="scope", user_agent="userAgent", user_agent_header="userAgentHeader" ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebSourceConfigurationProperty( url_configuration=bedrock_mixins.CfnDataSourcePropsMixin.UrlConfigurationProperty( seed_urls=[bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )] ) ) ) ), description="description", knowledge_base_id="knowledgeBaseId", name="name", server_side_encryption_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ServerSideEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn" ), vector_ingestion_configuration=bedrock_mixins.CfnDataSourcePropsMixin.VectorIngestionConfigurationProperty( chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ChunkingConfigurationProperty( chunking_strategy="chunkingStrategy", fixed_size_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty( max_tokens=123, overlap_percentage=123 ), hierarchical_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty( level_configurations=[bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty( max_tokens=123 )], overlap_tokens=123 ), semantic_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty( breakpoint_percentile_threshold=123, buffer_size=123, max_tokens=123 ) ), context_enrichment_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ContextEnrichmentConfigurationProperty( bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelContextEnrichmentConfigurationProperty( enrichment_strategy_configuration=bedrock_mixins.CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty( method="method" ), model_arn="modelArn" ), type="type" ), custom_transformation_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CustomTransformationConfigurationProperty( intermediate_storage=bedrock_mixins.CfnDataSourcePropsMixin.IntermediateStorageProperty( s3_location=bedrock_mixins.CfnDataSourcePropsMixin.S3LocationProperty( uri="uri" ) ), transformations=[bedrock_mixins.CfnDataSourcePropsMixin.TransformationProperty( step_to_apply="stepToApply", transformation_function=bedrock_mixins.CfnDataSourcePropsMixin.TransformationFunctionProperty( transformation_lambda_configuration=bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" ) ) )] ), parsing_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ParsingConfigurationProperty( bedrock_data_automation_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockDataAutomationConfigurationProperty( parsing_modality="parsingModality" ), bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelConfigurationProperty( model_arn="modelArn", parsing_modality="parsingModality", parsing_prompt=bedrock_mixins.CfnDataSourcePropsMixin.ParsingPromptProperty( parsing_prompt_text="parsingPromptText" ) ), parsing_strategy="parsingStrategy" ) ) ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Bedrock::DataSource.- Parameters:
props (
Union[CfnDataSourceMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['dataDeletionPolicy', 'dataSourceConfiguration', 'description', 'knowledgeBaseId', 'name', 'serverSideEncryptionConfiguration', 'vectorIngestionConfiguration']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
BedrockDataAutomationConfigurationProperty
- class CfnDataSourcePropsMixin.BedrockDataAutomationConfigurationProperty(*, parsing_modality=None)
Bases:
objectContains configurations for using Amazon Bedrock Data Automation as the parser for ingesting your data sources.
- Parameters:
parsing_modality (
Optional[str]) – Specifies whether to enable parsing of multimodal data, including both text and/or images.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins bedrock_data_automation_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.BedrockDataAutomationConfigurationProperty( parsing_modality="parsingModality" )
Attributes
- parsing_modality
Specifies whether to enable parsing of multimodal data, including both text and/or images.
BedrockFoundationModelConfigurationProperty
- class CfnDataSourcePropsMixin.BedrockFoundationModelConfigurationProperty(*, model_arn=None, parsing_modality=None, parsing_prompt=None)
Bases:
objectSettings for a foundation model used to parse documents for a data source.
- Parameters:
model_arn (
Optional[str]) – The ARN of the foundation model to use for parsing.parsing_modality (
Optional[str]) – Specifies whether to enable parsing of multimodal data, including both text and/or images.parsing_prompt (
Union[IResolvable,ParsingPromptProperty,Dict[str,Any],None]) – Instructions for interpreting the contents of a document.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins bedrock_foundation_model_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelConfigurationProperty( model_arn="modelArn", parsing_modality="parsingModality", parsing_prompt=bedrock_mixins.CfnDataSourcePropsMixin.ParsingPromptProperty( parsing_prompt_text="parsingPromptText" ) )
Attributes
- model_arn
The ARN of the foundation model to use for parsing.
- parsing_modality
Specifies whether to enable parsing of multimodal data, including both text and/or images.
- parsing_prompt
Instructions for interpreting the contents of a document.
BedrockFoundationModelContextEnrichmentConfigurationProperty
- class CfnDataSourcePropsMixin.BedrockFoundationModelContextEnrichmentConfigurationProperty(*, enrichment_strategy_configuration=None, model_arn=None)
Bases:
objectContext enrichment configuration is used to provide additional context to the RAG application using Amazon Bedrock foundation models.
- Parameters:
enrichment_strategy_configuration (
Union[IResolvable,EnrichmentStrategyConfigurationProperty,Dict[str,Any],None]) – The enrichment stategy used to provide additional context. For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction.model_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins bedrock_foundation_model_context_enrichment_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelContextEnrichmentConfigurationProperty( enrichment_strategy_configuration=bedrock_mixins.CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty( method="method" ), model_arn="modelArn" )
Attributes
- enrichment_strategy_configuration
The enrichment stategy used to provide additional context.
For example, Neptune GraphRAG uses Amazon Bedrock foundation models to perform chunk entity extraction.
- model_arn
The Amazon Resource Name (ARN) of the model used to create vector embeddings for the knowledge base.
ChunkingConfigurationProperty
- class CfnDataSourcePropsMixin.ChunkingConfigurationProperty(*, chunking_strategy=None, fixed_size_chunking_configuration=None, hierarchical_chunking_configuration=None, semantic_chunking_configuration=None)
Bases:
objectDetails about how to chunk the documents in the data source.
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
- Parameters:
chunking_strategy (
Optional[str]) – Knowledge base can split your source data into chunks. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt forNONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk. -FIXED_SIZE– Amazon Bedrock splits your source data into chunks of the approximate size that you set in thefixedSizeChunkingConfiguration. -HIERARCHICAL– Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer. -SEMANTIC– Split documents into chunks based on groups of similar content derived with natural language processing. -NONE– Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.fixed_size_chunking_configuration (
Union[IResolvable,FixedSizeChunkingConfigurationProperty,Dict[str,Any],None]) – Configurations for when you choose fixed-size chunking. If you set thechunkingStrategyasNONE, exclude this field.hierarchical_chunking_configuration (
Union[IResolvable,HierarchicalChunkingConfigurationProperty,Dict[str,Any],None]) – Settings for hierarchical document chunking for a data source. Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.semantic_chunking_configuration (
Union[IResolvable,SemanticChunkingConfigurationProperty,Dict[str,Any],None]) – Settings for semantic document chunking for a data source. Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins chunking_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ChunkingConfigurationProperty( chunking_strategy="chunkingStrategy", fixed_size_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty( max_tokens=123, overlap_percentage=123 ), hierarchical_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty( level_configurations=[bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty( max_tokens=123 )], overlap_tokens=123 ), semantic_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty( breakpoint_percentile_threshold=123, buffer_size=123, max_tokens=123 ) )
Attributes
- chunking_strategy
Knowledge base can split your source data into chunks.
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for
NONE, then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.FIXED_SIZE– Amazon Bedrock splits your source data into chunks of the approximate size that you set in thefixedSizeChunkingConfiguration.HIERARCHICAL– Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.SEMANTIC– Split documents into chunks based on groups of similar content derived with natural language processing.NONE– Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
- fixed_size_chunking_configuration
Configurations for when you choose fixed-size chunking.
If you set the
chunkingStrategyasNONE, exclude this field.
- hierarchical_chunking_configuration
Settings for hierarchical document chunking for a data source.
Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
- semantic_chunking_configuration
Settings for semantic document chunking for a data source.
Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
ConfluenceCrawlerConfigurationProperty
- class CfnDataSourcePropsMixin.ConfluenceCrawlerConfigurationProperty(*, filter_configuration=None)
Bases:
objectThe configuration of the Confluence content.
For example, configuring specific types of Confluence content.
- Parameters:
filter_configuration (
Union[IResolvable,CrawlFilterConfigurationProperty,Dict[str,Any],None]) – The configuration of filtering the Confluence content. For example, configuring regular expression patterns to include or exclude certain content.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins confluence_crawler_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) )
Attributes
- filter_configuration
The configuration of filtering the Confluence content.
For example, configuring regular expression patterns to include or exclude certain content.
ConfluenceDataSourceConfigurationProperty
- class CfnDataSourcePropsMixin.ConfluenceDataSourceConfigurationProperty(*, crawler_configuration=None, source_configuration=None)
Bases:
objectThe configuration information to connect to Confluence as your data source.
- Parameters:
crawler_configuration (
Union[IResolvable,ConfluenceCrawlerConfigurationProperty,Dict[str,Any],None]) – The configuration of the Confluence content. For example, configuring specific types of Confluence content.source_configuration (
Union[IResolvable,ConfluenceSourceConfigurationProperty,Dict[str,Any],None]) – The endpoint information to connect to your Confluence data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins confluence_data_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_type="hostType", host_url="hostUrl" ) )
Attributes
- crawler_configuration
The configuration of the Confluence content.
For example, configuring specific types of Confluence content.
- source_configuration
The endpoint information to connect to your Confluence data source.
ConfluenceSourceConfigurationProperty
- class CfnDataSourcePropsMixin.ConfluenceSourceConfigurationProperty(*, auth_type=None, credentials_secret_arn=None, host_type=None, host_url=None)
Bases:
objectThe endpoint information to connect to your Confluence data source.
- Parameters:
auth_type (
Optional[str]) – The supported authentication type to authenticate and connect to your Confluence instance.credentials_secret_arn (
Optional[str]) – The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Confluence instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration .host_type (
Optional[str]) – The supported host type, whether online/cloud or server/on-premises.host_url (
Optional[str]) – The Confluence host URL or instance URL.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins confluence_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_type="hostType", host_url="hostUrl" )
Attributes
- auth_type
The supported authentication type to authenticate and connect to your Confluence instance.
- credentials_secret_arn
The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Confluence instance URL.
For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Confluence connection configuration .
- host_type
The supported host type, whether online/cloud or server/on-premises.
- host_url
The Confluence host URL or instance URL.
ContextEnrichmentConfigurationProperty
- class CfnDataSourcePropsMixin.ContextEnrichmentConfigurationProperty(*, bedrock_foundation_model_configuration=None, type=None)
Bases:
objectContext enrichment configuration is used to provide additional context to the RAG application.
- Parameters:
bedrock_foundation_model_configuration (
Union[IResolvable,BedrockFoundationModelContextEnrichmentConfigurationProperty,Dict[str,Any],None]) – The configuration of the Amazon Bedrock foundation model used for context enrichment.type (
Optional[str]) – The method used for context enrichment. It must be Amazon Bedrock foundation models.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins context_enrichment_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ContextEnrichmentConfigurationProperty( bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelContextEnrichmentConfigurationProperty( enrichment_strategy_configuration=bedrock_mixins.CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty( method="method" ), model_arn="modelArn" ), type="type" )
Attributes
- bedrock_foundation_model_configuration
The configuration of the Amazon Bedrock foundation model used for context enrichment.
- type
The method used for context enrichment.
It must be Amazon Bedrock foundation models.
CrawlFilterConfigurationProperty
- class CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty(*, pattern_object_filter=None, type=None)
Bases:
objectThe configuration of filtering the data source content.
For example, configuring regular expression patterns to include or exclude certain content.
- Parameters:
pattern_object_filter (
Union[IResolvable,PatternObjectFilterConfigurationProperty,Dict[str,Any],None]) – The configuration of filtering certain objects or content types of the data source.type (
Optional[str]) – The type of filtering that you want to apply to certain objects or content of the data source. For example, thePATTERNtype is regular expression patterns you can apply to filter your content.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins crawl_filter_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" )
Attributes
- pattern_object_filter
The configuration of filtering certain objects or content types of the data source.
- type
The type of filtering that you want to apply to certain objects or content of the data source.
For example, the
PATTERNtype is regular expression patterns you can apply to filter your content.
CustomTransformationConfigurationProperty
- class CfnDataSourcePropsMixin.CustomTransformationConfigurationProperty(*, intermediate_storage=None, transformations=None)
Bases:
objectSettings for customizing steps in the data source content ingestion pipeline.
You can configure the data source to process documents with a Lambda function after they are parsed and converted into chunks. When you add a post-chunking transformation, the service stores chunked documents in an S3 bucket and invokes a Lambda function to process them.
To process chunked documents with a Lambda function, define an S3 bucket path for input and output objects, and a transformation that specifies the Lambda function to invoke. You can use the Lambda function to customize how chunks are split, and the metadata for each chunk.
- Parameters:
intermediate_storage (
Union[IResolvable,IntermediateStorageProperty,Dict[str,Any],None]) – An S3 bucket path for input and output objects.transformations (
Union[IResolvable,Sequence[Union[IResolvable,TransformationProperty,Dict[str,Any]]],None]) – A Lambda function that processes documents.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins custom_transformation_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.CustomTransformationConfigurationProperty( intermediate_storage=bedrock_mixins.CfnDataSourcePropsMixin.IntermediateStorageProperty( s3_location=bedrock_mixins.CfnDataSourcePropsMixin.S3LocationProperty( uri="uri" ) ), transformations=[bedrock_mixins.CfnDataSourcePropsMixin.TransformationProperty( step_to_apply="stepToApply", transformation_function=bedrock_mixins.CfnDataSourcePropsMixin.TransformationFunctionProperty( transformation_lambda_configuration=bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" ) ) )] )
Attributes
- intermediate_storage
An S3 bucket path for input and output objects.
- transformations
A Lambda function that processes documents.
DataSourceConfigurationProperty
- class CfnDataSourcePropsMixin.DataSourceConfigurationProperty(*, confluence_configuration=None, s3_configuration=None, salesforce_configuration=None, share_point_configuration=None, type=None, web_configuration=None)
Bases:
objectThe connection configuration for the data source.
- Parameters:
confluence_configuration (
Union[IResolvable,ConfluenceDataSourceConfigurationProperty,Dict[str,Any],None]) – The configuration information to connect to Confluence as your data source. .. epigraph:: Confluence data source connector is in preview release and is subject to change.s3_configuration (
Union[IResolvable,S3DataSourceConfigurationProperty,Dict[str,Any],None]) – The configuration information to connect to Amazon S3 as your data source.salesforce_configuration (
Union[IResolvable,SalesforceDataSourceConfigurationProperty,Dict[str,Any],None]) – The configuration information to connect to Salesforce as your data source. .. epigraph:: Salesforce data source connector is in preview release and is subject to change.share_point_configuration (
Union[IResolvable,SharePointDataSourceConfigurationProperty,Dict[str,Any],None]) – The configuration information to connect to SharePoint as your data source. .. epigraph:: SharePoint data source connector is in preview release and is subject to change.type (
Optional[str]) – The type of data source.web_configuration (
Union[IResolvable,WebDataSourceConfigurationProperty,Dict[str,Any],None]) – The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs. .. epigraph:: Crawling web URLs as your data source is in preview release and is subject to change.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins data_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.DataSourceConfigurationProperty( confluence_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ConfluenceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_type="hostType", host_url="hostUrl" ) ), s3_configuration=bedrock_mixins.CfnDataSourcePropsMixin.S3DataSourceConfigurationProperty( bucket_arn="bucketArn", bucket_owner_account_id="bucketOwnerAccountId", inclusion_prefixes=["inclusionPrefixes"] ), salesforce_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_url="hostUrl" ) ), share_point_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SharePointSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", domain="domain", host_type="hostType", site_urls=["siteUrls"], tenant_id="tenantId" ) ), type="type", web_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerConfigurationProperty( crawler_limits=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerLimitsProperty( max_pages=123, rate_limit=123 ), exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], scope="scope", user_agent="userAgent", user_agent_header="userAgentHeader" ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebSourceConfigurationProperty( url_configuration=bedrock_mixins.CfnDataSourcePropsMixin.UrlConfigurationProperty( seed_urls=[bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )] ) ) ) )
Attributes
- confluence_configuration
The configuration information to connect to Confluence as your data source.
Confluence data source connector is in preview release and is subject to change.
- s3_configuration
The configuration information to connect to Amazon S3 as your data source.
- salesforce_configuration
The configuration information to connect to Salesforce as your data source.
Salesforce data source connector is in preview release and is subject to change.
The configuration information to connect to SharePoint as your data source.
SharePoint data source connector is in preview release and is subject to change.
- type
The type of data source.
- web_configuration
The configuration of web URLs to crawl for your data source. You should be authorized to crawl the URLs.
Crawling web URLs as your data source is in preview release and is subject to change.
EnrichmentStrategyConfigurationProperty
- class CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty(*, method=None)
Bases:
objectThe strategy used for performing context enrichment.
- Parameters:
method (
Optional[str]) – The method used for the context enrichment strategy.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins enrichment_strategy_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty( method="method" )
Attributes
- method
The method used for the context enrichment strategy.
FixedSizeChunkingConfigurationProperty
- class CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty(*, max_tokens=None, overlap_percentage=None)
Bases:
objectConfigurations for when you choose fixed-size chunking.
If you set the
chunkingStrategyasNONE, exclude this field.- Parameters:
max_tokens (
Union[int,float,None]) – The maximum number of tokens to include in a chunk.overlap_percentage (
Union[int,float,None]) – The percentage of overlap between adjacent chunks of a data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins fixed_size_chunking_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty( max_tokens=123, overlap_percentage=123 )
Attributes
- max_tokens
The maximum number of tokens to include in a chunk.
- overlap_percentage
The percentage of overlap between adjacent chunks of a data source.
HierarchicalChunkingConfigurationProperty
- class CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty(*, level_configurations=None, overlap_tokens=None)
Bases:
objectSettings for hierarchical document chunking for a data source.
Hierarchical chunking splits documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
You configure the number of tokens to overlap, or repeat across adjacent chunks. For example, if you set overlap tokens to 60, the last 60 tokens in the first chunk are also included at the beginning of the second chunk. For each layer, you must also configure the maximum number of tokens in a chunk.
- Parameters:
level_configurations (
Union[IResolvable,Sequence[Union[IResolvable,HierarchicalChunkingLevelConfigurationProperty,Dict[str,Any]]],None]) – Token settings for each layer.overlap_tokens (
Union[int,float,None]) – The number of tokens to repeat across chunks in the same layer.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins hierarchical_chunking_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty( level_configurations=[bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty( max_tokens=123 )], overlap_tokens=123 )
Attributes
- level_configurations
Token settings for each layer.
- overlap_tokens
The number of tokens to repeat across chunks in the same layer.
HierarchicalChunkingLevelConfigurationProperty
- class CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty(*, max_tokens=None)
Bases:
objectToken settings for a layer in a hierarchical chunking configuration.
- Parameters:
max_tokens (
Union[int,float,None]) – The maximum number of tokens that a chunk can contain in this layer.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins hierarchical_chunking_level_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty( max_tokens=123 )
Attributes
- max_tokens
The maximum number of tokens that a chunk can contain in this layer.
IntermediateStorageProperty
- class CfnDataSourcePropsMixin.IntermediateStorageProperty(*, s3_location=None)
Bases:
objectA location for storing content from data sources temporarily as it is processed by custom components in the ingestion pipeline.
- Parameters:
s3_location (
Union[IResolvable,S3LocationProperty,Dict[str,Any],None]) – An S3 bucket path.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins intermediate_storage_property = bedrock_mixins.CfnDataSourcePropsMixin.IntermediateStorageProperty( s3_location=bedrock_mixins.CfnDataSourcePropsMixin.S3LocationProperty( uri="uri" ) )
Attributes
ParsingConfigurationProperty
- class CfnDataSourcePropsMixin.ParsingConfigurationProperty(*, bedrock_data_automation_configuration=None, bedrock_foundation_model_configuration=None, parsing_strategy=None)
Bases:
objectSettings for parsing document contents.
If you exclude this field, the default parser converts the contents of each document into text before splitting it into chunks. Specify the parsing strategy to use in the
parsingStrategyfield and include the relevant configuration, or omit it to use the Amazon Bedrock default parser. For more information, see Parsing options for your data source . .. epigraph:If you specify ``BEDROCK_DATA_AUTOMATION`` or ``BEDROCK_FOUNDATION_MODEL`` and it fails to parse a file, the Amazon Bedrock default parser will be used instead.
- Parameters:
bedrock_data_automation_configuration (
Union[IResolvable,BedrockDataAutomationConfigurationProperty,Dict[str,Any],None]) – If you specifyBEDROCK_DATA_AUTOMATIONas the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.bedrock_foundation_model_configuration (
Union[IResolvable,BedrockFoundationModelConfigurationProperty,Dict[str,Any],None]) – If you specifyBEDROCK_FOUNDATION_MODELas the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.parsing_strategy (
Optional[str]) – The parsing strategy for the data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins parsing_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ParsingConfigurationProperty( bedrock_data_automation_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockDataAutomationConfigurationProperty( parsing_modality="parsingModality" ), bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelConfigurationProperty( model_arn="modelArn", parsing_modality="parsingModality", parsing_prompt=bedrock_mixins.CfnDataSourcePropsMixin.ParsingPromptProperty( parsing_prompt_text="parsingPromptText" ) ), parsing_strategy="parsingStrategy" )
Attributes
- bedrock_data_automation_configuration
If you specify
BEDROCK_DATA_AUTOMATIONas the parsing strategy for ingesting your data source, use this object to modify configurations for using the Amazon Bedrock Data Automation parser.
- bedrock_foundation_model_configuration
If you specify
BEDROCK_FOUNDATION_MODELas the parsing strategy for ingesting your data source, use this object to modify configurations for using a foundation model to parse documents.
- parsing_strategy
The parsing strategy for the data source.
ParsingPromptProperty
- class CfnDataSourcePropsMixin.ParsingPromptProperty(*, parsing_prompt_text=None)
Bases:
objectInstructions for interpreting the contents of a document.
- Parameters:
parsing_prompt_text (
Optional[str]) – Instructions for interpreting the contents of a document.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins parsing_prompt_property = bedrock_mixins.CfnDataSourcePropsMixin.ParsingPromptProperty( parsing_prompt_text="parsingPromptText" )
Attributes
- parsing_prompt_text
Instructions for interpreting the contents of a document.
PatternObjectFilterConfigurationProperty
- class CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty(*, filters=None)
Bases:
objectThe configuration of filtering certain objects or content types of the data source.
- Parameters:
filters (
Union[IResolvable,Sequence[Union[IResolvable,PatternObjectFilterProperty,Dict[str,Any]]],None]) – The configuration of specific filters applied to your data source content. You can filter out or include certain content.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins pattern_object_filter_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] )
Attributes
- filters
The configuration of specific filters applied to your data source content.
You can filter out or include certain content.
PatternObjectFilterProperty
- class CfnDataSourcePropsMixin.PatternObjectFilterProperty(*, exclusion_filters=None, inclusion_filters=None, object_type=None)
Bases:
objectThe specific filters applied to your data source content.
You can filter out or include certain content.
- Parameters:
exclusion_filters (
Optional[Sequence[str]]) – A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.inclusion_filters (
Optional[Sequence[str]]) – A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern. If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.object_type (
Optional[str]) – The supported object type or content type of the data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins pattern_object_filter_property = bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )
Attributes
- exclusion_filters
A list of one or more exclusion regular expression patterns to exclude certain object types that adhere to the pattern.
If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
- inclusion_filters
A list of one or more inclusion regular expression patterns to include certain object types that adhere to the pattern.
If you specify an inclusion and exclusion filter/pattern and both match a document, the exclusion filter takes precedence and the document isn’t crawled.
- object_type
The supported object type or content type of the data source.
S3DataSourceConfigurationProperty
- class CfnDataSourcePropsMixin.S3DataSourceConfigurationProperty(*, bucket_arn=None, bucket_owner_account_id=None, inclusion_prefixes=None)
Bases:
objectThe configuration information to connect to Amazon S3 as your data source.
- Parameters:
bucket_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the S3 bucket that contains your data.bucket_owner_account_id (
Optional[str]) – The account ID for the owner of the S3 bucket.inclusion_prefixes (
Optional[Sequence[str]]) – A list of S3 prefixes to include certain files or content. This field is an array with a maximum of one item, which can contain a string that has a maximum length of 300 characters. For more information, see Organizing objects using prefixes .
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins s3_data_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.S3DataSourceConfigurationProperty( bucket_arn="bucketArn", bucket_owner_account_id="bucketOwnerAccountId", inclusion_prefixes=["inclusionPrefixes"] )
Attributes
- bucket_arn
The Amazon Resource Name (ARN) of the S3 bucket that contains your data.
- bucket_owner_account_id
The account ID for the owner of the S3 bucket.
- inclusion_prefixes
A list of S3 prefixes to include certain files or content.
This field is an array with a maximum of one item, which can contain a string that has a maximum length of 300 characters. For more information, see Organizing objects using prefixes .
S3LocationProperty
- class CfnDataSourcePropsMixin.S3LocationProperty(*, uri=None)
Bases:
objectA storage location in an Amazon S3 bucket.
- Parameters:
uri (
Optional[str]) – An object URI starting withs3://.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins s3_location_property = bedrock_mixins.CfnDataSourcePropsMixin.S3LocationProperty( uri="uri" )
Attributes
- uri
An object URI starting with
s3://.
SalesforceCrawlerConfigurationProperty
- class CfnDataSourcePropsMixin.SalesforceCrawlerConfigurationProperty(*, filter_configuration=None)
Bases:
objectThe configuration of the Salesforce content.
For example, configuring specific types of Salesforce content.
- Parameters:
filter_configuration (
Union[IResolvable,CrawlFilterConfigurationProperty,Dict[str,Any],None]) – The configuration of filtering the Salesforce content. For example, configuring regular expression patterns to include or exclude certain content.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins salesforce_crawler_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.SalesforceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) )
Attributes
- filter_configuration
The configuration of filtering the Salesforce content.
For example, configuring regular expression patterns to include or exclude certain content.
SalesforceDataSourceConfigurationProperty
- class CfnDataSourcePropsMixin.SalesforceDataSourceConfigurationProperty(*, crawler_configuration=None, source_configuration=None)
Bases:
objectThe configuration information to connect to Salesforce as your data source.
- Parameters:
crawler_configuration (
Union[IResolvable,SalesforceCrawlerConfigurationProperty,Dict[str,Any],None]) – The configuration of the Salesforce content. For example, configuring specific types of Salesforce content.source_configuration (
Union[IResolvable,SalesforceSourceConfigurationProperty,Dict[str,Any],None]) – The endpoint information to connect to your Salesforce data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins salesforce_data_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.SalesforceDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceCrawlerConfigurationProperty( filter_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CrawlFilterConfigurationProperty( pattern_object_filter=bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterConfigurationProperty( filters=[bedrock_mixins.CfnDataSourcePropsMixin.PatternObjectFilterProperty( exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], object_type="objectType" )] ), type="type" ) ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SalesforceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_url="hostUrl" ) )
Attributes
- crawler_configuration
The configuration of the Salesforce content.
For example, configuring specific types of Salesforce content.
- source_configuration
The endpoint information to connect to your Salesforce data source.
SalesforceSourceConfigurationProperty
- class CfnDataSourcePropsMixin.SalesforceSourceConfigurationProperty(*, auth_type=None, credentials_secret_arn=None, host_url=None)
Bases:
objectThe endpoint information to connect to your Salesforce data source.
- Parameters:
auth_type (
Optional[str]) – The supported authentication type to authenticate and connect to your Salesforce instance.credentials_secret_arn (
Optional[str]) – The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL. For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration .host_url (
Optional[str]) – The Salesforce host URL or instance URL.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins salesforce_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.SalesforceSourceConfigurationProperty( auth_type="authType", credentials_secret_arn="credentialsSecretArn", host_url="hostUrl" )
Attributes
- auth_type
The supported authentication type to authenticate and connect to your Salesforce instance.
- credentials_secret_arn
The Amazon Resource Name of an AWS Secrets Manager secret that stores your authentication credentials for your Salesforce instance URL.
For more information on the key-value pairs that must be included in your secret, depending on your authentication type, see Salesforce connection configuration .
- host_url
The Salesforce host URL or instance URL.
SeedUrlProperty
- class CfnDataSourcePropsMixin.SeedUrlProperty(*, url=None)
Bases:
objectThe seed or starting point URL.
You should be authorized to crawl the URL.
- Parameters:
url (
Optional[str]) – A seed or starting point URL.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins seed_url_property = bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )
Attributes
- url
A seed or starting point URL.
SemanticChunkingConfigurationProperty
- class CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty(*, breakpoint_percentile_threshold=None, buffer_size=None, max_tokens=None)
Bases:
objectSettings for semantic document chunking for a data source.
Semantic chunking splits a document into into smaller documents based on groups of similar content derived from the text with natural language processing.
With semantic chunking, each sentence is compared to the next to determine how similar they are. You specify a threshold in the form of a percentile, where adjacent sentences that are less similar than that percentage of sentence pairs are divided into separate chunks. For example, if you set the threshold to 90, then the 10 percent of sentence pairs that are least similar are split. So if you have 101 sentences, 100 sentence pairs are compared, and the 10 with the least similarity are split, creating 11 chunks. These chunks are further split if they exceed the max token size.
You must also specify a buffer size, which determines whether sentences are compared in isolation, or within a moving context window that includes the previous and following sentence. For example, if you set the buffer size to
1, the embedding for sentence 10 is derived from sentences 9, 10, and 11 combined.- Parameters:
breakpoint_percentile_threshold (
Union[int,float,None]) – The dissimilarity threshold for splitting chunks.buffer_size (
Union[int,float,None]) – The buffer size.max_tokens (
Union[int,float,None]) – The maximum number of tokens that a chunk can contain.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins semantic_chunking_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty( breakpoint_percentile_threshold=123, buffer_size=123, max_tokens=123 )
Attributes
- breakpoint_percentile_threshold
The dissimilarity threshold for splitting chunks.
- buffer_size
The buffer size.
- max_tokens
The maximum number of tokens that a chunk can contain.
ServerSideEncryptionConfigurationProperty
- class CfnDataSourcePropsMixin.ServerSideEncryptionConfigurationProperty(*, kms_key_arn=None)
Bases:
objectContains the configuration for server-side encryption.
- Parameters:
kms_key_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the AWS key used to encrypt the resource.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins server_side_encryption_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.ServerSideEncryptionConfigurationProperty( kms_key_arn="kmsKeyArn" )
Attributes
- kms_key_arn
The Amazon Resource Name (ARN) of the AWS key used to encrypt the resource.
TransformationFunctionProperty
- class CfnDataSourcePropsMixin.TransformationFunctionProperty(*, transformation_lambda_configuration=None)
Bases:
objectA Lambda function that processes documents.
- Parameters:
transformation_lambda_configuration (
Union[IResolvable,TransformationLambdaConfigurationProperty,Dict[str,Any],None]) – The Lambda function.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins transformation_function_property = bedrock_mixins.CfnDataSourcePropsMixin.TransformationFunctionProperty( transformation_lambda_configuration=bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" ) )
Attributes
- transformation_lambda_configuration
The Lambda function.
TransformationLambdaConfigurationProperty
- class CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty(*, lambda_arn=None)
Bases:
objectA Lambda function that processes documents.
- Parameters:
lambda_arn (
Optional[str]) – The function’s ARN identifier.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins transformation_lambda_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" )
Attributes
TransformationProperty
- class CfnDataSourcePropsMixin.TransformationProperty(*, step_to_apply=None, transformation_function=None)
Bases:
objectA custom processing step for documents moving through a data source ingestion pipeline.
To process documents after they have been converted into chunks, set the step to apply to
POST_CHUNKING.- Parameters:
step_to_apply (
Optional[str]) – When the service applies the transformation.transformation_function (
Union[IResolvable,TransformationFunctionProperty,Dict[str,Any],None]) – A Lambda function that processes documents.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins transformation_property = bedrock_mixins.CfnDataSourcePropsMixin.TransformationProperty( step_to_apply="stepToApply", transformation_function=bedrock_mixins.CfnDataSourcePropsMixin.TransformationFunctionProperty( transformation_lambda_configuration=bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" ) ) )
Attributes
- step_to_apply
When the service applies the transformation.
- transformation_function
A Lambda function that processes documents.
UrlConfigurationProperty
- class CfnDataSourcePropsMixin.UrlConfigurationProperty(*, seed_urls=None)
Bases:
objectThe configuration of web URLs that you want to crawl.
You should be authorized to crawl the URLs.
- Parameters:
seed_urls (
Union[IResolvable,Sequence[Union[IResolvable,SeedUrlProperty,Dict[str,Any]]],None]) – One or more seed or starting point URLs.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins url_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.UrlConfigurationProperty( seed_urls=[bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )] )
Attributes
- seed_urls
One or more seed or starting point URLs.
VectorIngestionConfigurationProperty
- class CfnDataSourcePropsMixin.VectorIngestionConfigurationProperty(*, chunking_configuration=None, context_enrichment_configuration=None, custom_transformation_configuration=None, parsing_configuration=None)
Bases:
objectContains details about how to ingest the documents in a data source.
- Parameters:
chunking_configuration (
Union[IResolvable,ChunkingConfigurationProperty,Dict[str,Any],None]) – Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.context_enrichment_configuration (
Union[IResolvable,ContextEnrichmentConfigurationProperty,Dict[str,Any],None]) – The context enrichment configuration used for ingestion of the data into the vector store.custom_transformation_configuration (
Union[IResolvable,CustomTransformationConfigurationProperty,Dict[str,Any],None]) – A custom document transformer for parsed data source documents.parsing_configuration (
Union[IResolvable,ParsingConfigurationProperty,Dict[str,Any],None]) – Configurations for a parser to use for parsing documents in your data source. If you exclude this field, the default parser will be used.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins vector_ingestion_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.VectorIngestionConfigurationProperty( chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ChunkingConfigurationProperty( chunking_strategy="chunkingStrategy", fixed_size_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.FixedSizeChunkingConfigurationProperty( max_tokens=123, overlap_percentage=123 ), hierarchical_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingConfigurationProperty( level_configurations=[bedrock_mixins.CfnDataSourcePropsMixin.HierarchicalChunkingLevelConfigurationProperty( max_tokens=123 )], overlap_tokens=123 ), semantic_chunking_configuration=bedrock_mixins.CfnDataSourcePropsMixin.SemanticChunkingConfigurationProperty( breakpoint_percentile_threshold=123, buffer_size=123, max_tokens=123 ) ), context_enrichment_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ContextEnrichmentConfigurationProperty( bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelContextEnrichmentConfigurationProperty( enrichment_strategy_configuration=bedrock_mixins.CfnDataSourcePropsMixin.EnrichmentStrategyConfigurationProperty( method="method" ), model_arn="modelArn" ), type="type" ), custom_transformation_configuration=bedrock_mixins.CfnDataSourcePropsMixin.CustomTransformationConfigurationProperty( intermediate_storage=bedrock_mixins.CfnDataSourcePropsMixin.IntermediateStorageProperty( s3_location=bedrock_mixins.CfnDataSourcePropsMixin.S3LocationProperty( uri="uri" ) ), transformations=[bedrock_mixins.CfnDataSourcePropsMixin.TransformationProperty( step_to_apply="stepToApply", transformation_function=bedrock_mixins.CfnDataSourcePropsMixin.TransformationFunctionProperty( transformation_lambda_configuration=bedrock_mixins.CfnDataSourcePropsMixin.TransformationLambdaConfigurationProperty( lambda_arn="lambdaArn" ) ) )] ), parsing_configuration=bedrock_mixins.CfnDataSourcePropsMixin.ParsingConfigurationProperty( bedrock_data_automation_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockDataAutomationConfigurationProperty( parsing_modality="parsingModality" ), bedrock_foundation_model_configuration=bedrock_mixins.CfnDataSourcePropsMixin.BedrockFoundationModelConfigurationProperty( model_arn="modelArn", parsing_modality="parsingModality", parsing_prompt=bedrock_mixins.CfnDataSourcePropsMixin.ParsingPromptProperty( parsing_prompt_text="parsingPromptText" ) ), parsing_strategy="parsingStrategy" ) )
Attributes
- chunking_configuration
Details about how to chunk the documents in the data source.
A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
- context_enrichment_configuration
The context enrichment configuration used for ingestion of the data into the vector store.
- custom_transformation_configuration
A custom document transformer for parsed data source documents.
- parsing_configuration
Configurations for a parser to use for parsing documents in your data source.
If you exclude this field, the default parser will be used.
WebCrawlerConfigurationProperty
- class CfnDataSourcePropsMixin.WebCrawlerConfigurationProperty(*, crawler_limits=None, exclusion_filters=None, inclusion_filters=None, scope=None, user_agent=None, user_agent_header=None)
Bases:
objectThe configuration of web URLs that you want to crawl.
You should be authorized to crawl the URLs.
- Parameters:
crawler_limits (
Union[IResolvable,WebCrawlerLimitsProperty,Dict[str,Any],None]) – The configuration of crawl limits for the web URLs.exclusion_filters (
Optional[Sequence[str]]) – A list of one or more exclusion regular expression patterns to exclude certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.inclusion_filters (
Optional[Sequence[str]]) – A list of one or more inclusion regular expression patterns to include certain URLs. If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.scope (
Optional[str]) – The scope of what is crawled for your URLs. You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL “https://docs.aws.amazon.com/bedrock/latest/userguide/” and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain “aws.amazon.com” can also include sub domain “docs.aws.amazon.com”.user_agent (
Optional[str]) – Returns the user agent suffix for your web crawler.user_agent_header (
Optional[str]) – A string used for identifying the crawler or bot when it accesses a web server. The user agent header value consists of thebedrockbot, UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set tobedrockbot_UUID. You can optionally append a custom suffix tobedrockbot_UUIDto allowlist a specific user agent permitted to access your source URLs.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins web_crawler_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerConfigurationProperty( crawler_limits=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerLimitsProperty( max_pages=123, rate_limit=123 ), exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], scope="scope", user_agent="userAgent", user_agent_header="userAgentHeader" )
Attributes
- crawler_limits
The configuration of crawl limits for the web URLs.
- exclusion_filters
A list of one or more exclusion regular expression patterns to exclude certain URLs.
If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
- inclusion_filters
A list of one or more inclusion regular expression patterns to include certain URLs.
If you specify an inclusion and exclusion filter/pattern and both match a URL, the exclusion filter takes precedence and the web content of the URL isn’t crawled.
- scope
The scope of what is crawled for your URLs.
You can choose to crawl only web pages that belong to the same host or primary domain. For example, only web pages that contain the seed URL “https://docs.aws.amazon.com/bedrock/latest/userguide/” and no other domains. You can choose to include sub domains in addition to the host or primary domain. For example, web pages that contain “aws.amazon.com” can also include sub domain “docs.aws.amazon.com”.
- user_agent
Returns the user agent suffix for your web crawler.
- user_agent_header
A string used for identifying the crawler or bot when it accesses a web server.
The user agent header value consists of the
bedrockbot, UUID, and a user agent suffix for your crawler (if one is provided). By default, it is set tobedrockbot_UUID. You can optionally append a custom suffix tobedrockbot_UUIDto allowlist a specific user agent permitted to access your source URLs.
WebCrawlerLimitsProperty
- class CfnDataSourcePropsMixin.WebCrawlerLimitsProperty(*, max_pages=None, rate_limit=None)
Bases:
objectThe rate limits for the URLs that you want to crawl.
You should be authorized to crawl the URLs.
- Parameters:
max_pages (
Union[int,float,None]) – The max number of web pages crawled from your source URLs, up to 25,000 pages. If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested.rate_limit (
Union[int,float,None]) – The max rate at which pages are crawled, up to 300 per minute per host.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins web_crawler_limits_property = bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerLimitsProperty( max_pages=123, rate_limit=123 )
Attributes
- max_pages
The max number of web pages crawled from your source URLs, up to 25,000 pages.
If the web pages exceed this limit, the data source sync will fail and no web pages will be ingested.
- rate_limit
The max rate at which pages are crawled, up to 300 per minute per host.
WebDataSourceConfigurationProperty
- class CfnDataSourcePropsMixin.WebDataSourceConfigurationProperty(*, crawler_configuration=None, source_configuration=None)
Bases:
objectThe configuration details for the web data source.
- Parameters:
crawler_configuration (
Union[IResolvable,WebCrawlerConfigurationProperty,Dict[str,Any],None]) – The Web Crawler configuration details for the web data source.source_configuration (
Union[IResolvable,WebSourceConfigurationProperty,Dict[str,Any],None]) – The source configuration details for the web data source.
- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins web_data_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.WebDataSourceConfigurationProperty( crawler_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerConfigurationProperty( crawler_limits=bedrock_mixins.CfnDataSourcePropsMixin.WebCrawlerLimitsProperty( max_pages=123, rate_limit=123 ), exclusion_filters=["exclusionFilters"], inclusion_filters=["inclusionFilters"], scope="scope", user_agent="userAgent", user_agent_header="userAgentHeader" ), source_configuration=bedrock_mixins.CfnDataSourcePropsMixin.WebSourceConfigurationProperty( url_configuration=bedrock_mixins.CfnDataSourcePropsMixin.UrlConfigurationProperty( seed_urls=[bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )] ) ) )
Attributes
- crawler_configuration
The Web Crawler configuration details for the web data source.
- source_configuration
The source configuration details for the web data source.
WebSourceConfigurationProperty
- class CfnDataSourcePropsMixin.WebSourceConfigurationProperty(*, url_configuration=None)
Bases:
objectThe configuration of the URL/URLs for the web content that you want to crawl.
You should be authorized to crawl the URLs.
- Parameters:
url_configuration (
Union[IResolvable,UrlConfigurationProperty,Dict[str,Any],None]) – The configuration of the URL/URLs.- See:
- 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.mixins_preview.aws_bedrock import mixins as bedrock_mixins web_source_configuration_property = bedrock_mixins.CfnDataSourcePropsMixin.WebSourceConfigurationProperty( url_configuration=bedrock_mixins.CfnDataSourcePropsMixin.UrlConfigurationProperty( seed_urls=[bedrock_mixins.CfnDataSourcePropsMixin.SeedUrlProperty( url="url" )] ) )
Attributes
- url_configuration
The configuration of the URL/URLs.