All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.kubernetes.apps.v1.kotlin.inputs.StatefulSetPersistentVolumeClaimRetentionPolicyArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.apps.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kubernetes.apps.v1.inputs.StatefulSetPersistentVolumeClaimRetentionPolicyArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * StatefulSetPersistentVolumeClaimRetentionPolicy describes the policy used for PVCs created from the StatefulSet VolumeClaimTemplates.
 * @property whenDeleted WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.
 * @property whenScaled WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.
 */
public data class StatefulSetPersistentVolumeClaimRetentionPolicyArgs(
    public val whenDeleted: Output? = null,
    public val whenScaled: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.apps.v1.inputs.StatefulSetPersistentVolumeClaimRetentionPolicyArgs =
        com.pulumi.kubernetes.apps.v1.inputs.StatefulSetPersistentVolumeClaimRetentionPolicyArgs.builder()
            .whenDeleted(whenDeleted?.applyValue({ args0 -> args0 }))
            .whenScaled(whenScaled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [StatefulSetPersistentVolumeClaimRetentionPolicyArgs].
 */
@PulumiTagMarker
public class StatefulSetPersistentVolumeClaimRetentionPolicyArgsBuilder internal constructor() {
    private var whenDeleted: Output? = null

    private var whenScaled: Output? = null

    /**
     * @param value WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.
     */
    @JvmName("qeedgrwkblmcmlug")
    public suspend fun whenDeleted(`value`: Output) {
        this.whenDeleted = value
    }

    /**
     * @param value WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.
     */
    @JvmName("qwxtssuylcmrmikg")
    public suspend fun whenScaled(`value`: Output) {
        this.whenScaled = value
    }

    /**
     * @param value WhenDeleted specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is deleted. The default policy of `Retain` causes PVCs to not be affected by StatefulSet deletion. The `Delete` policy causes those PVCs to be deleted.
     */
    @JvmName("eoapipkpaurisuxd")
    public suspend fun whenDeleted(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.whenDeleted = mapped
    }

    /**
     * @param value WhenScaled specifies what happens to PVCs created from StatefulSet VolumeClaimTemplates when the StatefulSet is scaled down. The default policy of `Retain` causes PVCs to not be affected by a scaledown. The `Delete` policy causes the associated PVCs for any excess pods above the replica count to be deleted.
     */
    @JvmName("uuaacipcykqjtjxh")
    public suspend fun whenScaled(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.whenScaled = mapped
    }

    internal fun build(): StatefulSetPersistentVolumeClaimRetentionPolicyArgs =
        StatefulSetPersistentVolumeClaimRetentionPolicyArgs(
            whenDeleted = whenDeleted,
            whenScaled = whenScaled,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy