putAccountSuppressionAttributes method

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

Change the settings for the account-level suppression list.

May throw BadRequestException. May throw TooManyRequestsException.

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.

Parameter validationAttributes : An object that contains additional suppression attributes for your account.

Implementation

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