Package org.cdk8s.plus24
Class GCEPersistentDiskPersistentVolumeProps.Builder
- java.lang.Object
-
- org.cdk8s.plus24.GCEPersistentDiskPersistentVolumeProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<GCEPersistentDiskPersistentVolumeProps>
- Enclosing interface:
- GCEPersistentDiskPersistentVolumeProps
@Stability(Stable) public static final class GCEPersistentDiskPersistentVolumeProps.Builder extends Object implements software.amazon.jsii.Builder<GCEPersistentDiskPersistentVolumeProps>
A builder forGCEPersistentDiskPersistentVolumeProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
pdName
@Stability(Stable) public GCEPersistentDiskPersistentVolumeProps.Builder pdName(String pdName)
Sets the value ofGCEPersistentDiskPersistentVolumeProps.getPdName()
- Parameters:
pdName
- Unique name of the PD resource in GCE. This parameter is required. Used to identify the disk in GCE.- Returns:
this
-
fsType
@Stability(Stable) public GCEPersistentDiskPersistentVolumeProps.Builder fsType(String fsType)
Sets the value ofGCEPersistentDiskPersistentVolumeProps.getFsType()
- Parameters:
fsType
- Filesystem type of the volume that you want to mount. Tip: Ensure that the filesystem type is supported by the host operating system.- Returns:
this
-
partition
@Stability(Stable) public GCEPersistentDiskPersistentVolumeProps.Builder partition(Number partition)
Sets the value ofGCEPersistentDiskPersistentVolumeProps.getPartition()
- Parameters:
partition
- The partition in the volume that you want to mount. If omitted, the default is to mount by volume name. Examples: For volume /dev/sda1, you specify the partition as "1". Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).- Returns:
this
-
readOnly
@Stability(Stable) public GCEPersistentDiskPersistentVolumeProps.Builder readOnly(Boolean readOnly)
Sets the value ofGCEPersistentDiskPersistentVolumeProps.getReadOnly()
- Parameters:
readOnly
- Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".- Returns:
this
-
accessModes
@Stability(Stable) public GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps.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 GCEPersistentDiskPersistentVolumeProps build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<GCEPersistentDiskPersistentVolumeProps>
- Returns:
- a new instance of
GCEPersistentDiskPersistentVolumeProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-