ModifyEventSubscription - Amazon Redshift

ModifyEventSubscription

Modifies an existing Amazon Redshift event notification subscription.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

SubscriptionName

The name of the modified Amazon Redshift event notification subscription.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: Yes

Enabled

A Boolean value indicating if the subscription is enabled. true indicates the subscription is enabled

Type: Boolean

Required: No

EventCategories.EventCategory.N

Specifies the Amazon Redshift event categories to be published by the event notification subscription.

Values: configuration, management, monitoring, security, pending

Type: Array of strings

Length Constraints: Maximum length of 2147483647.

Required: No

Severity

Specifies the Amazon Redshift event severity to be published by the event notification subscription.

Values: ERROR, INFO

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

SnsTopicArn

The Amazon Resource Name (ARN) of the SNS topic to be used by the event notification subscription.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

SourceIds.SourceId.N

A list of one or more identifiers of Amazon Redshift source objects. All of the objects must be of the same type as was specified in the source type parameter. The event subscription will return only events generated by the specified objects. If not specified, then events are returned for all objects within the source type specified.

Example: my-cluster-1, my-cluster-2

Example: my-snapshot-20131010

Type: Array of strings

Length Constraints: Maximum length of 2147483647.

Required: No

SourceType

The type of source that will be generating the events. For example, if you want to be notified of events generated by a cluster, you would set this parameter to cluster. If this value is not specified, events are returned for all Amazon Redshift objects in your AWS account. You must specify a source type in order to specify source IDs.

Valid values: cluster, cluster-parameter-group, cluster-security-group, cluster-snapshot, and scheduled-action.

Type: String

Length Constraints: Maximum length of 2147483647.

Required: No

Response Elements

The following element is returned by the service.

EventSubscription

Describes event subscriptions.

Type: EventSubscription object

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidSubscriptionStateFault

The subscription request is invalid because it is a duplicate request. This subscription request is already in progress.

HTTP Status Code: 400

SNSInvalidTopic

Amazon SNS has responded that there is a problem with the specified Amazon SNS topic.

HTTP Status Code: 400

SNSNoAuthorization

You do not have permission to publish to the specified Amazon SNS topic.

HTTP Status Code: 400

SNSTopicArnNotFound

An Amazon SNS topic with the specified Amazon Resource Name (ARN) does not exist.

HTTP Status Code: 404

SourceNotFound

The specified Amazon Redshift event source could not be found.

HTTP Status Code: 404

SubscriptionCategoryNotFound

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.

HTTP Status Code: 404

SubscriptionEventIdNotFound

An Amazon Redshift event with the specified event ID does not exist.

HTTP Status Code: 404

SubscriptionNotFound

An Amazon Redshift event notification subscription with the specified name does not exist.

HTTP Status Code: 404

SubscriptionSeverityNotFound

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.

HTTP Status Code: 404

Examples

Example

This example disables an event notification subscription.

Sample Request

https://redshift.us-east-2.amazonaws.com/ ?Action=ModifyEventSubscription &SubscriptionName=mysubscription &Enabled=false &SignatureMethod=HmacSHA256&SignatureVersion=4 &Version=2012-12-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIAIOSFODNN7EXAMPLE/20190817/us-east-2/redshift/aws4_request &X-Amz-Date=20190825T160000Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=0aa1234bb5cc678ddddd901ee2ff3aa45678b90c12d345e6ff789012345a6b7b

Sample Response

<ModifyEventSubscriptionResponse xmlns="http://redshift.amazonaws.com/doc/2012-12-01/"> <ModifyEventSubscriptionResult> <EventSubscription> <Severity>ERROR</Severity> <CustSubscriptionId>mysubscription</CustSubscriptionId> <SnsTopicArn>arn:aws:sns:us-east-2:123456789012:MySNStopic</SnsTopicArn> <SourceIdsList/> <EventCategoriesList/> <SubscriptionCreationTime>2019-12-27T00:27:43.748Z</SubscriptionCreationTime> <Enabled>false</Enabled> <Tags/> <Status>active</Status> <CustomerAwsId>123456789012</CustomerAwsId> </EventSubscription> </ModifyEventSubscriptionResult> <ResponseMetadata> <RequestId>ab342788-28f2-11ea-a940-1b28a85fd753</RequestId> </ResponseMetadata> </ModifyEventSubscriptionResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: