Web Apps - Analyze Custom Hostname Slot
分析自定义主机名的说明。
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname?api-version=2025-03-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname?hostName={hostName}&api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
name
|
path | True |
string |
Web 应用的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
资源所属的资源组的名称。 |
|
slot
|
path | True |
string |
Web 应用槽的名称。 如果未指定,则将默认为生产槽。 |
|
subscription
|
path | True |
string |
Azure 订阅 ID。 这是 GUID 格式的字符串(例如 000000000-0000-0000-0000-00000000000000)。 |
|
api-version
|
query | True |
string |
API 版本 |
|
host
|
query |
string |
自定义主机名。 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
好的 |
|
| Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
示例
Analyze custom hostname for slot
示例请求
GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging/analyzeCustomHostname?api-version=2025-03-01
示例响应
{
"id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging",
"name": "sitef6141/staging",
"type": "Microsoft.Web/sites/stagings",
"properties": {
"isHostnameAlreadyVerified": true,
"customDomainVerificationTest": "Passed",
"customDomainVerificationFailureInfo": {
"code": "07198",
"message": "Custom domain verification failed on conflicting CNAMEs."
},
"hasConflictOnScaleUnit": false,
"hasConflictAcrossSubscription": true,
"conflictingAppResourceId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/siteog/slots/qa",
"cNameRecords": [
"siteog.azurewebsites.net"
]
}
}
定义
| 名称 | 说明 |
|---|---|
|
Custom |
自定义域分析。 |
|
Default |
应用服务错误响应。 |
| Details | |
|
Dns |
DNS 验证测试结果。 |
| Error |
错误模型。 |
|
Error |
从 API 返回的错误响应的正文。 |
CustomHostnameAnalysisResult
自定义域分析。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| kind |
string |
资源类型。 |
| name |
string |
资源名称。 |
| properties.aRecords |
string[] |
记录控制器可以看到此主机名。 |
| properties.alternateCNameRecords |
string[] |
备用 CName 记录控制器可以看到此主机名。 |
| properties.alternateTxtRecords |
string[] |
备用 TXT 记录控制器可以看到此主机名。 |
| properties.cNameRecords |
string[] |
CName 记录控制器可以看到此主机名。 |
| properties.conflictingAppResourceId |
string |
缩放单元上冲突应用的名称(如果位于同一订阅中)。 |
| properties.customDomainVerificationFailureInfo |
如果 DNS 验证失败,原始失败信息。 |
|
| properties.customDomainVerificationTest |
DNS 验证测试结果。 |
|
| properties.hasConflictAcrossSubscription |
boolean |
|
| properties.hasConflictOnScaleUnit |
boolean |
|
| properties.isHostnameAlreadyVerified |
boolean |
|
| properties.txtRecords |
string[] |
TXT 记录控制器可以看到此主机名。 |
| type |
string |
资源类型。 |
DefaultErrorResponse
应用服务错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误模型。 |
Details
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
DnsVerificationTestResult
DNS 验证测试结果。
| 值 | 说明 |
|---|---|
| Passed | |
| Failed | |
| Skipped |
Error
错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| details |
Details[] |
详细错误。 |
| innererror |
string |
调试错误的更多信息。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
ErrorEntity
从 API 返回的错误响应的正文。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
基本错误代码。 |
| details |
错误详细信息。 |
|
| extendedCode |
string |
错误类型。 |
| innerErrors |
内部错误。 |
|
| message |
string |
错误的任何详细信息。 |
| messageTemplate |
string |
消息模板。 |
| parameters |
string[] |
模板的参数。 |
| target |
string |
错误目标。 |