Class CfnJobDefinition.Builder

java.lang.Object
software.amazon.awscdk.services.batch.CfnJobDefinition.Builder
All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobDefinition>
Enclosing class:
CfnJobDefinition

@Stability(Stable) public static final class CfnJobDefinition.Builder extends Object implements software.amazon.jsii.Builder<CfnJobDefinition>
A fluent builder for CfnJobDefinition.
  • Method Details

    • create

      @Stability(Stable) public static CfnJobDefinition.Builder create(Construct scope, String id)
      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      Returns:
      a new instance of CfnJobDefinition.Builder.
    • type

      @Stability(Stable) public CfnJobDefinition.Builder type(String 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 job is run on Fargate resources, then multinode isn't supported.

      Parameters:
      type - The type of job definition. This parameter is required.
      Returns:
      this
    • containerProperties

      @Stability(Stable) public CfnJobDefinition.Builder containerProperties(IResolvable containerProperties)
      An object with various properties specific to Amazon ECS based jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

      Parameters:
      containerProperties - An object with various properties specific to Amazon ECS based jobs. This parameter is required.
      Returns:
      this
    • containerProperties

      @Stability(Stable) public CfnJobDefinition.Builder containerProperties(CfnJobDefinition.ContainerPropertiesProperty containerProperties)
      An object with various properties specific to Amazon ECS based jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

      Parameters:
      containerProperties - An object with various properties specific to Amazon ECS based jobs. This parameter is required.
      Returns:
      this
    • eksProperties

      @Stability(Stable) public CfnJobDefinition.Builder eksProperties(IResolvable eksProperties)
      An object with various properties that are specific to Amazon EKS based jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

      Parameters:
      eksProperties - An object with various properties that are specific to Amazon EKS based jobs. This parameter is required.
      Returns:
      this
    • eksProperties

      @Stability(Stable) public CfnJobDefinition.Builder eksProperties(CfnJobDefinition.EksPropertiesProperty eksProperties)
      An object with various properties that are specific to Amazon EKS based jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

      Parameters:
      eksProperties - An object with various properties that are specific to Amazon EKS based jobs. This parameter is required.
      Returns:
      this
    • jobDefinitionName

      @Stability(Stable) public CfnJobDefinition.Builder jobDefinitionName(String jobDefinitionName)
      The name of the job definition.

      Parameters:
      jobDefinitionName - The name of the job definition. This parameter is required.
      Returns:
      this
    • nodeProperties

      @Stability(Stable) public CfnJobDefinition.Builder nodeProperties(IResolvable nodeProperties)
      An object with various properties that are specific to multi-node parallel jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

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

      Parameters:
      nodeProperties - An object with various properties that are specific to multi-node parallel jobs. This parameter is required.
      Returns:
      this
    • nodeProperties

      @Stability(Stable) public CfnJobDefinition.Builder nodeProperties(CfnJobDefinition.NodePropertiesProperty nodeProperties)
      An object with various properties that are specific to multi-node parallel jobs.

      Valid values are containerProperties , eksProperties , and nodeProperties . Only one can be specified.

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

      Parameters:
      nodeProperties - An object with various properties that are specific to multi-node parallel jobs. This parameter is required.
      Returns:
      this
    • parameters

      @Stability(Stable) public CfnJobDefinition.Builder parameters(Object 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 .

      Parameters:
      parameters - Default parameters or parameter substitution placeholders that are set in the job definition. This parameter is required.
      Returns:
      this
    • platformCapabilities

      @Stability(Stable) public CfnJobDefinition.Builder platformCapabilities(List<String> platformCapabilities)
      The platform capabilities required by the job definition.

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

      Parameters:
      platformCapabilities - The platform capabilities required by the job definition. This parameter is required.
      Returns:
      this
    • propagateTags

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

      Parameters:
      propagateTags - Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. This parameter is required.
      Returns:
      this
    • propagateTags

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

      Parameters:
      propagateTags - Specifies whether to propagate the tags from the job or job definition to the corresponding Amazon ECS task. This parameter is required.
      Returns:
      this
    • retryStrategy

      @Stability(Stable) public CfnJobDefinition.Builder retryStrategy(IResolvable retryStrategy)
      The retry strategy to use for failed jobs that are submitted with this job definition.

      Parameters:
      retryStrategy - The retry strategy to use for failed jobs that are submitted with this job definition. This parameter is required.
      Returns:
      this
    • retryStrategy

      @Stability(Stable) public CfnJobDefinition.Builder retryStrategy(CfnJobDefinition.RetryStrategyProperty retryStrategy)
      The retry strategy to use for failed jobs that are submitted with this job definition.

      Parameters:
      retryStrategy - The retry strategy to use for failed jobs that are submitted with this job definition. This parameter is required.
      Returns:
      this
    • schedulingPriority

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

      Parameters:
      schedulingPriority - The scheduling priority of the job definition. This parameter is required.
      Returns:
      this
    • tags

      @Stability(Stable) public CfnJobDefinition.Builder tags(Object tags)
      The tags that are applied to the job definition.

      Parameters:
      tags - The tags that are applied to the job definition. This parameter is required.
      Returns:
      this
    • timeout

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

      Parameters:
      timeout - The timeout time for jobs that are submitted with this job definition. This parameter is required.
      Returns:
      this
    • timeout

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

      Parameters:
      timeout - The timeout time for jobs that are submitted with this job definition. This parameter is required.
      Returns:
      this
    • build

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