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.rds.kotlin
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
import com.pulumi.awsnative.rds.EventSubscriptionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* The ``AWS::RDS::EventSubscription`` resource allows you to receive notifications for Amazon Relational Database Service events through the Amazon Simple Notification Service (Amazon SNS). For more information, see [Using Amazon RDS Event Notification](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) in the *Amazon RDS User Guide*.
* @property enabled Specifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.
* @property eventCategories A list of event categories for a particular source type (``SourceType``) that you want to subscribe to. You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html) or the [Amazon Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html). You can also see this list by using the ``DescribeEventCategories`` operation.
* @property snsTopicArn The Amazon Resource Name (ARN) of the SNS topic created for event notification. SNS automatically creates the ARN when you create a topic and subscribe to it.
* RDS doesn't support FIFO (first in, first out) topics. For more information, see [Message ordering and deduplication (FIFO topics)](https://docs.aws.amazon.com/sns/latest/dg/sns-fifo-topics.html) in the *Amazon Simple Notification Service Developer Guide*.
* @property sourceIds The list of identifiers of the event sources for which events are returned. If not specified, then all sources are included in the response. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens. It can't end with a hyphen or contain two consecutive hyphens.
* Constraints:
* + If a ``SourceIds`` value is supplied, ``SourceType`` must also be provided.
* + If the source type is a DB instance, a ``DBInstanceIdentifier`` value must be supplied.
* + If the source type is a DB cluster, a ``DBClusterIdentifier`` value must be supplied.
* + If the source type is a DB parameter group, a ``DBParameterGroupName`` value must be supplied.
* + If the source type is a DB security group, a ``DBSecurityGroupName`` value must be supplied.
* + If the source type is a DB snapshot, a ``DBSnapshotIdentifier`` value must be supplied.
* + If the source type is a DB cluster snapshot, a ``DBClusterSnapshotIdentifier`` value must be supplied.
* @property sourceType The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, set this parameter to ``db-instance``. If this value isn't specified, all events are returned.
* Valid values: ``db-instance`` | ``db-cluster`` | ``db-parameter-group`` | ``db-security-group`` | ``db-snapshot`` | ``db-cluster-snapshot``
* @property subscriptionName The name of the subscription.
* Constraints: The name must be less than 255 characters.
* @property tags An optional array of key-value pairs to apply to this subscription.
*/
public data class EventSubscriptionArgs(
public val enabled: Output? = null,
public val eventCategories: Output>? = null,
public val snsTopicArn: Output? = null,
public val sourceIds: Output>? = null,
public val sourceType: Output? = null,
public val subscriptionName: Output? = null,
public val tags: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.rds.EventSubscriptionArgs =
com.pulumi.awsnative.rds.EventSubscriptionArgs.builder()
.enabled(enabled?.applyValue({ args0 -> args0 }))
.eventCategories(eventCategories?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.snsTopicArn(snsTopicArn?.applyValue({ args0 -> args0 }))
.sourceIds(sourceIds?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
.sourceType(sourceType?.applyValue({ args0 -> args0 }))
.subscriptionName(subscriptionName?.applyValue({ args0 -> args0 }))
.tags(
tags?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [EventSubscriptionArgs].
*/
@PulumiTagMarker
public class EventSubscriptionArgsBuilder internal constructor() {
private var enabled: Output? = null
private var eventCategories: Output>? = null
private var snsTopicArn: Output? = null
private var sourceIds: Output>? = null
private var sourceType: Output? = null
private var subscriptionName: Output? = null
private var tags: Output>? = null
/**
* @param value Specifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.
*/
@JvmName("yqpcxgxmidynatkm")
public suspend fun enabled(`value`: Output) {
this.enabled = value
}
/**
* @param value A list of event categories for a particular source type (``SourceType``) that you want to subscribe to. You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html) or the [Amazon Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html). You can also see this list by using the ``DescribeEventCategories`` operation.
*/
@JvmName("brpkrbcmchiidemg")
public suspend fun eventCategories(`value`: Output>) {
this.eventCategories = value
}
@JvmName("uoehvngundoxxocd")
public suspend fun eventCategories(vararg values: Output) {
this.eventCategories = Output.all(values.asList())
}
/**
* @param values A list of event categories for a particular source type (``SourceType``) that you want to subscribe to. You can see a list of the categories for a given source type in the "Amazon RDS event categories and event messages" section of the [Amazon RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.Messages.html) or the [Amazon Aurora User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/USER_Events.Messages.html). You can also see this list by using the ``DescribeEventCategories`` operation.
*/
@JvmName("abmsvfkcgknnufjb")
public suspend fun eventCategories(values: List