Skip to content

delete_endpoint async

delete_endpoint(
    endpoint_arn: String, *, config_overrides: Optional[AsyncSNSClientConfig] = None
) -> None

Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see Using Amazon SNS Mobile Push Notifications.

When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.

Parameters:

  • endpoint_arn (String) –

    EndpointArn of endpoint to delete.

Raises:

Source code in docs_src/capo_sns/_services/async_sns.py
async def delete_endpoint(
    self,
    endpoint_arn: "capo_sns.types.string.String",
    *,
    config_overrides: Optional[AsyncSNSClientConfig] = None,
) -> None:
    """<p>Deletes the endpoint for a device and mobile app from Amazon SNS. This action is idempotent. For more information, see <a href="https://docs.aws.amazon.com/sns/latest/dg/SNSMobilePush.html">Using Amazon SNS Mobile Push Notifications</a>. </p> <p>When you delete an endpoint that is also subscribed to a topic, then you must also unsubscribe the endpoint from the topic.</p>

    Args:
        endpoint_arn: <p> <code>EndpointArn</code> of endpoint to delete.</p>

    Raises:
        capo_sns.errors.authorization_error_exception.AuthorizationErrorException: <p>Indicates that the user has been denied access to the requested resource.</p>
        capo_sns.errors.internal_error_exception.InternalErrorException: <p>Indicates an internal service error.</p>
        capo_sns.errors.invalid_parameter_exception.InvalidParameterException: <p>Indicates that a request parameter does not comply with the associated constraints.</p>
        capo_sns.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_sns.types.delete_endpoint_input.DeleteEndpointInput]",
    ) -> AsyncOperationResponse[None]:
        import capo_sns._operations.amazon_simple_notification_service.delete_endpoint

        (
            output,
            http_response,
        ) = await capo_sns._operations.amazon_simple_notification_service.delete_endpoint.async_delete_endpoint(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DeleteEndpoint")
    )
    input_: capo_sns.types.delete_endpoint_input.DeleteEndpointInput = {
        "endpoint_arn": endpoint_arn
    }

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