Class: AWSCDK::Batch::JobStateTimeLimitAction
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::JobStateTimeLimitAction
- Defined in:
- batch/job_state_time_limit_action.rb
Overview
Specifies an action that AWS Batch will take after the job has remained at the head of the queue in the specified state for longer than the specified time.
Instance Attribute Summary collapse
-
#action ⇒ AWSCDK::Batch::JobStateTimeLimitActionsAction?
readonly
The action to take when a job is at the head of the job queue in the specified state for the specified period of time.
-
#max_time ⇒ AWSCDK::Duration
readonly
The approximate amount of time, that must pass with the job in the specified state before the action is taken.
-
#reason ⇒ AWSCDK::Batch::JobStateTimeLimitActionsReason
readonly
The reason to log for the action being taken.
-
#state ⇒ AWSCDK::Batch::JobStateTimeLimitActionsState?
readonly
The state of the job needed to trigger the action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(max_time:, reason:, action: nil, state: nil) ⇒ JobStateTimeLimitAction
constructor
A new instance of JobStateTimeLimitAction.
- #to_jsii ⇒ Object
Constructor Details
#initialize(max_time:, reason:, action: nil, state: nil) ⇒ JobStateTimeLimitAction
Returns a new instance of JobStateTimeLimitAction.
11 12 13 14 15 16 17 18 19 20 |
# File 'batch/job_state_time_limit_action.rb', line 11 def initialize(max_time:, reason:, action: nil, state: nil) @max_time = max_time Jsii::Type.check_type(@max_time, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5EdXJhdGlvbiJ9")), "maxTime") @reason = reason Jsii::Type.check_type(@reason, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSm9iU3RhdGVUaW1lTGltaXRBY3Rpb25zUmVhc29uIn0=")), "reason") @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSm9iU3RhdGVUaW1lTGltaXRBY3Rpb25zQWN0aW9uIn0=")), "action") unless @action.nil? @state = state Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guSm9iU3RhdGVUaW1lTGltaXRBY3Rpb25zU3RhdGUifQ==")), "state") unless @state.nil? end |
Instance Attribute Details
#action ⇒ AWSCDK::Batch::JobStateTimeLimitActionsAction? (readonly)
Default: JobStateTimeLimitActionsAction.CANCEL
The action to take when a job is at the head of the job queue in the specified state for the specified period of time.
37 38 39 |
# File 'batch/job_state_time_limit_action.rb', line 37 def action @action end |
#max_time ⇒ AWSCDK::Duration (readonly)
The approximate amount of time, that must pass with the job in the specified state before the action is taken.
The minimum value is 10 minutes and the maximum value is 24 hours.
27 28 29 |
# File 'batch/job_state_time_limit_action.rb', line 27 def max_time @max_time end |
#reason ⇒ AWSCDK::Batch::JobStateTimeLimitActionsReason (readonly)
The reason to log for the action being taken.
32 33 34 |
# File 'batch/job_state_time_limit_action.rb', line 32 def reason @reason end |
#state ⇒ AWSCDK::Batch::JobStateTimeLimitActionsState? (readonly)
Default: JobStateTimeLimitActionsState.RUNNABLE
The state of the job needed to trigger the action.
42 43 44 |
# File 'batch/job_state_time_limit_action.rb', line 42 def state @state end |
Class Method Details
.jsii_properties ⇒ Object
44 45 46 47 48 49 50 51 |
# File 'batch/job_state_time_limit_action.rb', line 44 def self.jsii_properties { :max_time => "maxTime", :reason => "reason", :action => "action", :state => "state", } end |
Instance Method Details
#to_jsii ⇒ Object
53 54 55 56 57 58 59 60 61 62 |
# File 'batch/job_state_time_limit_action.rb', line 53 def to_jsii result = {} result.merge!({ "maxTime" => @max_time, "reason" => @reason, "action" => @action, "state" => @state, }) result.compact end |