Class: AWSCDK::StepFunctionsTasks::WorkerConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
step_functions_tasks/worker_configuration_property.rb

Overview

Properties for the worker configuration.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(number_of_workers:, worker_type: nil, worker_type_v2: nil) ⇒ WorkerConfigurationProperty

Returns a new instance of WorkerConfigurationProperty.

Parameters:

  • number_of_workers (Numeric)

    The number of workers of a defined WorkerType that are allocated when a job runs.

  • worker_type (AWSCDK::StepFunctionsTasks::WorkerType, nil) (defaults to: nil)

    The type of predefined worker that is allocated when a job runs.

  • worker_type_v2 (AWSCDK::StepFunctionsTasks::WorkerTypeV2, nil) (defaults to: nil)

    The type of predefined worker that is allocated when a job runs.



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_workersNumeric (readonly)

The number of workers of a defined WorkerType that are allocated when a job runs.

Returns:

  • (Numeric)


22
23
24
# File 'step_functions_tasks/worker_configuration_property.rb', line 22

def number_of_workers
  @number_of_workers
end

#worker_typeAWSCDK::StepFunctionsTasks::WorkerType? (readonly)

Deprecated.

Use workerTypeV2 for more flexibility in defining worker types.

Note:

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_v2AWSCDK::StepFunctionsTasks::WorkerTypeV2? (readonly)

Note:

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_propertiesObject



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_jsiiObject



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