AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates an Amazon Redshift event notification subscription. This action requires an ARN (Amazon Resource Name) of an Amazon SNS topic created by either the Amazon Redshift console, the Amazon SNS console, or the Amazon SNS API. To obtain an ARN with Amazon SNS, you must create a topic in Amazon SNS and subscribe to the topic. The ARN is displayed in the SNS console.

You can specify the source type, and lists of Amazon Redshift source IDs, event categories, and event severities. Notifications will be sent for all events you want that match those criteria. For example, you can specify source type = cluster, source ID = my-cluster-1 and mycluster2, event categories = Availability, Backup, and severity = ERROR. The subscription will only send notifications for those ERROR events in the Availability and Backup categories for the specified clusters.

If you specify both the source type and source IDs, such as source type = cluster and source identifier = my-cluster-1, notifications will be sent for all the cluster events for my-cluster-1. If you specify a source type but do not specify a source identifier, you will receive notice of the events for the objects of that type in your AWS account. If you do not specify either the SourceType nor the SourceIdentifier, you will be notified of events generated from all Amazon Redshift sources belonging to your AWS account. You must specify a source type if you specify a source ID.

Note:

For PCL this operation is only available in asynchronous form. Please refer to CreateEventSubscriptionAsync.

Namespace: Amazon.Redshift
Assembly: AWSSDK.Redshift.dll
Version: 3.x.y.z

Syntax

C#
public virtual CreateEventSubscriptionResponse CreateEventSubscription(
         CreateEventSubscriptionRequest request
)
Parameters
request
Type: Amazon.Redshift.Model.CreateEventSubscriptionRequest

Container for the necessary parameters to execute the CreateEventSubscription service method.

Return Value
The response from the CreateEventSubscription service method, as returned by Redshift.

Exceptions

ExceptionCondition
EventSubscriptionQuotaExceededException The request would exceed the allowed number of event subscriptions for this account. For information about increasing your quota, go to Limits in Amazon Redshift in the Amazon Redshift Cluster Management Guide.
InvalidTagException The tag is invalid.
SNSInvalidTopicException Amazon SNS has responded that there is a problem with the specified Amazon SNS topic.
SNSNoAuthorizationException You do not have permission to publish to the specified Amazon SNS topic.
SNSTopicArnNotFoundException An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not exist.
SourceNotFoundException The specified Amazon Redshift event source could not be found.
SubscriptionAlreadyExistException There is already an existing event notification subscription with the specified name.
SubscriptionCategoryNotFoundException The value specified for the event category was not one of the allowed values, or it specified a category that does not apply to the specified source type. The allowed values are Configuration, Management, Monitoring, and Security.
SubscriptionEventIdNotFoundException An Amazon Redshift event with the specified event ID does not exist.
SubscriptionSeverityNotFoundException The value specified for the event severity was not one of the allowed values, or it specified a severity that does not apply to the specified source type. The allowed values are ERROR and INFO.
TagLimitExceededException The request exceeds the limit of 10 tags for the resource.

Examples

This example shows how to create an event subscription.

To create an event subscription


var response = client.CreateEventSubscription(new CreateEventSubscriptionRequest 
{
    SnsTopicArn = "arn:aws:sns:us-west-2:123456789101:my-sns-topic",
    SubscriptionName = "mysubscription"
});


            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms

See Also