Class: AWSCDK::StepFunctionsTasks::WorkerConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::StepFunctionsTasks::WorkerConfigurationProperty
- Defined in:
- step_functions_tasks/worker_configuration_property.rb
Overview
Properties for the worker configuration.
Instance Attribute Summary collapse
-
#number_of_workers ⇒ Numeric
readonly
The number of workers of a defined
WorkerTypethat are allocated when a job runs. -
#worker_type ⇒ AWSCDK::StepFunctionsTasks::WorkerType?
readonly
deprecated
Deprecated.
Use
workerTypeV2for more flexibility in defining worker types. -
#worker_type_v2 ⇒ AWSCDK::StepFunctionsTasks::WorkerTypeV2?
readonly
The type of predefined worker that is allocated when a job runs.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(number_of_workers:, worker_type: nil, worker_type_v2: nil) ⇒ WorkerConfigurationProperty
constructor
A new instance of WorkerConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(number_of_workers:, worker_type: nil, worker_type_v2: nil) ⇒ WorkerConfigurationProperty
Returns a new instance of WorkerConfigurationProperty.
10 11 12 13 14 15 16 17 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 10 def initialize(number_of_workers:, worker_type: nil, worker_type_v2: nil) @number_of_workers = number_of_workers Jsii::Type.check_type(@number_of_workers, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "numberOfWorkers") @worker_type = worker_type Jsii::Type.check_type(@worker_type, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5Xb3JrZXJUeXBlIn0=")), "workerType") unless @worker_type.nil? @worker_type_v2 = worker_type_v2 Jsii::Type.check_type(@worker_type_v2, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3Nfc3RlcGZ1bmN0aW9uc190YXNrcy5Xb3JrZXJUeXBlVjIifQ==")), "workerTypeV2") unless @worker_type_v2.nil? end |
Instance Attribute Details
#number_of_workers ⇒ Numeric (readonly)
The number of workers of a defined WorkerType that are allocated when a job runs.
22 23 24 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 22 def number_of_workers @number_of_workers end |
#worker_type ⇒ AWSCDK::StepFunctionsTasks::WorkerType? (readonly)
Use workerTypeV2 for more flexibility in defining worker types.
Default: - must choose one of workerType or workerTypeV2
The type of predefined worker that is allocated when a job runs.
28 29 30 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 28 def worker_type @worker_type end |
#worker_type_v2 ⇒ AWSCDK::StepFunctionsTasks::WorkerTypeV2? (readonly)
Default: - must choose one of workerType or workerTypeV2
The type of predefined worker that is allocated when a job runs.
Can be one of the
predefined values or dynamic values using WorkerTypeV2.of(...).
36 37 38 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 36 def worker_type_v2 @worker_type_v2 end |
Class Method Details
.jsii_properties ⇒ Object
38 39 40 41 42 43 44 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 38 def self.jsii_properties { :number_of_workers => "numberOfWorkers", :worker_type => "workerType", :worker_type_v2 => "workerTypeV2", } end |
Instance Method Details
#to_jsii ⇒ Object
46 47 48 49 50 51 52 53 54 |
# File 'step_functions_tasks/worker_configuration_property.rb', line 46 def to_jsii result = {} result.merge!({ "numberOfWorkers" => @number_of_workers, "workerType" => @worker_type, "workerTypeV2" => @worker_type_v2, }) result.compact end |