你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

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

Subscription credentials which uniquely identify the 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 Type Description
parameters

CheckNameAvailability

Parameters to check availability of the specified namespace name.

Responses

Name Type Description
200 OK

CheckNameAvailabilityResult

Check availability returned successfully.

Other Status Codes

ErrorResponse

Relay 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

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

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

Definitions

Name Description
CheckNameAvailability

Parameters to check availability of the specified namespace name.

CheckNameAvailabilityResult

Description of the check name availability request properties.

ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

UnavailableReason

The reason for unavailability of a namespace.

CheckNameAvailability

Parameters to check availability of the specified namespace name.

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

The reason for unavailability of a namespace.

Name Type Description
InvalidName

string

NameInLockdown

string

NameInUse

string

None

string

SubscriptionIsDisabled

string

TooManyNamespaceInCurrentSubscription

string