Class CfnDataset
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.personalize.CfnDataset
- All Implemented Interfaces:
IEnvironmentAware,IInspectable,IDatasetRef,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.118.0 (build 02eec31)",
date="2025-11-10T13:40:10.801Z")
@Stability(Stable)
public class CfnDataset
extends CfnResource
implements IInspectable, IDatasetRef
Creates an empty dataset and adds it to the specified dataset group.
Use CreateDatasetImportJob to import your training data to a dataset.
There are 5 types of datasets:
- Item interactions
- Items
- Users
- Action interactions (you can't use CloudFormation to create an Action interactions dataset)
- Actions (you can't use CloudFormation to create an Actions dataset)
Each dataset type has an associated schema with required field types. Only the Item interactions dataset is required in order to train a model (also referred to as creating a solution).
A dataset can be in one of the following states:
- CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
- DELETE PENDING > DELETE IN_PROGRESS
To get the status of the dataset, call DescribeDataset .
Related APIs - CreateDatasetGroup
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.personalize.*;
Object dataSource;
CfnDataset cfnDataset = CfnDataset.Builder.create(this, "MyCfnDataset")
.datasetGroupArn("datasetGroupArn")
.datasetType("datasetType")
.name("name")
.schemaArn("schemaArn")
// the properties below are optional
.datasetImportJob(DatasetImportJobProperty.builder()
.datasetArn("datasetArn")
.datasetImportJobArn("datasetImportJobArn")
.dataSource(dataSource)
.jobName("jobName")
.roleArn("roleArn")
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA fluent builder forCfnDataset.static interfaceDescribes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.static interfaceDescribes the data source that contains the data to upload to a dataset, or the list of records to delete from Amazon Personalize.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.services.personalize.IDatasetRef
IDatasetRef.Jsii$Default, IDatasetRef.Jsii$ProxyNested 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
ConstructorsModifierConstructorDescriptionprotectedCfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedCfnDataset(software.amazon.jsii.JsiiObjectRef objRef) CfnDataset(software.constructs.Construct scope, String id, CfnDatasetProps props) -
Method Summary
Modifier and TypeMethodDescriptionThe Amazon Resource Name (ARN) of the dataset.The Amazon Resource Name (ARN) of the dataset group.Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.A reference to a Dataset resource.One of the following values:.getName()The name of the dataset.The ARN of the associated schema.voidinspect(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties(Map<String, Object> props) voidsetDatasetGroupArn(String value) The Amazon Resource Name (ARN) of the dataset group.voidsetDatasetImportJob(IResolvable value) Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.voidDescribes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.voidsetDatasetType(String value) One of the following values:.voidThe name of the dataset.voidsetSchemaArn(String value) The ARN of the associated schema.Methods inherited from class software.amazon.awscdk.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getEnv, 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.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IEnvironmentAware
getEnvMethods 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
-
CfnDataset
protected CfnDataset(software.amazon.jsii.JsiiObjectRef objRef) -
CfnDataset
protected CfnDataset(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnDataset
@Stability(Stable) public CfnDataset(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull CfnDatasetProps 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.
-
getAttrDatasetArn
The Amazon Resource Name (ARN) of the dataset. -
getCfnProperties
- Overrides:
getCfnPropertiesin classCfnResource
-
getDatasetRef
A reference to a Dataset resource.- Specified by:
getDatasetRefin interfaceIDatasetRef
-
getDatasetGroupArn
The Amazon Resource Name (ARN) of the dataset group. -
setDatasetGroupArn
The Amazon Resource Name (ARN) of the dataset group. -
getDatasetType
One of the following values:. -
setDatasetType
One of the following values:. -
getName
The name of the dataset. -
setName
The name of the dataset. -
getSchemaArn
The ARN of the associated schema. -
setSchemaArn
The ARN of the associated schema. -
getDatasetImportJob
Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.Returns union: either
IResolvableorCfnDataset.DatasetImportJobProperty -
setDatasetImportJob
Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset. -
setDatasetImportJob
@Stability(Stable) public void setDatasetImportJob(@Nullable CfnDataset.DatasetImportJobProperty value) Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.
-