ModifyEventSubscription - Amazon Relational Database Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

ModifyEventSubscription

Modifies an existing RDS event notification subscription. You can't modify the source identifiers using this call. To change source identifiers for a subscription, use the AddSourceIdentifierToSubscription and RemoveSourceIdentifierFromSubscription calls.

You can see a list of the event categories for a given source type (SourceType) in Events in the Amazon RDS User Guide or by using the DescribeEventCategories operation.

Request Parameters

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

SubscriptionName

The name of the RDS event notification subscription.

Type: String

Required: Yes

Enabled

Specifies whether to activate the subscription.

Type: Boolean

Required: No

EventCategories.EventCategory.N

A list of event categories for a source type (SourceType) that you want to subscribe to. You can see a list of the categories for a given source type in Events in the Amazon RDS User Guide or by using the DescribeEventCategories operation.

Type: Array of strings

Required: No

SnsTopicArn

The Amazon Resource Name (ARN) of the SNS topic created for event notification. The ARN is created by Amazon SNS when you create a topic and subscribe to it.

Type: String

Required: No

SourceType

The type of source that is generating the events. For example, if you want to be notified of events generated by a DB instance, you would set this parameter to db-instance. For RDS Proxy events, specify db-proxy. If this value isn't specified, all events are returned.

Valid Values: db-instance | db-cluster | db-parameter-group | db-security-group | db-snapshot | db-cluster-snapshot | db-proxy

Type: String

Required: No

Response Elements

The following element is returned by the service.

EventSubscription

Contains the results of a successful invocation of the DescribeEventSubscriptions action.

Type: EventSubscription object

Errors

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

EventSubscriptionQuotaExceeded

You have reached the maximum number of event subscriptions.

HTTP Status Code: 400

SNSInvalidTopic

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

HTTP Status Code: 400

SNSNoAuthorization

You do not have permission to publish to the SNS topic ARN.

HTTP Status Code: 400

SNSTopicArnNotFound

The SNS topic ARN does not exist.

HTTP Status Code: 404

SubscriptionCategoryNotFound

The supplied category does not exist.

HTTP Status Code: 404

SubscriptionNotFound

The subscription name does not exist.

HTTP Status Code: 404

Examples

Example

This example illustrates one usage of ModifyEventSubscription.

Sample Request

https://rds.us-west-2.amazonaws.com/ ?Action=ModifyEventSubscription &Enabled=true &EventCategories.member.1=creation &EventCategories.member.2=deletion &EventCategories.member.3=failover &SignatureMethod=HmacSHA256 &SignatureVersion=4 &SnsTopicArn=arn%3Aaws%3Asns%3Aus-west-2%3A802#########%3Amy-rds-events &SourceIds.member.1=myexampledb&SourceType=db-instance &SubscriptionName=ES-myuser01 &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140428/us-west-2/rds/aws4_request &X-Amz-Date=20140428T183020Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=3d85bdfaf13861e93a9528824d9876ed87e6e01aaf43a962ce6f2a39247cf33a

Sample Response

<ModifyEventSubscriptionResponse xmlns="http://rds.amazonaws.com/doc/2014-10-31/"> <ModifyEventSubscriptionResult> <EventSubscription> <CustomerAwsId>802#########</CustomerAwsId> <Enabled>true</Enabled> <SourceType>db-instance</SourceType> <Status>modifying</Status> <SourceIdsList> <SourceId>myexampledb</SourceId> </SourceIdsList> <SubscriptionCreationTime>2014-04-28 18:24:52.735</SubscriptionCreationTime> <EventCategoriesList> <EventCategory>creation</EventCategory> <EventCategory>deletion</EventCategory> <EventCategory>failover</EventCategory> </EventCategoriesList> <CustSubscriptionId>ES-myuser01</CustSubscriptionId> <SnsTopicArn>arn:aws:sns:us-west-2:802#########:my-rds-events</SnsTopicArn> </EventSubscription> </ModifyEventSubscriptionResult> <ResponseMetadata> <RequestId>1798605b-be02-11d3-f73c-899ec2766c3b</RequestId> </ResponseMetadata> </ModifyEventSubscriptionResponse>

See Also

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