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

Check Name Availability - Check Name Availability

Description for Check if a resource name is available.

POST https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.Web/checknameavailability?api-version=2023-12-01

URI Parameters

Name In Required Type Description
subscriptionId
path True

string

Your Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000).

api-version
query True

string

API Version

Request Body

Name Required Type Description
name True

string

Resource name to verify.

type True

CheckNameResourceTypes

Resource type used for verification.

environmentId

string

Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}

isFqdn

boolean

Is fully qualified domain name.

Responses

Name Type Description
200 OK

ResourceNameAvailability

OK

Other Status Codes

DefaultErrorResponse

App Service 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

Definitions

Name Description
CheckNameResourceTypes

Resource type used for verification.

DefaultErrorResponse

App Service error response.

Details
Error

Error model.

InAvailabilityReasonType

Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable.

ResourceNameAvailability

Information regarding availability of a resource name.

ResourceNameAvailabilityRequest

Resource name availability request content.

CheckNameResourceTypes

Resource type used for verification.

Name Type Description
HostingEnvironment

string

Microsoft.Web/hostingEnvironments

string

Microsoft.Web/publishingUsers

string

Microsoft.Web/sites

string

Microsoft.Web/sites/slots

string

PublishingUser

string

Site

string

Slot

string

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Detailed errors.

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

InAvailabilityReasonType

Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable.

Name Type Description
AlreadyExists

string

Invalid

string

ResourceNameAvailability

Information regarding availability of a resource name.

Name Type Description
message

string

If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain that resource name is already in use, and direct them to select a different name.

nameAvailable

boolean

true indicates name is valid and available. false indicates the name is invalid, unavailable, or both.

reason

InAvailabilityReasonType

Invalid indicates the name provided does not match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable.

ResourceNameAvailabilityRequest

Resource name availability request content.

Name Type Description
environmentId

string

Azure Resource Manager ID of the customer's selected Container Apps Environment on which to host the Function app. This must be of the form /subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.App/managedEnvironments/{managedEnvironmentName}

isFqdn

boolean

Is fully qualified domain name.

name

string

Resource name to verify.

type

CheckNameResourceTypes

Resource type used for verification.