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

com.pulumi.awsnative.s3.kotlin.inputs.BucketRuleArgs.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.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.s3.kotlin.inputs

import com.pulumi.awsnative.s3.inputs.BucketRuleArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.BucketRuleStatus
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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Specifies lifecycle rules for an Amazon S3 bucket. For more information, see [Put Bucket Lifecycle Configuration](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketPUTlifecycle.html) in the *Amazon S3 API Reference*.
 *  You must specify at least one of the following properties: ``AbortIncompleteMultipartUpload``, ``ExpirationDate``, ``ExpirationInDays``, ``NoncurrentVersionExpirationInDays``, ``NoncurrentVersionTransition``, ``NoncurrentVersionTransitions``, ``Transition``, or ``Transitions``.
 * @property abortIncompleteMultipartUpload Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
 * @property expirationDate Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
 * @property expirationInDays Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
 * @property expiredObjectDeleteMarker Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ``ExpirationInDays``, ``ExpirationDate``, or ``TagFilters``.
 * @property id Unique identifier for the rule. The value can't be longer than 255 characters.
 * @property noncurrentVersionExpiration Specifies when noncurrent object versions expire. Upon expiration, S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that S3 delete noncurrent object versions at a specific period in the object's lifetime.
 * @property noncurrentVersionExpirationInDays (Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
 * @property noncurrentVersionTransition (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransitions`` property.
 * @property noncurrentVersionTransitions For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
 * @property objectSizeGreaterThan Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
 * @property objectSizeLessThan Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
 * @property prefix Object key prefix that identifies one or more objects to which this rule applies.
 *   Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see [XML related object key constraints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
 * @property status If ``Enabled``, the rule is currently being applied. If ``Disabled``, the rule is not currently being applied.
 * @property tagFilters Tags to use to identify a subset of objects to which the lifecycle rule applies.
 * @property transition (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transitions`` property.
 * @property transitions One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
 */
public data class BucketRuleArgs(
    public val abortIncompleteMultipartUpload: Output? =
        null,
    public val expirationDate: Output? = null,
    public val expirationInDays: Output? = null,
    public val expiredObjectDeleteMarker: Output? = null,
    public val id: Output? = null,
    public val noncurrentVersionExpiration: Output? = null,
    public val noncurrentVersionExpirationInDays: Output? = null,
    public val noncurrentVersionTransition: Output? = null,
    public val noncurrentVersionTransitions: Output>? =
        null,
    public val objectSizeGreaterThan: Output? = null,
    public val objectSizeLessThan: Output? = null,
    public val prefix: Output? = null,
    public val status: Output,
    public val tagFilters: Output>? = null,
    public val transition: Output? = null,
    public val transitions: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketRuleArgs =
        com.pulumi.awsnative.s3.inputs.BucketRuleArgs.builder()
            .abortIncompleteMultipartUpload(
                abortIncompleteMultipartUpload?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .expirationDate(expirationDate?.applyValue({ args0 -> args0 }))
            .expirationInDays(expirationInDays?.applyValue({ args0 -> args0 }))
            .expiredObjectDeleteMarker(expiredObjectDeleteMarker?.applyValue({ args0 -> args0 }))
            .id(id?.applyValue({ args0 -> args0 }))
            .noncurrentVersionExpiration(
                noncurrentVersionExpiration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .noncurrentVersionExpirationInDays(
                noncurrentVersionExpirationInDays?.applyValue({ args0 ->
                    args0
                }),
            )
            .noncurrentVersionTransition(
                noncurrentVersionTransition?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .noncurrentVersionTransitions(
                noncurrentVersionTransitions?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .objectSizeGreaterThan(objectSizeGreaterThan?.applyValue({ args0 -> args0 }))
            .objectSizeLessThan(objectSizeLessThan?.applyValue({ args0 -> args0 }))
            .prefix(prefix?.applyValue({ args0 -> args0 }))
            .status(status.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tagFilters(
                tagFilters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .transition(transition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .transitions(
                transitions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketRuleArgs].
 */
@PulumiTagMarker
public class BucketRuleArgsBuilder internal constructor() {
    private var abortIncompleteMultipartUpload: Output? =
        null

    private var expirationDate: Output? = null

    private var expirationInDays: Output? = null

    private var expiredObjectDeleteMarker: Output? = null

    private var id: Output? = null

    private var noncurrentVersionExpiration: Output? = null

    private var noncurrentVersionExpirationInDays: Output? = null

    private var noncurrentVersionTransition: Output? = null

    private var noncurrentVersionTransitions: Output>? =
        null

    private var objectSizeGreaterThan: Output? = null

    private var objectSizeLessThan: Output? = null

    private var prefix: Output? = null

    private var status: Output? = null

    private var tagFilters: Output>? = null

    private var transition: Output? = null

    private var transitions: Output>? = null

    /**
     * @param value Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
     */
    @JvmName("dvbyjfyciprvxctk")
    public suspend fun abortIncompleteMultipartUpload(`value`: Output) {
        this.abortIncompleteMultipartUpload = value
    }

    /**
     * @param value Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
     */
    @JvmName("uvmtofucbluwioha")
    public suspend fun expirationDate(`value`: Output) {
        this.expirationDate = value
    }

    /**
     * @param value Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
     */
    @JvmName("xckovmquxsxutlso")
    public suspend fun expirationInDays(`value`: Output) {
        this.expirationInDays = value
    }

    /**
     * @param value Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ``ExpirationInDays``, ``ExpirationDate``, or ``TagFilters``.
     */
    @JvmName("obqpwvvsupiosnpn")
    public suspend fun expiredObjectDeleteMarker(`value`: Output) {
        this.expiredObjectDeleteMarker = value
    }

    /**
     * @param value Unique identifier for the rule. The value can't be longer than 255 characters.
     */
    @JvmName("wjexysotbvfdregi")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Specifies when noncurrent object versions expire. Upon expiration, S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that S3 delete noncurrent object versions at a specific period in the object's lifetime.
     */
    @JvmName("mhjqbfpbbmgcxhxm")
    public suspend fun noncurrentVersionExpiration(`value`: Output) {
        this.noncurrentVersionExpiration = value
    }

    /**
     * @param value (Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
     */
    @JvmName("agovcoudjhquqmht")
    public suspend fun noncurrentVersionExpirationInDays(`value`: Output) {
        this.noncurrentVersionExpirationInDays = value
    }

    /**
     * @param value (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransitions`` property.
     */
    @JvmName("apcivuwevsqartnv")
    public suspend fun noncurrentVersionTransition(`value`: Output) {
        this.noncurrentVersionTransition = value
    }

    /**
     * @param value For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("xsebcsecdxoaaqnq")
    public suspend fun noncurrentVersionTransitions(`value`: Output>) {
        this.noncurrentVersionTransitions = value
    }

    @JvmName("eqawlftsfljqgpsf")
    public suspend fun noncurrentVersionTransitions(vararg values: Output) {
        this.noncurrentVersionTransitions = Output.all(values.asList())
    }

    /**
     * @param values For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("ckogxxujqesdvoan")
    public suspend fun noncurrentVersionTransitions(values: List>) {
        this.noncurrentVersionTransitions = Output.all(values)
    }

    /**
     * @param value Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
     */
    @JvmName("buhugvbpdyypeyhg")
    public suspend fun objectSizeGreaterThan(`value`: Output) {
        this.objectSizeGreaterThan = value
    }

    /**
     * @param value Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
     */
    @JvmName("mlholmugwwnsknbk")
    public suspend fun objectSizeLessThan(`value`: Output) {
        this.objectSizeLessThan = value
    }

    /**
     * @param value Object key prefix that identifies one or more objects to which this rule applies.
     *   Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see [XML related object key constraints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
     */
    @JvmName("kymetoknpnjqpcrm")
    public suspend fun prefix(`value`: Output) {
        this.prefix = value
    }

    /**
     * @param value If ``Enabled``, the rule is currently being applied. If ``Disabled``, the rule is not currently being applied.
     */
    @JvmName("jytcswjeaxxperqr")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("ypbsuwmiifaxdqmn")
    public suspend fun tagFilters(`value`: Output>) {
        this.tagFilters = value
    }

    @JvmName("ptkrngjifqvbldyl")
    public suspend fun tagFilters(vararg values: Output) {
        this.tagFilters = Output.all(values.asList())
    }

    /**
     * @param values Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("cvxjiydhmhohlpyj")
    public suspend fun tagFilters(values: List>) {
        this.tagFilters = Output.all(values)
    }

    /**
     * @param value (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transitions`` property.
     */
    @JvmName("ufyctmykcgtgevhp")
    public suspend fun transition(`value`: Output) {
        this.transition = value
    }

    /**
     * @param value One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("tuljfiuvfreckmdg")
    public suspend fun transitions(`value`: Output>) {
        this.transitions = value
    }

    @JvmName("plxapuwujxjppnvq")
    public suspend fun transitions(vararg values: Output) {
        this.transitions = Output.all(values.asList())
    }

    /**
     * @param values One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("tjyiqpdlarkacjld")
    public suspend fun transitions(values: List>) {
        this.transitions = Output.all(values)
    }

    /**
     * @param value Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
     */
    @JvmName("fdbefrfgdtelppnb")
    public suspend fun abortIncompleteMultipartUpload(`value`: BucketAbortIncompleteMultipartUploadArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.abortIncompleteMultipartUpload = mapped
    }

    /**
     * @param argument Specifies a lifecycle rule that stops incomplete multipart uploads to an Amazon S3 bucket.
     */
    @JvmName("jiadmymnnkiurijj")
    public suspend fun abortIncompleteMultipartUpload(argument: suspend BucketAbortIncompleteMultipartUploadArgsBuilder.() -> Unit) {
        val toBeMapped = BucketAbortIncompleteMultipartUploadArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.abortIncompleteMultipartUpload = mapped
    }

    /**
     * @param value Indicates when objects are deleted from Amazon S3 and Amazon S3 Glacier. The date value must be in ISO 8601 format. The time is always midnight UTC. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
     */
    @JvmName("dnekyjcjnwvgfwqf")
    public suspend fun expirationDate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirationDate = mapped
    }

    /**
     * @param value Indicates the number of days after creation when objects are deleted from Amazon S3 and Amazon S3 Glacier. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time.
     */
    @JvmName("bilmwjssdvscnskd")
    public suspend fun expirationInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirationInDays = mapped
    }

    /**
     * @param value Indicates whether Amazon S3 will remove a delete marker without any noncurrent versions. If set to true, the delete marker will be removed if there are no noncurrent versions. This cannot be specified with ``ExpirationInDays``, ``ExpirationDate``, or ``TagFilters``.
     */
    @JvmName("wmiultunmxqyliej")
    public suspend fun expiredObjectDeleteMarker(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expiredObjectDeleteMarker = mapped
    }

    /**
     * @param value Unique identifier for the rule. The value can't be longer than 255 characters.
     */
    @JvmName("qpakbnxqhscrneat")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Specifies when noncurrent object versions expire. Upon expiration, S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that S3 delete noncurrent object versions at a specific period in the object's lifetime.
     */
    @JvmName("xkcrlmurmilmgleg")
    public suspend fun noncurrentVersionExpiration(`value`: BucketNoncurrentVersionExpirationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionExpiration = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions expire. Upon expiration, S3 permanently deletes the noncurrent object versions. You set this lifecycle configuration action on a bucket that has versioning enabled (or suspended) to request that S3 delete noncurrent object versions at a specific period in the object's lifetime.
     */
    @JvmName("cylwylaigdhbffdn")
    public suspend fun noncurrentVersionExpiration(argument: suspend BucketNoncurrentVersionExpirationArgsBuilder.() -> Unit) {
        val toBeMapped = BucketNoncurrentVersionExpirationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.noncurrentVersionExpiration = mapped
    }

    /**
     * @param value (Deprecated.) For buckets with versioning enabled (or suspended), specifies the time, in days, between when a new version of the object is uploaded to the bucket and when old versions of the object expire. When object versions expire, Amazon S3 permanently deletes them. If you specify a transition and expiration time, the expiration time must be later than the transition time.
     */
    @JvmName("wfabqcnnsnaoggkr")
    public suspend fun noncurrentVersionExpirationInDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionExpirationInDays = mapped
    }

    /**
     * @param value (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransitions`` property.
     */
    @JvmName("sbfbxeopslkmnhat")
    public suspend fun noncurrentVersionTransition(`value`: BucketNoncurrentVersionTransitionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionTransition = mapped
    }

    /**
     * @param argument (Deprecated.) For buckets with versioning enabled (or suspended), specifies when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransitions`` property.
     */
    @JvmName("gvplhicbcbdawwvy")
    public suspend fun noncurrentVersionTransition(argument: suspend BucketNoncurrentVersionTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketNoncurrentVersionTransitionArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransition = mapped
    }

    /**
     * @param value For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("tfarjtvnsnbkhris")
    public suspend fun noncurrentVersionTransitions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("dtqwioevimrrymrf")
    public suspend fun noncurrentVersionTransitions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketNoncurrentVersionTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("qhtstmvtefkefdtk")
    public suspend fun noncurrentVersionTransitions(vararg argument: suspend BucketNoncurrentVersionTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketNoncurrentVersionTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("teebgeycwblirusl")
    public suspend fun noncurrentVersionTransitions(argument: suspend BucketNoncurrentVersionTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketNoncurrentVersionTransitionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param values For buckets with versioning enabled (or suspended), one or more transition rules that specify when non-current objects transition to a specified storage class. If you specify a transition and expiration time, the expiration time must be later than the transition time. If you specify this property, don't specify the ``NoncurrentVersionTransition`` property.
     */
    @JvmName("mkllhdcyevlwbycf")
    public suspend fun noncurrentVersionTransitions(vararg values: BucketNoncurrentVersionTransitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param value Specifies the minimum object size in bytes for this rule to apply to. Objects must be larger than this value in bytes. For more information about size based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
     */
    @JvmName("owynqcribahqrbyf")
    public suspend fun objectSizeGreaterThan(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectSizeGreaterThan = mapped
    }

    /**
     * @param value Specifies the maximum object size in bytes for this rule to apply to. Objects must be smaller than this value in bytes. For more information about sized based rules, see [Lifecycle configuration using size-based rules](https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lc-size-rules) in the *Amazon S3 User Guide*.
     */
    @JvmName("nabufhbthsedjlch")
    public suspend fun objectSizeLessThan(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.objectSizeLessThan = mapped
    }

    /**
     * @param value Object key prefix that identifies one or more objects to which this rule applies.
     *   Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see [XML related object key constraints](https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-keys.html#object-key-xml-related-constraints).
     */
    @JvmName("tkueyhygcfeggaex")
    public suspend fun prefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefix = mapped
    }

    /**
     * @param value If ``Enabled``, the rule is currently being applied. If ``Disabled``, the rule is not currently being applied.
     */
    @JvmName("vwhjpkoihbscleob")
    public suspend fun status(`value`: BucketRuleStatus) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("fxebdftvsnpvefnu")
    public suspend fun tagFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagFilters = mapped
    }

    /**
     * @param argument Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("quvabaychjobapxt")
    public suspend fun tagFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketTagFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagFilters = mapped
    }

    /**
     * @param argument Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("kuxdkhyifivpnjdy")
    public suspend fun tagFilters(vararg argument: suspend BucketTagFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketTagFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagFilters = mapped
    }

    /**
     * @param argument Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("pypomnqeqyukftau")
    public suspend fun tagFilters(argument: suspend BucketTagFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BucketTagFilterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tagFilters = mapped
    }

    /**
     * @param values Tags to use to identify a subset of objects to which the lifecycle rule applies.
     */
    @JvmName("wdimllyorsngyhoo")
    public suspend fun tagFilters(vararg values: BucketTagFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tagFilters = mapped
    }

    /**
     * @param value (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transitions`` property.
     */
    @JvmName("ucfjbbrvvrbnnous")
    public suspend fun transition(`value`: BucketTransitionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transition = mapped
    }

    /**
     * @param argument (Deprecated.) Specifies when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transitions`` property.
     */
    @JvmName("hgyfomtlkxwjkwoi")
    public suspend fun transition(argument: suspend BucketTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketTransitionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.transition = mapped
    }

    /**
     * @param value One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("nbpvbuausutfdmus")
    public suspend fun transitions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitions = mapped
    }

    /**
     * @param argument One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("vcqddgarlcsfkfqp")
    public suspend fun transitions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketTransitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param argument One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("dswbtclucffypmkp")
    public suspend fun transitions(vararg argument: suspend BucketTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketTransitionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param argument One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("vbjyugycwrtctydp")
    public suspend fun transitions(argument: suspend BucketTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(BucketTransitionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param values One or more transition rules that specify when an object transitions to a specified storage class. If you specify an expiration and transition time, you must use the same time unit for both properties (either in days or by date). The expiration time must also be later than the transition time. If you specify this property, don't specify the ``Transition`` property.
     */
    @JvmName("yiniqmrpdhwlsdkg")
    public suspend fun transitions(vararg values: BucketTransitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transitions = mapped
    }

    internal fun build(): BucketRuleArgs = BucketRuleArgs(
        abortIncompleteMultipartUpload = abortIncompleteMultipartUpload,
        expirationDate = expirationDate,
        expirationInDays = expirationInDays,
        expiredObjectDeleteMarker = expiredObjectDeleteMarker,
        id = id,
        noncurrentVersionExpiration = noncurrentVersionExpiration,
        noncurrentVersionExpirationInDays = noncurrentVersionExpirationInDays,
        noncurrentVersionTransition = noncurrentVersionTransition,
        noncurrentVersionTransitions = noncurrentVersionTransitions,
        objectSizeGreaterThan = objectSizeGreaterThan,
        objectSizeLessThan = objectSizeLessThan,
        prefix = prefix,
        status = status ?: throw PulumiNullFieldException("status"),
        tagFilters = tagFilters,
        transition = transition,
        transitions = transitions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy