Package org.cdk8s.plus24
Class AwsElasticBlockStorePersistentVolumeProps.Builder
- java.lang.Object
-
- org.cdk8s.plus24.AwsElasticBlockStorePersistentVolumeProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolumeProps>
- Enclosing interface:
- AwsElasticBlockStorePersistentVolumeProps
@Stability(Stable) public static final class AwsElasticBlockStorePersistentVolumeProps.Builder extends Object implements software.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolumeProps>
A builder forAwsElasticBlockStorePersistentVolumeProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
volumeId
@Stability(Stable) public AwsElasticBlockStorePersistentVolumeProps.Builder volumeId(String volumeId)
Sets the value ofAwsElasticBlockStorePersistentVolumeProps.getVolumeId()
- Parameters:
volumeId
- Unique ID of the persistent disk resource in AWS (Amazon EBS volume). This parameter is required. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore- Returns:
this
-
fsType
@Stability(Stable) public AwsElasticBlockStorePersistentVolumeProps.Builder fsType(String fsType)
Sets the value ofAwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.Builder partition(Number partition)
Sets the value ofAwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.Builder readOnly(Boolean readOnly)
Sets the value ofAwsElasticBlockStorePersistentVolumeProps.getReadOnly()
- Parameters:
readOnly
- Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".- Returns:
this
-
accessModes
@Stability(Stable) public AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps.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 AwsElasticBlockStorePersistentVolumeProps build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolumeProps>
- Returns:
- a new instance of
AwsElasticBlockStorePersistentVolumeProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-