addSourceIdentifierToSubscription method

Future<AddSourceIdentifierToSubscriptionResult> addSourceIdentifierToSubscription({
  1. required String sourceIdentifier,
  2. required String subscriptionName,
})

Adds a source identifier to an existing event notification subscription.

May throw SourceNotFoundFault. May throw SubscriptionNotFoundFault.

Parameter 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.

Parameter subscriptionName : The name of the Amazon DocumentDB event notification subscription that you want to add a source identifier to.

Implementation

Future<AddSourceIdentifierToSubscriptionResult>
    addSourceIdentifierToSubscription({
  required String sourceIdentifier,
  required String subscriptionName,
}) async {
  final $request = <String, String>{
    'SourceIdentifier': sourceIdentifier,
    'SubscriptionName': subscriptionName,
  };
  final $result = await _protocol.send(
    $request,
    action: 'AddSourceIdentifierToSubscription',
    version: '2014-10-31',
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    resultWrapper: 'AddSourceIdentifierToSubscriptionResult',
  );
  return AddSourceIdentifierToSubscriptionResult.fromXml($result);
}