Class: AWSCDK::Glue::CfnMLTransformProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
glue/cfn_ml_transform_props.rb

Overview

Properties for defining a CfnMLTransform.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_record_tables:, role:, transform_parameters:, description: nil, glue_version: nil, max_capacity: nil, max_retries: nil, name: nil, number_of_workers: nil, tags: nil, timeout: nil, transform_encryption: nil, worker_type: nil) ⇒ CfnMLTransformProps

Returns a new instance of CfnMLTransformProps.

Parameters:

  • input_record_tables (AWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::InputRecordTablesProperty)

    A list of AWS Glue table definitions used by the transform.

  • role (String)

    The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.

  • transform_parameters (AWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::TransformParametersProperty)

    The algorithm-specific parameters that are associated with the machine learning transform.

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

    A user-defined, long-form description text for the machine learning transform.

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

    This value determines which version of AWS Glue this machine learning transform is compatible with.

  • max_capacity (Numeric, nil) (defaults to: nil)

    The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform.

  • max_retries (Numeric, nil) (defaults to: nil)

    The maximum number of times to retry after an MLTaskRun of the machine learning transform fails.

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

    A user-defined name for the machine learning transform. Names are required to be unique. Name is optional:.

  • number_of_workers (Numeric, nil) (defaults to: nil)

    The number of workers of a defined workerType that are allocated when a task of the transform runs.

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

    The tags to use with this machine learning transform.

  • timeout (Numeric, nil) (defaults to: nil)

    The timeout in minutes of the machine learning transform.

  • transform_encryption (AWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::TransformEncryptionProperty, nil) (defaults to: nil)

    The encryption-at-rest settings of the transform that apply to accessing user data.

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

    The type of predefined worker that is allocated when a task of this transform runs.



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'glue/cfn_ml_transform_props.rb', line 22

def initialize(input_record_tables:, role:, transform_parameters:, description: nil, glue_version: nil, max_capacity: nil, max_retries: nil, name: nil, number_of_workers: nil, tags: nil, timeout: nil, transform_encryption: nil, worker_type: nil)
  @input_record_tables = input_record_tables.is_a?(Hash) ? ::AWSCDK::Glue::CfnMLTransform::InputRecordTablesProperty.new(**input_record_tables.transform_keys(&:to_sym)) : input_record_tables
  Jsii::Type.check_type(@input_record_tables, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbk1MVHJhbnNmb3JtLklucHV0UmVjb3JkVGFibGVzUHJvcGVydHkifV19fQ==")), "inputRecordTables")
  @role = role
  Jsii::Type.check_type(@role, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "role")
  @transform_parameters = transform_parameters.is_a?(Hash) ? ::AWSCDK::Glue::CfnMLTransform::TransformParametersProperty.new(**transform_parameters.transform_keys(&:to_sym)) : transform_parameters
  Jsii::Type.check_type(@transform_parameters, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbk1MVHJhbnNmb3JtLlRyYW5zZm9ybVBhcmFtZXRlcnNQcm9wZXJ0eSJ9XX19")), "transformParameters")
  @description = description
  Jsii::Type.check_type(@description, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "description") unless @description.nil?
  @glue_version = glue_version
  Jsii::Type.check_type(@glue_version, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "glueVersion") unless @glue_version.nil?
  @max_capacity = max_capacity
  Jsii::Type.check_type(@max_capacity, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxCapacity") unless @max_capacity.nil?
  @max_retries = max_retries
  Jsii::Type.check_type(@max_retries, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxRetries") unless @max_retries.nil?
  @name = name
  Jsii::Type.check_type(@name, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "name") unless @name.nil?
  @number_of_workers = number_of_workers
  Jsii::Type.check_type(@number_of_workers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "numberOfWorkers") unless @number_of_workers.nil?
  @tags = tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "tags") unless @tags.nil?
  @timeout = timeout
  Jsii::Type.check_type(@timeout, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "timeout") unless @timeout.nil?
  @transform_encryption = transform_encryption.is_a?(Hash) ? ::AWSCDK::Glue::CfnMLTransform::TransformEncryptionProperty.new(**transform_encryption.transform_keys(&:to_sym)) : transform_encryption
  Jsii::Type.check_type(@transform_encryption, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19nbHVlLkNmbk1MVHJhbnNmb3JtLlRyYW5zZm9ybUVuY3J5cHRpb25Qcm9wZXJ0eSJ9XX19")), "transformEncryption") unless @transform_encryption.nil?
  @worker_type = worker_type
  Jsii::Type.check_type(@worker_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "workerType") unless @worker_type.nil?
end

Instance Attribute Details

#descriptionString? (readonly)

A user-defined, long-form description text for the machine learning transform.



75
76
77
# File 'glue/cfn_ml_transform_props.rb', line 75

def description
  @description
end

#glue_versionString? (readonly)

This value determines which version of AWS Glue this machine learning transform is compatible with.

Glue 1.0 is recommended for most customers. If the value is not set, the Glue compatibility defaults to Glue 0.9. For more information, see AWS Glue Versions in the developer guide.



82
83
84
# File 'glue/cfn_ml_transform_props.rb', line 82

def glue_version
  @glue_version
end

#input_record_tablesAWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::InputRecordTablesProperty (readonly)

A list of AWS Glue table definitions used by the transform.



55
56
57
# File 'glue/cfn_ml_transform_props.rb', line 55

def input_record_tables
  @input_record_tables
end

#max_capacityNumeric? (readonly)

The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform.

You can allocate from 2 to 100 DPUs; the default is 10. A DPU is a relative measure of processing power that consists of 4 vCPUs of compute capacity and 16 GB of memory. For more information, see the AWS Glue pricing page .

MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType .

  • If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set.
  • If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set.
  • If WorkerType is set, then NumberOfWorkers is required (and vice versa).
  • MaxCapacity and NumberOfWorkers must both be at least 1.

When the WorkerType field is set to a value other than Standard , the MaxCapacity field is set automatically and becomes read-only.



98
99
100
# File 'glue/cfn_ml_transform_props.rb', line 98

def max_capacity
  @max_capacity
end

#max_retriesNumeric? (readonly)

The maximum number of times to retry after an MLTaskRun of the machine learning transform fails.



103
104
105
# File 'glue/cfn_ml_transform_props.rb', line 103

def max_retries
  @max_retries
end

#nameString? (readonly)

A user-defined name for the machine learning transform. Names are required to be unique. Name is optional:.

  • If you supply Name , the stack cannot be repeatedly created.
  • If Name is not provided, a randomly generated name will be used instead.


111
112
113
# File 'glue/cfn_ml_transform_props.rb', line 111

def name
  @name
end

#number_of_workersNumeric? (readonly)

The number of workers of a defined workerType that are allocated when a task of the transform runs.

If WorkerType is set, then NumberOfWorkers is required (and vice versa).



118
119
120
# File 'glue/cfn_ml_transform_props.rb', line 118

def number_of_workers
  @number_of_workers
end

#roleString (readonly)

The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.

The required permissions include both AWS Glue service role permissions to AWS Glue resources, and Amazon S3 permissions required by the transform.

  • This role needs AWS Glue service role permissions to allow access to resources in AWS Glue . See Attach a Policy to IAM Users That Access AWS Glue .
  • This role needs permission to your Amazon Simple Storage Service (Amazon S3) sources, targets, temporary directory, scripts, and any libraries used by the task run for this transform.


65
66
67
# File 'glue/cfn_ml_transform_props.rb', line 65

def role
  @role
end

#tagsObject? (readonly)

The tags to use with this machine learning transform.

You may use tags to limit access to the machine learning transform. For more information about tags in AWS Glue , see AWS Tags in AWS Glue in the developer guide.



125
126
127
# File 'glue/cfn_ml_transform_props.rb', line 125

def tags
  @tags
end

#timeoutNumeric? (readonly)

The timeout in minutes of the machine learning transform.



130
131
132
# File 'glue/cfn_ml_transform_props.rb', line 130

def timeout
  @timeout
end

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

The encryption-at-rest settings of the transform that apply to accessing user data.

Machine learning transforms can access user data encrypted in Amazon S3 using KMS.

Additionally, imported labels and trained transforms can now be encrypted using a customer provided KMS key.



141
142
143
# File 'glue/cfn_ml_transform_props.rb', line 141

def transform_encryption
  @transform_encryption
end

#transform_parametersAWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::TransformParametersProperty (readonly)

The algorithm-specific parameters that are associated with the machine learning transform.



70
71
72
# File 'glue/cfn_ml_transform_props.rb', line 70

def transform_parameters
  @transform_parameters
end

#worker_typeString? (readonly)

The type of predefined worker that is allocated when a task of this transform runs.

Accepts a value of Standard, G.1X, or G.2X.

  • For the Standard worker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker.
  • For the G.1X worker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker.
  • For the G.2X worker type, each worker provides 8 vCPU, 32 GB of memory and a 128GB disk, and 1 executor per worker.

MaxCapacity is a mutually exclusive option with NumberOfWorkers and WorkerType .

  • If either NumberOfWorkers or WorkerType is set, then MaxCapacity cannot be set.
  • If MaxCapacity is set then neither NumberOfWorkers or WorkerType can be set.
  • If WorkerType is set, then NumberOfWorkers is required (and vice versa).
  • MaxCapacity and NumberOfWorkers must both be at least 1.


159
160
161
# File 'glue/cfn_ml_transform_props.rb', line 159

def worker_type
  @worker_type
end

Class Method Details

.jsii_propertiesObject



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'glue/cfn_ml_transform_props.rb', line 161

def self.jsii_properties
  {
    :input_record_tables => "inputRecordTables",
    :role => "role",
    :transform_parameters => "transformParameters",
    :description => "description",
    :glue_version => "glueVersion",
    :max_capacity => "maxCapacity",
    :max_retries => "maxRetries",
    :name => "name",
    :number_of_workers => "numberOfWorkers",
    :tags => "tags",
    :timeout => "timeout",
    :transform_encryption => "transformEncryption",
    :worker_type => "workerType",
  }
end

Instance Method Details

#to_jsiiObject



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'glue/cfn_ml_transform_props.rb', line 179

def to_jsii
  result = {}
  result.merge!({
    "inputRecordTables" => @input_record_tables,
    "role" => @role,
    "transformParameters" => @transform_parameters,
    "description" => @description,
    "glueVersion" => @glue_version,
    "maxCapacity" => @max_capacity,
    "maxRetries" => @max_retries,
    "name" => @name,
    "numberOfWorkers" => @number_of_workers,
    "tags" => @tags,
    "timeout" => @timeout,
    "transformEncryption" => @transform_encryption,
    "workerType" => @worker_type,
  })
  result.compact
end