Skip to content

put_email_identity_feedback_attributes async

put_email_identity_feedback_attributes(
    email_identity: Identity,
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
    email_forwarding_enabled: Optional[Enabled] = None,
) -> PutEmailIdentityFeedbackAttributesResponse

Used to enable or disable feedback forwarding for an identity. This setting determines what happens when an identity is used to send an email that results in a bounce or complaint event.

When you enable feedback forwarding, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.

When you disable feedback forwarding, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic. You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).

Parameters:

  • email_identity (Identity) –

    The email identity that you want to configure bounce and complaint feedback forwarding for.

  • email_forwarding_enabled (Optional[Enabled], default: None ) –

    Sets the feedback forwarding configuration for the identity.

    If the value is true, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.

    When you set this value to false, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic or another event destination. You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).

Raises:

Source code in docs_src/capo_pinpoint_email/_services/async_pinpoint_email.py
async def put_email_identity_feedback_attributes(
    self,
    email_identity: "capo_pinpoint_email.types.identity.Identity",
    *,
    config_overrides: Optional[AsyncPinpointEmailClientConfig] = None,
    email_forwarding_enabled: Optional[
        "capo_pinpoint_email.types.enabled.Enabled"
    ] = None,
) -> "capo_pinpoint_email.types.put_email_identity_feedback_attributes_response.PutEmailIdentityFeedbackAttributesResponse":
    """<p>Used to enable or disable feedback forwarding for an identity. This setting determines what happens when an identity is used to send an email that results in a bounce or complaint event.</p> <p>When you enable feedback forwarding, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.</p> <p>When you disable feedback forwarding, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic. You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).</p>

    Args:
        email_identity: <p>The email identity that you want to configure bounce and complaint feedback forwarding for.</p>
        email_forwarding_enabled: <p>Sets the feedback forwarding configuration for the identity.</p> <p>If the value is <code>true</code>, Amazon Pinpoint sends you email notifications when bounce or complaint events occur. Amazon Pinpoint sends this notification to the address that you specified in the Return-Path header of the original email.</p> <p>When you set this value to <code>false</code>, Amazon Pinpoint sends notifications through other mechanisms, such as by notifying an Amazon SNS topic or another event destination. You're required to have a method of tracking bounces and complaints. If you haven't set up another mechanism for receiving bounce or complaint notifications, Amazon Pinpoint sends an email notification when these events occur (even if this setting is disabled).</p>

    Raises:
        capo_pinpoint_email.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_pinpoint_email.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</p>
        capo_pinpoint_email.errors.too_many_requests_exception.TooManyRequestsException: <p>Too many requests have been made to the operation.</p>
        capo_pinpoint_email.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_pinpoint_email.types.put_email_identity_feedback_attributes_request.PutEmailIdentityFeedbackAttributesRequest]",
    ) -> AsyncOperationResponse[
        "capo_pinpoint_email.types.put_email_identity_feedback_attributes_response.PutEmailIdentityFeedbackAttributesResponse"
    ]:
        import capo_pinpoint_email._operations.amazon_pinpoint_email_service.put_email_identity_feedback_attributes

        (
            output,
            http_response,
        ) = await capo_pinpoint_email._operations.amazon_pinpoint_email_service.put_email_identity_feedback_attributes.async_put_email_identity_feedback_attributes(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutEmailIdentityFeedbackAttributes")
    )
    input_: capo_pinpoint_email.types.put_email_identity_feedback_attributes_request.PutEmailIdentityFeedbackAttributesRequest = {
        "email_identity": email_identity
    }
    if email_forwarding_enabled is not None:
        input_["email_forwarding_enabled"] = email_forwarding_enabled

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