Enables or disables email sending across your entire Amazon SES account in the current Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending across your Amazon SES account in a given Amazon Web Services Region when reputation metrics (such as your bounce or complaint rates) reach certain thresholds.
You can execute this operation no more than once per second.
Parameters:
-
enabled
(Optional[Enabled], default:
None
)
–
Describes whether email sending is enabled or disabled for your Amazon SES account in the current Amazon Web Services Region.
Raises:
Examples:
UpdateAccountSendingEnabled
The following example updated the sending status for this account.
>>> client.update_account_sending_enabled(enabled=True)
Source code in docs_src/capo_ses/_services/ses.py
| def update_account_sending_enabled(
self,
*,
config_overrides: Optional[SESClientConfig] = None,
enabled: Optional["capo_ses.types.enabled.Enabled"] = None,
) -> None:
"""<p>Enables or disables email sending across your entire Amazon SES account in the current Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending across your Amazon SES account in a given Amazon Web Services Region when reputation metrics (such as your bounce or complaint rates) reach certain thresholds.</p> <p>You can execute this operation no more than once per second.</p>
Args:
enabled: <p>Describes whether email sending is enabled or disabled for your Amazon SES account in the current Amazon Web Services Region.</p>
Raises:
capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
UpdateAccountSendingEnabled
The following example updated the sending status for this account.
>>> client.update_account_sending_enabled(enabled=True)
"""
def _handler(
req: "OperationRequest[capo_ses.types.update_account_sending_enabled_request.UpdateAccountSendingEnabledRequest]",
) -> OperationResponse[None]:
import capo_ses._operations.simple_email_service.update_account_sending_enabled
output, http_response = (
capo_ses._operations.simple_email_service.update_account_sending_enabled.update_account_sending_enabled(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("UpdateAccountSendingEnabled")
)
input_: capo_ses.types.update_account_sending_enabled_request.UpdateAccountSendingEnabledRequest = {}
if enabled is not None:
input_["enabled"] = enabled
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|