Class: AWSCDK::Glue::CfnMLTransformProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Glue::CfnMLTransformProps
- Defined in:
- glue/cfn_ml_transform_props.rb
Overview
Properties for defining a CfnMLTransform.
Instance Attribute Summary collapse
-
#description ⇒ String?
readonly
A user-defined, long-form description text for the machine learning transform.
-
#glue_version ⇒ String?
readonly
This value determines which version of AWS Glue this machine learning transform is compatible with.
-
#input_record_tables ⇒ AWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::InputRecordTablesProperty
readonly
A list of AWS Glue table definitions used by the transform.
-
#max_capacity ⇒ Numeric?
readonly
The number of AWS Glue data processing units (DPUs) that are allocated to task runs for this transform.
-
#max_retries ⇒ Numeric?
readonly
The maximum number of times to retry after an
MLTaskRunof the machine learning transform fails. -
#name ⇒ String?
readonly
A user-defined name for the machine learning transform.
-
#number_of_workers ⇒ Numeric?
readonly
The number of workers of a defined
workerTypethat are allocated when a task of the transform runs. -
#role ⇒ String
readonly
The name or Amazon Resource Name (ARN) of the IAM role with the required permissions.
-
#tags ⇒ Object?
readonly
The tags to use with this machine learning transform.
-
#timeout ⇒ Numeric?
readonly
The timeout in minutes of the machine learning transform.
-
#transform_encryption ⇒ AWSCDK::IResolvable, ...
readonly
The encryption-at-rest settings of the transform that apply to accessing user data.
-
#transform_parameters ⇒ AWSCDK::IResolvable, AWSCDK::Glue::CfnMLTransform::TransformParametersProperty
readonly
The algorithm-specific parameters that are associated with the machine learning transform.
-
#worker_type ⇒ String?
readonly
The type of predefined worker that is allocated when a task of this transform runs.
Class Method Summary collapse
Instance Method Summary collapse
-
#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
constructor
A new instance of CfnMLTransformProps.
- #to_jsii ⇒ Object
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.
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 = 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
#description ⇒ String? (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_version ⇒ String? (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_tables ⇒ AWSCDK::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_capacity ⇒ Numeric? (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
NumberOfWorkersorWorkerTypeis set, thenMaxCapacitycannot be set. - If
MaxCapacityis set then neitherNumberOfWorkersorWorkerTypecan be set. - If
WorkerTypeis set, thenNumberOfWorkersis required (and vice versa). MaxCapacityandNumberOfWorkersmust 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_retries ⇒ Numeric? (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 |
#name ⇒ String? (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
Nameis 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_workers ⇒ Numeric? (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 |
#role ⇒ String (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 |
#tags ⇒ Object? (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 end |
#timeout ⇒ Numeric? (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_encryption ⇒ AWSCDK::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_parameters ⇒ AWSCDK::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_type ⇒ String? (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
Standardworker type, each worker provides 4 vCPU, 16 GB of memory and a 50GB disk, and 2 executors per worker. - For the
G.1Xworker type, each worker provides 4 vCPU, 16 GB of memory and a 64GB disk, and 1 executor per worker. - For the
G.2Xworker 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
NumberOfWorkersorWorkerTypeis set, thenMaxCapacitycannot be set. - If
MaxCapacityis set then neitherNumberOfWorkersorWorkerTypecan be set. - If
WorkerTypeis set, thenNumberOfWorkersis required (and vice versa). MaxCapacityandNumberOfWorkersmust 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_properties ⇒ Object
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_jsii ⇒ Object
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 |