Class EksJobDefinition
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.Resource
software.amazon.awscdk.services.batch.EksJobDefinition
- All Implemented Interfaces:
IEnvironmentAware,IResource,IEksJobDefinition,IJobDefinition,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.119.0 (build 1634eac)",
date="2025-12-01T16:02:15.200Z")
@Stability(Stable)
public class EksJobDefinition
extends Resource
implements IEksJobDefinition, IJobDefinition
A JobDefinition that uses Eks orchestration.
Example:
EksJobDefinition jobDefn = EksJobDefinition.Builder.create(this, "eksf2")
.container(EksContainerDefinition.Builder.create(this, "container")
.image(ContainerImage.fromRegistry("amazon/amazon-ecs-sample"))
.volumes(List.of(EksVolume.emptyDir(EmptyDirVolumeOptions.builder()
.name("myEmptyDirVolume")
.mountPath("/mount/path")
.medium(EmptyDirMediumType.MEMORY)
.readonly(true)
.sizeLimit(Size.mebibytes(2048))
.build())))
.build())
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IEksJobDefinition
IEksJobDefinition.Jsii$Default, IEksJobDefinition.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IJobDefinition
IJobDefinition.Jsii$Default, IJobDefinition.Jsii$ProxyNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default -
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedEksJobDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedEksJobDefinition(software.amazon.jsii.JsiiObjectRef objRef) EksJobDefinition(software.constructs.Construct scope, String id, EksJobDefinitionProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRetryStrategy(RetryStrategy strategy) Add a RetryStrategy to this JobDefinition.static IEksJobDefinitionfromEksJobDefinitionArn(software.constructs.Construct scope, String id, String eksJobDefinitionArn) Import an EksJobDefinition by its arn.The container this Job Definition will run.The DNS Policy of the pod used by this Job Definition.The ARN of this job definition.The name of this job definition.The default parameters passed to the container These parameters can be referenced in thecommandthat you give to the container.The number of times to retry a job.Defines the retry behavior for this job.The priority of this Job.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.If specified, the Pod used by this Job Definition will use the host's network IP address.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.interfaces.IEnvironmentAware
getEnvMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
PROPERTY_INJECTION_ID
Uniquely identifies this class.
-
-
Constructor Details
-
EksJobDefinition
protected EksJobDefinition(software.amazon.jsii.JsiiObjectRef objRef) -
EksJobDefinition
protected EksJobDefinition(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
EksJobDefinition
@Stability(Stable) public EksJobDefinition(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull EksJobDefinitionProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props- This parameter is required.
-
-
Method Details
-
fromEksJobDefinitionArn
@Stability(Stable) @NotNull public static IEksJobDefinition fromEksJobDefinitionArn(@NotNull software.constructs.Construct scope, @NotNull String id, @NotNull String eksJobDefinitionArn) Import an EksJobDefinition by its arn.- Parameters:
scope- This parameter is required.id- This parameter is required.eksJobDefinitionArn- This parameter is required.
-
addRetryStrategy
Add a RetryStrategy to this JobDefinition.- Specified by:
addRetryStrategyin interfaceIJobDefinition- Parameters:
strategy- This parameter is required.
-
getContainer
The container this Job Definition will run.- Specified by:
getContainerin interfaceIEksJobDefinition
-
getJobDefinitionArn
The ARN of this job definition.- Specified by:
getJobDefinitionArnin interfaceIJobDefinition
-
getJobDefinitionName
The name of this job definition.- Specified by:
getJobDefinitionNamein interfaceIJobDefinition
-
getRetryStrategies
Defines the retry behavior for this job.- Specified by:
getRetryStrategiesin interfaceIJobDefinition
-
getDnsPolicy
The DNS Policy of the pod used by this Job Definition.- Specified by:
getDnsPolicyin interfaceIEksJobDefinition- See Also:
-
getParameters
The default parameters passed to the container These parameters can be referenced in thecommandthat you give to the container.- Specified by:
getParametersin interfaceIJobDefinition- See Also:
-
getRetryAttempts
The number of times to retry a job.The job is retried on failure the same number of attempts as the value.
- Specified by:
getRetryAttemptsin interfaceIJobDefinition
-
getSchedulingPriority
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.
- Specified by:
getSchedulingPriorityin interfaceIJobDefinition
-
getServiceAccount
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.
- Specified by:
getServiceAccountin interfaceIEksJobDefinition- See Also:
-
getTimeout
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.
- Specified by:
getTimeoutin interfaceIJobDefinition
-
getUseHostNetwork
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.
- Specified by:
getUseHostNetworkin interfaceIEksJobDefinition- See Also:
-