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.101.0 (build b95fe5d)",
date="2024-07-12T19:33:58.303Z")
@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() .s3Configuration(S3DataSourceConfigurationProperty.builder() .bucketArn("bucketArn") // the properties below are optional .bucketOwnerAccountId("bucketOwnerAccountId") .inclusionPrefixes(List.of("inclusionPrefixes")) .build()) .type("type") .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()) .build()) .build()) .build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A fluent builder forCfnDataSource
.static interface
Details about how to chunk the documents in the data source.static interface
Contains details about how a data source is stored.static interface
Configurations for when you choose fixed-size chunking.static interface
Contains information about the S3 configuration of the data source.static interface
Contains the configuration for server-side encryption.static interface
Contains details about how to ingest the documents in a data source.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 a data source.Contains details about how the data source is stored.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 a data source.void
Contains details about how the data source is stored.void
Contains details about how the data source is stored.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
Contains details about how the data source is stored. -
setDataSourceConfiguration
Contains details about how the data source is stored. -
setDataSourceConfiguration
@Stability(Stable) public void setDataSourceConfiguration(@NotNull CfnDataSource.DataSourceConfigurationProperty value) Contains details about how the data source is stored. -
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 a data source. -
setDataDeletionPolicy
The data deletion policy for a 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.
-