Package org.cdk8s.plus20
Class Pod
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus20.Resource
-
- org.cdk8s.plus20.Pod
-
- All Implemented Interfaces:
IPodSpec,IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct
@Generated(value="jsii-pacmak/1.52.1 (build 5ccc8f6)", date="2022-01-14T19:05:22.122Z") @Stability(Stable) public class Pod extends Resource implements IPodSpec
Pod is a collection of containers that can run on a host.This resource is created by clients and scheduled onto hosts.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPod.BuilderA fluent builder forPod.-
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 org.cdk8s.plus20.IPodSpec
IPodSpec.Jsii$Default, IPodSpec.Jsii$Proxy
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IResource
IResource.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPod(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPod(software.amazon.jsii.JsiiObjectRef objRef)Pod(software.constructs.Construct scope, String id)Pod(software.constructs.Construct scope, String id, PodProps props)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContaineraddContainer(ContainerProps container)Add a container to the pod.voidaddVolume(Volume volume)Add a volume to the pod.protected org.cdk8s.ApiObjectgetApiObject()The underlying cdk8s API object.List<Container>getContainers()The containers belonging to the pod.RestartPolicygetRestartPolicy()Restart policy for all containers within the pod.IServiceAccountgetServiceAccount()The service account used to run this pod.List<Volume>getVolumes()The volumes associated with this pod.-
Methods inherited from class org.cdk8s.plus20.Resource
getMetadata, getName
-
Methods inherited from class software.constructs.Construct
onPrepare, onSynthesize, onValidate, toString
-
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
-
-
-
-
Constructor Detail
-
Pod
protected Pod(software.amazon.jsii.JsiiObjectRef objRef)
-
Pod
protected Pod(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
Pod
@Stability(Stable) public Pod(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable PodProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
Pod
@Stability(Stable) public Pod(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
addContainer
@Stability(Stable) @NotNull public Container addContainer(@NotNull ContainerProps container)
Add a container to the pod.- Specified by:
addContainerin interfaceIPodSpec- Parameters:
container- This parameter is required.
-
addVolume
@Stability(Stable) public void addVolume(@NotNull Volume volume)Add a volume to the pod.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObjectin classResource- See Also:
base.Resource.apiObject
-
getContainers
@Stability(Stable) @NotNull public List<Container> getContainers()
The containers belonging to the pod.Use
addContainerto add containers.- Specified by:
getContainersin interfaceIPodSpec
-
getVolumes
@Stability(Stable) @NotNull public List<Volume> getVolumes()
The volumes associated with this pod.Use
addVolumeto add volumes.- Specified by:
getVolumesin interfaceIPodSpec
-
getRestartPolicy
@Stability(Stable) @Nullable public RestartPolicy getRestartPolicy()
Restart policy for all containers within the pod.- Specified by:
getRestartPolicyin interfaceIPodSpec
-
getServiceAccount
@Stability(Stable) @Nullable public IServiceAccount getServiceAccount()
The service account used to run this pod.- Specified by:
getServiceAccountin interfaceIPodSpec
-
-