deleteEventSubscription method

Future<DeleteEventSubscriptionResponse> deleteEventSubscription({
  1. required String subscriptionName,
})

Deletes an AWS DMS event subscription.

May throw ResourceNotFoundFault. May throw InvalidResourceStateFault.

Parameter subscriptionName : The name of the DMS event notification subscription to be deleted.

Implementation

Future<DeleteEventSubscriptionResponse> deleteEventSubscription({
  required String subscriptionName,
}) async {
  ArgumentError.checkNotNull(subscriptionName, 'subscriptionName');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonDMSv20160101.DeleteEventSubscription'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'SubscriptionName': subscriptionName,
    },
  );

  return DeleteEventSubscriptionResponse.fromJson(jsonResponse.body);
}