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:
IResource
,IEksJobDefinition
,IJobDefinition
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)",
date="2024-09-11T18:01:12.008Z")
@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 classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IEksJobDefinition
IEksJobDefinition.Jsii$Default, IEksJobDefinition.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.batch.IJobDefinition
IJobDefinition.Jsii$Default, IJobDefinition.Jsii$Proxy
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
EksJobDefinition
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
EksJobDefinition
(software.amazon.jsii.JsiiObjectRef objRef) EksJobDefinition
(software.constructs.Construct scope, String id, EksJobDefinitionProps props) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRetryStrategy
(RetryStrategy strategy) Add a RetryStrategy to this JobDefinition.static IEksJobDefinition
fromEksJobDefinitionArn
(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 thecommand
that 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, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
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:
addRetryStrategy
in interfaceIJobDefinition
- Parameters:
strategy
- This parameter is required.
-
getContainer
The container this Job Definition will run.- Specified by:
getContainer
in interfaceIEksJobDefinition
-
getJobDefinitionArn
The ARN of this job definition.- Specified by:
getJobDefinitionArn
in interfaceIJobDefinition
-
getJobDefinitionName
The name of this job definition.- Specified by:
getJobDefinitionName
in interfaceIJobDefinition
-
getRetryStrategies
Defines the retry behavior for this job.- Specified by:
getRetryStrategies
in interfaceIJobDefinition
-
getDnsPolicy
The DNS Policy of the pod used by this Job Definition.- Specified by:
getDnsPolicy
in interfaceIEksJobDefinition
- See Also:
-
getParameters
The default parameters passed to the container These parameters can be referenced in thecommand
that you give to the container.- Specified by:
getParameters
in 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:
getRetryAttempts
in 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:
getSchedulingPriority
in 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:
getServiceAccount
in 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:
getTimeout
in 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:
getUseHostNetwork
in interfaceIEksJobDefinition
- See Also:
-