EventSubscriptionArgs

data class EventSubscriptionArgs(val enabled: Output<Boolean>? = null, val eventCategories: Output<List<String>>? = null, val name: Output<String>? = null, val namePrefix: Output<String>? = null, val snsTopic: Output<String>? = null, val sourceIds: Output<List<String>>? = null, val sourceType: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<EventSubscriptionArgs>

Provides a DB event subscription resource.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.Instance;
import com.pulumi.aws.rds.InstanceArgs;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.rds.EventSubscription;
import com.pulumi.aws.rds.EventSubscriptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.allocatedStorage(10)
.engine("mysql")
.engineVersion("5.6.17")
.instanceClass("db.t2.micro")
.name("mydb")
.username("foo")
.password("bar")
.dbSubnetGroupName("my_database_subnet_group")
.parameterGroupName("default.mysql5.6")
.build());
var defaultTopic = new Topic("defaultTopic");
var defaultEventSubscription = new EventSubscription("defaultEventSubscription", EventSubscriptionArgs.builder()
.snsTopic(defaultTopic.arn())
.sourceType("db-instance")
.sourceIds(defaultInstance.id())
.eventCategories(
"availability",
"deletion",
"failover",
"failure",
"low storage",
"maintenance",
"notification",
"read replica",
"recovery",
"restoration")
.build());
}
}

Import

DB Event Subscriptions can be imported using the name, e.g.,

$ pulumi import aws:rds/eventSubscription:EventSubscription default rds-event-sub

Constructors

Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, eventCategories: Output<List<String>>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, snsTopic: Output<String>? = null, sourceIds: Output<List<String>>? = null, sourceType: Output<String>? = null, tags: Output<Map<String, String>>? = null)

Properties

Link copied to clipboard
val enabled: Output<Boolean>? = null

A boolean flag to enable/disable the subscription. Defaults to true.

Link copied to clipboard
val eventCategories: Output<List<String>>? = null

A list of event categories for a SourceType that you want to subscribe to. See http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html or run aws rds describe-event-categories.

Link copied to clipboard
val name: Output<String>? = null

The name of the DB event subscription. By default generated by this provider.

Link copied to clipboard
val namePrefix: Output<String>? = null

The name of the DB event subscription. Conflicts with name.

Link copied to clipboard
val snsTopic: Output<String>? = null

The SNS topic to send events to.

Link copied to clipboard
val sourceIds: Output<List<String>>? = null

A list of identifiers of the event sources for which events will be returned. If not specified, then all sources are included in the response. If specified, a source_type must also be specified.

Link copied to clipboard
val sourceType: Output<String>? = null

The type of source that will be generating the events. Valid options are db-instance, db-security-group, db-parameter-group, db-snapshot, db-cluster or db-cluster-snapshot. If not set, all sources will be subscribed to.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. .If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Functions

Link copied to clipboard
open override fun toJava(): EventSubscriptionArgs