putConfigurationSetSuppressionOptions method
Specify the suppression list preferences for a configuration set. You can
also use this operation to specify a SuppressionScope to
override the suppression scope of the tenant or account for emails sent
using this configuration set.
May throw BadRequestException.
May throw NotFoundException.
May throw TooManyRequestsException.
Parameter configurationSetName :
The name of the configuration set 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 or for a specific tenant.
This list can contain any or all of the following:
-
COMPLAINT– Amazon SES adds an email address to the suppression list for your account or for a specific tenant 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 or for a specific tenant when a message sent to that address results in a hard bounce.
Parameter suppressionScope :
The suppression scope for the configuration set. This overrides the tenant
or account suppression scope for emails sent using this configuration set.
Can be one of the following:
-
TENANT– Use the tenant's suppression list. -
ACCOUNT– Use the account-level suppression list.
Parameter validationOptions :
An object that contains information about the email address suppression
preferences for the configuration set in the current Amazon Web Services
Region.
Implementation
Future<void> putConfigurationSetSuppressionOptions({
required String configurationSetName,
List<SuppressionListReason>? suppressedReasons,
SuppressionListScope? suppressionScope,
SuppressionValidationOptions? validationOptions,
}) async {
final $payload = <String, dynamic>{
if (suppressedReasons != null)
'SuppressedReasons': suppressedReasons.map((e) => e.value).toList(),
if (suppressionScope != null) 'SuppressionScope': suppressionScope.value,
if (validationOptions != null) 'ValidationOptions': validationOptions,
};
final response = await _protocol.send(
payload: $payload,
method: 'PUT',
requestUri:
'/v2/email/configuration-sets/${Uri.encodeComponent(configurationSetName)}/suppression-options',
exceptionFnMap: _exceptionFns,
);
}