Class EksJobDefinition.Builder

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

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

    • create

      @Stability(Stable) public static EksJobDefinition.Builder create(software.constructs.Construct scope, String id)
      Parameters:
      scope - This parameter is required.
      id - This parameter is required.
      Returns:
      a new instance of EksJobDefinition.Builder.
    • jobDefinitionName

      @Stability(Stable) public EksJobDefinition.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 EksJobDefinition.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 EksJobDefinition.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 EksJobDefinition.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 EksJobDefinition.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 EksJobDefinition.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 EksJobDefinition.Builder container(EksContainerDefinition container)
      The container this Job Definition will run.

      Parameters:
      container - The container this Job Definition will run. This parameter is required.
      Returns:
      this
    • dnsPolicy

      @Stability(Stable) public EksJobDefinition.Builder dnsPolicy(DnsPolicy dnsPolicy)
      The DNS Policy of the pod used by this Job Definition.

      Default: `DnsPolicy.CLUSTER_FIRST`

      Parameters:
      dnsPolicy - The DNS Policy of the pod used by this Job Definition. This parameter is required.
      Returns:
      this
      See Also:
    • serviceAccount

      @Stability(Stable) public EksJobDefinition.Builder serviceAccount(String serviceAccount)
      The name of the service account that's used to run the container.

      service accounts are Kubernetes method of identification and authentication, roughly analogous to IAM users.

      Default: - the default service account of the container

      Parameters:
      serviceAccount - The name of the service account that's used to run the container. This parameter is required.
      Returns:
      this
      See Also:
    • useHostNetwork

      @Stability(Stable) public EksJobDefinition.Builder useHostNetwork(Boolean useHostNetwork)
      If specified, the Pod used by this Job Definition will use the host's network IP address.

      Otherwise, the Kubernetes pod networking model is enabled. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.

      Default: true

      Parameters:
      useHostNetwork - If specified, the Pod used by this Job Definition will use the host's network IP address. This parameter is required.
      Returns:
      this
      See Also:
    • build

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