Class: AWSCDK::Batch::CustomReason
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CustomReason
- Defined in:
- batch/custom_reason.rb
Overview
The corresponding Action will only be taken if all of the conditions specified here are met.
Instance Attribute Summary collapse
-
#on_exit_code ⇒ String?
readonly
A glob string that will match on the job exit code.
-
#on_reason ⇒ String?
readonly
A glob string that will match on the reason returned by the exiting job For example,
'CannotPullContainerError*'indicates that container needed to start the job could not be pulled. -
#on_status_reason ⇒ String?
readonly
A glob string that will match on the statusReason returned by the exiting job.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(on_exit_code: nil, on_reason: nil, on_status_reason: nil) ⇒ CustomReason
constructor
A new instance of CustomReason.
- #to_jsii ⇒ Object
Constructor Details
#initialize(on_exit_code: nil, on_reason: nil, on_status_reason: nil) ⇒ CustomReason
Returns a new instance of CustomReason.
10 11 12 13 14 15 16 17 |
# File 'batch/custom_reason.rb', line 10 def initialize(on_exit_code: nil, on_reason: nil, on_status_reason: nil) @on_exit_code = on_exit_code Jsii::Type.check_type(@on_exit_code, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "onExitCode") unless @on_exit_code.nil? @on_reason = on_reason Jsii::Type.check_type(@on_reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "onReason") unless @on_reason.nil? @on_status_reason = on_status_reason Jsii::Type.check_type(@on_status_reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "onStatusReason") unless @on_status_reason.nil? end |
Instance Attribute Details
#on_exit_code ⇒ String? (readonly)
Default: - will not match on the exit code
A glob string that will match on the job exit code.
For example, '40*' will match 400, 404, 40123456789012
25 26 27 |
# File 'batch/custom_reason.rb', line 25 def on_exit_code @on_exit_code end |
#on_reason ⇒ String? (readonly)
Default: - will not match on the reason
A glob string that will match on the reason returned by the exiting job For example, 'CannotPullContainerError*' indicates that container needed to start the job could not be pulled.
30 31 32 |
# File 'batch/custom_reason.rb', line 30 def on_reason @on_reason end |
#on_status_reason ⇒ String? (readonly)
Default: - will not match on the status reason
A glob string that will match on the statusReason returned by the exiting job.
For example, 'Host EC2*' indicates that the spot instance has been reclaimed.
37 38 39 |
# File 'batch/custom_reason.rb', line 37 def on_status_reason @on_status_reason end |
Class Method Details
.jsii_properties ⇒ Object
39 40 41 42 43 44 45 |
# File 'batch/custom_reason.rb', line 39 def self.jsii_properties { :on_exit_code => "onExitCode", :on_reason => "onReason", :on_status_reason => "onStatusReason", } end |
Instance Method Details
#to_jsii ⇒ Object
47 48 49 50 51 52 53 54 55 |
# File 'batch/custom_reason.rb', line 47 def to_jsii result = {} result.merge!({ "onExitCode" => @on_exit_code, "onReason" => @on_reason, "onStatusReason" => @on_status_reason, }) result.compact end |