createConfigurationSetEventDestination method

Future<void> createConfigurationSetEventDestination({
  1. required String configurationSetName,
  2. required EventDestinationDefinition eventDestination,
  3. required String eventDestinationName,
})

Create an event destination. Events include message sends, deliveries, opens, clicks, bounces, and complaints. Event destinations are places that you can send information about these events to. For example, you can send event data to Amazon EventBridge and associate a rule to send the event to the specified target.

A single configuration set can include more than one event destination.

May throw AlreadyExistsException. May throw BadRequestException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException.

Parameter configurationSetName : The name of the configuration set .

Parameter eventDestination : An object that defines the event destination.

Parameter eventDestinationName : A name that identifies the event destination within the configuration set.

Implementation

Future<void> createConfigurationSetEventDestination({
  required String configurationSetName,
  required EventDestinationDefinition eventDestination,
  required String eventDestinationName,
}) async {
  final $payload = <String, dynamic>{
    'EventDestination': eventDestination,
    'EventDestinationName': eventDestinationName,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri:
        '/v2/email/configuration-sets/${Uri.encodeComponent(configurationSetName)}/event-destinations',
    exceptionFnMap: _exceptionFns,
  );
}