Package org.cdk8s.plus24
Class PersistentVolumeClaim
- java.lang.Object
-
- software.amazon.jsii.JsiiObject
-
- software.constructs.Construct
-
- org.cdk8s.plus24.Resource
-
- org.cdk8s.plus24.PersistentVolumeClaim
-
- All Implemented Interfaces:
IApiEndpoint
,IApiResource
,IPersistentVolumeClaim
,IResource
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.75.0 (build 63bb957)", date="2023-02-20T02:42:01.902Z") @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 class
PersistentVolumeClaim.Builder
A 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.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.IPersistentVolumeClaim
IPersistentVolumeClaim.Jsii$Default, IPersistentVolumeClaim.Jsii$Proxy
-
Nested classes/interfaces inherited from interface org.cdk8s.plus24.IResource
IResource.Jsii$Default
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PersistentVolumeClaim(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
protected
PersistentVolumeClaim(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 void
bind(IPersistentVolume vol)
Bind a claim to a specific volume.static IPersistentVolumeClaim
fromClaimName(software.constructs.Construct scope, String id, String claimName)
Imports a pvc from the cluster as a reference.List<PersistentVolumeAccessMode>
getAccessModes()
Access modes requirement of this claim.protected org.cdk8s.ApiObject
getApiObject()
The underlying cdk8s API object.String
getResourceType()
The name of a resource type as it appears in the relevant API endpoint.org.cdk8s.Size
getStorage()
Storage requirement of this claim.String
getStorageClassName()
Storage class requirment of this claim.IPersistentVolume
getVolume()
PV this claim is bound to.PersistentVolumeMode
getVolumeMode()
Volume mode requirement of this claim.-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.cdk8s.plus24.IApiResource
getApiGroup, getResourceName
-
Methods inherited from interface org.cdk8s.plus24.IResource
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 software.constructs.Construct scope, @NotNull String id, @NotNull String claimName)
Imports a pvc from the cluster as a reference.- Parameters:
scope
- This parameter is required.id
- This parameter is required.claimName
- 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.- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes/#binding
-
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
-
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.
-
-