![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.digitalocean.kotlin.inputs.SpacesBucketLifecycleRuleArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-digitalocean-kotlin Show documentation
Show all versions of pulumi-digitalocean-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.digitalocean.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.digitalocean.inputs.SpacesBucketLifecycleRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property abortIncompleteMultipartUploadDays Specifies the number of days after initiating a multipart
* upload when the multipart upload must be completed or else Spaces will abort the upload.
* @property enabled Specifies lifecycle rule status.
* @property expiration Specifies a time period after which applicable objects expire (documented below).
* @property id Unique identifier for the rule.
* @property noncurrentVersionExpiration Specifies when non-current object versions expire (documented below).
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
* @property prefix Object key prefix identifying one or more objects to which the rule applies.
*/
public data class SpacesBucketLifecycleRuleArgs(
public val abortIncompleteMultipartUploadDays: Output? = null,
public val enabled: Output,
public val expiration: Output? = null,
public val id: Output? = null,
public val noncurrentVersionExpiration: Output? = null,
public val prefix: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.digitalocean.inputs.SpacesBucketLifecycleRuleArgs =
com.pulumi.digitalocean.inputs.SpacesBucketLifecycleRuleArgs.builder()
.abortIncompleteMultipartUploadDays(
abortIncompleteMultipartUploadDays?.applyValue({ args0 ->
args0
}),
)
.enabled(enabled.applyValue({ args0 -> args0 }))
.expiration(expiration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.id(id?.applyValue({ args0 -> args0 }))
.noncurrentVersionExpiration(
noncurrentVersionExpiration?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.prefix(prefix?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SpacesBucketLifecycleRuleArgs].
*/
@PulumiTagMarker
public class SpacesBucketLifecycleRuleArgsBuilder internal constructor() {
private var abortIncompleteMultipartUploadDays: Output? = null
private var enabled: Output? = null
private var expiration: Output? = null
private var id: Output? = null
private var noncurrentVersionExpiration:
Output? = null
private var prefix: Output? = null
/**
* @param value Specifies the number of days after initiating a multipart
* upload when the multipart upload must be completed or else Spaces will abort the upload.
*/
@JvmName("axvqkobmhwkgjwky")
public suspend fun abortIncompleteMultipartUploadDays(`value`: Output) {
this.abortIncompleteMultipartUploadDays = value
}
/**
* @param value Specifies lifecycle rule status.
*/
@JvmName("ukboisonejrkiied")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value Specifies a time period after which applicable objects expire (documented below).
*/
@JvmName("ftlsoogjorsudgqp")
public suspend fun expiration(`value`: Output) {
this.expiration = value
}
/**
* @param value Unique identifier for the rule.
*/
@JvmName("ddlxbhkeiorbpldr")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value Specifies when non-current object versions expire (documented below).
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
*/
@JvmName("veoawnbqowudgfri")
public suspend fun noncurrentVersionExpiration(`value`: Output) {
this.noncurrentVersionExpiration = value
}
/**
* @param value Object key prefix identifying one or more objects to which the rule applies.
*/
@JvmName("kcuuwvbomwqchujb")
public suspend fun prefix(`value`: Output) {
this.prefix = value
}
/**
* @param value Specifies the number of days after initiating a multipart
* upload when the multipart upload must be completed or else Spaces will abort the upload.
*/
@JvmName("mkabrjwjkillhtye")
public suspend fun abortIncompleteMultipartUploadDays(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.abortIncompleteMultipartUploadDays = mapped
}
/**
* @param value Specifies lifecycle rule status.
*/
@JvmName("wxkwvuwpsyyvrqls")
public suspend fun enabled(`value`: Boolean) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.enabled = mapped
}
/**
* @param value Specifies a time period after which applicable objects expire (documented below).
*/
@JvmName("bpihaywkolrvkqfg")
public suspend fun expiration(`value`: SpacesBucketLifecycleRuleExpirationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.expiration = mapped
}
/**
* @param argument Specifies a time period after which applicable objects expire (documented below).
*/
@JvmName("cpbfmhsfxrkmwipr")
public suspend fun expiration(argument: suspend SpacesBucketLifecycleRuleExpirationArgsBuilder.() -> Unit) {
val toBeMapped = SpacesBucketLifecycleRuleExpirationArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.expiration = mapped
}
/**
* @param value Unique identifier for the rule.
*/
@JvmName("xcigmydpyhmrmclm")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value Specifies when non-current object versions expire (documented below).
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
*/
@JvmName("pnuyspsevghjkfbh")
public suspend fun noncurrentVersionExpiration(`value`: SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.noncurrentVersionExpiration = mapped
}
/**
* @param argument Specifies when non-current object versions expire (documented below).
* At least one of `expiration` or `noncurrent_version_expiration` must be specified.
*/
@JvmName("yyrxnkicesveenkw")
public suspend fun noncurrentVersionExpiration(argument: suspend SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgsBuilder.() -> Unit) {
val toBeMapped = SpacesBucketLifecycleRuleNoncurrentVersionExpirationArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.noncurrentVersionExpiration = mapped
}
/**
* @param value Object key prefix identifying one or more objects to which the rule applies.
*/
@JvmName("oqqebfaqajyaeuex")
public suspend fun prefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.prefix = mapped
}
internal fun build(): SpacesBucketLifecycleRuleArgs = SpacesBucketLifecycleRuleArgs(
abortIncompleteMultipartUploadDays = abortIncompleteMultipartUploadDays,
enabled = enabled ?: throw PulumiNullFieldException("enabled"),
expiration = expiration,
id = id,
noncurrentVersionExpiration = noncurrentVersionExpiration,
prefix = prefix,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy