com.pulumi.awsnative.s3.kotlin.inputs.BucketTopicConfigurationArgs.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.BucketTopicConfigurationArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A container for specifying the configuration for publication of messages to an Amazon Simple Notification Service (Amazon SNS) topic when Amazon S3 detects specified events.
* @property event The Amazon S3 bucket event about which to send notifications. For more information, see [Supported Event Types](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the *Amazon S3 User Guide*.
* @property filter The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a ``.jpg`` extension are added to the bucket.
* @property topic The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
*/
public data class BucketTopicConfigurationArgs(
public val event: Output,
public val filter: Output? = null,
public val topic: Output,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketTopicConfigurationArgs =
com.pulumi.awsnative.s3.inputs.BucketTopicConfigurationArgs.builder()
.event(event.applyValue({ args0 -> args0 }))
.filter(filter?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.topic(topic.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BucketTopicConfigurationArgs].
*/
@PulumiTagMarker
public class BucketTopicConfigurationArgsBuilder internal constructor() {
private var event: Output? = null
private var filter: Output? = null
private var topic: Output? = null
/**
* @param value The Amazon S3 bucket event about which to send notifications. For more information, see [Supported Event Types](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the *Amazon S3 User Guide*.
*/
@JvmName("depuhoprdiwkybew")
public suspend fun event(`value`: Output) {
this.event = value
}
/**
* @param value The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a ``.jpg`` extension are added to the bucket.
*/
@JvmName("tuinfgunhclsxsvu")
public suspend fun filter(`value`: Output) {
this.filter = value
}
/**
* @param value The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
*/
@JvmName("geujnxesnfoqaptj")
public suspend fun topic(`value`: Output) {
this.topic = value
}
/**
* @param value The Amazon S3 bucket event about which to send notifications. For more information, see [Supported Event Types](https://docs.aws.amazon.com/AmazonS3/latest/dev/NotificationHowTo.html) in the *Amazon S3 User Guide*.
*/
@JvmName("aupyigugrswggsxg")
public suspend fun event(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.event = mapped
}
/**
* @param value The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a ``.jpg`` extension are added to the bucket.
*/
@JvmName("kmacqlfrmjepyevp")
public suspend fun filter(`value`: BucketNotificationFilterArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.filter = mapped
}
/**
* @param argument The filtering rules that determine for which objects to send notifications. For example, you can create a filter so that Amazon S3 sends notifications only when image files with a ``.jpg`` extension are added to the bucket.
*/
@JvmName("rqvbwrfwoydvgncs")
public suspend fun filter(argument: suspend BucketNotificationFilterArgsBuilder.() -> Unit) {
val toBeMapped = BucketNotificationFilterArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.filter = mapped
}
/**
* @param value The Amazon Resource Name (ARN) of the Amazon SNS topic to which Amazon S3 publishes a message when it detects events of the specified type.
*/
@JvmName("tubptskfqcknatmv")
public suspend fun topic(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.topic = mapped
}
internal fun build(): BucketTopicConfigurationArgs = BucketTopicConfigurationArgs(
event = event ?: throw PulumiNullFieldException("event"),
filter = filter,
topic = topic ?: throw PulumiNullFieldException("topic"),
)
}