Class: AWSCDK::Batch::Reason

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

Overview

Common job exit reasons.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeReason

Returns a new instance of Reason.



8
9
10
# File 'batch/reason.rb', line 8

def initialize
  Jsii::Object.instance_method(:initialize).bind(self).call
end

Class Method Details

.CANNOT_PULL_CONTAINERAWSCDK::Batch::Reason

Will only match if the Docker container could not be pulled.

Returns:

  • (AWSCDK::Batch::Reason)


32
33
34
# File 'batch/reason.rb', line 32

def self.CANNOT_PULL_CONTAINER()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_batch.Reason", "CANNOT_PULL_CONTAINER")
end

.custom(custom_reason_props) ⇒ AWSCDK::Batch::Reason

A custom Reason that can match on multiple conditions.

Note that all specified conditions must be met for this reason to match.

Parameters:

Returns:

  • (AWSCDK::Batch::Reason)


23
24
25
26
27
# File 'batch/reason.rb', line 23

def self.custom(custom_reason_props)
  custom_reason_props = custom_reason_props.is_a?(Hash) ? ::AWSCDK::Batch::CustomReason.new(**custom_reason_props.transform_keys(&:to_sym)) : custom_reason_props
  Jsii::Type.check_type(custom_reason_props, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ3VzdG9tUmVhc29uIn0=")), "customReasonProps")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.Reason", "custom", [custom_reason_props])
end

.jsii_overridable_methodsObject



12
13
14
15
# File 'batch/reason.rb', line 12

def self.jsii_overridable_methods
  {
  }
end

.NON_ZERO_EXIT_CODEAWSCDK::Batch::Reason

Will match any non-zero exit code.

Returns:

  • (AWSCDK::Batch::Reason)


39
40
41
# File 'batch/reason.rb', line 39

def self.NON_ZERO_EXIT_CODE()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_batch.Reason", "NON_ZERO_EXIT_CODE")
end

.SPOT_INSTANCE_RECLAIMEDAWSCDK::Batch::Reason

Will only match if the Spot instance executing the job was reclaimed.

Returns:

  • (AWSCDK::Batch::Reason)


46
47
48
# File 'batch/reason.rb', line 46

def self.SPOT_INSTANCE_RECLAIMED()
  Jsii::Kernel.instance.get_static("aws-cdk-lib.aws_batch.Reason", "SPOT_INSTANCE_RECLAIMED")
end