Web Apps - Create Or Update Host Name Binding Slot
为应用创建主机名绑定的说明。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}?api-version=2025-03-01
URI 参数
| 名称 | 在 | 必需 | 类型 | 说明 |
|---|---|---|---|---|
|
host
|
path | True |
string |
主机名绑定中的主机名。 |
|
name
|
path | True |
string |
应用的名称。 |
|
resource
|
path | True |
string minLength: 1maxLength: 90 pattern: ^[-\w\._\(\)]+[^\.]$ |
资源所属的资源组的名称。 |
|
slot
|
path | True |
string |
部署槽的名称。 如果未指定槽,API 将为生产槽创建绑定。 |
|
subscription
|
path | True |
string |
Azure 订阅 ID。 这是 GUID 格式的字符串(例如 000000000-0000-0000-0000-00000000000000)。 |
|
api-version
|
query | True |
string |
API 版本 |
请求正文
| 名称 | 类型 | 说明 |
|---|---|---|
| kind |
string |
资源类型。 |
| properties.azureResourceName |
string |
Azure 资源名称。 |
| properties.azureResourceType |
Azure 资源类型。 |
|
| properties.customHostNameDnsRecordType |
自定义 DNS 记录类型。 |
|
| properties.domainId |
string |
完全限定的 ARM 域资源 URI。 |
| properties.hostNameType |
主机名类型。 |
|
| properties.siteName |
string |
应用服务应用名称。 |
| properties.sslState |
SSL 类型 |
|
| properties.thumbprint |
string |
SSL 证书指纹 |
响应
| 名称 | 类型 | 说明 |
|---|---|---|
| 200 OK |
好的 |
|
| Other Status Codes |
应用服务错误响应。 |
安全性
azure_auth
Azure Active Directory OAuth2 流
类型:
oauth2
流向:
implicit
授权 URL:
https://login.microsoftonline.com/common/oauth2/authorize
作用域
| 名称 | 说明 |
|---|---|
| user_impersonation | 模拟用户帐户 |
定义
| 名称 | 说明 |
|---|---|
|
Azure |
Azure 资源类型。 |
|
Custom |
自定义 DNS 记录类型。 |
|
Default |
应用服务错误响应。 |
| Details | |
| Error |
错误模型。 |
|
Host |
主机名绑定对象。 |
|
Host |
主机名类型。 |
|
Ssl |
SSL 类型 |
AzureResourceType
Azure 资源类型。
| 值 | 说明 |
|---|---|
| Website | |
| TrafficManager |
CustomHostNameDnsRecordType
自定义 DNS 记录类型。
| 值 | 说明 |
|---|---|
| CName | |
| A |
DefaultErrorResponse
应用服务错误响应。
| 名称 | 类型 | 说明 |
|---|---|---|
| error |
错误模型。 |
Details
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
Error
错误模型。
| 名称 | 类型 | 说明 |
|---|---|---|
| code |
string |
标准化字符串,以编程方式识别错误。 |
| details |
Details[] |
详细错误。 |
| innererror |
string |
调试错误的更多信息。 |
| message |
string |
详细的错误描述和调试信息。 |
| target |
string |
详细的错误描述和调试信息。 |
HostNameBinding
主机名绑定对象。
| 名称 | 类型 | 说明 |
|---|---|---|
| id |
string |
资源 ID。 |
| kind |
string |
资源类型。 |
| name |
string |
资源名称。 |
| properties.azureResourceName |
string |
Azure 资源名称。 |
| properties.azureResourceType |
Azure 资源类型。 |
|
| properties.customHostNameDnsRecordType |
自定义 DNS 记录类型。 |
|
| properties.domainId |
string |
完全限定的 ARM 域资源 URI。 |
| properties.hostNameType |
主机名类型。 |
|
| properties.siteName |
string |
应用服务应用名称。 |
| properties.sslState |
SSL 类型 |
|
| properties.thumbprint |
string |
SSL 证书指纹 |
| properties.virtualIP |
string |
如果启用了基于 IP 的 SSL,则分配给主机名的虚拟 IP 地址。 |
| type |
string |
资源类型。 |
HostNameType
主机名类型。
| 值 | 说明 |
|---|---|
| Verified | |
| Managed |
SslState
SSL 类型
| 值 | 说明 |
|---|---|
| Disabled | |
| SniEnabled | |
| IpBasedEnabled |