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 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

      @Stability(Stable) public EcsJobDefinition.Builder jobDefinitionName(String 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 the command that you give to the container.

      Default: none

      Parameters:
      parameters - The default parameters passed to the container These parameters can be referenced in the command that you give to the container. This parameter is required.
      Returns:
      this
      See Also:
    • retryAttempts

      @Stability(Stable) public EcsJobDefinition.Builder retryAttempts(Number 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

      @Stability(Stable) public EcsJobDefinition.Builder schedulingPriority(Number 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

      @Stability(Stable) public EcsJobDefinition.Builder timeout(Duration 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

      @Stability(Stable) public EcsJobDefinition.Builder container(IEcsContainerDefinition container)
      The container that this job will run.

      Parameters:
      container - The container that this job will run. This parameter is required.
      Returns:
      this
    • propagateTags

      @Stability(Stable) public EcsJobDefinition.Builder propagateTags(Boolean 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

      @Stability(Stable) public EcsJobDefinition build()
      Specified by:
      build in interface software.amazon.jsii.Builder<EcsJobDefinition>
      Returns:
      a newly built instance of EcsJobDefinition.