com.pulumi.awsnative.s3.kotlin.inputs.BucketReplicationRuleArgs.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.BucketReplicationRuleArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.BucketReplicationRuleStatus
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Specifies which Amazon S3 objects to replicate and where to store the replicas.
* @property deleteMarkerReplication Specifies whether Amazon S3 replicates delete markers. If you specify a ``Filter`` in your replication configuration, you must also include a ``DeleteMarkerReplication`` element. If your ``Filter`` includes a ``Tag`` element, the ``DeleteMarkerReplication`` ``Status`` must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
* For more information about delete marker replication, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
* If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see [Backward Compatibility](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
* @property destination A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
* @property filter A filter that identifies the subset of objects to which the replication rule applies. A ``Filter`` must specify exactly one ``Prefix``, ``TagFilter``, or an ``And`` child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn't supported in a V1 replication configuration.
* V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
* @property id A unique identifier for the rule. The maximum value is 255 characters. If you don't specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as "ID".
* @property prefix An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
* 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 priority The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.
* For more information, see [Replication](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the *Amazon S3 User Guide*.
* @property sourceSelectionCriteria A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.
* @property status Specifies whether the rule is enabled.
*/
public data class BucketReplicationRuleArgs(
public val deleteMarkerReplication: Output? = null,
public val destination: Output,
public val filter: Output? = null,
public val id: Output? = null,
public val prefix: Output? = null,
public val priority: Output? = null,
public val sourceSelectionCriteria: Output? = null,
public val status: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketReplicationRuleArgs =
com.pulumi.awsnative.s3.inputs.BucketReplicationRuleArgs.builder()
.deleteMarkerReplication(
deleteMarkerReplication?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.destination(destination.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.filter(filter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.id(id?.applyValue({ args0 -> args0 }))
.prefix(prefix?.applyValue({ args0 -> args0 }))
.priority(priority?.applyValue({ args0 -> args0 }))
.sourceSelectionCriteria(
sourceSelectionCriteria?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.status(status.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [BucketReplicationRuleArgs].
*/
@PulumiTagMarker
public class BucketReplicationRuleArgsBuilder internal constructor() {
private var deleteMarkerReplication: Output? = null
private var destination: Output? = null
private var filter: Output? = null
private var id: Output? = null
private var prefix: Output? = null
private var priority: Output? = null
private var sourceSelectionCriteria: Output? = null
private var status: Output? = null
/**
* @param value Specifies whether Amazon S3 replicates delete markers. If you specify a ``Filter`` in your replication configuration, you must also include a ``DeleteMarkerReplication`` element. If your ``Filter`` includes a ``Tag`` element, the ``DeleteMarkerReplication`` ``Status`` must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
* For more information about delete marker replication, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
* If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see [Backward Compatibility](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
*/
@JvmName("axoxvywrltjxvjyf")
public suspend fun deleteMarkerReplication(`value`: Output) {
this.deleteMarkerReplication = value
}
/**
* @param value A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
*/
@JvmName("nhahyldywyfwmpbh")
public suspend fun destination(`value`: Output) {
this.destination = value
}
/**
* @param value A filter that identifies the subset of objects to which the replication rule applies. A ``Filter`` must specify exactly one ``Prefix``, ``TagFilter``, or an ``And`` child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn't supported in a V1 replication configuration.
* V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
*/
@JvmName("tesfhxkfwsugorys")
public suspend fun filter(`value`: Output) {
this.filter = value
}
/**
* @param value A unique identifier for the rule. The maximum value is 255 characters. If you don't specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as "ID".
*/
@JvmName("nwhxndwllsqrworm")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
* 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("mtryukyxdtxdofww")
public suspend fun prefix(`value`: Output) {
this.prefix = value
}
/**
* @param value The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.
* For more information, see [Replication](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the *Amazon S3 User Guide*.
*/
@JvmName("dryftylquytbmlsl")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.
*/
@JvmName("owmenlycwxnpwqka")
public suspend fun sourceSelectionCriteria(`value`: Output) {
this.sourceSelectionCriteria = value
}
/**
* @param value Specifies whether the rule is enabled.
*/
@JvmName("sgygcerajqrybyhe")
public suspend fun status(`value`: Output) {
this.status = value
}
/**
* @param value Specifies whether Amazon S3 replicates delete markers. If you specify a ``Filter`` in your replication configuration, you must also include a ``DeleteMarkerReplication`` element. If your ``Filter`` includes a ``Tag`` element, the ``DeleteMarkerReplication`` ``Status`` must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
* For more information about delete marker replication, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
* If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see [Backward Compatibility](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
*/
@JvmName("kqngmnlyrpmquajo")
public suspend fun deleteMarkerReplication(`value`: BucketDeleteMarkerReplicationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.deleteMarkerReplication = mapped
}
/**
* @param argument Specifies whether Amazon S3 replicates delete markers. If you specify a ``Filter`` in your replication configuration, you must also include a ``DeleteMarkerReplication`` element. If your ``Filter`` includes a ``Tag`` element, the ``DeleteMarkerReplication`` ``Status`` must be set to Disabled, because Amazon S3 does not support replicating delete markers for tag-based rules. For an example configuration, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-config-min-rule-config).
* For more information about delete marker replication, see [Basic Rule Configuration](https://docs.aws.amazon.com/AmazonS3/latest/dev/delete-marker-replication.html).
* If you are using an earlier version of the replication configuration, Amazon S3 handles replication of delete markers differently. For more information, see [Backward Compatibility](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication-add-config.html#replication-backward-compat-considerations).
*/
@JvmName("wqdeawaifcbeuaru")
public suspend fun deleteMarkerReplication(argument: suspend BucketDeleteMarkerReplicationArgsBuilder.() -> Unit) {
val toBeMapped = BucketDeleteMarkerReplicationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.deleteMarkerReplication = mapped
}
/**
* @param value A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
*/
@JvmName("qliagftjrdyedpue")
public suspend fun destination(`value`: BucketReplicationDestinationArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.destination = mapped
}
/**
* @param argument A container for information about the replication destination and its configurations including enabling the S3 Replication Time Control (S3 RTC).
*/
@JvmName("iiitpwgtcouhetwu")
public suspend fun destination(argument: suspend BucketReplicationDestinationArgsBuilder.() -> Unit) {
val toBeMapped = BucketReplicationDestinationArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.destination = mapped
}
/**
* @param value A filter that identifies the subset of objects to which the replication rule applies. A ``Filter`` must specify exactly one ``Prefix``, ``TagFilter``, or an ``And`` child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn't supported in a V1 replication configuration.
* V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
*/
@JvmName("ydusbmtbrrruesuc")
public suspend fun filter(`value`: BucketReplicationRuleFilterArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.filter = mapped
}
/**
* @param argument A filter that identifies the subset of objects to which the replication rule applies. A ``Filter`` must specify exactly one ``Prefix``, ``TagFilter``, or an ``And`` child element. The use of the filter field indicates that this is a V2 replication configuration. This field isn't supported in a V1 replication configuration.
* V1 replication configuration only supports filtering by key prefix. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
*/
@JvmName("tgwvfyscsypfuixw")
public suspend fun filter(argument: suspend BucketReplicationRuleFilterArgsBuilder.() -> Unit) {
val toBeMapped = BucketReplicationRuleFilterArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.filter = mapped
}
/**
* @param value A unique identifier for the rule. The maximum value is 255 characters. If you don't specify a value, AWS CloudFormation generates a random ID. When using a V2 replication configuration this property is capitalized as "ID".
*/
@JvmName("abhocnorpxummytu")
public suspend fun id(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value An object key name prefix that identifies the object or objects to which the rule applies. The maximum prefix length is 1,024 characters. To include all objects in a bucket, specify an empty string. To filter using a V1 replication configuration, add the ``Prefix`` directly as a child element of the ``Rule`` element.
* 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("afvvprbjcsvqimfs")
public suspend fun prefix(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.prefix = mapped
}
/**
* @param value The priority indicates which rule has precedence whenever two or more replication rules conflict. Amazon S3 will attempt to replicate objects according to all replication rules. However, if there are two or more rules with the same destination bucket, then objects will be replicated according to the rule with the highest priority. The higher the number, the higher the priority.
* For more information, see [Replication](https://docs.aws.amazon.com/AmazonS3/latest/dev/replication.html) in the *Amazon S3 User Guide*.
*/
@JvmName("oqrydvbcthneugyg")
public suspend fun priority(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.priority = mapped
}
/**
* @param value A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.
*/
@JvmName("ngwnjtngybswtxro")
public suspend fun sourceSelectionCriteria(`value`: BucketSourceSelectionCriteriaArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.sourceSelectionCriteria = mapped
}
/**
* @param argument A container that describes additional filters for identifying the source objects that you want to replicate. You can choose to enable or disable the replication of these objects.
*/
@JvmName("kmvwchunyjxaabya")
public suspend fun sourceSelectionCriteria(argument: suspend BucketSourceSelectionCriteriaArgsBuilder.() -> Unit) {
val toBeMapped = BucketSourceSelectionCriteriaArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.sourceSelectionCriteria = mapped
}
/**
* @param value Specifies whether the rule is enabled.
*/
@JvmName("ffkwphaxxsmnwrrh")
public suspend fun status(`value`: BucketReplicationRuleStatus) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.status = mapped
}
internal fun build(): BucketReplicationRuleArgs = BucketReplicationRuleArgs(
deleteMarkerReplication = deleteMarkerReplication,
destination = destination ?: throw PulumiNullFieldException("destination"),
filter = filter,
id = id,
prefix = prefix,
priority = priority,
sourceSelectionCriteria = sourceSelectionCriteria,
status = status ?: throw PulumiNullFieldException("status"),
)
}