putConfigurationSetSuppressionOptions method
Future<void>
putConfigurationSetSuppressionOptions({
- required String configurationSetName,
- List<
SuppressionListReason> ? suppressedReasons,
Specify the account suppression list preferences for a configuration set.
May throw NotFoundException. May throw TooManyRequestsException. May throw BadRequestException.
Parameter configurationSetName
:
The name of the configuration set that you want to change the suppression
list preferences for.
Parameter suppressedReasons
:
A list that contains the reasons that email addresses are 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> putConfigurationSetSuppressionOptions({
required String configurationSetName,
List<SuppressionListReason>? suppressedReasons,
}) async {
ArgumentError.checkNotNull(configurationSetName, 'configurationSetName');
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/configuration-sets/${Uri.encodeComponent(configurationSetName)}/suppression-options',
exceptionFnMap: _exceptionFns,
);
}