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 iscontainer
, then one of the following is required:containerProperties
,ecsProperties
, oreksProperties
. - If the value ismultinode
, thennodeProperties
is required. .. epigraph:: If the job is run on Fargate resources, thenmultinode
isn’t supported.container_properties (
Union
[IResolvable
,ContainerPropertiesProperty
,Dict
[str
,Any
],None
]) – An object with properties specific to Amazon ECS-based jobs. WhencontainerProperties
is used in the job definition, it can’t be used in addition toeksProperties
,ecsProperties
, ornodeProperties
.ecs_properties (
Union
[IResolvable
,EcsPropertiesProperty
,Dict
[str
,Any
],None
]) – An object that contains the properties for the Amazon ECS resources of a job.WhenecsProperties
is used in the job definition, it can’t be used in addition tocontainerProperties
,eksProperties
, ornodeProperties
.eks_properties (
Union
[IResolvable
,EksPropertiesProperty
,Dict
[str
,Any
],None
]) – An object with properties that are specific to Amazon EKS-based jobs. WheneksProperties
is used in the job definition, it can’t be used in addition tocontainerProperties
,ecsProperties
, ornodeProperties
.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. WhennodeProperties
is used in the job definition, it can’t be used in addition tocontainerProperties
,ecsProperties
, oreksProperties
. .. epigraph:: If the job runs on Fargate resources, don’t specifynodeProperties
. UsecontainerProperties
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 aSubmitJob
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 toEC2
. Jobs run on Fargate resources specifyFARGATE
.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 theFAILED
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 toeksProperties
,ecsProperties
, ornodeProperties
.
- 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 tocontainerProperties
,eksProperties
, ornodeProperties
.
- 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 tocontainerProperties
,ecsProperties
, ornodeProperties
.
- job_definition_name
The name of the job definition.
- 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 tocontainerProperties
,ecsProperties
, oreksProperties
. .. epigraph:If the job runs on Fargate resources, don't specify ``nodeProperties`` . Use ``containerProperties`` instead.
- 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 .
- platform_capabilities
The platform capabilities required by the job definition.
If no value is specified, it defaults to
EC2
. Jobs run on Fargate resources specifyFARGATE
.
- 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.
- retry_strategy
The retry strategy to use for failed jobs that are submitted with this job definition.
- 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.
- tags
The tags that are applied to the job definition.
- 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.
- 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
, oreksProperties
.If the value is
multinode
, thennodeProperties
is required.
If the job is run on Fargate resources, then
multinode
isn’t supported.