Skip to content

set_identity_feedback_forwarding_enabled async

set_identity_feedback_forwarding_enabled(
    identity: Identity,
    forwarding_enabled: Enabled,
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> SetIdentityFeedbackForwardingEnabledResponse

Given an identity (an email address or a domain), enables or disables whether Amazon SES forwards bounce and complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and complaints.

Feedback forwarding does not apply to delivery notifications. Delivery notifications are only available through Amazon SNS.

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

For more information about using notifications with Amazon SES, see the Amazon SES Developer Guide.

Parameters:

  • identity (Identity) –

    The identity for which to set bounce and complaint notification forwarding. Examples: [email protected], example.com.

  • forwarding_enabled (Enabled) –

    Sets whether Amazon SES forwards bounce and complaint notifications as email. true specifies that Amazon SES forwards bounce and complaint notifications as email, in addition to any Amazon SNS topic publishing otherwise specified. false specifies that Amazon SES publishes bounce and complaint notifications only through Amazon SNS. This value can only be set to false when Amazon SNS topics are set for both Bounce and Complaint notification types.

Raises:

Examples:

SetIdentityFeedbackForwardingEnabled The following example configures Amazon SES to forward an identity's bounces and complaints via email:

>>> await client.set_identity_feedback_forwarding_enabled(identity='[email protected]', forwarding_enabled=True)
Source code in docs_src/capo_ses/_services/async_ses.py
async def set_identity_feedback_forwarding_enabled(
    self,
    identity: "capo_ses.types.identity.Identity",
    forwarding_enabled: "capo_ses.types.enabled.Enabled",
    *,
    config_overrides: Optional[AsyncSESClientConfig] = None,
) -> "capo_ses.types.set_identity_feedback_forwarding_enabled_response.SetIdentityFeedbackForwardingEnabledResponse":
    """<p>Given an identity (an email address or a domain), enables or disables whether Amazon SES forwards bounce and complaint notifications as email. Feedback forwarding can only be disabled when Amazon Simple Notification Service (Amazon SNS) topics are specified for both bounces and complaints.</p> <note> <p>Feedback forwarding does not apply to delivery notifications. Delivery notifications are only available through Amazon SNS.</p> </note> <p>You can execute this operation no more than once per second.</p> <p>For more information about using notifications with Amazon SES, see the <a href="https://docs.aws.amazon.com/ses/latest/dg/monitor-sending-activity-using-notifications.html">Amazon SES Developer Guide</a>.</p>

    Args:
        identity: <p>The identity for which to set bounce and complaint notification forwarding. Examples: <code>[email protected]</code>, <code>example.com</code>.</p>
        forwarding_enabled: <p>Sets whether Amazon SES forwards bounce and complaint notifications as email. <code>true</code> specifies that Amazon SES forwards bounce and complaint notifications as email, in addition to any Amazon SNS topic publishing otherwise specified. <code>false</code> specifies that Amazon SES publishes bounce and complaint notifications only through Amazon SNS. This value can only be set to <code>false</code> when Amazon SNS topics are set for both <code>Bounce</code> and <code>Complaint</code> notification types.</p>

    Raises:
        capo_ses.errors.UnknownServiceError: The service returned an error code this client does not model.

    Examples:
        SetIdentityFeedbackForwardingEnabled
        The following example configures Amazon SES to forward an identity's bounces and complaints via email:

        >>> await client.set_identity_feedback_forwarding_enabled(identity='[email protected]', forwarding_enabled=True)
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_ses.types.set_identity_feedback_forwarding_enabled_request.SetIdentityFeedbackForwardingEnabledRequest]",
    ) -> AsyncOperationResponse[
        "capo_ses.types.set_identity_feedback_forwarding_enabled_response.SetIdentityFeedbackForwardingEnabledResponse"
    ]:
        import capo_ses._operations.simple_email_service.set_identity_feedback_forwarding_enabled

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("SetIdentityFeedbackForwardingEnabled")
    )
    input_: capo_ses.types.set_identity_feedback_forwarding_enabled_request.SetIdentityFeedbackForwardingEnabledRequest = {
        "identity": identity,
        "forwarding_enabled": forwarding_enabled,
    }

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