Method: projects.subscriptions.delete

Deletes an existing subscription. All messages retained in the subscription are immediately dropped. Calls to subscriptions.pull after deletion will return NOT_FOUND. After a subscription is deleted, a new one may be created with the same name, but the new one has no association with the old subscription or its topic unless the same topic is specified.

HTTP request

DELETE https://pubsub.googleapis.com/v1/{subscription}

Path parameters

Parameters
subscription

string

The subscription to delete. Format is projects/{project}/subscriptions/{sub}.

Request body

The request body must be empty.

Response body

If successful, the response body will be empty.

Authorization

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 Auth Guide.

Try it!

Send feedback about...

Cloud Pub/Sub