Class CfnJobDefinition.PodPropertiesProperty.Builder
java.lang.Object
software.amazon.awscdk.services.batch.CfnJobDefinition.PodPropertiesProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnJobDefinition.PodPropertiesProperty>
- Enclosing interface:
CfnJobDefinition.PodPropertiesProperty
@Stability(Stable)
public static final class CfnJobDefinition.PodPropertiesProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnJobDefinition.PodPropertiesProperty>
A builder for
CfnJobDefinition.PodPropertiesProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.containers
(List<? extends Object> containers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getContainers()
containers
(IResolvable containers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getContainers()
Sets the value ofCfnJobDefinition.PodPropertiesProperty.getDnsPolicy()
hostNetwork
(Boolean hostNetwork) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getHostNetwork()
hostNetwork
(IResolvable hostNetwork) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getHostNetwork()
imagePullSecrets
(List<? extends Object> imagePullSecrets) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getImagePullSecrets()
imagePullSecrets
(IResolvable imagePullSecrets) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getImagePullSecrets()
initContainers
(List<? extends Object> initContainers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getInitContainers()
initContainers
(IResolvable initContainers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getInitContainers()
metadata
(IResolvable metadata) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getMetadata()
metadata
(CfnJobDefinition.MetadataProperty metadata) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getMetadata()
serviceAccountName
(String serviceAccountName) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getServiceAccountName()
shareProcessNamespace
(Boolean shareProcessNamespace) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getShareProcessNamespace()
shareProcessNamespace
(IResolvable shareProcessNamespace) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getShareProcessNamespace()
Sets the value ofCfnJobDefinition.PodPropertiesProperty.getVolumes()
volumes
(IResolvable volumes) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getVolumes()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
containers
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder containers(IResolvable containers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getContainers()
- Parameters:
containers
- The properties of the container that's used on the Amazon EKS pod.- Returns:
this
-
containers
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder containers(List<? extends Object> containers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getContainers()
- Parameters:
containers
- The properties of the container that's used on the Amazon EKS pod.- Returns:
this
-
dnsPolicy
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder dnsPolicy(String dnsPolicy) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getDnsPolicy()
- Parameters:
dnsPolicy
- The DNS policy for the pod. The default value isClusterFirst
. If thehostNetwork
parameter is not specified, the default isClusterFirstWithHostNet
.ClusterFirst
indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. For more information, see Pod's DNS policy in the Kubernetes documentation .Valid values:
Default
|ClusterFirst
|ClusterFirstWithHostNet
- Returns:
this
-
hostNetwork
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder hostNetwork(Boolean hostNetwork) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getHostNetwork()
- Parameters:
hostNetwork
- Indicates if the pod uses the hosts' network IP address. The default value istrue
. Setting this tofalse
enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see Host namespaces and Pod networking in the Kubernetes documentation .- Returns:
this
-
hostNetwork
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder hostNetwork(IResolvable hostNetwork) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getHostNetwork()
- Parameters:
hostNetwork
- Indicates if the pod uses the hosts' network IP address. The default value istrue
. Setting this tofalse
enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections. For more information, see Host namespaces and Pod networking in the Kubernetes documentation .- Returns:
this
-
imagePullSecrets
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder imagePullSecrets(IResolvable imagePullSecrets) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getImagePullSecrets()
- Parameters:
imagePullSecrets
- the value to be set.- Returns:
this
-
imagePullSecrets
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder imagePullSecrets(List<? extends Object> imagePullSecrets) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getImagePullSecrets()
- Parameters:
imagePullSecrets
- the value to be set.- Returns:
this
-
initContainers
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder initContainers(IResolvable initContainers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getInitContainers()
- Parameters:
initContainers
- These containers run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. For more information, see Init Containers in the Kubernetes documentation .This object is limited to 10 elements
- Returns:
this
-
initContainers
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder initContainers(List<? extends Object> initContainers) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getInitContainers()
- Parameters:
initContainers
- These containers run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. For more information, see Init Containers in the Kubernetes documentation .This object is limited to 10 elements
- Returns:
this
-
metadata
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder metadata(IResolvable metadata) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getMetadata()
- Parameters:
metadata
- Metadata about the Kubernetes pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation .- Returns:
this
-
metadata
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder metadata(CfnJobDefinition.MetadataProperty metadata) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getMetadata()
- Parameters:
metadata
- Metadata about the Kubernetes pod. For more information, see Understanding Kubernetes Objects in the Kubernetes documentation .- Returns:
this
-
serviceAccountName
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder serviceAccountName(String serviceAccountName) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getServiceAccountName()
- Parameters:
serviceAccountName
- The name of the service account that's used to run the pod. For more information, see Kubernetes service accounts and Configure a Kubernetes service account to assume an IAM role in the Amazon EKS User Guide and Configure service accounts for pods in the Kubernetes documentation .- Returns:
this
-
volumes
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder volumes(IResolvable volumes) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getVolumes()
- Parameters:
volumes
- Specifies the volumes for a job definition that uses Amazon EKS resources.- Returns:
this
-
volumes
@Stability(Stable) public CfnJobDefinition.PodPropertiesProperty.Builder volumes(List<? extends Object> volumes) Sets the value ofCfnJobDefinition.PodPropertiesProperty.getVolumes()
- Parameters:
volumes
- Specifies the volumes for a job definition that uses Amazon EKS resources.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnJobDefinition.PodPropertiesProperty>
- Returns:
- a new instance of
CfnJobDefinition.PodPropertiesProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-