你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
AFD Profiles - Check Endpoint Name Availability
检查 afdx 终结点名称的可用性,并返回全局唯一的终结点主机名。
POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Cdn/profiles/{profileName}/checkEndpointNameAvailability?api-version=2023-05-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
profile
|
path | True |
string |
资源组中唯一的 Azure Front Door Standard 或 Azure Front Door Premium 的名称。 Regex pattern: |
resource
|
path | True |
string |
Azure 订阅中的资源组的名称。 Regex pattern: |
subscription
|
path | True |
string |
Azure 订阅 ID。 |
api-version
|
query | True |
string |
要与客户端请求一起使用的 API 的版本。 当前版本为 2023-05-01。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
name | True |
string |
要验证的资源名称。 |
type | True |
要验证其名称的资源的类型。 |
|
autoGeneratedDomainNameLabelScope |
指示终结点名称重用范围。 默认值为 TenantReuse。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
没问题。 请求已成功。 |
|
Other Status Codes |
描述操作失败原因的 Azure Front Door 错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 Flow。
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
名称 | 说明 |
---|---|
user_impersonation | 模拟用户帐户 |
示例
CheckEndpointNameAvailability
Sample Request
POST https://management.azure.com/subscriptions/subid/resourceGroups/myResourceGroup/providers/Microsoft.Cdn/profiles/profile1/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": ""
}
定义
名称 | 说明 |
---|---|
Afd |
错误响应 |
Auto |
指示终结点名称重用范围。 默认值为 TenantReuse。 |
Check |
CheckNameAvailability API 的输入。 |
Check |
检查名称可用性 API 的输出。 |
Error |
资源管理错误附加信息。 |
Error |
错误详细信息。 |
Resource |
CheckNameAvailability 中使用的 CDN 资源类型。 |
AfdErrorResponse
错误响应
名称 | 类型 | 说明 |
---|---|---|
error |
错误对象。 |
AutoGeneratedDomainNameLabelScope
指示终结点名称重用范围。 默认值为 TenantReuse。
名称 | 类型 | 说明 |
---|---|---|
NoReuse |
string |
|
ResourceGroupReuse |
string |
|
SubscriptionReuse |
string |
|
TenantReuse |
string |
CheckEndpointNameAvailabilityInput
CheckNameAvailability API 的输入。
名称 | 类型 | 说明 |
---|---|---|
autoGeneratedDomainNameLabelScope |
指示终结点名称重用范围。 默认值为 TenantReuse。 |
|
name |
string |
要验证的资源名称。 |
type |
要验证其名称的资源的类型。 |
CheckEndpointNameAvailabilityOutput
检查名称可用性 API 的输出。
名称 | 类型 | 说明 |
---|---|---|
availableHostname |
string |
当名称可用时,返回基于 AutoGeneratedDomainNameLabelScope 生成的可用主机名,否则返回空字符串 |
message |
string |
描述名称不可用的原因的详细错误消息。 |
nameAvailable |
boolean |
指示名称是否可用。 |
reason |
string |
名称不可用的原因。 |
ErrorAdditionalInfo
资源管理错误附加信息。
名称 | 类型 | 说明 |
---|---|---|
info |
object |
其他信息。 |
type |
string |
其他信息类型。 |
ErrorDetail
错误详细信息。
名称 | 类型 | 说明 |
---|---|---|
additionalInfo |
错误附加信息。 |
|
code |
string |
错误代码。 |
details |
错误详细信息。 |
|
message |
string |
错误消息。 |
target |
string |
错误目标。 |
ResourceType
CheckNameAvailability 中使用的 CDN 资源类型。
名称 | 类型 | 说明 |
---|---|---|
Microsoft.Cdn/Profiles/AfdEndpoints |
string |
|
Microsoft.Cdn/Profiles/Endpoints |
string |