Method: projects.subscriptions.detach

Detaches a subscription from this topic. All messages retained in the subscription are dropped. Subsequent subscriptions.pull and StreamingPull requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will stop.

HTTP request


Path parameters

Parameters
subscription

string

Required. The subscription to detach. Format is projects/{project}/subscriptions/{subscription}.

Request body

The request body must be empty.

Response body

If successful, the response body is empty.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/pubsub
  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.