Skip to content

delete_suppressed_destination

delete_suppressed_destination(
    email_address: EmailAddress,
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tenant_name: Optional[TenantName] = None,
) -> DeleteSuppressedDestinationResponse

Removes an email address from the suppression list for your account or for a specific tenant. To target a tenant's suppression list, specify the TenantName parameter. If you omit TenantName, the address is removed from the account-level suppression list.

Parameters:

  • email_address (EmailAddress) –

    The suppressed email destination to remove from the suppression list for your account or for the specified tenant.

  • tenant_name (Optional[TenantName], default: None ) –

    The name of the tenant whose suppression list you want to remove the address from. If you omit this parameter, the address is removed from the account-level suppression list.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def delete_suppressed_destination(
    self,
    email_address: "capo_sesv2.types.email_address.EmailAddress",
    *,
    config_overrides: Optional[SESv2ClientConfig] = None,
    tenant_name: Optional["capo_sesv2.types.tenant_name.TenantName"] = None,
) -> "capo_sesv2.types.delete_suppressed_destination_response.DeleteSuppressedDestinationResponse":
    """<p>Removes an email address from the suppression list for your account or for a specific tenant. To target a tenant's suppression list, specify the <code>TenantName</code> parameter. If you omit <code>TenantName</code>, the address is removed from the account-level suppression list.</p>

    Args:
        email_address: <p>The suppressed email destination to remove from the suppression list for your account or for the specified tenant.</p>
        tenant_name: <p>The name of the tenant whose suppression list you want to remove the address from. If you omit this parameter, the address is removed from the account-level suppression list.</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.delete_suppressed_destination_request.DeleteSuppressedDestinationRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.delete_suppressed_destination_response.DeleteSuppressedDestinationResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.delete_suppressed_destination

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteSuppressedDestination")
    )
    input_: capo_sesv2.types.delete_suppressed_destination_request.DeleteSuppressedDestinationRequest = {
        "email_address": email_address
    }
    if tenant_name is not None:
        input_["tenant_name"] = tenant_name

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output