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()
.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)
.metadata(MetadataProperty.builder()
.labels(labels)
.build())
.serviceAccountName("serviceAccountName")
.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();
-
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 ObjectCfnJobDefinition.PodPropertiesProperty.Metadata.default StringThe name of the service account that's used to run the 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. -
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. If no value was specified fordnsPolicyin the RegisterJobDefinition API operation, then no value will be returned fordnsPolicyby either of DescribeJobDefinitions or DescribeJobs API operations. The pod spec setting will contain eitherClusterFirstorClusterFirstWithHostNet, depending on the value of thehostNetworkparameter. For more information, see Pod's DNS policy in the Kubernetes documentation .Valid values:
Default|ClusterFirst|ClusterFirstWithHostNet -
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 . -
getMetadata
CfnJobDefinition.PodPropertiesProperty.Metadata. -
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 .
-
getVolumes
Specifies the volumes for a job definition that uses Amazon EKS resources. -
builder
-