Package org.cdk8s.plus24
Class Job
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus24.Resource
-
- org.cdk8s.plus24.AbstractPod
-
- org.cdk8s.plus24.Workload
-
- org.cdk8s.plus24.Job
-
- All Implemented Interfaces:
IApiEndpoint
,IApiResource
,INetworkPolicyPeer
,IPodSelector
,IResource
,ISubject
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-07-08T00:25:14.223Z") @Stability(Stable) public class Job extends Workload
A Job creates one or more Pods and ensures that a specified number of them successfully terminate.As pods successfully complete, the Job tracks the successful completions. When a specified number of successful completions is reached, the task (ie, Job) is complete. Deleting a Job will clean up the Pods it created. A simple case is to create one Job object in order to reliably run one Pod to completion. The Job object will start a new Pod if the first Pod fails or is deleted (for example due to a node hardware failure or a node reboot). You can also use a Job to run multiple Pods in parallel.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Job.Builder
A fluent builder forJob
.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IApiResource
IApiResource.Jsii$Default
-
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.INetworkPolicyPeer
INetworkPolicyPeer.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IPodSelector
IPodSelector.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IResource
IResource.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.ISubject
ISubject.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
Job(software.amazon.jsii.JsiiObjectRef objRef)
Job(software.constructs.Construct scope, String id)
Job(software.constructs.Construct scope, String id, JobProps props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.cdk8s.Duration
getActiveDeadline()
Duration before job is terminated.protected org.cdk8s.ApiObject
getApiObject()
The underlying cdk8s API object.Number
getBackoffLimit()
Number of retries before marking failed.String
getResourceType()
The name of a resource type as it appears in the relevant API endpoint.org.cdk8s.Duration
getTtlAfterFinished()
TTL before the job is deleted after it is finished.-
Methods inherited from class org.cdk8s.plus24.Workload
getConnections, getMatchExpressions, getMatchLabels, getPodMetadata, getScheduling, select
-
Methods inherited from class org.cdk8s.plus24.AbstractPod
addContainer, addHostAlias, addInitContainer, addVolume, attachContainer, getAutomountServiceAccountToken, getContainers, getDns, getDockerRegistryAuth, getHostAliases, getHostNetwork, getInitContainers, getIsolate, getRestartPolicy, getSecurityContext, getServiceAccount, getTerminationGracePeriod, getVolumes, toNetworkPolicyPeerConfig, toPodSelector, toPodSelectorConfig, toSubjectConfiguration
-
Methods inherited from class org.cdk8s.plus24.Resource
asApiResource, asNonApiResource, getApiGroup, getApiVersion, getKind, getMetadata, getName, getPermissions, getResourceName
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Job
protected Job(software.amazon.jsii.JsiiObjectRef objRef)
-
Job
protected Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Job
@Stability(Stable) public Job(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable JobProps props)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
Job
@Stability(Stable) public Job(@NotNull software.constructs.Construct scope, @NotNull String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.
-
-
Method Detail
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObject
in classResource
- See Also:
- base.Resource.apiObject
-
getResourceType
@Stability(Stable) @NotNull public String getResourceType()
The name of a resource type as it appears in the relevant API endpoint.- Specified by:
getResourceType
in interfaceIApiResource
- Specified by:
getResourceType
in classResource
- See Also:
- https://kubernetes.io/docs/reference/access-authn-authz/rbac/#referring-to-resources
-
getActiveDeadline
@Stability(Stable) @Nullable public org.cdk8s.Duration getActiveDeadline()
Duration before job is terminated.If undefined, there is no deadline.
-
getBackoffLimit
@Stability(Stable) @Nullable public Number getBackoffLimit()
Number of retries before marking failed.
-
getTtlAfterFinished
@Stability(Stable) @Nullable public org.cdk8s.Duration getTtlAfterFinished()
TTL before the job is deleted after it is finished.
-
-