EventSubscription
Provides a Redshift event subscription resource.
Attributes
The following additional atttributes are provided:
arn- Amazon Resource Name (ARN) of the Redshift event notification subscriptionid- The name of the Redshift event notification subscriptioncustomer_aws_id- The AWS customer account associated with the Redshift event notification subscription
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var defaultCluster = new Aws.RedShift.Cluster("defaultCluster", new Aws.RedShift.ClusterArgs
{
ClusterIdentifier = "default",
DatabaseName = "default",
});
var defaultTopic = new Aws.Sns.Topic("defaultTopic", new Aws.Sns.TopicArgs
{
});
var defaultEventSubscription = new Aws.RedShift.EventSubscription("defaultEventSubscription", new Aws.RedShift.EventSubscriptionArgs
{
EventCategories =
{
"configuration",
"management",
"monitoring",
"security",
},
Severity = "INFO",
SnsTopicArn = defaultTopic.Arn,
SourceIds =
{
defaultCluster.Id,
},
SourceType = "cluster",
Tags =
{
{ "Name", "default" },
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/redshift"
"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 := redshift.NewCluster(ctx, "defaultCluster", &redshift.ClusterArgs{
ClusterIdentifier: pulumi.String("default"),
DatabaseName: pulumi.String("default"),
})
if err != nil {
return err
}
defaultTopic, err := sns.NewTopic(ctx, "defaultTopic", nil)
if err != nil {
return err
}
_, err = redshift.NewEventSubscription(ctx, "defaultEventSubscription", &redshift.EventSubscriptionArgs{
EventCategories: pulumi.StringArray{
pulumi.String("configuration"),
pulumi.String("management"),
pulumi.String("monitoring"),
pulumi.String("security"),
},
Severity: pulumi.String("INFO"),
SnsTopicArn: defaultTopic.Arn,
SourceIds: pulumi.StringArray{
defaultCluster.ID(),
},
SourceType: pulumi.String("cluster"),
Tags: pulumi.StringMap{
"Name": pulumi.String("default"),
},
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
default_cluster = aws.redshift.Cluster("defaultCluster",
cluster_identifier="default",
database_name="default")
default_topic = aws.sns.Topic("defaultTopic")
default_event_subscription = aws.redshift.EventSubscription("defaultEventSubscription",
event_categories=[
"configuration",
"management",
"monitoring",
"security",
],
severity="INFO",
sns_topic_arn=default_topic.arn,
source_ids=[default_cluster.id],
source_type="cluster",
tags={
"Name": "default",
})import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const defaultCluster = new aws.redshift.Cluster("default", {
clusterIdentifier: "default",
databaseName: "default",
});
const defaultTopic = new aws.sns.Topic("default", {});
const defaultEventSubscription = new aws.redshift.EventSubscription("default", {
eventCategories: [
"configuration",
"management",
"monitoring",
"security",
],
severity: "INFO",
snsTopicArn: defaultTopic.arn,
sourceIds: [defaultCluster.id],
sourceType: "cluster",
tags: {
Name: "default",
},
});Create a EventSubscription Resource
new EventSubscription(name: string, args: EventSubscriptionArgs, opts?: CustomResourceOptions);def EventSubscription(resource_name, opts=None, enabled=None, event_categories=None, name=None, severity=None, sns_topic_arn=None, source_ids=None, source_type=None, tags=None, __props__=None);func NewEventSubscription(ctx *Context, name string, args EventSubscriptionArgs, opts ...ResourceOption) (*EventSubscription, error)public EventSubscription(string name, EventSubscriptionArgs args, CustomResourceOptions? opts = null)- 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:
- Sns
Topic stringArn 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<string> A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- Name string
The name of the Redshift event subscription.
- Severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- Source
Ids 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.
- Source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- Dictionary<string, string>
A map of tags to assign to the resource.
- Sns
Topic stringArn 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 []string A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- Name string
The name of the Redshift event subscription.
- Severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- Source
Ids []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.
- Source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- map[string]string
A map of tags to assign to the resource.
- sns
Topic stringArn The ARN of the SNS topic to send events to.
- enabled boolean
A boolean flag to enable/disable the subscription. Defaults to true.
- event
Categories string[] A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- name string
The name of the Redshift event subscription.
- severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- source
Ids 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.
- source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- {[key: string]: string}
A map of tags to assign to the resource.
- sns_
topic_ strarn 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 SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- name str
The name of the Redshift event subscription.
- severity str
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- 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
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- 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:
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): EventSubscriptionstatic get(resource_name, id, opts=None, arn=None, customer_aws_id=None, enabled=None, event_categories=None, name=None, severity=None, sns_topic_arn=None, source_ids=None, source_type=None, status=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
- Customer
Aws stringId - Enabled bool
A boolean flag to enable/disable the subscription. Defaults to true.
- Event
Categories List<string> A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- Name string
The name of the Redshift event subscription.
- Severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- Sns
Topic stringArn The ARN of the SNS topic to send events to.
- Source
Ids 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.
- Source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- Status string
- Dictionary<string, string>
A map of tags to assign to the resource.
- Arn string
- Customer
Aws stringId - Enabled bool
A boolean flag to enable/disable the subscription. Defaults to true.
- Event
Categories []string A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- Name string
The name of the Redshift event subscription.
- Severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- Sns
Topic stringArn The ARN of the SNS topic to send events to.
- Source
Ids []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.
- Source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- Status string
- map[string]string
A map of tags to assign to the resource.
- arn string
- customer
Aws stringId - enabled boolean
A boolean flag to enable/disable the subscription. Defaults to true.
- event
Categories string[] A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- name string
The name of the Redshift event subscription.
- severity string
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- sns
Topic stringArn The ARN of the SNS topic to send events to.
- source
Ids 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.
- source
Type string The type of source that will be generating the events. Valid options are
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- status string
- {[key: string]: string}
A map of tags to assign to the resource.
- arn str
- customer_
aws_ strid - enabled bool
A boolean flag to enable/disable the subscription. Defaults to true.
- event_
categories List[str] A list of event categories for a SourceType that you want to subscribe to. See https://docs.aws.amazon.com/redshift/latest/mgmt/working-with-event-notifications.html or run
aws redshift describe-event-categories.- name str
The name of the Redshift event subscription.
- severity str
The event severity to be published by the notification subscription. Valid options are
INFOorERROR.- sns_
topic_ strarn 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
cluster,cluster-parameter-group,cluster-security-group, orcluster-snapshot. If not set, all sources will be subscribed to.- status str
- 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
awsTerraform Provider.