CfnDatasetPropsMixin
- class aws_cdk.mixins_preview.aws_personalize.mixins.CfnDatasetPropsMixin(props, *, strategy=None)
Bases:
MixinCreates 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 interactionsdataset 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
- See:
http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-personalize-dataset.html
- CloudformationResource:
AWS::Personalize::Dataset
- 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_personalize import mixins as personalize_mixins # data_source: Any cfn_dataset_props_mixin = personalize_mixins.CfnDatasetPropsMixin(personalize_mixins.CfnDatasetMixinProps( dataset_group_arn="datasetGroupArn", dataset_import_job=personalize_mixins.CfnDatasetPropsMixin.DatasetImportJobProperty( dataset_arn="datasetArn", dataset_import_job_arn="datasetImportJobArn", data_source=data_source, job_name="jobName", role_arn="roleArn" ), dataset_type="datasetType", name="name", schema_arn="schemaArn" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Personalize::Dataset.- Parameters:
props (
Union[CfnDatasetMixinProps,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 = ['datasetGroupArn', 'datasetImportJob', 'datasetType', 'name', 'schemaArn']
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
DatasetImportJobProperty
- class CfnDatasetPropsMixin.DatasetImportJobProperty(*, dataset_arn=None, dataset_import_job_arn=None, data_source=None, job_name=None, role_arn=None)
Bases:
objectDescribes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.
A dataset import job can be in one of the following states:
CREATE PENDING > CREATE IN_PROGRESS > ACTIVE -or- CREATE FAILED
If you specify a dataset import job as part of a dataset, all dataset import job fields are required.
- Parameters:
dataset_arn (
Optional[str]) – The Amazon Resource Name (ARN) of the dataset that receives the imported data.dataset_import_job_arn (
Optional[str]) – The ARN of the dataset import job.data_source (
Any) – The Amazon S3 bucket that contains the training data to import.job_name (
Optional[str]) – The name of the import job.role_arn (
Optional[str]) – The ARN of the IAM role that has permissions to read from the Amazon S3 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_personalize import mixins as personalize_mixins # data_source: Any dataset_import_job_property = personalize_mixins.CfnDatasetPropsMixin.DatasetImportJobProperty( dataset_arn="datasetArn", dataset_import_job_arn="datasetImportJobArn", data_source=data_source, job_name="jobName", role_arn="roleArn" )
Attributes
- data_source
The Amazon S3 bucket that contains the training data to import.
- dataset_arn
The Amazon Resource Name (ARN) of the dataset that receives the imported data.
- dataset_import_job_arn
The ARN of the dataset import job.
- job_name
The name of the import job.
- role_arn
The ARN of the IAM role that has permissions to read from the Amazon S3 data source.