Event Subscription Args
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 snsTopicArn: 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 DocumentDB 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.docdb.Cluster;
import com.pulumi.aws.docdb.ClusterArgs;
import com.pulumi.aws.sns.Topic;
import com.pulumi.aws.docdb.EventSubscription;
import com.pulumi.aws.docdb.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 exampleCluster = new Cluster("exampleCluster", ClusterArgs.builder()
.clusterIdentifier("example")
.availabilityZones(
data.aws_availability_zones().available().names()[0],
data.aws_availability_zones().available().names()[1],
data.aws_availability_zones().available().names()[2])
.masterUsername("foo")
.masterPassword("mustbeeightcharaters")
.skipFinalSnapshot(true)
.build());
var exampleTopic = new Topic("exampleTopic");
var exampleEventSubscription = new EventSubscription("exampleEventSubscription", EventSubscriptionArgs.builder()
.enabled(true)
.eventCategories(
"creation",
"failure")
.sourceType("db-cluster")
.sourceIds(exampleCluster.id())
.snsTopicArn(exampleTopic.arn())
.build());
}
}
Content copied to clipboard
Import
DocumentDB Event Subscriptions can be imported using the name
, e.g.,
$ pulumi import aws:docdb/eventSubscription:EventSubscription example event-sub
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(enabled: Output<Boolean>? = null, eventCategories: Output<List<String>>? = null, name: Output<String>? = null, namePrefix: Output<String>? = null, snsTopicArn: Output<String>? = null, sourceIds: Output<List<String>>? = null, sourceType: Output<String>? = null, tags: Output<Map<String, String>>? = null)
Properties
Link copied to clipboard
A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/documentdb/latest/developerguide/API_Event.html or run aws docdb describe-event-categories
.
Link copied to clipboard
The name of the DocumentDB event subscription. Conflicts with name
.
Link copied to clipboard
Link copied to clipboard
The type of source that will be generating the events. Valid options are db-instance
, db-cluster
, db-parameter-group
, db-security-group
,db-cluster-snapshot
. If not set, all sources will be subscribed to.