Class AwsElasticBlockStorePersistentVolume.Builder
- java.lang.Object
-
- org.cdk8s.plus24.AwsElasticBlockStorePersistentVolume.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolume>
- Enclosing class:
- AwsElasticBlockStorePersistentVolume
@Stability(Stable) public static final class AwsElasticBlockStorePersistentVolume.Builder extends Object implements software.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolume>
A fluent builder forAwsElasticBlockStorePersistentVolume
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AwsElasticBlockStorePersistentVolume.Builder
accessModes(List<? extends PersistentVolumeAccessMode> accessModes)
Contains all ways the volume can be mounted.AwsElasticBlockStorePersistentVolume
build()
AwsElasticBlockStorePersistentVolume.Builder
claim(IPersistentVolumeClaim claim)
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.static AwsElasticBlockStorePersistentVolume.Builder
create(software.constructs.Construct scope, String id)
AwsElasticBlockStorePersistentVolume.Builder
fsType(String fsType)
Filesystem type of the volume that you want to mount.AwsElasticBlockStorePersistentVolume.Builder
metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.AwsElasticBlockStorePersistentVolume.Builder
mountOptions(List<String> mountOptions)
A list of mount options, e.g.AwsElasticBlockStorePersistentVolume.Builder
partition(Number partition)
The partition in the volume that you want to mount.AwsElasticBlockStorePersistentVolume.Builder
readOnly(Boolean readOnly)
Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".AwsElasticBlockStorePersistentVolume.Builder
reclaimPolicy(PersistentVolumeReclaimPolicy reclaimPolicy)
When a user is done with their volume, they can delete the PVC objects from the API that allows reclamation of the resource.AwsElasticBlockStorePersistentVolume.Builder
storage(org.cdk8s.Size storage)
What is the storage capacity of this volume.AwsElasticBlockStorePersistentVolume.Builder
storageClassName(String storageClassName)
Name of StorageClass to which this persistent volume belongs.AwsElasticBlockStorePersistentVolume.Builder
volumeId(String volumeId)
Unique ID of the persistent disk resource in AWS (Amazon EBS volume).AwsElasticBlockStorePersistentVolume.Builder
volumeMode(PersistentVolumeMode volumeMode)
Defines what type of volume is required by the claim.
-
-
-
Method Detail
-
create
@Stability(Stable) public static AwsElasticBlockStorePersistentVolume.Builder create(software.constructs.Construct scope, String id)
- Parameters:
scope
- This parameter is required.id
- This parameter is required.- Returns:
- a new instance of
AwsElasticBlockStorePersistentVolume.Builder
.
-
metadata
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder metadata(org.cdk8s.ApiObjectMetadata metadata)
Metadata that all persisted resources must have, which includes all objects users must create.- Parameters:
metadata
- Metadata that all persisted resources must have, which includes all objects users must create. This parameter is required.- Returns:
this
-
accessModes
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder accessModes(List<? extends PersistentVolumeAccessMode> accessModes)
Contains all ways the volume can be mounted.Default: - No access modes.
- Parameters:
accessModes
- Contains all ways the volume can be mounted. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes
-
claim
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder claim(IPersistentVolumeClaim claim)
Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim.Expected to be non-nil when bound.
Default: - Not bound to a specific claim.
- Parameters:
claim
- Part of a bi-directional binding between PersistentVolume and PersistentVolumeClaim. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#binding
-
mountOptions
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder mountOptions(List<String> mountOptions)
A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid.Default: - No options.
- Parameters:
mountOptions
- A list of mount options, e.g. ["ro", "soft"]. Not validated - mount will simply fail if one is invalid. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes/#mount-options
-
reclaimPolicy
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder reclaimPolicy(PersistentVolumeReclaimPolicy 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.
Default: PersistentVolumeReclaimPolicy.RETAIN
- 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. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#reclaiming
-
storage
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder storage(org.cdk8s.Size storage)
What is the storage capacity of this volume.Default: - No specified.
- Parameters:
storage
- What is the storage capacity of this volume. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
-
storageClassName
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder storageClassName(String storageClassName)
Name of StorageClass to which this persistent volume belongs.Default: - Volume does not belong to any storage class.
- Parameters:
storageClassName
- Name of StorageClass to which this persistent volume belongs. This parameter is required.- Returns:
this
-
volumeMode
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder volumeMode(PersistentVolumeMode volumeMode)
Defines what type of volume is required by the claim.Default: VolumeMode.FILE_SYSTEM
- Parameters:
volumeMode
- Defines what type of volume is required by the claim. This parameter is required.- Returns:
this
-
volumeId
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder volumeId(String volumeId)
Unique ID of the persistent disk resource in AWS (Amazon EBS volume).More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
- Parameters:
volumeId
- Unique ID of the persistent disk resource in AWS (Amazon EBS volume). This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
fsType
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder fsType(String fsType)
Filesystem type of the volume that you want to mount.Tip: Ensure that the filesystem type is supported by the host operating system.
Default: 'ext4'
- Parameters:
fsType
- Filesystem type of the volume that you want to mount. This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
partition
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder partition(Number 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).
Default: - No partition.
- Parameters:
partition
- The partition in the volume that you want to mount. This parameter is required.- Returns:
this
-
readOnly
@Stability(Stable) public AwsElasticBlockStorePersistentVolume.Builder readOnly(Boolean readOnly)
Specify "true" to force and set the ReadOnly property in VolumeMounts to "true".Default: false
- Parameters:
readOnly
- Specify "true" to force and set the ReadOnly property in VolumeMounts to "true". This parameter is required.- Returns:
this
- See Also:
- https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore
-
build
@Stability(Stable) public AwsElasticBlockStorePersistentVolume build()
- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AwsElasticBlockStorePersistentVolume>
- Returns:
- a newly built instance of
AwsElasticBlockStorePersistentVolume
.
-
-