Skip to content

update_configuration_set_sending_enabled async

update_configuration_set_sending_enabled(
    configuration_set_name: ConfigurationSetName,
    enabled: Enabled,
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> None

Enables or disables email sending for messages sent using a specific configuration set in a given Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending for a configuration set when the reputation metrics for that configuration set (such as your bounce on complaint rate) exceed certain thresholds.

You can execute this operation no more than once per second.

Parameters:

  • configuration_set_name (ConfigurationSetName) –

    The name of the configuration set to update.

  • enabled (Enabled) –

    Describes whether email sending is enabled or disabled for the configuration set.

Raises:

Examples:

UpdateConfigurationSetReputationMetricsEnabled Set the sending enabled flag for a specific configuration set.

>>> await client.update_configuration_set_sending_enabled(configuration_set_name='foo', enabled=True)
Source code in docs_src/capo_ses/_services/async_ses.py
async def update_configuration_set_sending_enabled(
    self,
    configuration_set_name: "capo_ses.types.configuration_set_name.ConfigurationSetName",
    enabled: "capo_ses.types.enabled.Enabled",
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> None:
    """<p>Enables or disables email sending for messages sent using a specific configuration set in a given Amazon Web Services Region. You can use this operation in conjunction with Amazon CloudWatch alarms to temporarily pause email sending for a configuration set when the reputation metrics for that configuration set (such as your bounce on complaint rate) exceed certain thresholds.</p> <p>You can execute this operation no more than once per second.</p>

    Args:
        configuration_set_name: <p>The name of the configuration set to update.</p>
        enabled: <p>Describes whether email sending is enabled or disabled for the configuration set. </p>

    Raises:
        capo_ses.errors.configuration_set_does_not_exist_exception.ConfigurationSetDoesNotExistException: <p>Indicates that the configuration set does not exist.</p>
        capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        UpdateConfigurationSetReputationMetricsEnabled
        Set the sending enabled flag for a specific configuration set.

        >>> await client.update_configuration_set_sending_enabled(configuration_set_name='foo', enabled=True)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ses.types.update_configuration_set_sending_enabled_request.UpdateConfigurationSetSendingEnabledRequest]",
    ) -> AsyncOperationResponse[None]:
        import capo_ses._operations.simple_email_service.update_configuration_set_sending_enabled

        (
            output,
            http_response,
        ) = await capo_ses._operations.simple_email_service.update_configuration_set_sending_enabled.async_update_configuration_set_sending_enabled(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("UpdateConfigurationSetSendingEnabled")
    )
    input_: capo_ses.types.update_configuration_set_sending_enabled_request.UpdateConfigurationSetSendingEnabledRequest = {
        "configuration_set_name": configuration_set_name,
        "enabled": enabled,
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output