aws-cdk-lib.aws_batch.CfnJobDefinition.RetryStrategyProperty

interface RetryStrategyProperty

LanguageType name
.NETAmazon.CDK.AWS.Batch.CfnJobDefinition.RetryStrategyProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsbatch#CfnJobDefinition_RetryStrategyProperty
Javasoftware.amazon.awscdk.services.batch.CfnJobDefinition.RetryStrategyProperty
Pythonaws_cdk.aws_batch.CfnJobDefinition.RetryStrategyProperty
TypeScript aws-cdk-lib » aws_batch » CfnJobDefinition » RetryStrategyProperty

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 { aws_batch as batch } from 'aws-cdk-lib';
const retryStrategyProperty: batch.CfnJobDefinition.RetryStrategyProperty = {
  attempts: 123,
  evaluateOnExit: [{
    action: 'action',

    // the properties below are optional
    onExitCode: 'onExitCode',
    onReason: 'onReason',
    onStatusReason: 'onStatusReason',
  }],
};

Properties

NameTypeDescription
attempts?numberThe number of times to move a job to the RUNNABLE status.
evaluateOnExit?IResolvable | IResolvable | EvaluateOnExitProperty[]Array of up to 5 objects that specify the conditions where jobs are retried or failed.

attempts?

Type: number (optional)

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.


evaluateOnExit?

Type: IResolvable | IResolvable | EvaluateOnExitProperty[] (optional)

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.