Package org.cdk8s.plus20
Class PersistentVolumeProps.Builder
- java.lang.Object
-
- org.cdk8s.plus20.PersistentVolumeProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<PersistentVolumeProps>
- Enclosing interface:
- PersistentVolumeProps
@Stability(Stable) public static final class PersistentVolumeProps.Builder extends Object implements software.amazon.jsii.Builder<PersistentVolumeProps>
A builder forPersistentVolumeProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
accessModes
@Stability(Stable) public PersistentVolumeProps.Builder accessModes(List<? extends PersistentVolumeAccessMode> accessModes)
Sets the value ofPersistentVolumeProps.getAccessModes()- Parameters:
accessModes- Contains all ways the volume can be mounted.- Returns:
this
-
claim
@Stability(Stable) public PersistentVolumeProps.Builder claim(IPersistentVolumeClaim claim)
Sets the value ofPersistentVolumeProps.getClaim()- Parameters:
claim- Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. Expected to be non-nil when bound.- Returns:
this
-
mountOptions
@Stability(Stable) public PersistentVolumeProps.Builder mountOptions(List<String> mountOptions)
Sets the value ofPersistentVolumeProps.getMountOptions()- Parameters:
mountOptions- A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid.- Returns:
this
-
reclaimPolicy
@Stability(Stable) public PersistentVolumeProps.Builder reclaimPolicy(PersistentVolumeReclaimPolicy reclaimPolicy)
Sets the value ofPersistentVolumeProps.getReclaimPolicy()- Parameters:
reclaimPolicy- When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource. The reclaim policy tells the cluster what to do with the volume after it has been released of its claim.- Returns:
this
-
storage
@Stability(Stable) public PersistentVolumeProps.Builder storage(org.cdk8s.Size storage)
Sets the value ofPersistentVolumeProps.getStorage()- Parameters:
storage- What is the storage capacity of this volume.- Returns:
this
-
storageClassName
@Stability(Stable) public PersistentVolumeProps.Builder storageClassName(String storageClassName)
Sets the value ofPersistentVolumeProps.getStorageClassName()- Parameters:
storageClassName- Name of StorageClass to which this persistent volume belongs.- Returns:
this
-
volumeMode
@Stability(Stable) public PersistentVolumeProps.Builder volumeMode(PersistentVolumeMode volumeMode)
Sets the value ofPersistentVolumeProps.getVolumeMode()- Parameters:
volumeMode- Defines what type of volume is required by the claim.- Returns:
this
-
metadata
@Stability(Stable) public PersistentVolumeProps.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
Sets the value ofResourceProps.getMetadata()- Parameters:
metadata- Metadata that all persisted resources must have, which includes all objects users must create.- Returns:
this
-
build
@Stability(Stable) public PersistentVolumeProps build()
Builds the configured instance.- Specified by:
buildin interfacesoftware.amazon.jsii.Builder<PersistentVolumeProps>- Returns:
- a new instance of
PersistentVolumeProps - Throws:
NullPointerException- if any required attribute was not provided
-
-