Class: AWSCDK::Forecast::CfnDatasetProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
forecast/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_name:, dataset_type:, domain:, schema:, data_frequency: nil, encryption_config: nil, tags: nil) ⇒ CfnDatasetProps

Returns a new instance of CfnDatasetProps.

Parameters:

  • dataset_name (String)

    The name of the dataset.

  • dataset_type (String)

    The dataset type.

  • domain (String)

    The domain associated with the dataset.

  • schema (Object)

    The schema for the dataset.

  • data_frequency (String, nil) (defaults to: nil)

    The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.

  • encryption_config (Object, nil) (defaults to: nil)

    A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.

  • tags (Array<AWSCDK::Forecast::CfnDataset::TagsItemsProperty>, nil) (defaults to: nil)

    An array of key-value pairs to apply to this resource.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'forecast/cfn_dataset_props.rb', line 16

def initialize(dataset_name:, dataset_type:, domain:, schema:, data_frequency: nil, encryption_config: nil, tags: nil)
  @dataset_name = dataset_name
  Jsii::Type.check_type(@dataset_name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetName")
  @dataset_type = dataset_type
  Jsii::Type.check_type(@dataset_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "datasetType")
  @domain = domain
  Jsii::Type.check_type(@domain, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "domain")
  @schema = schema
  Jsii::Type.check_type(@schema, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "schema")
  @data_frequency = data_frequency
  Jsii::Type.check_type(@data_frequency, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "dataFrequency") unless @data_frequency.nil?
  @encryption_config = encryption_config
  Jsii::Type.check_type(@encryption_config, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "encryptionConfig") unless @encryption_config.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::Forecast::CfnDataset::TagsItemsProperty.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19mb3JlY2FzdC5DZm5EYXRhc2V0LlRhZ3NJdGVtc1Byb3BlcnR5In0sImtpbmQiOiJhcnJheSJ9fQ==")), "tags") unless @tags.nil?
end

Instance Attribute Details

#data_frequencyString? (readonly)

The frequency of data collection. This parameter is required for RELATED_TIME_SERIES datasets.

Valid intervals are an integer followed by Y (Year), M (Month), W (Week), D (Day), H (Hour), and min (Minute). For example, "1D" indicates every day and "15min" indicates every 15 minutes. You cannot specify a value that would overlap with the next larger frequency. That means, for example, you cannot specify a frequency of 60 minutes, because that is equivalent to 1 hour. The valid values for each frequency are the following:

  • Minute - 1-59
  • Hour - 1-23
  • Day - 1-6
  • Week - 1-4
  • Month - 1-11
  • Year - 1

Thus, if you want every other week forecasts, specify "2W". Or, if you want quarterly forecasts, you specify "3M".



70
71
72
# File 'forecast/cfn_dataset_props.rb', line 70

def data_frequency
  @data_frequency
end

#dataset_nameString (readonly)

The name of the dataset.



37
38
39
# File 'forecast/cfn_dataset_props.rb', line 37

def dataset_name
  @dataset_name
end

#dataset_typeString (readonly)

The dataset type.



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

def dataset_type
  @dataset_type
end

#domainString (readonly)

The domain associated with the dataset.



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

def domain
  @domain
end

#encryption_configObject? (readonly)

A Key Management Service (KMS) key and the Identity and Access Management (IAM) role that Amazon Forecast can assume to access the key.



75
76
77
# File 'forecast/cfn_dataset_props.rb', line 75

def encryption_config
  @encryption_config
end

#schemaObject (readonly)

The schema for the dataset.

The schema attributes and their order must match the fields in your data. The dataset Domain and DatasetType that you choose determine the minimum required fields in your training data. For information about the required fields for a specific dataset domain and type, see Dataset Domains and Dataset Types .



54
55
56
# File 'forecast/cfn_dataset_props.rb', line 54

def schema
  @schema
end

#tagsArray<AWSCDK::Forecast::CfnDataset::TagsItemsProperty>? (readonly)

An array of key-value pairs to apply to this resource.

For more information, see Tag .



82
83
84
# File 'forecast/cfn_dataset_props.rb', line 82

def tags
  @tags
end

Class Method Details

.jsii_propertiesObject



84
85
86
87
88
89
90
91
92
93
94
# File 'forecast/cfn_dataset_props.rb', line 84

def self.jsii_properties
  {
    :dataset_name => "datasetName",
    :dataset_type => "datasetType",
    :domain => "domain",
    :schema => "schema",
    :data_frequency => "dataFrequency",
    :encryption_config => "encryptionConfig",
    :tags => "tags",
  }
end

Instance Method Details

#to_jsiiObject



96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'forecast/cfn_dataset_props.rb', line 96

def to_jsii
  result = {}
  result.merge!({
    "datasetName" => @dataset_name,
    "datasetType" => @dataset_type,
    "domain" => @domain,
    "schema" => @schema,
    "dataFrequency" => @data_frequency,
    "encryptionConfig" => @encryption_config,
    "tags" => @tags,
  })
  result.compact
end