

# ModifyEventSubscription
<a name="API_ModifyEventSubscription"></a>

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](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) in the *Amazon RDS User Guide* or by using the `DescribeEventCategories` operation.

## Request Parameters
<a name="API_ModifyEventSubscription_RequestParameters"></a>

 For information about the parameters that are common to all actions, see [Common Parameters](CommonParameters.md).

 ** 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](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Events.html) 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 | zero-etl | custom-engine-version | blue-green-deployment `   
Type: String  
Required: No

## Response Elements
<a name="API_ModifyEventSubscription_ResponseElements"></a>

The following element is returned by the service.

 ** EventSubscription **   
Contains the results of a successful invocation of the `DescribeEventSubscriptions` action.  
Type: [EventSubscription](API_EventSubscription.md) object

## Errors
<a name="API_ModifyEventSubscription_Errors"></a>

For information about the errors that are common to all actions, see [Common Error Types](CommonErrors.md).

 ** 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
<a name="API_ModifyEventSubscription_Examples"></a>

### Example
<a name="API_ModifyEventSubscription_Example_1"></a>

This example illustrates one usage of ModifyEventSubscription.

#### Sample Request
<a name="API_ModifyEventSubscription_Example_1_Request"></a>

```
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
<a name="API_ModifyEventSubscription_Example_1_Response"></a>

```
<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
<a name="API_ModifyEventSubscription_SeeAlso"></a>

For more information about using this API in one of the language-specific AWS SDKs, see the following:
+  [AWS Command Line Interface V2](https://docs.aws.amazon.com/goto/cli2/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for .NET V4](https://docs.aws.amazon.com/goto/DotNetSDKV4/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for C\$1\$1](https://docs.aws.amazon.com/goto/SdkForCpp/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for Go v2](https://docs.aws.amazon.com/goto/SdkForGoV2/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for Java V2](https://docs.aws.amazon.com/goto/SdkForJavaV2/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for JavaScript V3](https://docs.aws.amazon.com/goto/SdkForJavaScriptV3/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for Kotlin](https://docs.aws.amazon.com/goto/SdkForKotlin/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for PHP V3](https://docs.aws.amazon.com/goto/SdkForPHPV3/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for Python](https://docs.aws.amazon.com/goto/boto3/rds-2014-10-31/ModifyEventSubscription) 
+  [AWS SDK for Ruby V3](https://docs.aws.amazon.com/goto/SdkForRubyV3/rds-2014-10-31/ModifyEventSubscription) 