Package org.cdk8s.plus24
Class AzureDiskPersistentVolumeProps.Builder
- java.lang.Object
-
- org.cdk8s.plus24.AzureDiskPersistentVolumeProps.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<AzureDiskPersistentVolumeProps>
- Enclosing interface:
- AzureDiskPersistentVolumeProps
@Stability(Stable) public static final class AzureDiskPersistentVolumeProps.Builder extends Object implements software.amazon.jsii.Builder<AzureDiskPersistentVolumeProps>
A builder forAzureDiskPersistentVolumeProps
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
-
-
-
Method Detail
-
diskName
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder diskName(String diskName)
Sets the value ofAzureDiskPersistentVolumeProps.getDiskName()
- Parameters:
diskName
- The Name of the data disk in the blob storage. This parameter is required.- Returns:
this
-
diskUri
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder diskUri(String diskUri)
Sets the value ofAzureDiskPersistentVolumeProps.getDiskUri()
- Parameters:
diskUri
- The URI the data disk in the blob storage. This parameter is required.- Returns:
this
-
cachingMode
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder cachingMode(AzureDiskPersistentVolumeCachingMode cachingMode)
Sets the value ofAzureDiskPersistentVolumeProps.getCachingMode()
- Parameters:
cachingMode
- Host Caching mode.- Returns:
this
-
fsType
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder fsType(String fsType)
Sets the value ofAzureDiskPersistentVolumeProps.getFsType()
- Parameters:
fsType
- Filesystem type to mount. Must be a filesystem type supported by the host operating system.- Returns:
this
-
kind
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder kind(AzureDiskPersistentVolumeKind kind)
Sets the value ofAzureDiskPersistentVolumeProps.getKind()
- Parameters:
kind
- Kind of disk.- Returns:
this
-
readOnly
@Stability(Stable) public AzureDiskPersistentVolumeProps.Builder readOnly(Boolean readOnly)
Sets the value ofAzureDiskPersistentVolumeProps.getReadOnly()
- Parameters:
readOnly
- Force the ReadOnly setting in VolumeMounts.- Returns:
this
-
accessModes
@Stability(Stable) public AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps.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 AzureDiskPersistentVolumeProps build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<AzureDiskPersistentVolumeProps>
- Returns:
- a new instance of
AzureDiskPersistentVolumeProps
- Throws:
NullPointerException
- if any required attribute was not provided
-
-