com.pulumi.awsnative.s3.kotlin.inputs.BucketNoncurrentVersionTransitionArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.s3.kotlin.inputs
import com.pulumi.awsnative.s3.inputs.BucketNoncurrentVersionTransitionArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.BucketNoncurrentVersionTransitionStorageClass
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Container for the transition rule that describes when noncurrent objects transition to the ``STANDARD_IA``, ``ONEZONE_IA``, ``INTELLIGENT_TIERING``, ``GLACIER_IR``, ``GLACIER``, or ``DEEP_ARCHIVE`` storage class. If your bucket is versioning-enabled (or versioning is suspended), you can set this action to request that Amazon S3 transition noncurrent object versions to the ``STANDARD_IA``, ``ONEZONE_IA``, ``INTELLIGENT_TIERING``, ``GLACIER_IR``, ``GLACIER``, or ``DEEP_ARCHIVE`` storage class at a specific period in the object's lifetime. If you specify this property, don't specify the ``NoncurrentVersionTransitions`` property.
* @property newerNoncurrentVersions Specifies how many noncurrent versions S3 will retain. If there are this many more recent noncurrent versions, S3 will take the associated action. For more information about noncurrent versions, see [Lifecycle configuration elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide*.
* @property storageClass The class of storage used to store the object.
* @property transitionInDays Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see [How Amazon S3 Calculates How Long an Object Has Been Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide*.
*/
public data class BucketNoncurrentVersionTransitionArgs(
public val newerNoncurrentVersions: Output? = null,
public val storageClass: Output,
public val transitionInDays: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketNoncurrentVersionTransitionArgs =
com.pulumi.awsnative.s3.inputs.BucketNoncurrentVersionTransitionArgs.builder()
.newerNoncurrentVersions(newerNoncurrentVersions?.applyValue({ args0 -> args0 }))
.storageClass(storageClass.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.transitionInDays(transitionInDays.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BucketNoncurrentVersionTransitionArgs].
*/
@PulumiTagMarker
public class BucketNoncurrentVersionTransitionArgsBuilder internal constructor() {
private var newerNoncurrentVersions: Output? = null
private var storageClass: Output? = null
private var transitionInDays: Output? = null
/**
* @param value Specifies how many noncurrent versions S3 will retain. If there are this many more recent noncurrent versions, S3 will take the associated action. For more information about noncurrent versions, see [Lifecycle configuration elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide*.
*/
@JvmName("dreqhbtoifpdhsjc")
public suspend fun newerNoncurrentVersions(`value`: Output) {
this.newerNoncurrentVersions = value
}
/**
* @param value The class of storage used to store the object.
*/
@JvmName("jalbtaolpbynjhsg")
public suspend fun storageClass(`value`: Output) {
this.storageClass = value
}
/**
* @param value Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see [How Amazon S3 Calculates How Long an Object Has Been Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide*.
*/
@JvmName("eintvnslhbepcabe")
public suspend fun transitionInDays(`value`: Output) {
this.transitionInDays = value
}
/**
* @param value Specifies how many noncurrent versions S3 will retain. If there are this many more recent noncurrent versions, S3 will take the associated action. For more information about noncurrent versions, see [Lifecycle configuration elements](https://docs.aws.amazon.com/AmazonS3/latest/userguide/intro-lifecycle-rules.html) in the *Amazon S3 User Guide*.
*/
@JvmName("sjvyhldtnphxrgpk")
public suspend fun newerNoncurrentVersions(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.newerNoncurrentVersions = mapped
}
/**
* @param value The class of storage used to store the object.
*/
@JvmName("kdnmlhofnrtautds")
public suspend fun storageClass(`value`: BucketNoncurrentVersionTransitionStorageClass) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.storageClass = mapped
}
/**
* @param value Specifies the number of days an object is noncurrent before Amazon S3 can perform the associated action. For information about the noncurrent days calculations, see [How Amazon S3 Calculates How Long an Object Has Been Noncurrent](https://docs.aws.amazon.com/AmazonS3/latest/dev/intro-lifecycle-rules.html#non-current-days-calculations) in the *Amazon S3 User Guide*.
*/
@JvmName("ldeewinaobhdtovh")
public suspend fun transitionInDays(`value`: Int) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.transitionInDays = mapped
}
internal fun build(): BucketNoncurrentVersionTransitionArgs =
BucketNoncurrentVersionTransitionArgs(
newerNoncurrentVersions = newerNoncurrentVersions,
storageClass = storageClass ?: throw PulumiNullFieldException("storageClass"),
transitionInDays = transitionInDays ?: throw PulumiNullFieldException("transitionInDays"),
)
}