CfnJobDefinitionProps

class aws_cdk.aws_batch.CfnJobDefinitionProps(*, type, container_properties=None, ecs_properties=None, eks_properties=None, job_definition_name=None, node_properties=None, parameters=None, platform_capabilities=None, propagate_tags=None, retry_strategy=None, scheduling_priority=None, tags=None, timeout=None)

Bases: object

Properties for defining a CfnJobDefinition.

Parameters:
  • type (str) – The type of job definition. For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the AWS Batch User Guide . - If the value is container , then one of the following is required: containerProperties , ecsProperties , or eksProperties . - If the value is multinode , then nodeProperties is required. .. epigraph:: If the job is run on Fargate resources, then multinode isn’t supported.

  • container_properties (Union[IResolvable, ContainerPropertiesProperty, Dict[str, Any], None]) – An object with properties specific to Amazon ECS-based jobs. When containerProperties is used in the job definition, it can’t be used in addition to eksProperties , ecsProperties , or nodeProperties .

  • ecs_properties (Union[IResolvable, EcsPropertiesProperty, Dict[str, Any], None]) – An object that contains the properties for the Amazon ECS resources of a job.When ecsProperties is used in the job definition, it can’t be used in addition to containerProperties , eksProperties , or nodeProperties .

  • eks_properties (Union[IResolvable, EksPropertiesProperty, Dict[str, Any], None]) – An object with properties that are specific to Amazon EKS-based jobs. When eksProperties is used in the job definition, it can’t be used in addition to containerProperties , ecsProperties , or nodeProperties .

  • job_definition_name (Optional[str]) – The name of the job definition.

  • node_properties (Union[IResolvable, NodePropertiesProperty, Dict[str, Any], None]) – An object with properties that are specific to multi-node parallel jobs. When nodeProperties is used in the job definition, it can’t be used in addition to containerProperties , ecsProperties , or eksProperties . .. epigraph:: If the job runs on Fargate resources, don’t specify nodeProperties . Use containerProperties instead.

  • parameters (Any) – Default parameters or parameter substitution placeholders that are set in the job definition. Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the AWS Batch User Guide .

  • platform_capabilities (Optional[Sequence[str]]) – The platform capabilities required by the job definition. If no value is specified, it defaults to EC2 . Jobs run on Fargate resources specify FARGATE .

  • propagate_tags (Union[bool, IResolvable, None]) – Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. If no value is specified, the tags aren’t propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state.

  • retry_strategy (Union[IResolvable, RetryStrategyProperty, Dict[str, Any], None]) – The retry strategy to use for failed jobs that are submitted with this job definition.

  • scheduling_priority (Union[int, float, None]) – The scheduling priority of the job definition. This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.

  • tags (Any) – The tags that are applied to the job definition.

  • timeout (Union[IResolvable, TimeoutProperty, Dict[str, Any], None]) – The timeout time for jobs that are submitted with this job definition. After the amount of time you specify passes, AWS Batch terminates your jobs if they aren’t finished.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html

ExampleMetadata:

fixture=_generated

Example:

.. rubric:: Attributes
container_properties

An object with properties specific to Amazon ECS-based jobs.

When containerProperties is used in the job definition, it can’t be used in addition to eksProperties , ecsProperties , or nodeProperties .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-containerproperties

ecs_properties

An object that contains the properties for the Amazon ECS resources of a job.When ecsProperties is used in the job definition, it can’t be used in addition to containerProperties , eksProperties , or nodeProperties .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-ecsproperties

eks_properties

An object with properties that are specific to Amazon EKS-based jobs.

When eksProperties is used in the job definition, it can’t be used in addition to containerProperties , ecsProperties , or nodeProperties .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-eksproperties

job_definition_name

The name of the job definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-jobdefinitionname

node_properties

An object with properties that are specific to multi-node parallel jobs.

When nodeProperties is used in the job definition, it can’t be used in addition to containerProperties , ecsProperties , or eksProperties . .. epigraph:

If the job runs on Fargate resources, don't specify ``nodeProperties`` . Use ``containerProperties`` instead.
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-nodeproperties

parameters

Default parameters or parameter substitution placeholders that are set in the job definition.

Parameters are specified as a key-value pair mapping. Parameters in a SubmitJob request override any corresponding parameter defaults from the job definition. For more information about specifying parameters, see Job definition parameters in the AWS Batch User Guide .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-parameters

platform_capabilities

The platform capabilities required by the job definition.

If no value is specified, it defaults to EC2 . Jobs run on Fargate resources specify FARGATE .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-platformcapabilities

propagate_tags

Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task.

If no value is specified, the tags aren’t propagated. Tags can only be propagated to the tasks when the tasks are created. For tags with the same name, job tags are given priority over job definitions tags. If the total number of combined tags from the job and job definition is over 50, the job is moved to the FAILED state.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-propagatetags

retry_strategy

The retry strategy to use for failed jobs that are submitted with this job definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-retrystrategy

scheduling_priority

The scheduling priority of the job definition.

This only affects jobs in job queues with a fair share policy. Jobs with a higher scheduling priority are scheduled before jobs with a lower scheduling priority.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-schedulingpriority

tags

The tags that are applied to the job definition.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-tags

timeout

The timeout time for jobs that are submitted with this job definition.

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

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-timeout

type

The type of job definition.

For more information about multi-node parallel jobs, see Creating a multi-node parallel job definition in the AWS Batch User Guide .

  • If the value is container , then one of the following is required: containerProperties , ecsProperties , or eksProperties .

  • If the value is multinode , then nodeProperties is required.

If the job is run on Fargate resources, then multinode isn’t supported.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-batch-jobdefinition.html#cfn-batch-jobdefinition-type