EcsJobDefinitionProps
- class aws_cdk.aws_batch.EcsJobDefinitionProps(*, job_definition_name=None, parameters=None, retry_attempts=None, retry_strategies=None, scheduling_priority=None, timeout=None, container, propagate_tags=None)
- Bases: - JobDefinitionProps- Props for EcsJobDefinition. - 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- commandthat 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
- container ( - IEcsContainerDefinition) – The container that this job will run.
- propagate_tags ( - Optional[- bool]) – Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns. Default: false
 
- ExampleMetadata:
- infused 
 - Example: - # my_file_system: efs.IFileSystem # my_job_role: iam.Role my_file_system.grant_read(my_job_role) job_defn = batch.EcsJobDefinition(self, "JobDefn", container=batch.EcsEc2ContainerDefinition(self, "containerDefn", image=ecs.ContainerImage.from_registry("public.ecr.aws/amazonlinux/amazonlinux:latest"), memory=cdk.Size.mebibytes(2048), cpu=256, volumes=[batch.EcsVolume.efs( name="myVolume", file_system=my_file_system, container_path="/Volumes/myVolume", use_job_role=True )], job_role=my_job_role ) ) - Attributes - container
- The container that this job will run. 
 - 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 - commandthat you give to the container.
 - propagate_tags
- Whether to propagate tags from the JobDefinition to the ECS task that Batch spawns. - Default:
- false 
 
 - 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