Create Namespace

Important

This API is obsolete and retired as of 11/1/2021 and should no longer be used.

Creates a new service namespace. Once created, this namespace’s resource manifest is immutable. This operation is idempotent.

The namespace identifier should adhere to the following naming conventions:

  1. The name length is at least 6 and at most 50 characters.

  2. The name matches regex ^[a-zA-Z][a-zA-Z0-9-]*$ (the namespace name can contain only Letters, numbers, hyphens “-“).

  3. The name doesn't end with “-“, “-sb“ or “-mgmt“.

  4. The name is available via a call to provisioning, that is, the name must be unique across Azure to be successfully created.

  5. The name must start with a letter.

  6. A GUID is now allowed as the namespace name.

Request

Method Request URI HTTP version
PUT https://management.core.windows.net/{subscription ID}/services/ServiceBus/Namespaces/{namespace name} HTTP/1.1

Request Headers

The following table describes required and optional request headers.

Request Header Description
Content-Type Set to application/atom+xml.
x-ms-version 2012-03-01

The request also requires a client certificate. This certificate must match the certificate you uploaded for that particular subscription.

Request Body

The namespace description. See Namespace Description. Only Region is required; the other fields are optional.

Response

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

Response Codes

Note

If you create a namespace with a name containing special or encoded characters (for example, "test?Name=value&", which gets encoded to "test%3FName%3Dvalue%26"), a “(400) invalid request body” exception is generated.

Code Description
200 Namespace created.
401 Authorization failure.
500 Internal error.

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

Response Headers

The response for this operation includes the following headers. The response might also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response Header Description
Content-Type application/atom+xml; type=entry; charset=utf-8

Response Body

The Namespace Description is returned. If some description properties were missing from the PUT request, these properties might contain default values.