Skip to content

get_suppressed_destination

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

Retrieves information about a specific email address that's on 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 operation targets the account-level suppression list.

Parameters:

  • email_address (EmailAddress) –

    The email address that's on 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 query. If you omit this parameter, the operation targets the account-level suppression list.

Raises:

Source code in docs_src/capo_sesv2/_services/se_sv2.py
def get_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.get_suppressed_destination_response.GetSuppressedDestinationResponse":
    """<p>Retrieves information about a specific email address that's on 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 operation targets the account-level suppression list.</p>

    Args:
        email_address: <p>The email address that's on 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 query. If you omit this parameter, the operation targets 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.get_suppressed_destination_request.GetSuppressedDestinationRequest]",
    ) -> OperationResponse[
        "capo_sesv2.types.get_suppressed_destination_response.GetSuppressedDestinationResponse"
    ]:
        import capo_sesv2._operations.simple_email_service_v2.get_suppressed_destination

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

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("GetSuppressedDestination")
    )
    input_: capo_sesv2.types.get_suppressed_destination_request.GetSuppressedDestinationRequest = {
        "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