Change the settings for the account-level suppression list.
Parameters:
-
suppressed_reasons
(Optional[SuppressionListReasons], default:
None
)
–
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.
-
validation_attributes
(Optional[SuppressionValidationAttributes], default:
None
)
–
An object that contains additional suppression attributes for your account.
Raises:
Source code in docs_src/capo_sesv2/_services/async_se_sv2.py
| async def put_account_suppression_attributes(
self,
*,
config_overrides: Optional[AsyncSESv2ClientConfig] = None,
suppressed_reasons: Optional[
"capo_sesv2.types.suppression_list_reasons.SuppressionListReasons"
] = None,
validation_attributes: Optional[
"capo_sesv2.types.suppression_validation_attributes.SuppressionValidationAttributes"
] = None,
) -> "capo_sesv2.types.put_account_suppression_attributes_response.PutAccountSuppressionAttributesResponse":
"""<p>Change the settings for the account-level suppression list.</p>
Args:
suppressed_reasons: <p>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:</p> <ul> <li> <p> <code>COMPLAINT</code> – Amazon SES adds an email address to the suppression list for your account when a message sent to that address results in a complaint.</p> </li> <li> <p> <code>BOUNCE</code> – 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.</p> </li> </ul>
validation_attributes: <p>An object that contains additional suppression attributes for your account.</p>
Raises:
capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
capo_sesv2.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
capo_sesv2.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_sesv2.types.put_account_suppression_attributes_request.PutAccountSuppressionAttributesRequest]",
) -> AsyncOperationResponse[
"capo_sesv2.types.put_account_suppression_attributes_response.PutAccountSuppressionAttributesResponse"
]:
import capo_sesv2._operations.simple_email_service_v2.put_account_suppression_attributes
(
output,
http_response,
) = await capo_sesv2._operations.simple_email_service_v2.put_account_suppression_attributes.async_put_account_suppression_attributes(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("PutAccountSuppressionAttributes")
)
input_: capo_sesv2.types.put_account_suppression_attributes_request.PutAccountSuppressionAttributesRequest = {}
if suppressed_reasons is not None:
input_["suppressed_reasons"] = suppressed_reasons
if validation_attributes is not None:
input_["validation_attributes"] = validation_attributes
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|