Class: AWSCDK::Batch::RetryStrategy

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

Overview

Define how Jobs using this JobDefinition respond to different exit conditions.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(action, on) ⇒ RetryStrategy

Returns a new instance of RetryStrategy.

Parameters:



10
11
12
13
14
# File 'batch/retry_strategy.rb', line 10

def initialize(action, on)
  Jsii::Type.check_type(action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQWN0aW9uIn0=")), "action")
  Jsii::Type.check_type(on, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guUmVhc29uIn0=")), "on")
  Jsii::Object.instance_method(:initialize).bind(self).call(action, on)
end

Class Method Details

.jsii_overridable_methodsObject



16
17
18
19
20
21
# File 'batch/retry_strategy.rb', line 16

def self.jsii_overridable_methods
  {
    :action => { kind: :property, name: "action", is_optional: false },
    :on => { kind: :property, name: "on", is_optional: false },
  }
end

.of(action, on) ⇒ AWSCDK::Batch::RetryStrategy

Create a new RetryStrategy.

Parameters:

Returns:

  • (AWSCDK::Batch::RetryStrategy)


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

def self.of(action, on)
  Jsii::Type.check_type(action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQWN0aW9uIn0=")), "action")
  Jsii::Type.check_type(on, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guUmVhc29uIn0=")), "on")
  Jsii::Kernel.instance.call_static("aws-cdk-lib.aws_batch.RetryStrategy", "of", [action, on])
end

Instance Method Details

#actionAWSCDK::Batch::Action

The action to take when the job exits with the Reason specified.



37
38
39
# File 'batch/retry_strategy.rb', line 37

def action()
  jsii_get_property("action")
end

#onAWSCDK::Batch::Reason

If the job exits with this Reason it will trigger the specified Action.



44
45
46
# File 'batch/retry_strategy.rb', line 44

def on()
  jsii_get_property("on")
end