Class: AWSCDK::Batch::OrderedComputeEnvironment

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
batch/ordered_compute_environment.rb

Overview

Assigns an order to a ComputeEnvironment.

The JobQueue will prioritize the lowest-order ComputeEnvironment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(compute_environment:, order:) ⇒ OrderedComputeEnvironment

Returns a new instance of OrderedComputeEnvironment.

Parameters:



11
12
13
14
15
16
# File 'batch/ordered_compute_environment.rb', line 11

def initialize(compute_environment:, order:)
  @compute_environment = compute_environment
  Jsii::Type.check_type(@compute_environment, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5pbnRlcmZhY2VzLmF3c19iYXRjaC5JQ29tcHV0ZUVudmlyb25tZW50UmVmIn0=")), "computeEnvironment")
  @order = order
  Jsii::Type.check_type(@order, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "order")
end

Instance Attribute Details

#compute_environmentAWSCDK::Interfaces::AWSBatch::IComputeEnvironmentRef (readonly)

The ComputeEnvironment to link to this JobQueue.



21
22
23
# File 'batch/ordered_compute_environment.rb', line 21

def compute_environment
  @compute_environment
end

#orderNumeric (readonly)

The order associated with computeEnvironment.

Returns:

  • (Numeric)


25
26
27
# File 'batch/ordered_compute_environment.rb', line 25

def order
  @order
end

Class Method Details

.jsii_propertiesObject



27
28
29
30
31
32
# File 'batch/ordered_compute_environment.rb', line 27

def self.jsii_properties
  {
    :compute_environment => "computeEnvironment",
    :order => "order",
  }
end

Instance Method Details

#to_jsiiObject



34
35
36
37
38
39
40
41
# File 'batch/ordered_compute_environment.rb', line 34

def to_jsii
  result = {}
  result.merge!({
    "computeEnvironment" => @compute_environment,
    "order" => @order,
  })
  result.compact
end