deleteEventDestination method

Future<DeleteEventDestinationResult> deleteEventDestination({
  1. required String configurationSetName,
  2. required String eventDestinationName,
})

Deletes an existing event destination.

An event destination is a location where you send response information about the messages that you send. For example, when a message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter configurationSetName : The name of the configuration set or the configuration set's Amazon Resource Name (ARN) to remove the event destination from. The ConfigurateSetName and ConfigurationSetArn can be found using the DescribeConfigurationSets action.

Parameter eventDestinationName : The name of the event destination to delete.

Implementation

Future<DeleteEventDestinationResult> deleteEventDestination({
  required String configurationSetName,
  required String eventDestinationName,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'PinpointSMSVoiceV2.DeleteEventDestination'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'ConfigurationSetName': configurationSetName,
      'EventDestinationName': eventDestinationName,
    },
  );

  return DeleteEventDestinationResult.fromJson(jsonResponse.body);
}