

# AddSourceIdentifierToSubscription
<a name="API_AddSourceIdentifierToSubscription"></a>

Adds a source identifier to an existing event notification subscription.

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

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

 ** SourceIdentifier **   
The identifier of the event source to be added:  
+ If the source type is an instance, a `DBInstanceIdentifier` must be provided.
+ If the source type is a security group, a `DBSecurityGroupName` must be provided.
+ If the source type is a parameter group, a `DBParameterGroupName` must be provided.
+ If the source type is a snapshot, a `DBSnapshotIdentifier` must be provided.
Type: String  
Required: Yes

 ** SubscriptionName **   
The name of the Amazon DocumentDB event notification subscription that you want to add a source identifier to.  
Type: String  
Required: Yes

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

The following element is returned by the service.

 ** EventSubscription **   
Detailed information about an event to which you have subscribed.  
Type: [EventSubscription](API_EventSubscription.md) object

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

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

 ** SourceNotFound **   
The requested source could not be found.   
HTTP Status Code: 404

 ** SubscriptionNotFound **   
The subscription name does not exist.   
HTTP Status Code: 404

## See Also
<a name="API_AddSourceIdentifierToSubscription_SeeAlso"></a>

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