Package org.cdk8s.plus24.k8s
Class StatefulSetPersistentVolumeClaimRetentionPolicy.Builder
- java.lang.Object
-
- org.cdk8s.plus24.k8s.StatefulSetPersistentVolumeClaimRetentionPolicy.Builder
-
- All Implemented Interfaces:
software.amazon.jsii.Builder<StatefulSetPersistentVolumeClaimRetentionPolicy>
- Enclosing interface:
- StatefulSetPersistentVolumeClaimRetentionPolicy
@Stability(Stable) public static final class StatefulSetPersistentVolumeClaimRetentionPolicy.Builder extends Object implements software.amazon.jsii.Builder<StatefulSetPersistentVolumeClaimRetentionPolicy>
A builder forStatefulSetPersistentVolumeClaimRetentionPolicy
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatefulSetPersistentVolumeClaimRetentionPolicy
build()
Builds the configured instance.StatefulSetPersistentVolumeClaimRetentionPolicy.Builder
whenDeleted(String whenDeleted)
Sets the value ofStatefulSetPersistentVolumeClaimRetentionPolicy.getWhenDeleted()
StatefulSetPersistentVolumeClaimRetentionPolicy.Builder
whenScaled(String whenScaled)
Sets the value ofStatefulSetPersistentVolumeClaimRetentionPolicy.getWhenScaled()
-
-
-
Method Detail
-
whenDeleted
@Stability(Stable) public StatefulSetPersistentVolumeClaimRetentionPolicy.Builder whenDeleted(String whenDeleted)
Sets the value ofStatefulSetPersistentVolumeClaimRetentionPolicy.getWhenDeleted()
- Parameters:
whenDeleted
- WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy ofRetain
causes PVCs to not be affected by StatefulSet deletion. TheDelete
policy causes those PVCs to be deleted.- Returns:
this
-
whenScaled
@Stability(Stable) public StatefulSetPersistentVolumeClaimRetentionPolicy.Builder whenScaled(String whenScaled)
Sets the value ofStatefulSetPersistentVolumeClaimRetentionPolicy.getWhenScaled()
- Parameters:
whenScaled
- WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy ofRetain
causes PVCs to not be affected by a scaledown. TheDelete
policy causes the associated PVCs for any excess pods above the replica count to be deleted.- Returns:
this
-
build
@Stability(Stable) public StatefulSetPersistentVolumeClaimRetentionPolicy build()
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<StatefulSetPersistentVolumeClaimRetentionPolicy>
- Returns:
- a new instance of
StatefulSetPersistentVolumeClaimRetentionPolicy
- Throws:
NullPointerException
- if any required attribute was not provided
-
-