Class: AWSCDK::Personalize::CfnDatasetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
personalize/cfn_dataset_props.rb

Overview

Properties for defining a CfnDataset.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(dataset_group_arn:, dataset_type:, name:, schema_arn:, dataset_import_job: nil) ⇒ CfnDatasetProps

Returns a new instance of CfnDatasetProps.

Parameters:

  • dataset_group_arn (String)

    The Amazon Resource Name (ARN) of the dataset group.

  • dataset_type (String)

    One of the following values:.

  • name (String)

    The name of the dataset.

  • schema_arn (String)

    The ARN of the associated schema.

  • dataset_import_job (AWSCDK::IResolvable, AWSCDK::Personalize::CfnDataset::DatasetImportJobProperty, nil) (defaults to: nil)

    Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.



14
15
16
17
18
19
20
21
22
23
24
25
# File 'personalize/cfn_dataset_props.rb', line 14

def initialize(dataset_group_arn:, dataset_type:, name:, schema_arn:, dataset_import_job: nil)
  @dataset_group_arn = dataset_group_arn
  Jsii::Type.check_type(@dataset_group_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetGroupArn")
  @dataset_type = dataset_type
  Jsii::Type.check_type(@dataset_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetType")
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name")
  @schema_arn = schema_arn
  Jsii::Type.check_type(@schema_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "schemaArn")
  @dataset_import_job = dataset_import_job.is_a?(Hash) ? ::AWSCDK::Personalize::CfnDataset::DatasetImportJobProperty.new(**dataset_import_job.transform_keys(&:to_sym)) : dataset_import_job
  Jsii::Type.check_type(@dataset_import_job, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19wZXJzb25hbGl6ZS5DZm5EYXRhc2V0LkRhdGFzZXRJbXBvcnRKb2JQcm9wZXJ0eSJ9XX19")), "datasetImportJob") unless @dataset_import_job.nil?
end

Instance Attribute Details

#dataset_group_arnString (readonly)

The Amazon Resource Name (ARN) of the dataset group.



31
32
33
# File 'personalize/cfn_dataset_props.rb', line 31

def dataset_group_arn
  @dataset_group_arn
end

#dataset_import_jobAWSCDK::IResolvable, ... (readonly)

Describes a job that imports training data from a data source (Amazon S3 bucket) to an Amazon Personalize dataset.

If you specify a dataset import job as part of a dataset, all dataset import job fields are required.



59
60
61
# File 'personalize/cfn_dataset_props.rb', line 59

def dataset_import_job
  @dataset_import_job
end

#dataset_typeString (readonly)

One of the following values:.

  • Interactions
  • Items
  • Users

You can't use CloudFormation to create an Action Interactions or Actions dataset.



42
43
44
# File 'personalize/cfn_dataset_props.rb', line 42

def dataset_type
  @dataset_type
end

#nameString (readonly)

The name of the dataset.



47
48
49
# File 'personalize/cfn_dataset_props.rb', line 47

def name
  @name
end

#schema_arnString (readonly)

The ARN of the associated schema.



52
53
54
# File 'personalize/cfn_dataset_props.rb', line 52

def schema_arn
  @schema_arn
end

Class Method Details

.jsii_propertiesObject



61
62
63
64
65
66
67
68
69
# File 'personalize/cfn_dataset_props.rb', line 61

def self.jsii_properties
  {
    :dataset_group_arn => "datasetGroupArn",
    :dataset_type => "datasetType",
    :name => "name",
    :schema_arn => "schemaArn",
    :dataset_import_job => "datasetImportJob",
  }
end

Instance Method Details

#to_jsiiObject



71
72
73
74
75
76
77
78
79
80
81
# File 'personalize/cfn_dataset_props.rb', line 71

def to_jsii
  result = {}
  result.merge!({
    "datasetGroupArn" => @dataset_group_arn,
    "datasetType" => @dataset_type,
    "name" => @name,
    "schemaArn" => @schema_arn,
    "datasetImportJob" => @dataset_import_job,
  })
  result.compact
end