Namespaces - Check Name Availability
Check the specified namespace name availability.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Relay/checkNameAvailability?api-version=2024-01-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
subscription
|
path | True |
string minLength: 1 |
The ID of the target subscription. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Required | Type | Description |
|---|---|---|---|
| name | True |
string |
The namespace name to check for availability. 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 |
The request has succeeded. |
|
| Other Status Codes |
An unexpected error response. |
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
RelayCheckNameAvailability
Sample request
POST https://management.azure.com/subscriptions/ffffffff-ffff-ffff-ffff-ffffffffffff/providers/Microsoft.Relay/checkNameAvailability?api-version=2024-01-01
{
"name": "example-RelayNamespace1321"
}
Sample response
{
"message": "",
"nameAvailable": true,
"reason": "None"
}
Definitions
| Name | Description |
|---|---|
|
Check |
Description of the check name availability request properties. |
|
Check |
Description of the check name availability request properties. |
|
Error |
The resource management error additional info. |
|
Error |
The error detail. |
|
Error |
Error response |
|
Unavailable |
Specifies the reason for the unavailability of the service. |
CheckNameAvailability
Description of the check name availability request properties.
| Name | Type | Description |
|---|---|---|
| name |
string |
The namespace name to check for availability. 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 the 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 available. Returns true if the namespace is available; otherwise, false. |
| reason |
The reason for unavailability of a namespace. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ErrorDetail
The error detail.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
The error details. |
|
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorResponse
Error response
| Name | Type | Description |
|---|---|---|
| error |
The error object. |
UnavailableReason
Specifies the reason for the unavailability of the service.
| Value | Description |
|---|---|
| None | |
| InvalidName | |
| SubscriptionIsDisabled | |
| NameInUse | |
| NameInLockdown | |
| TooManyNamespaceInCurrentSubscription |