com.pulumi.gcp.compute.kotlin.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.compute.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property maxRetentionDays Maximum age of the snapshot that is allowed to be kept.
* @property onSourceDiskDelete Specifies the behavior to apply to scheduled snapshots when
* the source disk is deleted.
* Default value is `KEEP_AUTO_SNAPSHOTS`.
* Possible values are: `KEEP_AUTO_SNAPSHOTS`, `APPLY_RETENTION_POLICY`.
*/
public data class ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
public val maxRetentionDays: Output,
public val onSourceDiskDelete: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs =
com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder()
.maxRetentionDays(maxRetentionDays.applyValue({ args0 -> args0 }))
.onSourceDiskDelete(onSourceDiskDelete?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs].
*/
@PulumiTagMarker
public class ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgsBuilder internal constructor() {
private var maxRetentionDays: Output? = null
private var onSourceDiskDelete: Output? = null
/**
* @param value Maximum age of the snapshot that is allowed to be kept.
*/
@JvmName("shohdndyqcwnnqmm")
public suspend fun maxRetentionDays(`value`: Output) {
this.maxRetentionDays = value
}
/**
* @param value Specifies the behavior to apply to scheduled snapshots when
* the source disk is deleted.
* Default value is `KEEP_AUTO_SNAPSHOTS`.
* Possible values are: `KEEP_AUTO_SNAPSHOTS`, `APPLY_RETENTION_POLICY`.
*/
@JvmName("vrmxxpxppmxfsdvv")
public suspend fun onSourceDiskDelete(`value`: Output) {
this.onSourceDiskDelete = value
}
/**
* @param value Maximum age of the snapshot that is allowed to be kept.
*/
@JvmName("fephslvyghhmkluf")
public suspend fun maxRetentionDays(`value`: Int) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.maxRetentionDays = mapped
}
/**
* @param value Specifies the behavior to apply to scheduled snapshots when
* the source disk is deleted.
* Default value is `KEEP_AUTO_SNAPSHOTS`.
* Possible values are: `KEEP_AUTO_SNAPSHOTS`, `APPLY_RETENTION_POLICY`.
*/
@JvmName("knylknkpkmrdwqmi")
public suspend fun onSourceDiskDelete(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.onSourceDiskDelete = mapped
}
internal fun build(): ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs =
ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
maxRetentionDays = maxRetentionDays ?: throw PulumiNullFieldException("maxRetentionDays"),
onSourceDiskDelete = onSourceDiskDelete,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy