Interface CfnJobDefinition.RetryStrategyProperty

All Superinterfaces:
software.amazon.jsii.JsiiSerializable
All Known Implementing Classes:
CfnJobDefinition.RetryStrategyProperty.Jsii$Proxy
Enclosing class:
CfnJobDefinition

@Stability(Stable) public static interface CfnJobDefinition.RetryStrategyProperty extends software.amazon.jsii.JsiiSerializable
The retry strategy that's associated with a job.

For more information, see Automated job retries in the AWS Batch User Guide .

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.batch.*;
 RetryStrategyProperty retryStrategyProperty = RetryStrategyProperty.builder()
         .attempts(123)
         .evaluateOnExit(List.of(EvaluateOnExitProperty.builder()
                 .action("action")
                 // the properties below are optional
                 .onExitCode("onExitCode")
                 .onReason("onReason")
                 .onStatusReason("onStatusReason")
                 .build()))
         .build();
 
  • Method Details

    • getAttempts

      @Stability(Stable) @Nullable default Number getAttempts()
      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.

    • getEvaluateOnExit

      @Stability(Stable) @Nullable default Object getEvaluateOnExit()
      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.

    • builder

      @Stability(Stable) static CfnJobDefinition.RetryStrategyProperty.Builder builder()
      Returns:
      a CfnJobDefinition.RetryStrategyProperty.Builder of CfnJobDefinition.RetryStrategyProperty