putAccountSuppressionAttributes method

Future<void> putAccountSuppressionAttributes({
  1. List<SuppressionListReason>? suppressedReasons,
})

Change the settings for the account-level suppression list.

May throw TooManyRequestsException. May throw BadRequestException.

Parameter suppressedReasons : A list that contains the reasons that email addresses will be automatically added to the suppression list for your account. This list can contain any or all of the following:

  • COMPLAINT – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a complaint.
  • BOUNCE – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a hard bounce.

Implementation

Future<void> putAccountSuppressionAttributes({
  List<SuppressionListReason>? suppressedReasons,
}) async {
  final $payload = <String, dynamic>{
    if (suppressedReasons != null)
      'SuppressedReasons': suppressedReasons.map((e) => e.toValue()).toList(),
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/v2/email/account/suppression',
    exceptionFnMap: _exceptionFns,
  );
}