@Generated(value="jsii-pacmak/1.13.0 (build 385c325)", date="2020-10-21T06:58:44.667Z") @Stability(value=Experimental) public class Job extends Resource implements IPodTemplate
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.
| Modifier and Type | Class and Description |
|---|---|
static class |
Job.Builder
(experimental) A fluent builder for
Job. |
software.amazon.jsii.JsiiObject.InitializationModeIPodTemplate.Jsii$Proxy| Modifier | Constructor and Description |
|---|---|
|
Job(software.constructs.Construct scope,
String id) |
|
Job(software.constructs.Construct scope,
String id,
JobProps props) |
protected |
Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Job(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
void |
addContainer(Container container)
(experimental) Add a container to the pod.
|
void |
addVolume(Volume volume)
(experimental) Add a volume to the pod.
|
protected ApiObject |
getApiObject()
(experimental) The underlying cdk8s API object.
|
List<Container> |
getContainers()
(experimental) The containers belonging to the pod.
|
ApiObjectMetadataDefinition |
getPodMetadata()
(experimental) Provides read/write access to the underlying pod metadata of the resource.
|
RestartPolicy |
getRestartPolicy()
(experimental) Restart policy for all containers within the pod.
|
IServiceAccount |
getServiceAccount()
(experimental) The service account used to run this pod.
|
Duration |
getTtlAfterFinished()
(experimental) TTL before the job is deleted after it is finished.
|
List<Volume> |
getVolumes()
(experimental) The volumes associated with this pod.
|
getMetadata, getNameonPrepare, onSynthesize, onValidate, toStringjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSetprotected Job(software.amazon.jsii.JsiiObjectRef objRef)
protected Job(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public Job(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@Nullable
JobProps props)
scope - This parameter is required.id - This parameter is required.props - @Stability(value=Experimental)
public Job(@NotNull
software.constructs.Construct scope,
@NotNull
String id)
scope - This parameter is required.id - This parameter is required.@Stability(value=Experimental)
public void addContainer(@NotNull
Container container)
addContainer in interface IPodSpeccontainer - This parameter is required.@Stability(value=Experimental)
public void addVolume(@NotNull
Volume volume)
@Stability(value=Experimental) @NotNull protected ApiObject getApiObject()
getApiObject in class Resourcebase.Resource.apiObject@Stability(value=Experimental) @NotNull public List<Container> getContainers()
Use addContainer to add containers.
getContainers in interface IPodSpec@Stability(value=Experimental) @NotNull public ApiObjectMetadataDefinition getPodMetadata()
getPodMetadata in interface IPodTemplate@Stability(value=Experimental) @NotNull public List<Volume> getVolumes()
Use addVolume to add volumes.
getVolumes in interface IPodSpec@Stability(value=Experimental) @Nullable public RestartPolicy getRestartPolicy()
getRestartPolicy in interface IPodSpec@Stability(value=Experimental) @Nullable public IServiceAccount getServiceAccount()
getServiceAccount in interface IPodSpec@Stability(value=Experimental) @Nullable public Duration getTtlAfterFinished()
Copyright © 2020. All rights reserved.