Interface CfnJobDefinition.PodPropertiesProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnJobDefinition.PodPropertiesProperty.Jsii$Proxy
- Enclosing class:
CfnJobDefinition
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.batch.*;
Object labels;
Object limits;
Object requests;
PodPropertiesProperty podPropertiesProperty = PodPropertiesProperty.builder()
.containers(List.of(EksContainerProperty.builder()
.image("image")
// the properties below are optional
.args(List.of("args"))
.command(List.of("command"))
.env(List.of(EksContainerEnvironmentVariableProperty.builder()
.name("name")
// the properties below are optional
.value("value")
.build()))
.imagePullPolicy("imagePullPolicy")
.name("name")
.resources(ResourcesProperty.builder()
.limits(limits)
.requests(requests)
.build())
.securityContext(SecurityContextProperty.builder()
.allowPrivilegeEscalation(false)
.privileged(false)
.readOnlyRootFilesystem(false)
.runAsGroup(123)
.runAsNonRoot(false)
.runAsUser(123)
.build())
.volumeMounts(List.of(EksContainerVolumeMountProperty.builder()
.mountPath("mountPath")
.name("name")
.readOnly(false)
.build()))
.build()))
.dnsPolicy("dnsPolicy")
.hostNetwork(false)
.imagePullSecrets(List.of(ImagePullSecretProperty.builder()
.name("name")
.build()))
.initContainers(List.of(EksContainerProperty.builder()
.image("image")
// the properties below are optional
.args(List.of("args"))
.command(List.of("command"))
.env(List.of(EksContainerEnvironmentVariableProperty.builder()
.name("name")
// the properties below are optional
.value("value")
.build()))
.imagePullPolicy("imagePullPolicy")
.name("name")
.resources(ResourcesProperty.builder()
.limits(limits)
.requests(requests)
.build())
.securityContext(SecurityContextProperty.builder()
.allowPrivilegeEscalation(false)
.privileged(false)
.readOnlyRootFilesystem(false)
.runAsGroup(123)
.runAsNonRoot(false)
.runAsUser(123)
.build())
.volumeMounts(List.of(EksContainerVolumeMountProperty.builder()
.mountPath("mountPath")
.name("name")
.readOnly(false)
.build()))
.build()))
.metadata(MetadataProperty.builder()
.labels(labels)
.build())
.serviceAccountName("serviceAccountName")
.shareProcessNamespace(false)
.volumes(List.of(EksVolumeProperty.builder()
.name("name")
// the properties below are optional
.emptyDir(EmptyDirProperty.builder()
.medium("medium")
.sizeLimit("sizeLimit")
.build())
.hostPath(HostPathProperty.builder()
.path("path")
.build())
.secret(EksSecretProperty.builder()
.secretName("secretName")
// the properties below are optional
.optional(false)
.build())
.build()))
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnJobDefinition.PodPropertiesPropertystatic final classAn implementation forCfnJobDefinition.PodPropertiesProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectThe properties of the container that's used on the Amazon EKS pod.default StringThe DNS policy for the pod.default ObjectIndicates if the pod uses the hosts' network IP address.default Objectdefault ObjectThese containers run before application containers, always runs to completion, and must complete successfully before the next container starts.default ObjectMetadata about the Kubernetes pod.default StringThe name of the service account that's used to run the pod.default ObjectIndicates if the processes in a container are shared, or visible, to other containers in the same pod.default ObjectSpecifies the volumes for a job definition that uses Amazon EKS resources.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getContainers
The properties of the container that's used on the Amazon EKS pod.This object is limited to 10 elements.
- See Also:
-
getDnsPolicy
The DNS policy for the pod.The default value is
ClusterFirst. If thehostNetworkparameter is not specified, the default isClusterFirstWithHostNet.ClusterFirstindicates 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- See Also:
-
getHostNetwork
Indicates if the pod uses the hosts' network IP address.The default value is
true. Setting this tofalseenables 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 .- See Also:
-
getImagePullSecrets
- See Also:
-
getInitContainers
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.
- See Also:
-
getMetadata
Metadata about the Kubernetes pod.For more information, see Understanding Kubernetes Objects in the Kubernetes documentation .
- See Also:
-
getServiceAccountName
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 .
- See Also:
-
getVolumes
Specifies the volumes for a job definition that uses Amazon EKS resources.- See Also:
-
builder
-