Skip to content

put_email_identity_feedback_attributes

put_email_identity_feedback_attributes(
    email_identity: Identity,
    *,
    config_overrides: Optional[SESv2ClientConfig] = 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.

If the value is true, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.

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 (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

Parameters:

  • email_identity (Identity) –

    The email identity.

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

    Sets the feedback forwarding configuration for the identity.

    If the value is true, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the Return-Path header of the original email.

    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 (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def put_email_identity_feedback_attributes(
    self,
    email_identity: "capo_sesv2.types.identity.Identity",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    email_forwarding_enabled: Optional["capo_sesv2.types.enabled.Enabled"] = None,
) -> "capo_sesv2.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>If the value is <code>true</code>, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the <code>Return-Path</code> header of the original email.</p> <p>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 (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).</p>

    Args:
        email_identity: <p>The email identity.</p>
        email_forwarding_enabled: <p>Sets the feedback forwarding configuration for the identity.</p> <p>If the value is <code>true</code>, you receive email notifications when bounce or complaint events occur. These notifications are sent to the address that you specified in the <code>Return-Path</code> header of the original email.</p> <p>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 (for example, by setting up an event destination), you receive an email notification when these events occur (even if this setting is disabled).</p>

    Raises:
        capo_sesv2.errors.bad_request_exception.BadRequestException: <p>The input you provided is invalid.</p>
        capo_sesv2.errors.not_found_exception.NotFoundException: <p>The resource you attempted to access doesn't exist.</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.
    """

    def _handler(
        req: "OperationRequest[capo_sesv2.types.put_email_identity_feedback_attributes_request.PutEmailIdentityFeedbackAttributesRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.put_email_identity_feedback_attributes_response.PutEmailIdentityFeedbackAttributesResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.put_email_identity_feedback_attributes

        output, http_response = (
            capo_sesv2._operations.simple_email_service_v2.put_email_identity_feedback_attributes.put_email_identity_feedback_attributes(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("PutEmailIdentityFeedbackAttributes")
    )
    input_: capo_sesv2.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 = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output