Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
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.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