Create Queue

 

Creates a new queue. Once created, the queue resource manifest is immutable. Repeating the create call after a queue with same name has been created successfully, results in a 409 conflict error message. Note that Service Bus queue names can contain letters, numbers, periods (.), hyphens (-), and underscores (_).

Request

Method

Request URI

HTTP Version

PUT

https://{serviceNamespace}.servicebus.windows.net/{Queue Path}

HTTP/1.1

Request Headers

The following table describes required and optional request headers.

Request Header

Description

Authorization

Specifies a WRAPv0.9.7.2 token containing a SimpleWebToken acquired from ACS. Set to WRAP access_token=”{swt}”.

Content-Type

Set to application/atom+xml;type=entry;charset=utf-8.

Request Body

The queue description. See Queue Description.

Response

The response includes an HTTP status code and a set of response headers.

Response Codes

Note

If you create a queue with a name containing special or encoded characters (for example, "test?Name=value&", which gets encoded to "test%3FName%3Dvalue%26", a (401) Unauthorized exception will be generated.

Code

Description

201

Queue created.

400

Invalid request body.

401

Authorization failure.

403

Quota exceeded; queue not created.

409

The specified queue already exists (or the specified path is already occupied).

500

Internal error.

For information about status codes, see Status and Error Codes.

Response Headers

None.

Response Body

The queue description is returned. Some description properties might contain default values if they were missing from the PUT request.

See Also

Queues
Example: Creating a Queue
Delete Queue
Get Queue
List Queues
Queue Description