Class CfnDataSource
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.bedrock.CfnDataSource
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.106.0 (build e852934)",
date="2025-02-06T22:15:50.368Z")
@Stability(Stable)
public class CfnDataSource
extends CfnResource
implements IInspectable
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.
Example:
// The code below shows an example of how to instantiate this type. // The values are placeholders you should change. import software.amazon.awscdk.services.bedrock.*; CfnDataSource cfnDataSource = CfnDataSource.Builder.create(this, "MyCfnDataSource") .dataSourceConfiguration(DataSourceConfigurationProperty.builder() .type("type") // the properties below are optional .confluenceConfiguration(ConfluenceDataSourceConfigurationProperty.builder() .sourceConfiguration(ConfluenceSourceConfigurationProperty.builder() .authType("authType") .credentialsSecretArn("credentialsSecretArn") .hostType("hostType") .hostUrl("hostUrl") .build()) // the properties below are optional .crawlerConfiguration(ConfluenceCrawlerConfigurationProperty.builder() .filterConfiguration(CrawlFilterConfigurationProperty.builder() .type("type") // the properties below are optional .patternObjectFilter(PatternObjectFilterConfigurationProperty.builder() .filters(List.of(PatternObjectFilterProperty.builder() .objectType("objectType") // the properties below are optional .exclusionFilters(List.of("exclusionFilters")) .inclusionFilters(List.of("inclusionFilters")) .build())) .build()) .build()) .build()) .build()) .s3Configuration(S3DataSourceConfigurationProperty.builder() .bucketArn("bucketArn") // the properties below are optional .bucketOwnerAccountId("bucketOwnerAccountId") .inclusionPrefixes(List.of("inclusionPrefixes")) .build()) .salesforceConfiguration(SalesforceDataSourceConfigurationProperty.builder() .sourceConfiguration(SalesforceSourceConfigurationProperty.builder() .authType("authType") .credentialsSecretArn("credentialsSecretArn") .hostUrl("hostUrl") .build()) // the properties below are optional .crawlerConfiguration(SalesforceCrawlerConfigurationProperty.builder() .filterConfiguration(CrawlFilterConfigurationProperty.builder() .type("type") // the properties below are optional .patternObjectFilter(PatternObjectFilterConfigurationProperty.builder() .filters(List.of(PatternObjectFilterProperty.builder() .objectType("objectType") // the properties below are optional .exclusionFilters(List.of("exclusionFilters")) .inclusionFilters(List.of("inclusionFilters")) .build())) .build()) .build()) .build()) .build()) .sharePointConfiguration(SharePointDataSourceConfigurationProperty.builder() .sourceConfiguration(SharePointSourceConfigurationProperty.builder() .authType("authType") .credentialsSecretArn("credentialsSecretArn") .domain("domain") .hostType("hostType") .siteUrls(List.of("siteUrls")) // the properties below are optional .tenantId("tenantId") .build()) // the properties below are optional .crawlerConfiguration(SharePointCrawlerConfigurationProperty.builder() .filterConfiguration(CrawlFilterConfigurationProperty.builder() .type("type") // the properties below are optional .patternObjectFilter(PatternObjectFilterConfigurationProperty.builder() .filters(List.of(PatternObjectFilterProperty.builder() .objectType("objectType") // the properties below are optional .exclusionFilters(List.of("exclusionFilters")) .inclusionFilters(List.of("inclusionFilters")) .build())) .build()) .build()) .build()) .build()) .webConfiguration(WebDataSourceConfigurationProperty.builder() .sourceConfiguration(WebSourceConfigurationProperty.builder() .urlConfiguration(UrlConfigurationProperty.builder() .seedUrls(List.of(SeedUrlProperty.builder() .url("url") .build())) .build()) .build()) // the properties below are optional .crawlerConfiguration(WebCrawlerConfigurationProperty.builder() .crawlerLimits(WebCrawlerLimitsProperty.builder() .rateLimit(123) .build()) .exclusionFilters(List.of("exclusionFilters")) .inclusionFilters(List.of("inclusionFilters")) .scope("scope") .build()) .build()) .build()) .knowledgeBaseId("knowledgeBaseId") .name("name") // the properties below are optional .dataDeletionPolicy("dataDeletionPolicy") .description("description") .serverSideEncryptionConfiguration(ServerSideEncryptionConfigurationProperty.builder() .kmsKeyArn("kmsKeyArn") .build()) .vectorIngestionConfiguration(VectorIngestionConfigurationProperty.builder() .chunkingConfiguration(ChunkingConfigurationProperty.builder() .chunkingStrategy("chunkingStrategy") // the properties below are optional .fixedSizeChunkingConfiguration(FixedSizeChunkingConfigurationProperty.builder() .maxTokens(123) .overlapPercentage(123) .build()) .hierarchicalChunkingConfiguration(HierarchicalChunkingConfigurationProperty.builder() .levelConfigurations(List.of(HierarchicalChunkingLevelConfigurationProperty.builder() .maxTokens(123) .build())) .overlapTokens(123) .build()) .semanticChunkingConfiguration(SemanticChunkingConfigurationProperty.builder() .breakpointPercentileThreshold(123) .bufferSize(123) .maxTokens(123) .build()) .build()) .customTransformationConfiguration(CustomTransformationConfigurationProperty.builder() .intermediateStorage(IntermediateStorageProperty.builder() .s3Location(S3LocationProperty.builder() .uri("uri") .build()) .build()) .transformations(List.of(TransformationProperty.builder() .stepToApply("stepToApply") .transformationFunction(TransformationFunctionProperty.builder() .transformationLambdaConfiguration(TransformationLambdaConfigurationProperty.builder() .lambdaArn("lambdaArn") .build()) .build()) .build())) .build()) .parsingConfiguration(ParsingConfigurationProperty.builder() .parsingStrategy("parsingStrategy") // the properties below are optional .bedrockDataAutomationConfiguration(BedrockDataAutomationConfigurationProperty.builder() .parsingModality("parsingModality") .build()) .bedrockFoundationModelConfiguration(BedrockFoundationModelConfigurationProperty.builder() .modelArn("modelArn") // the properties below are optional .parsingModality("parsingModality") .parsingPrompt(ParsingPromptProperty.builder() .parsingPromptText("parsingPromptText") .build()) .build()) .build()) .build()) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Contains configurations for using Amazon Bedrock Data Automation as the parser for ingesting your data sources.static interface
Settings for a foundation model or inference profile used to parse documents for a data source.static final class
A fluent builder forCfnDataSource
.static interface
Details about how to chunk the documents in the data source.static interface
The configuration of the Confluence content.static interface
The configuration information to connect to Confluence as your data source.static interface
The endpoint information to connect to your Confluence data source.static interface
The configuration of filtering the data source content.static interface
Settings for customizing steps in the data source content ingestion pipeline.static interface
The connection configuration for the data source.static interface
Configurations for when you choose fixed-size chunking.static interface
Settings for hierarchical document chunking for a data source.static interface
Token settings for a layer in a hierarchical chunking configuration.static interface
A location for storing content from data sources temporarily as it is processed by custom components in the ingestion pipeline.static interface
Settings for parsing document contents.static interface
Instructions for interpreting the contents of a document.static interface
The configuration of filtering certain objects or content types of the data source.static interface
The specific filters applied to your data source content.static interface
The configuration information to connect to Amazon S3 as your data source.static interface
A storage location in an S3 bucket.static interface
The configuration of the Salesforce content.static interface
The configuration information to connect to Salesforce as your data source.static interface
The endpoint information to connect to your Salesforce data source.static interface
The seed or starting point URL.static interface
Settings for semantic document chunking for a data source.static interface
Contains the configuration for server-side encryption.static interface
The configuration of the SharePoint content.static interface
The configuration information to connect to SharePoint as your data source.static interface
The endpoint information to connect to your SharePoint data source.static interface
A Lambda function that processes documents.static interface
A Lambda function that processes documents.static interface
A custom processing step for documents moving through a data source ingestion pipeline.static interface
The configuration of web URLs that you want to crawl.static interface
Contains details about how to ingest the documents in a data source.static interface
The configuration of web URLs that you want to crawl.static interface
The rate limits for the URLs that you want to crawl.static interface
The configuration details for the web data source.static interface
The configuration of the URL/URLs for the web content that you want to crawl.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
CfnDataSource
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnDataSource
(software.amazon.jsii.JsiiObjectRef objRef) CfnDataSource
(software.constructs.Construct scope, String id, CfnDataSourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe time at which the data source was created.The unique identifier of the data source.The status of the data source.The detailed reasons on the failure to delete a data source.The time at which the data source was last updated.The data deletion policy for the data source.The connection configuration for the data source.The description of the data source.The unique identifier of the knowledge base to which the data source belongs.getName()
The name of the data source.Contains details about the configuration of the server-side encryption.Contains details about how to ingest the documents in the data source.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setDataDeletionPolicy
(String value) The data deletion policy for the data source.void
The connection configuration for the data source.void
The connection configuration for the data source.void
setDescription
(String value) The description of the data source.void
setKnowledgeBaseId
(String value) The unique identifier of the knowledge base to which the data source belongs.void
The name of the data source.void
Contains details about the configuration of the server-side encryption.void
Contains details about the configuration of the server-side encryption.void
Contains details about how to ingest the documents in the data source.void
Contains details about how to ingest the documents in the data source.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnDataSource
protected CfnDataSource(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDataSource
protected CfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDataSource
@Stability(Stable) public CfnDataSource(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDataSourceProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
- tree inspector to collect and process attributes. This parameter is required.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrCreatedAt
The time at which the data source was created. -
getAttrDataSourceId
The unique identifier of the data source. -
getAttrDataSourceStatus
The status of the data source. The following statuses are possible:.- Available – The data source has been created and is ready for ingestion into the knowledge base.
- Deleting – The data source is being deleted.
-
getAttrFailureReasons
The detailed reasons on the failure to delete a data source. -
getAttrUpdatedAt
The time at which the data source was last updated. -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getDataSourceConfiguration
The connection configuration for the data source. -
setDataSourceConfiguration
The connection configuration for the data source. -
setDataSourceConfiguration
@Stability(Stable) public void setDataSourceConfiguration(@NotNull CfnDataSource.DataSourceConfigurationProperty value) The connection configuration for the data source. -
getKnowledgeBaseId
The unique identifier of the knowledge base to which the data source belongs. -
setKnowledgeBaseId
The unique identifier of the knowledge base to which the data source belongs. -
getName
The name of the data source. -
setName
The name of the data source. -
getDataDeletionPolicy
The data deletion policy for the data source. -
setDataDeletionPolicy
The data deletion policy for the data source. -
getDescription
The description of the data source. -
setDescription
The description of the data source. -
getServerSideEncryptionConfiguration
Contains details about the configuration of the server-side encryption. -
setServerSideEncryptionConfiguration
Contains details about the configuration of the server-side encryption. -
setServerSideEncryptionConfiguration
@Stability(Stable) public void setServerSideEncryptionConfiguration(@Nullable CfnDataSource.ServerSideEncryptionConfigurationProperty value) Contains details about the configuration of the server-side encryption. -
getVectorIngestionConfiguration
Contains details about how to ingest the documents in the data source. -
setVectorIngestionConfiguration
Contains details about how to ingest the documents in the data source. -
setVectorIngestionConfiguration
@Stability(Stable) public void setVectorIngestionConfiguration(@Nullable CfnDataSource.VectorIngestionConfigurationProperty value) Contains details about how to ingest the documents in the data source.
-