Class EksJobDefinition.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<EksJobDefinition>
- Enclosing class:
EksJobDefinition
EksJobDefinition
.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
container
(EksContainerDefinition container) The container this Job Definition will run.static EksJobDefinition.Builder
The DNS Policy of the pod used by this Job Definition.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.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.serviceAccount
(String serviceAccount) The name of the service account that's used to run the container.The timeout time for jobs that are submitted with this job definition.useHostNetwork
(Boolean useHostNetwork) If specified, the Pod used by this Job Definition will use the host's network IP address.
-
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
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 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 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
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 this Job Definition will run.- Parameters:
container
- The container this Job Definition will run. This parameter is required.- Returns:
this
-
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
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
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
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<EksJobDefinition>
- Returns:
- a newly built instance of
EksJobDefinition
.
-