Class EventSubscription
Provides a DB event subscription resource.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var defaultInstance = new Aws.Rds.Instance("defaultInstance", new Aws.Rds.InstanceArgs
{
AllocatedStorage = 10,
DbSubnetGroupName = "my_database_subnet_group",
Engine = "mysql",
EngineVersion = "5.6.17",
InstanceClass = "db.t2.micro",
Name = "mydb",
ParameterGroupName = "default.mysql5.6",
Password = "bar",
Username = "foo",
});
var defaultTopic = new Aws.Sns.Topic("defaultTopic", new Aws.Sns.TopicArgs
{
});
var defaultEventSubscription = new Aws.Rds.EventSubscription("defaultEventSubscription", new Aws.Rds.EventSubscriptionArgs
{
EventCategories =
{
"availability",
"deletion",
"failover",
"failure",
"low storage",
"maintenance",
"notification",
"read replica",
"recovery",
"restoration",
},
SnsTopic = defaultTopic.Arn,
SourceIds =
{
defaultInstance.Id,
},
SourceType = "db-instance",
});
}
}
Attributes
The following additional atttributes are provided:
id- The name of the RDS event notification subscriptionarn- The Amazon Resource Name of the RDS event notification subscriptioncustomer_aws_id- The AWS customer account associated with the RDS event notification subscription
Inherited Members
Namespace: Pulumi.Aws.Rds
Assembly: Pulumi.Aws.dll
Syntax
public class EventSubscription : CustomResource
Constructors
View SourceEventSubscription(String, EventSubscriptionArgs, CustomResourceOptions)
Create a EventSubscription resource with the given unique name, arguments, and options.
Declaration
public EventSubscription(string name, EventSubscriptionArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| EventSubscriptionArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceArn
Declaration
public Output<string> Arn { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
CustomerAwsId
Declaration
public Output<string> CustomerAwsId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Enabled
A boolean flag to enable/disable the subscription. Defaults to true.
Declaration
public Output<bool?> Enabled { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Nullable<System.Boolean>> |
EventCategories
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.
Declaration
public Output<ImmutableArray<string>> EventCategories { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
Name
The name of the DB event subscription. By default generated by this provider.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
NamePrefix
The name of the DB event subscription. Conflicts with name.
Declaration
public Output<string> NamePrefix { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SnsTopic
The SNS topic to send events to.
Declaration
public Output<string> SnsTopic { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
SourceIds
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.
Declaration
public Output<ImmutableArray<string>> SourceIds { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableArray<System.String>> |
SourceType
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.
Declaration
public Output<string> SourceType { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Tags
A map of tags to assign to the resource.
Declaration
public Output<ImmutableDictionary<string, object>> Tags { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Collections.Immutable.ImmutableDictionary<System.String, System.Object>> |
Methods
View SourceGet(String, Input<String>, EventSubscriptionState, CustomResourceOptions)
Get an existing EventSubscription resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static EventSubscription Get(string name, Input<string> id, EventSubscriptionState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| EventSubscriptionState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| EventSubscription |