Class: AWSCDK::Batch::CfnJobDefinition::RetryStrategyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Batch::CfnJobDefinition::RetryStrategyProperty
- Defined in:
- batch/cfn_job_definition.rb
Overview
The retry strategy that's associated with a job.
For more information, see Automated job retries in the AWS Batch User Guide .
Instance Attribute Summary collapse
-
#attempts ⇒ Numeric?
readonly
The number of times to move a job to the
RUNNABLEstatus. -
#evaluate_on_exit ⇒ AWSCDK::IResolvable, ...
readonly
Array of up to 5 objects that specify the conditions where jobs are retried or failed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(attempts: nil, evaluate_on_exit: nil) ⇒ RetryStrategyProperty
constructor
A new instance of RetryStrategyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(attempts: nil, evaluate_on_exit: nil) ⇒ RetryStrategyProperty
Returns a new instance of RetryStrategyProperty.
3251 3252 3253 3254 3255 3256 |
# File 'batch/cfn_job_definition.rb', line 3251 def initialize(attempts: nil, evaluate_on_exit: nil) @attempts = attempts Jsii::Type.check_type(@attempts, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "attempts") unless @attempts.nil? @evaluate_on_exit = evaluate_on_exit Jsii::Type.check_type(@evaluate_on_exit, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImNvbGxlY3Rpb24iOnsiZWxlbWVudHR5cGUiOnsidW5pb24iOnsidHlwZXMiOlt7ImZxbiI6ImF3cy1jZGstbGliLklSZXNvbHZhYmxlIn0seyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfYmF0Y2guQ2ZuSm9iRGVmaW5pdGlvbi5FdmFsdWF0ZU9uRXhpdFByb3BlcnR5In1dfX0sImtpbmQiOiJhcnJheSJ9fV19fQ==")), "evaluateOnExit") unless @evaluate_on_exit.nil? end |
Instance Attribute Details
#attempts ⇒ Numeric? (readonly)
The number of times to move a job to the RUNNABLE status.
You can specify between 1 and 10 attempts. If the value of attempts is greater than one, the job is retried on failure the same number of attempts as the value.
3264 3265 3266 |
# File 'batch/cfn_job_definition.rb', line 3264 def attempts @attempts end |
#evaluate_on_exit ⇒ AWSCDK::IResolvable, ... (readonly)
Array of up to 5 objects that specify the conditions where jobs are retried or failed.
If this parameter is specified, then the attempts parameter must also be specified. If none of the listed conditions match, then the job is retried.
3271 3272 3273 |
# File 'batch/cfn_job_definition.rb', line 3271 def evaluate_on_exit @evaluate_on_exit end |
Class Method Details
.jsii_properties ⇒ Object
3273 3274 3275 3276 3277 3278 |
# File 'batch/cfn_job_definition.rb', line 3273 def self.jsii_properties { :attempts => "attempts", :evaluate_on_exit => "evaluateOnExit", } end |
Instance Method Details
#to_jsii ⇒ Object
3280 3281 3282 3283 3284 3285 3286 3287 |
# File 'batch/cfn_job_definition.rb', line 3280 def to_jsii result = {} result.merge!({ "attempts" => @attempts, "evaluateOnExit" => @evaluate_on_exit, }) result.compact end |