Namespaces - CheckName Availability - Check Name Availability

Check the give namespace name availability.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.ServiceBus/CheckNameAvailability?api-version=2021-11-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Subscription credentials that uniquely identify a Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.

api-version
query True

string

Client API version.

Request Body

Name Required Type Description
name True

string

The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.

Responses

Name Type Description
200 OK

CheckNameAvailabilityResult

check availability returned successfully.

Other Status Codes

ErrorResponse

ServiceBus error response describing why the operation failed.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

NameSpaceCheckNameAvailability

Sample Request

POST https://management.azure.com/subscriptions/5f750a97-50d9-4e36-8081-c9ee4c0210d4/providers/Microsoft.ServiceBus/CheckNameAvailability?api-version=2021-11-01

{
  "name": "sdk-Namespace-2924"
}

Sample Response

{
  "nameAvailable": true,
  "reason": "None",
  "message": ""
}

Definitions

Name Description
CheckNameAvailability

Description of a Check Name availability request properties.

CheckNameAvailabilityResult

Description of a Check Name availability request properties.

Error

The error object.

ErrorAdditionalInfo

The resource management error additional info.

ErrorResponse

The resource management error response.

UnavailableReason

Specifies the reason for the unavailability of the service.

CheckNameAvailability

Description of a Check Name availability request properties.

Name Type Description
name

string

The Name to check the namespace name availability and The namespace name can contain only letters, numbers, and hyphens. The namespace must start with a letter, and it must end with a letter or number.

CheckNameAvailabilityResult

Description of a Check Name availability request properties.

Name Type Description
message

string

The detailed info regarding the reason associated with the namespace.

nameAvailable

boolean

Value indicating namespace is availability, true if the namespace is available; otherwise, false.

reason

UnavailableReason

The reason for unavailability of a namespace.

Error

The error object.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorResponse[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorResponse

The resource management error response.

Name Type Description
error

Error

The error object.

UnavailableReason

Specifies the reason for the unavailability of the service.

Name Type Description
InvalidName

string

NameInLockdown

string

NameInUse

string

None

string

SubscriptionIsDisabled

string

TooManyNamespaceInCurrentSubscription

string