Share via


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
subscriptionId
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

CheckNameAvailabilityResult

The request has succeeded.

Other Status Codes

ErrorResponse

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
CheckNameAvailability

Description of the check name availability request properties.

CheckNameAvailabilityResult

Description of the check name availability request properties.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

UnavailableReason

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

UnavailableReason

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

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

UnavailableReason

Specifies the reason for the unavailability of the service.

Value Description
None
InvalidName
SubscriptionIsDisabled
NameInUse
NameInLockdown
TooManyNamespaceInCurrentSubscription