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.104.0 (build e79254c)",
date="2024-11-06T23:25:05.065Z")
@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
.bedrockFoundationModelConfiguration(BedrockFoundationModelConfigurationProperty.builder()
.modelArn("modelArn")
// the properties below are optional
.parsingPrompt(ParsingPromptProperty.builder()
.parsingPromptText("parsingPromptText")
.build())
.build())
.build())
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceSettings for a foundation model or inference profile used to parse documents for a data source.static final classA fluent builder forCfnDataSource.static interfaceDetails about how to chunk the documents in the data source.static interfaceThe configuration of the Confluence content.static interfaceThe configuration information to connect to Confluence as your data source.static interfaceThe endpoint information to connect to your Confluence data source.static interfaceThe configuration of filtering the data source content.static interfaceSettings for customizing steps in the data source content ingestion pipeline.static interfaceThe connection configuration for the data source.static interfaceConfigurations for when you choose fixed-size chunking.static interfaceSettings for hierarchical document chunking for a data source.static interfaceToken settings for a layer in a hierarchical chunking configuration.static interfaceA location for storing content from data sources temporarily as it is processed by custom components in the ingestion pipeline.static interfaceSettings for parsing document contents.static interfaceInstructions for interpreting the contents of a document.static interfaceThe configuration of filtering certain objects or content types of the data source.static interfaceThe specific filters applied to your data source content.static interfaceThe configuration information to connect to Amazon S3 as your data source.static interfaceAn Amazon S3 location.static interfaceThe configuration of the Salesforce content.static interfaceThe configuration information to connect to Salesforce as your data source.static interfaceThe endpoint information to connect to your Salesforce data source.static interfaceThe seed or starting point URL.static interfaceSettings for semantic document chunking for a data source.static interfaceContains the configuration for server-side encryption.static interfaceThe configuration of the SharePoint content.static interfaceThe configuration information to connect to SharePoint as your data source.static interfaceThe endpoint information to connect to your SharePoint data source.static interfaceA Lambda function that processes documents.static interfaceA Lambda function that processes documents.static interfaceA custom processing step for documents moving through a data source ingestion pipeline.static interfaceThe configuration of web URLs that you want to crawl.static interfaceContains details about how to ingest the documents in a data source.static interfaceThe configuration of web URLs that you want to crawl.static interfaceThe rate limits for the URLs that you want to crawl.static interfaceThe configuration details for the web data source.static interfaceThe 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.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe CloudFormation resource type name for this resource class. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCfnDataSource(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDataSource(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.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDataDeletionPolicy(String value) The data deletion policy for the data source.voidThe connection configuration for the data source.voidThe connection configuration for the data source.voidsetDescription(String value) The description of the data source.voidsetKnowledgeBaseId(String value) The unique identifier of the knowledge base to which the data source belongs.voidThe name of the data source.voidContains details about the configuration of the server-side encryption.voidContains details about the configuration of the server-side encryption.voidContains details about how to ingest the documents in the data source.voidContains 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, validatePropertiesMethods inherited from class software.amazon.awscdk.CfnRefElement
getRefMethods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdMethods inherited from class software.constructs.Construct
getNode, isConstructMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
inspectin 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:
renderPropertiesin 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:
getCfnPropertiesin 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.
-