
com.pulumi.googlenative.compute.beta.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-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-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.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.compute.beta.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.compute.beta.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder
import com.pulumi.googlenative.compute.beta.kotlin.enums.ResourcePolicySnapshotSchedulePolicyRetentionPolicyOnSourceDiskDelete
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Policy for retention of scheduled snapshots.
* @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.
*/
public data class ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
public val maxRetentionDays: Output? = null,
public val onSourceDiskDelete: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.compute.beta.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs =
com.pulumi.googlenative.compute.beta.inputs.ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs.builder()
.maxRetentionDays(maxRetentionDays?.applyValue({ args0 -> args0 }))
.onSourceDiskDelete(
onSourceDiskDelete?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).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("ksusrhohrlpgxdxv")
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.
*/
@JvmName("wfbvumgwaavhhqyu")
public suspend fun onSourceDiskDelete(`value`: Output) {
this.onSourceDiskDelete = value
}
/**
* @param value Maximum age of the snapshot that is allowed to be kept.
*/
@JvmName("paribhdwfelwptfm")
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.
*/
@JvmName("uhkkvcvyeouvwqur")
public suspend fun onSourceDiskDelete(`value`: ResourcePolicySnapshotSchedulePolicyRetentionPolicyOnSourceDiskDelete?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.onSourceDiskDelete = mapped
}
internal fun build(): ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs =
ResourcePolicySnapshotSchedulePolicyRetentionPolicyArgs(
maxRetentionDays = maxRetentionDays,
onSourceDiskDelete = onSourceDiskDelete,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy