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

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=2023-12-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname?hostName={hostName}&api-version=2023-12-01

URI 参数

名称 必需 类型 说明
name
path True

string

Web 应用的名称。

resourceGroupName
path True

string

资源所属的资源组的名称。

Regex pattern: ^[-\w\._\(\)]+[^\.]$

slot
path True

string

Web 应用槽的名称。 如果未指定,则 默认为生产槽。

subscriptionId
path True

string

Azure 订阅 ID。 这是一个 GUID 格式的字符串, (例如 00000000-0000-0000-0000-0000000000000) 。

api-version
query True

string

API 版本

hostName
query

string

自定义主机名。

响应

名称 类型 说明
200 OK

CustomHostnameAnalysisResult

确定

Other Status Codes

DefaultErrorResponse

App 服务错误响应。

安全性

azure_auth

Azure Active Directory OAuth2 流

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

名称 说明
user_impersonation 模拟用户帐户

示例

Analyze custom hostname for slot

Sample Request

GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/testrg123/providers/Microsoft.Web/sites/sitef6141/slots/staging/analyzeCustomHostname?api-version=2023-12-01

Sample Response

{
  "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"
    ]
  }
}

定义

名称 说明
CustomHostnameAnalysisResult

自定义域分析。

DefaultErrorResponse

App 服务错误响应。

Details
DnsVerificationTestResult

DNS 验证测试结果。

Error

错误模型。

ErrorEntity

从 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

ErrorEntity

DNS 验证失败时的原始故障信息。

properties.customDomainVerificationTest

DnsVerificationTestResult

DNS 验证测试结果。

properties.hasConflictAcrossSubscription

boolean

true 如果订阅之间存在冲突,则为 ;否则为 false

properties.hasConflictOnScaleUnit

boolean

true 如果缩放单元上存在冲突,则为 ;否则为 false

properties.isHostnameAlreadyVerified

boolean

true 如果已验证主机名,则为 ;否则为 false

properties.txtRecords

string[]

TXT 记录控制器可以看到此主机名。

type

string

资源类型。

DefaultErrorResponse

App 服务错误响应。

名称 类型 说明
error

Error

错误模型。

Details

名称 类型 说明
code

string

标准化字符串,用于以编程方式标识错误。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

DnsVerificationTestResult

DNS 验证测试结果。

名称 类型 说明
Failed

string

Passed

string

Skipped

string

Error

错误模型。

名称 类型 说明
code

string

标准化字符串,用于以编程方式标识错误。

details

Details[]

详细错误。

innererror

string

调试错误的详细信息。

message

string

详细的错误说明和调试信息。

target

string

详细的错误说明和调试信息。

ErrorEntity

从 API 返回的错误响应的正文。

名称 类型 说明
code

string

基本错误代码。

details

ErrorEntity[]

错误详细信息。

extendedCode

string

错误类型。

innerErrors

ErrorEntity[]

内部错误。

message

string

错误的任何详细信息。

messageTemplate

string

消息模板。

parameters

string[]

模板的参数。

target

string

错误目标。