EventSubscription

Attributes

The following additional atttributes are provided:

  • id - The name of the Neptune event notification subscription.
  • arn - The Amazon Resource Name of the Neptune event notification subscription.
  • customer_aws_id - The AWS customer account associated with the Neptune event notification subscription.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultCluster = new Aws.Neptune.Cluster("defaultCluster", new Aws.Neptune.ClusterArgs
        {
            ApplyImmediately = true,
            BackupRetentionPeriod = 5,
            ClusterIdentifier = "neptune-cluster-demo",
            Engine = "neptune",
            IamDatabaseAuthenticationEnabled = true,
            PreferredBackupWindow = "07:00-09:00",
            SkipFinalSnapshot = true,
        });
        var example = new Aws.Neptune.ClusterInstance("example", new Aws.Neptune.ClusterInstanceArgs
        {
            ApplyImmediately = true,
            ClusterIdentifier = defaultCluster.Id,
            Engine = "neptune",
            InstanceClass = "db.r4.large",
        });
        var defaultTopic = new Aws.Sns.Topic("defaultTopic", new Aws.Sns.TopicArgs
        {
        });
        var defaultEventSubscription = new Aws.Neptune.EventSubscription("defaultEventSubscription", new Aws.Neptune.EventSubscriptionArgs
        {
            EventCategories = 
            {
                "maintenance",
                "availability",
                "creation",
                "backup",
                "restoration",
                "recovery",
                "deletion",
                "failover",
                "failure",
                "notification",
                "configuration change",
                "read replica",
            },
            SnsTopicArn = defaultTopic.Arn,
            SourceIds = 
            {
                example.Id,
            },
            SourceType = "db-instance",
            Tags = 
            {
                { "env", "test" },
            },
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/neptune"
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/sns"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        defaultCluster, err := neptune.NewCluster(ctx, "defaultCluster", &neptune.ClusterArgs{
            ApplyImmediately:                 pulumi.Bool(true),
            BackupRetentionPeriod:            pulumi.Int(5),
            ClusterIdentifier:                pulumi.String("neptune-cluster-demo"),
            Engine:                           pulumi.String("neptune"),
            IamDatabaseAuthenticationEnabled: pulumi.Bool(true),
            PreferredBackupWindow:            pulumi.String("07:00-09:00"),
            SkipFinalSnapshot:                pulumi.Bool(true),
        })
        if err != nil {
            return err
        }
        example, err := neptune.NewClusterInstance(ctx, "example", &neptune.ClusterInstanceArgs{
            ApplyImmediately:  pulumi.Bool(true),
            ClusterIdentifier: defaultCluster.ID(),
            Engine:            pulumi.String("neptune"),
            InstanceClass:     pulumi.String("db.r4.large"),
        })
        if err != nil {
            return err
        }
        defaultTopic, err := sns.NewTopic(ctx, "defaultTopic", nil)
        if err != nil {
            return err
        }
        _, err = neptune.NewEventSubscription(ctx, "defaultEventSubscription", &neptune.EventSubscriptionArgs{
            EventCategories: pulumi.StringArray{
                pulumi.String("maintenance"),
                pulumi.String("availability"),
                pulumi.String("creation"),
                pulumi.String("backup"),
                pulumi.String("restoration"),
                pulumi.String("recovery"),
                pulumi.String("deletion"),
                pulumi.String("failover"),
                pulumi.String("failure"),
                pulumi.String("notification"),
                pulumi.String("configuration change"),
                pulumi.String("read replica"),
            },
            SnsTopicArn: defaultTopic.Arn,
            SourceIds: pulumi.StringArray{
                example.ID(),
            },
            SourceType: pulumi.String("db-instance"),
            Tags: pulumi.StringMap{
                "env": pulumi.String("test"),
            },
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

default_cluster = aws.neptune.Cluster("defaultCluster",
    apply_immediately="true",
    backup_retention_period=5,
    cluster_identifier="neptune-cluster-demo",
    engine="neptune",
    iam_database_authentication_enabled="true",
    preferred_backup_window="07:00-09:00",
    skip_final_snapshot=True)
example = aws.neptune.ClusterInstance("example",
    apply_immediately="true",
    cluster_identifier=default_cluster.id,
    engine="neptune",
    instance_class="db.r4.large")
default_topic = aws.sns.Topic("defaultTopic")
default_event_subscription = aws.neptune.EventSubscription("defaultEventSubscription",
    event_categories=[
        "maintenance",
        "availability",
        "creation",
        "backup",
        "restoration",
        "recovery",
        "deletion",
        "failover",
        "failure",
        "notification",
        "configuration change",
        "read replica",
    ],
    sns_topic_arn=default_topic.arn,
    source_ids=[example.id],
    source_type="db-instance",
    tags={
        "env": "test",
    })
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const defaultCluster = new aws.neptune.Cluster("default", {
    applyImmediately: true,
    backupRetentionPeriod: 5,
    clusterIdentifier: "neptune-cluster-demo",
    engine: "neptune",
    iamDatabaseAuthenticationEnabled: true,
    preferredBackupWindow: "07:00-09:00",
    skipFinalSnapshot: true,
});
const example = new aws.neptune.ClusterInstance("example", {
    applyImmediately: true,
    clusterIdentifier: defaultCluster.id,
    engine: "neptune",
    instanceClass: "db.r4.large",
});
const defaultTopic = new aws.sns.Topic("default", {});
const defaultEventSubscription = new aws.neptune.EventSubscription("default", {
    eventCategories: [
        "maintenance",
        "availability",
        "creation",
        "backup",
        "restoration",
        "recovery",
        "deletion",
        "failover",
        "failure",
        "notification",
        "configuration change",
        "read replica",
    ],
    snsTopicArn: defaultTopic.arn,
    sourceIds: [example.id],
    sourceType: "db-instance",
    tags: {
        env: "test",
    },
});

Create a EventSubscription Resource

def EventSubscription(resource_name, opts=None, enabled=None, event_categories=None, name=None, name_prefix=None, sns_topic_arn=None, source_ids=None, source_type=None, tags=None, __props__=None);
name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args EventSubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

EventSubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The EventSubscription resource accepts the following input properties:

SnsTopicArn string

The ARN of the SNS topic to send events to.

Enabled bool

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

EventCategories List<string>

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

Name string

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

NamePrefix string

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

SourceIds List<string>

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.

SourceType string

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.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

SnsTopicArn string

The ARN of the SNS topic to send events to.

Enabled bool

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

EventCategories []string

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

Name string

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

NamePrefix string

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

SourceIds []string

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.

SourceType string

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.

Tags map[string]string

A map of tags to assign to the resource.

snsTopicArn string

The ARN of the SNS topic to send events to.

enabled boolean

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

eventCategories string[]

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

name string

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

namePrefix string

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

sourceIds string[]

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.

sourceType string

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.

tags {[key: string]: string}

A map of tags to assign to the resource.

sns_topic_arn str

The ARN of the SNS topic to send events to.

enabled bool

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

event_categories List[str]

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

name str

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

name_prefix str

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

source_ids List[str]

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.

source_type str

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.

tags Dict[str, str]

A map of tags to assign to the resource.

Outputs

All input properties are implicitly available as output properties. Additionally, the EventSubscription resource produces the following output properties:

Arn string
CustomerAwsId string
Id string
The provider-assigned unique ID for this managed resource.
Arn string
CustomerAwsId string
Id string
The provider-assigned unique ID for this managed resource.
arn string
customerAwsId string
id string
The provider-assigned unique ID for this managed resource.
arn str
customer_aws_id str
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing EventSubscription Resource

Get an existing EventSubscription resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: EventSubscriptionState, opts?: CustomResourceOptions): EventSubscription
static get(resource_name, id, opts=None, arn=None, customer_aws_id=None, enabled=None, event_categories=None, name=None, name_prefix=None, sns_topic_arn=None, source_ids=None, source_type=None, tags=None, __props__=None);
func GetEventSubscription(ctx *Context, name string, id IDInput, state *EventSubscriptionState, opts ...ResourceOption) (*EventSubscription, error)
public static EventSubscription Get(string name, Input<string> id, EventSubscriptionState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

Arn string
CustomerAwsId string
Enabled bool

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

EventCategories List<string>

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

Name string

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

NamePrefix string

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

SnsTopicArn string

The ARN of the SNS topic to send events to.

SourceIds List<string>

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.

SourceType string

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.

Tags Dictionary<string, string>

A map of tags to assign to the resource.

Arn string
CustomerAwsId string
Enabled bool

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

EventCategories []string

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

Name string

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

NamePrefix string

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

SnsTopicArn string

The ARN of the SNS topic to send events to.

SourceIds []string

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.

SourceType string

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.

Tags map[string]string

A map of tags to assign to the resource.

arn string
customerAwsId string
enabled boolean

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

eventCategories string[]

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

name string

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

namePrefix string

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

snsTopicArn string

The ARN of the SNS topic to send events to.

sourceIds string[]

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.

sourceType string

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.

tags {[key: string]: string}

A map of tags to assign to the resource.

arn str
customer_aws_id str
enabled bool

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

event_categories List[str]

A list of event categories for a source_type that you want to subscribe to. Run aws neptune describe-event-categories to find all the event categories.

name str

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

name_prefix str

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

sns_topic_arn str

The ARN of the SNS topic to send events to.

source_ids List[str]

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.

source_type str

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.

tags Dict[str, str]

A map of tags to assign to the resource.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.