Class EksJobDefinitionProps.Builder
java.lang.Object
software.amazon.awscdk.services.batch.EksJobDefinitionProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EksJobDefinitionProps>
- Enclosing interface:
EksJobDefinitionProps
@Stability(Stable)
public static final class EksJobDefinitionProps.Builder
extends Object
implements software.amazon.jsii.Builder<EksJobDefinitionProps>
A builder for
EksJobDefinitionProps
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.container
(EksContainerDefinition container) Sets the value ofEksJobDefinitionProps.getContainer()
Sets the value ofEksJobDefinitionProps.getDnsPolicy()
jobDefinitionName
(String jobDefinitionName) Sets the value ofJobDefinitionProps.getJobDefinitionName()
parameters
(Map<String, ? extends Object> parameters) Sets the value ofJobDefinitionProps.getParameters()
retryAttempts
(Number retryAttempts) Sets the value ofJobDefinitionProps.getRetryAttempts()
retryStrategies
(List<? extends RetryStrategy> retryStrategies) Sets the value ofJobDefinitionProps.getRetryStrategies()
schedulingPriority
(Number schedulingPriority) Sets the value ofJobDefinitionProps.getSchedulingPriority()
serviceAccount
(String serviceAccount) Sets the value ofEksJobDefinitionProps.getServiceAccount()
Sets the value ofJobDefinitionProps.getTimeout()
useHostNetwork
(Boolean useHostNetwork) Sets the value ofEksJobDefinitionProps.getUseHostNetwork()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
container
Sets the value ofEksJobDefinitionProps.getContainer()
- Parameters:
container
- The container this Job Definition will run. This parameter is required.- Returns:
this
-
dnsPolicy
Sets the value ofEksJobDefinitionProps.getDnsPolicy()
- Parameters:
dnsPolicy
- The DNS Policy of the pod used by this Job Definition.- Returns:
this
-
serviceAccount
Sets the value ofEksJobDefinitionProps.getServiceAccount()
- Parameters:
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.- Returns:
this
-
useHostNetwork
Sets the value ofEksJobDefinitionProps.getUseHostNetwork()
- Parameters:
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.- Returns:
this
-
jobDefinitionName
Sets the value ofJobDefinitionProps.getJobDefinitionName()
- Parameters:
jobDefinitionName
- The name of this job definition.- Returns:
this
-
parameters
@Stability(Stable) public EksJobDefinitionProps.Builder parameters(Map<String, ? extends Object> parameters) Sets the value ofJobDefinitionProps.getParameters()
- Parameters:
parameters
- The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.- Returns:
this
-
retryAttempts
Sets the value ofJobDefinitionProps.getRetryAttempts()
- Parameters:
retryAttempts
- The number of times to retry a job. The job is retried on failure the same number of attempts as the value.- Returns:
this
-
retryStrategies
@Stability(Stable) public EksJobDefinitionProps.Builder retryStrategies(List<? extends RetryStrategy> retryStrategies) Sets the value ofJobDefinitionProps.getRetryStrategies()
- Parameters:
retryStrategies
- Defines the retry behavior for this job.- Returns:
this
-
schedulingPriority
@Stability(Stable) public EksJobDefinitionProps.Builder schedulingPriority(Number schedulingPriority) Sets the value ofJobDefinitionProps.getSchedulingPriority()
- Parameters:
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.- Returns:
this
-
timeout
Sets the value ofJobDefinitionProps.getTimeout()
- Parameters:
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.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EksJobDefinitionProps>
- Returns:
- a new instance of
EksJobDefinitionProps
- Throws:
NullPointerException
- if any required attribute was not provided
-