Package org.cdk8s.plus20
Class PersistentVolumeClaim
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus20.Resource
-
- org.cdk8s.plus20.PersistentVolumeClaim
-
- All Implemented Interfaces:
IApiEndpoint,IApiResource,IPersistentVolumeClaim,IResource,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.59.0 (build eb02c92)", date="2022-05-18T23:19:48.636Z") @Stability(Stable) public class PersistentVolumeClaim extends Resource implements IPersistentVolumeClaim
A PersistentVolumeClaim (PVC) is a request for storage by a user.It is similar to a Pod. Pods consume node resources and PVCs consume PV resources. Pods can request specific levels of resources (CPU and Memory). Claims can request specific size and access modes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPersistentVolumeClaim.BuilderA fluent builder forPersistentVolumeClaim.-
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IApiEndpoint
IApiEndpoint.Jsii$Default
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.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.plus20.IPersistentVolumeClaim
IPersistentVolumeClaim.Jsii$Default, IPersistentVolumeClaim.Jsii$Proxy
-
Nested classes/interfaces inherited from interface org.cdk8s.plus20.IResource
IResource.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPersistentVolumeClaim(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)protectedPersistentVolumeClaim(software.amazon.jsii.JsiiObjectRef objRef)PersistentVolumeClaim(software.constructs.Construct scope, String id)PersistentVolumeClaim(software.constructs.Construct scope, String id, PersistentVolumeClaimProps props)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbind(IPersistentVolume vol)Bind a claim to a specific volume.static IPersistentVolumeClaimfromClaimName(String claimName)Imports a pvc from the cluster as a reference.List<PersistentVolumeAccessMode>getAccessModes()Access modes requirement of this claim.protected org.cdk8s.ApiObjectgetApiObject()The underlying cdk8s API object.StringgetResourceType()The name of a resource type as it appears in the relevant API endpoint.org.cdk8s.SizegetStorage()Storage requirement of this claim.StringgetStorageClassName()Storage class requirment of this claim.IPersistentVolumegetVolume()PV this claim is bound to.PersistentVolumeModegetVolumeMode()Volume mode requirement of this claim.-
Methods inherited from class org.cdk8s.plus20.Resource
asApiResource, asNonApiResource, getApiGroup, getApiVersion, getKind, getMetadata, getName, getResourceName
-
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 org.cdk8s.plus20.IResource
getApiGroup, getApiVersion, getKind, getName
-
-
-
-
Constructor Detail
-
PersistentVolumeClaim
protected PersistentVolumeClaim(software.amazon.jsii.JsiiObjectRef objRef)
-
PersistentVolumeClaim
protected PersistentVolumeClaim(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
PersistentVolumeClaim
@Stability(Stable) public PersistentVolumeClaim(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable PersistentVolumeClaimProps props)- Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
PersistentVolumeClaim
@Stability(Stable) public PersistentVolumeClaim(@NotNull software.constructs.Construct scope, @NotNull String id)- Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Detail
-
fromClaimName
@Stability(Stable) @NotNull public static IPersistentVolumeClaim fromClaimName(@NotNull String claimName)
Imports a pvc from the cluster as a reference.- Parameters:
claimName- The name of the pvc to reference. This parameter is required.
-
bind
@Stability(Stable) public void bind(@NotNull IPersistentVolume vol)Bind a claim to a specific volume.Note that you must also bind the volume to the claim.
- Parameters:
vol- The PV to bind to. This parameter is required.
-
getApiObject
@Stability(Stable) @NotNull protected org.cdk8s.ApiObject getApiObject()
The underlying cdk8s API object.- Specified by:
getApiObjectin 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:
getResourceTypein interfaceIApiResource- Specified by:
getResourceTypein classResource
-
getVolumeMode
@Stability(Stable) @NotNull public PersistentVolumeMode getVolumeMode()
Volume mode requirement of this claim.
-
getAccessModes
@Stability(Stable) @Nullable public List<PersistentVolumeAccessMode> getAccessModes()
Access modes requirement of this claim.
-
getStorage
@Stability(Stable) @Nullable public org.cdk8s.Size getStorage()
Storage requirement of this claim.
-
getStorageClassName
@Stability(Stable) @Nullable public String getStorageClassName()
Storage class requirment of this claim.
-
getVolume
@Stability(Stable) @Nullable public IPersistentVolume getVolume()
PV this claim is bound to.Undefined means the claim is not bound to any specific volume.
-
-