Deletes a queue.

Notice After a queue is deleted, all messages in the queue are deleted and cannot be restored. Proceed with caution.

Authorization

By default, only Alibaba Cloud accounts can call this operation. RAM users can call this operation only after these RAM users are granted related permissions. The following table describes the authorization information of this operation. For more information, see Permission policies and examples.

Item Value
API operation DeleteQueue
Action mns:DeleteQueue
Resource acs:mns:$region:$accountid:/queues/$queueName

Request

A request consists of the following parts:

  • Request line

    DELETE /queues/$queueName HTTP/1.1

  • Operation-specific request headers

    None.

  • Request body

    None.

Response

A response consists of the following parts:

  • HTTP status code

    HTTP/1.1 204 No Content

  • Operation-specific response headers

    None.

  • Response body

    None.

Examples

Sample requests

DELETE /queues/$queueName  HTTP/1.1
Host: $AccountId.mns.cn-hangzhou.aliyuncs.com
Date: Wed, 08 Mar 2012 12:00:00 GMT
x-mns-version: 2015-06-06
Authorization: MNS 15B4D3461F177624206A:xQE0diMbLRepdf3YB+FIEXAM****

Sample success responses

HTTP/1.1 204 No Content
x-mns-request-id: 512B2A634403E52B1956****
x-mns-version: 2015-06-06          

Error codes

No operation-specific errors occur when you call this operation. Common errors include unauthorized access and invalid parameters. For more information, see Error codes.