Package org.cdk8s.plus25.k8s
Class StatefulSetPersistentVolumeClaimRetentionPolicy.Builder
- java.lang.Object
-
- org.cdk8s.plus25.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 StatefulSetPersistentVolumeClaimRetentionPolicybuild()Builds the configured instance.StatefulSetPersistentVolumeClaimRetentionPolicy.BuilderwhenDeleted(String whenDeleted)Sets the value ofStatefulSetPersistentVolumeClaimRetentionPolicy.getWhenDeleted()StatefulSetPersistentVolumeClaimRetentionPolicy.BuilderwhenScaled(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 ofRetaincauses PVCs to not be affected by StatefulSet deletion. TheDeletepolicy 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 ofRetaincauses PVCs to not be affected by a scaledown. TheDeletepolicy 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:
buildin interfacesoftware.amazon.jsii.Builder<StatefulSetPersistentVolumeClaimRetentionPolicy>- Returns:
- a new instance of
StatefulSetPersistentVolumeClaimRetentionPolicy - Throws:
NullPointerException- if any required attribute was not provided
-
-