Services - Check Name Availability
Check name validity and availability
This method checks whether a proposed top-level resource name is valid and available.
POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.DataMigration/locations/{location}/checkNameAvailability?api-version=2022-03-30-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
location
|
path | True |
string |
The Azure region of the operation |
subscription
|
path | True |
string |
Subscription ID that identifies an Azure subscription. |
api-version
|
query | True |
string |
Version of the API |
Request Body
Name | Type | Description |
---|---|---|
name |
string |
The proposed resource name |
type |
string |
The resource type chain (e.g. virtualMachines/extensions) |
Responses
Name | Type | Description |
---|---|---|
200 OK |
Name checked |
|
Other Status Codes |
Error |
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
Services_CheckNameAvailability
Sample Request
Sample Response
{
"nameAvailable": true
}
Definitions
Name | Description |
---|---|
Api |
Error information. |
created |
|
Name |
A resource type and proposed name |
Name |
Indicates whether a proposed resource name is available |
Name |
The reason why the name is not available, if nameAvailable is false |
OData |
Error information in OData format. |
System |
ApiError
Error information.
Name | Type | Description |
---|---|---|
error |
Error information in OData format |
|
systemData |
Metadata pertaining to creation and last modification of the resource. |
createdByType
Name | Type | Description |
---|---|---|
Application |
string |
|
Key |
string |
|
ManagedIdentity |
string |
|
User |
string |
NameAvailabilityRequest
A resource type and proposed name
Name | Type | Description |
---|---|---|
name |
string |
The proposed resource name |
type |
string |
The resource type chain (e.g. virtualMachines/extensions) |
NameAvailabilityResponse
Indicates whether a proposed resource name is available
Name | Type | Description |
---|---|---|
message |
string |
The localized reason why the name is not available, if nameAvailable is false |
nameAvailable |
boolean |
If true, the name is valid and available. If false, 'reason' describes why not. |
reason |
The reason why the name is not available, if nameAvailable is false |
NameCheckFailureReason
The reason why the name is not available, if nameAvailable is false
Name | Type | Description |
---|---|---|
AlreadyExists |
string |
|
Invalid |
string |
ODataError
Error information in OData format.
Name | Type | Description |
---|---|---|
code |
string |
The machine-readable description of the error, such as 'InvalidRequest' or 'InternalServerError' |
details |
Inner errors that caused this error |
|
message |
string |
The human-readable description of the error |
SystemData
Name | Type | Description |
---|---|---|
createdAt |
string |
|
createdBy |
string |
|
createdByType | ||
lastModifiedAt |
string |
|
lastModifiedBy |
string |
|
lastModifiedByType |