Check Endpoint Name Availability - Check Endpoint Name Availability
Check the availability of a resource name. This is needed for resources where name is globally unique, such as a afdx endpoint.
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/checkEndpointNameAvailability?api-version=2023-05-01
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
resource
|
path | True |
string |
Name of the Resource group within the Azure subscription. Regex pattern: |
subscription
|
path | True |
string |
Azure Subscription ID. |
api-version
|
query | True |
string |
Version of the API to be used with the client request. Current version is 2023-05-01. |
Request Body
Name | Required | Type | Description |
---|---|---|---|
name | True |
string |
The resource name to validate. |
type | True |
The type of the resource whose name is to be validated. |
|
autoGeneratedDomainNameLabelScope |
Indicates the endpoint name reuse scope. The default value is TenantReuse. |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. The request has succeeded. |
|
Other Status Codes |
Azure Front Door 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
CheckEndpointNameAvailability
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/checkEndpointNameAvailability?api-version=2023-05-01
{
"name": "sampleName",
"type": "Microsoft.Cdn/Profiles/AfdEndpoints",
"autoGeneratedDomainNameLabelScope": "TenantReuse"
}
Sample Response
{
"nameAvailable": false,
"reason": "Name is already in use",
"message": "Name not available",
"availableHostname": ""
}
Definitions
Name | Description |
---|---|
Afd |
Error response |
Auto |
Indicates the endpoint name reuse scope. The default value is TenantReuse. |
Check |
Input of CheckNameAvailability API. |
Check |
Output of check name availability API. |
Error |
The resource management error additional info. |
Error |
The error detail. |
Resource |
Type of CDN resource used in CheckNameAvailability. |
AfdErrorResponse
Error response
Name | Type | Description |
---|---|---|
error |
The error object. |
AutoGeneratedDomainNameLabelScope
Indicates the endpoint name reuse scope. The default value is TenantReuse.
Name | Type | Description |
---|---|---|
NoReuse |
string |
|
ResourceGroupReuse |
string |
|
SubscriptionReuse |
string |
|
TenantReuse |
string |
CheckEndpointNameAvailabilityInput
Input of CheckNameAvailability API.
Name | Type | Description |
---|---|---|
autoGeneratedDomainNameLabelScope |
Indicates the endpoint name reuse scope. The default value is TenantReuse. |
|
name |
string |
The resource name to validate. |
type |
The type of the resource whose name is to be validated. |
CheckEndpointNameAvailabilityOutput
Output of check name availability API.
Name | Type | Description |
---|---|---|
availableHostname |
string |
Returns the available hostname generated based on the AutoGeneratedDomainNameLabelScope when the name is available, otherwise it returns empty string |
message |
string |
The detailed error message describing why the name is not available. |
nameAvailable |
boolean |
Indicates whether the name is available. |
reason |
string |
The reason why the name is not available. |
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. |
ResourceType
Type of CDN resource used in CheckNameAvailability.
Name | Type | Description |
---|---|---|
Microsoft.Cdn/Profiles/AfdEndpoints |
string |
|
Microsoft.Cdn/Profiles/Endpoints |
string |