JobDefinitionProps

class aws_cdk.aws_batch.JobDefinitionProps(*, job_definition_name=None, parameters=None, retry_attempts=None, retry_strategies=None, scheduling_priority=None, timeout=None)

Bases: object

Props common to all JobDefinitions.

Parameters:
  • job_definition_name (Optional[str]) – The name of this job definition. Default: - generated by CloudFormation

  • parameters (Optional[Mapping[str, Any]]) – The default parameters passed to the container These parameters can be referenced in the command that you give to the container. Default: none

  • retry_attempts (Union[int, float, None]) – The number of times to retry a job. The job is retried on failure the same number of attempts as the value. Default: 1

  • retry_strategies (Optional[Sequence[RetryStrategy]]) – Defines the retry behavior for this job. Default: - no RetryStrategy

  • scheduling_priority (Union[int, float, 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. Default: none

  • timeout (Optional[Duration]) – 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. Default: - no timeout

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk as cdk
from aws_cdk import aws_batch as batch

# parameters: Any
# retry_strategy: batch.RetryStrategy

job_definition_props = batch.JobDefinitionProps(
    job_definition_name="jobDefinitionName",
    parameters={
        "parameters_key": parameters
    },
    retry_attempts=123,
    retry_strategies=[retry_strategy],
    scheduling_priority=123,
    timeout=cdk.Duration.minutes(30)
)

Attributes

job_definition_name

The name of this job definition.

Default:
  • generated by CloudFormation

parameters

The default parameters passed to the container These parameters can be referenced in the command that you give to the container.

Default:

none

See:

https://docs.aws.amazon.com/batch/latest/userguide/job_definition_parameters.html#parameters

retry_attempts

The number of times to retry a job.

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

Default:

1

retry_strategies

Defines the retry behavior for this job.

Default:
  • no RetryStrategy

scheduling_priority

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.

Default:

none

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.

Default:
  • no timeout