Class EcsJobDefinition.Builder
java.lang.Object
software.amazon.awscdk.services.batch.EcsJobDefinition.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EcsJobDefinition>
- Enclosing class:
EcsJobDefinition
@Stability(Stable)
public static final class EcsJobDefinition.Builder
extends Object
implements software.amazon.jsii.Builder<EcsJobDefinition>
A fluent builder for
EcsJobDefinition
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
container
(IEcsContainerDefinition container) The container that this job will run.static EcsJobDefinition.Builder
jobDefinitionName
(String jobDefinitionName) The name of this job definition.parameters
(Map<String, ? extends Object> parameters) The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.propagateTags
(Boolean propagateTags) Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns.retryAttempts
(Number retryAttempts) The number of times to retry a job.retryStrategies
(List<? extends RetryStrategy> retryStrategies) Defines the retry behavior for this job.schedulingPriority
(Number schedulingPriority) The priority of this Job.The timeout time for jobs that are submitted with this job definition.
-
Method Details
-
create
@Stability(Stable) public static EcsJobDefinition.Builder create(software.constructs.Construct scope, String id) - Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
EcsJobDefinition.Builder
.
-
jobDefinitionName
The name of this job definition.Default: - generated by CloudFormation
- Parameters:
jobDefinitionName
- The name of this job definition. This parameter is required.- Returns:
this
-
parameters
@Stability(Stable) public EcsJobDefinition.Builder parameters(Map<String, ? extends Object> parameters) The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.Default: none
- Parameters:
parameters
- The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container. This parameter is required.- Returns:
this
- See Also:
-
retryAttempts
The number of times to retry a job.The job is retried on failure the same number of attempts as the value.
Default: 1
- Parameters:
retryAttempts
- The number of times to retry a job. This parameter is required.- Returns:
this
-
retryStrategies
@Stability(Stable) public EcsJobDefinition.Builder retryStrategies(List<? extends RetryStrategy> retryStrategies) Defines the retry behavior for this job.Default: - no `RetryStrategy`
- Parameters:
retryStrategies
- Defines the retry behavior for this job. This parameter is required.- Returns:
this
-
schedulingPriority
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
- Parameters:
schedulingPriority
- The priority of this Job. This parameter is required.- Returns:
this
-
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
- Parameters:
timeout
- The timeout time for jobs that are submitted with this job definition. This parameter is required.- Returns:
this
-
container
The container that this job will run.- Parameters:
container
- The container that this job will run. This parameter is required.- Returns:
this
-
propagateTags
Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns.Default: false
- Parameters:
propagateTags
- Whether to propogate tags from the JobDefinition to the ECS task that Batch spawns. This parameter is required.- Returns:
this
-
build
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EcsJobDefinition>
- Returns:
- a newly built instance of
EcsJobDefinition
.
-