
com.pulumi.awsnative.rds.kotlin.EventSubscription.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.rds.kotlin
import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [EventSubscription].
*/
@PulumiTagMarker
public class EventSubscriptionResourceBuilder internal constructor() {
public var name: String? = null
public var args: EventSubscriptionArgs = EventSubscriptionArgs()
public var opts: CustomResourceOptions = CustomResourceOptions()
/**
* @param name The _unique_ name of the resulting resource.
*/
public fun name(`value`: String) {
this.name = value
}
/**
* @param block The arguments to use to populate this resource's properties.
*/
public suspend fun args(block: suspend EventSubscriptionArgsBuilder.() -> Unit) {
val builder = EventSubscriptionArgsBuilder()
block(builder)
this.args = builder.build()
}
/**
* @param block A bag of options that control this resource's behavior.
*/
public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
}
internal fun build(): EventSubscription {
val builtJavaResource = com.pulumi.awsnative.rds.EventSubscription(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return EventSubscription(builtJavaResource)
}
}
/**
* 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*.
*/
public class EventSubscription internal constructor(
override val javaResource: com.pulumi.awsnative.rds.EventSubscription,
) : KotlinCustomResource(javaResource, EventSubscriptionMapper) {
/**
* Specifies whether to activate the subscription. If the event notification subscription isn't activated, the subscription is created but not active.
*/
public val enabled: Output?
get() = javaResource.enabled().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
/**
* 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.
*/
public val eventCategories: Output>?
get() = javaResource.eventCategories().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 -> args0 })
}).orElse(null)
})
/**
* 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*.
*/
public val snsTopicArn: Output
get() = javaResource.snsTopicArn().applyValue({ args0 -> args0 })
/**
* 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.
*/
public val sourceIds: Output>?
get() = javaResource.sourceIds().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* 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``
*/
public val sourceType: Output?
get() = javaResource.sourceType().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The name of the subscription.
* Constraints: The name must be less than 255 characters.
*/
public val subscriptionName: Output?
get() = javaResource.subscriptionName().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* An optional array of key-value pairs to apply to this subscription.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object EventSubscriptionMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.rds.EventSubscription::class == javaResource::class
override fun map(javaResource: Resource): EventSubscription = EventSubscription(
javaResource as
com.pulumi.awsnative.rds.EventSubscription,
)
}
/**
* @see [EventSubscription].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [EventSubscription].
*/
public suspend fun eventSubscription(
name: String,
block: suspend EventSubscriptionResourceBuilder.() -> Unit,
): EventSubscription {
val builder = EventSubscriptionResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [EventSubscription].
* @param name The _unique_ name of the resulting resource.
*/
public fun eventSubscription(name: String): EventSubscription {
val builder = EventSubscriptionResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy