Class: AWSCDK::Batch::CfnJobQueue::JobStateTimeLimitActionProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnJobQueue::JobStateTimeLimitActionProperty
- Defined in:
- batch/cfn_job_queue.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 ⇒ String
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_seconds ⇒ Numeric
readonly
The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
-
#reason ⇒ String
readonly
The reason to log for the action being taken.
-
#state ⇒ String
readonly
The state of the job needed to trigger the action.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(action:, max_time_seconds:, reason:, state:) ⇒ JobStateTimeLimitActionProperty
constructor
A new instance of JobStateTimeLimitActionProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(action:, max_time_seconds:, reason:, state:) ⇒ JobStateTimeLimitActionProperty
Returns a new instance of JobStateTimeLimitActionProperty.
674 675 676 677 678 679 680 681 682 683 |
# File 'batch/cfn_job_queue.rb', line 674 def initialize(action:, max_time_seconds:, reason:, state:) @action = action Jsii::Type.check_type(@action, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "action") @max_time_seconds = max_time_seconds Jsii::Type.check_type(@max_time_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "maxTimeSeconds") @reason = reason Jsii::Type.check_type(@reason, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "reason") @state = state Jsii::Type.check_type(@state, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "state") end |
Instance Attribute Details
#action ⇒ String (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.
The only supported value is CANCEL , which will cancel the job.
691 692 693 |
# File 'batch/cfn_job_queue.rb', line 691 def action @action end |
#max_time_seconds ⇒ Numeric (readonly)
The approximate amount of time, in seconds, that must pass with the job in the specified state before the action is taken.
The minimum value is 600 (10 minutes) and the maximum value is 86,400 (24 hours).
698 699 700 |
# File 'batch/cfn_job_queue.rb', line 698 def max_time_seconds @max_time_seconds end |
#reason ⇒ String (readonly)
The reason to log for the action being taken.
703 704 705 |
# File 'batch/cfn_job_queue.rb', line 703 def reason @reason end |
#state ⇒ String (readonly)
The state of the job needed to trigger the action.
The only supported value is RUNNABLE .
710 711 712 |
# File 'batch/cfn_job_queue.rb', line 710 def state @state end |
Class Method Details
.jsii_properties ⇒ Object
712 713 714 715 716 717 718 719 |
# File 'batch/cfn_job_queue.rb', line 712 def self.jsii_properties { :action => "action", :max_time_seconds => "maxTimeSeconds", :reason => "reason", :state => "state", } end |
Instance Method Details
#to_jsii ⇒ Object
721 722 723 724 725 726 727 728 729 730 |
# File 'batch/cfn_job_queue.rb', line 721 def to_jsii result = {} result.merge!({ "action" => @action, "maxTimeSeconds" => @max_time_seconds, "reason" => @reason, "state" => @state, }) result.compact end |