你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Zones - Create Or Update
创建或更新 DNS 区域。 不修改区域中的 DNS 记录。
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}?api-version=2018-05-01
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
resource
|
path | True |
string |
资源组的名称。 |
subscription
|
path | True |
string |
指定唯一标识 Microsoft Azure 订阅的 Azure 订阅 ID。 |
zone
|
path | True |
string |
DNS 区域的名称 (没有终止点) 。 |
api-version
|
query | True |
string |
指定 API 版本。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
If-Match |
string |
DNS 区域的 etag。 省略此值以始终覆盖当前区域。 指定上次看到的 etag 值,以防止意外覆盖任何并发更改。 |
|
If-None-Match |
string |
设置为“*”以允许创建新的 DNS 区域,但要阻止更新现有区域。 其他值将被忽略。 |
请求正文
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
location | True |
string |
资源位置。 |
etag |
string |
区域的 etag。 |
|
properties.registrationVirtualNetworks |
对此 DNS 区域中注册主机名的虚拟网络的引用列表。 仅当 ZoneType 为 Private 时,这才为 。 |
||
properties.resolutionVirtualNetworks |
对解析此 DNS 区域中记录的虚拟网络的引用列表。 仅当 ZoneType 为 Private 时,这才为 。 |
||
properties.zoneType |
此 DNS 区域的类型 (公共或专用) 。 |
||
tags |
object |
资源标记。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
DNS 区域已更新。 |
|
201 Created |
已创建 DNS 区域。 |
|
Other Status Codes |
默认响应。 它将根据错误定义进行反序列化。 |
示例
Create zone
Sample Request
PUT https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1?api-version=2018-05-01
{
"location": "Global",
"tags": {
"key1": "value1"
}
}
Sample Response
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1",
"etag": "00000000-0000-0000-0000-000000000000",
"location": "global",
"name": "zone1",
"type": "Microsoft.Network/dnsZones",
"properties": {
"maxNumberOfRecordSets": 5000,
"numberOfRecordSets": 2,
"nameServers": [
"ns1-01.azure-dns.com",
"ns2-01.azure-dns.net",
"ns3-01.azure-dns.org",
"ns4-01.azure-dns.info"
],
"zoneType": "Public"
},
"tags": {
"key1": "value1"
}
}
{
"id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1",
"etag": "00000000-0000-0000-0000-000000000000",
"location": "global",
"name": "zone1",
"type": "Microsoft.Network/dnsZones",
"properties": {
"maxNumberOfRecordSets": 5000,
"numberOfRecordSets": 2,
"nameServers": [
"ns1-01.azure-dns.com",
"ns2-01.azure-dns.net",
"ns3-01.azure-dns.org",
"ns4-01.azure-dns.info"
],
"zoneType": "Public"
},
"tags": {
"key1": "value1"
}
}
定义
名称 | 说明 |
---|---|
Cloud |
来自服务的错误响应。 |
Cloud |
来自服务的错误响应。 |
Sub |
对另一资源的引用 |
Zone |
描述 DNS 区域。 |
Zone |
此 DNS 区域的类型 (公共或专用) 。 |
CloudError
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
error |
云错误正文。 |
CloudErrorBody
来自服务的错误响应。
名称 | 类型 | 说明 |
---|---|---|
code |
string |
错误的标识符。 代码是固定的,旨在以编程方式使用。 |
details |
有关错误的其他详细信息的列表。 |
|
message |
string |
描述错误的消息,该消息适用于在用户界面中显示。 |
target |
string |
特定错误的目标。 例如,属性的名称出错。 |
SubResource
对另一资源的引用
名称 | 类型 | 说明 |
---|---|---|
id |
string |
资源 ID。 |
Zone
描述 DNS 区域。
名称 | 类型 | 默认值 | 说明 |
---|---|---|---|
etag |
string |
区域的 etag。 |
|
id |
string |
资源 ID。 |
|
location |
string |
资源位置。 |
|
name |
string |
资源名称。 |
|
properties.maxNumberOfRecordSets |
integer |
可在此 DNS 区域中创建的最大记录集数。 这是一个只读属性,任何设置此值的尝试都将被忽略。 |
|
properties.maxNumberOfRecordsPerRecordSet |
integer |
可在此 DNS 区域中创建的每个记录集的最大记录数。 这是一个只读属性,任何设置此值的尝试都将被忽略。 |
|
properties.nameServers |
string[] |
此 DNS 区域的名称服务器。 这是一个只读属性,任何设置此值的尝试都将被忽略。 |
|
properties.numberOfRecordSets |
integer |
此 DNS 区域中的当前记录集数。 这是一个只读属性,任何设置此值的尝试都将被忽略。 |
|
properties.registrationVirtualNetworks |
对此 DNS 区域中注册主机名的虚拟网络的引用列表。 仅当 ZoneType 为 Private 时,这才为 。 |
||
properties.resolutionVirtualNetworks |
对解析此 DNS 区域中记录的虚拟网络的引用列表。 仅当 ZoneType 为 Private 时,这才为 。 |
||
properties.zoneType | Public |
此 DNS 区域的类型 (公共或专用) 。 |
|
tags |
object |
资源标记。 |
|
type |
string |
资源类型。 |
ZoneType
此 DNS 区域的类型 (公共或专用) 。
名称 | 类型 | 说明 |
---|---|---|
Private |
string |
|
Public |
string |