Skip to content
v2.274.0

JobDefinitionProps Struct ​

Props common to all JobDefinitions.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_batch as batch } from 'aws-cdk-lib';

declare const parameters: any;
declare const retryStrategy: batch.RetryStrategy;
const jobDefinitionProps: batch.JobDefinitionProps = {
  jobDefinitionName: 'jobDefinitionName',
  parameters: {
    parametersKey: parameters,
  },
  retryAttempts: 123,
  retryStrategies: [retryStrategy],
  schedulingPriority: 123,
  skipDeregisterOnUpdate: false,
  timeout: cdk.Duration.minutes(30),
};

Properties ​

jobDefinitionNamestringjob_definition_namestrjobDefinitionNameStringJobDefinitionNamestringJobDefinitionName*string= generated by CloudFormation#
The name of this job definition.
parameters{ [key: string]: any }parameterstyping.Mapping[str, Any]parametersMap<String, Object>ParametersIDictionary<string, object>Parameters*map[string]interface{}= none#
The default parameters passed to the container These parameters can be referenced in the `command` that you give to the container.
retryAttemptsnumberretry_attemptsint | floatretryAttemptsNumberRetryAttemptsdoubleRetryAttempts*float64= 1#
The number of times to retry a job.

The job is retried on failure the same number of attempts as the value.

retryStrategiesRetryStrategy[]retry_strategiestyping.List[RetryStrategy]retryStrategiesList<RetryStrategy>RetryStrategiesRetryStrategy[]RetryStrategies*[]RetryStrategy= no `RetryStrategy`#
Defines the retry behavior for this job.
schedulingPrioritynumberscheduling_priorityint | floatschedulingPriorityNumberSchedulingPrioritydoubleSchedulingPriority*float64= none#
The priority of this Job.

Only used in Fairshare Scheduling to decide which job to run first when there are multiple jobs with the same share identifier.

skipDeregisterOnUpdatebooleanskip_deregister_on_updateboolskipDeregisterOnUpdateBooleanSkipDeregisterOnUpdateboolSkipDeregisterOnUpdate*bool= undefined - AWS Batch default is…#
Specifies whether the previous revision of the job definition is retained in an active status after UPDATE events for the resource.

When the property is set to false, the previous revision of the job definition is de-registered after a new revision is created. When the property is set to true, the previous revision of the job definition is not de-registered.

default

Default: undefined - AWS Batch default is false

timeoutDurationtimeoutDurationtimeoutDurationTimeoutDurationTimeoutDuration= no timeout#
The timeout time for jobs that are submitted with this job definition.

After the amount of time you specify passes, Batch terminates your jobs if they aren't finished.