Record Sets - Update
Updates a record set within a Private DNS zone.
PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateZoneName}/{recordType}/{relativeRecordSetName}?api-version=2018-09-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
private
|
path | True |
string |
The name of the Private DNS zone (without a terminating dot). |
|
record
|
path | True |
The type of DNS record in this record set. |
|
|
relative
|
path | True |
string |
The name of the record set, relative to the name of the zone. |
|
resource
|
path | True |
string |
The name of the resource group. |
|
subscription
|
path | True |
string |
Gets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
|
api-version
|
query | True |
string |
Client Api Version. |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
| If-Match |
string |
The ETag of the record set. Omit this value to always overwrite the current record set. Specify the last-seen ETag value to prevent accidentally overwriting concurrent changes. |
Request Body
| Name | Type | Description |
|---|---|---|
| etag |
string |
The ETag of the record set. |
| properties.aRecords |
ARecord[] |
The list of A records in the record set. |
| properties.aaaaRecords |
The list of AAAA records in the record set. |
|
| properties.cnameRecord |
The CNAME record in the record set. |
|
| properties.metadata |
object |
The metadata attached to the record set. |
| properties.mxRecords |
Mx |
The list of MX records in the record set. |
| properties.ptrRecords |
The list of PTR records in the record set. |
|
| properties.soaRecord |
The SOA record in the record set. |
|
| properties.srvRecords |
The list of SRV records in the record set. |
|
| properties.ttl |
integer (int64) |
The TTL (time-to-live) of the records in the record set. |
| properties.txtRecords |
The list of TXT records in the record set. |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
The record set has been updated. |
|
| Other Status Codes |
Default response. It will be deserialized as per the Error definition. |
Examples
PATCH Private DNS Zone A Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/A/recordA?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/A/recorda",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recorda",
"type": "Microsoft.Network/privateDnsZones/A",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recorda.privatezone1.com.",
"isAutoRegistered": false,
"aRecords": [
{
"ipv4Address": "1.2.3.4"
}
]
}
}
PATCH Private DNS Zone AAAA Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/AAAA/recordAAAA?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/AAAA/recordaaaa",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recordaaaa",
"type": "Microsoft.Network/privateDnsZones/AAAA",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recordaaaa.privatezone1.com.",
"isAutoRegistered": false,
"aaaaRecords": [
{
"ipv6Address": "::1"
}
]
}
}
PATCH Private DNS Zone CNAME Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/CNAME/recordCNAME?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/CNAME/recordcname",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recordcname",
"type": "Microsoft.Network/privateDnsZones/CNAME",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recordcname.privatezone1.com.",
"isAutoRegistered": false,
"cnameRecord": {
"cname": "contoso.com"
}
}
}
PATCH Private DNS Zone MX Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/MX/recordMX?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/MX/recordmx",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recordmx",
"type": "Microsoft.Network/privateDnsZones/MX",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recordmx.privatezone1.com.",
"isAutoRegistered": false,
"mxRecords": [
{
"preference": 0,
"exchange": "mail.privatezone1.com"
}
]
}
}
PATCH Private DNS Zone PTR Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/0.0.127.in-addr.arpa/PTR/1?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/0.0.127.in-addr.arpa/PTR/1",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "1",
"type": "Microsoft.Network/privateDnsZones/PTR",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "1.0.0.127.in-addr.arpa.",
"isAutoRegistered": false,
"ptrRecords": [
{
"ptrdname": "localhost"
}
]
}
}
PATCH Private DNS Zone SOA Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/SOA/@?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/SOA/@",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "@",
"type": "Microsoft.Network/privateDnsZones/SOA",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "privatezone1.com.",
"isAutoRegistered": false,
"soaRecord": {
"host": "azureprivatedns.net",
"email": "azureprivatedns-hostmaster.microsoft.com",
"serialNumber": 1,
"refreshTime": 3600,
"retryTime": 300,
"expireTime": 2419200,
"minimumTtl": 300
}
}
}
PATCH Private DNS Zone SRV Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/SRV/recordSRV?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/SRV/recordsrv",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recordsrv",
"type": "Microsoft.Network/privateDnsZones/SRV",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recordsrv.privatezone1.com.",
"isAutoRegistered": false,
"srvRecords": [
{
"priority": 0,
"weight": 10,
"port": 80,
"target": "contoso.com"
}
]
}
}
PATCH Private DNS Zone TXT Record Set
Sample request
PATCH https://management.azure.com/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/TXT/recordTXT?api-version=2018-09-01
{
"properties": {
"metadata": {
"key2": "value2"
}
}
}
Sample response
{
"id": "/subscriptions/subscriptionId/resourceGroups/resourceGroup1/providers/Microsoft.Network/privateDnsZones/privatezone1.com/TXT/recordtxt",
"etag": "00000000-0000-0000-0000-000000000000",
"name": "recordtxt",
"type": "Microsoft.Network/privateDnsZones/TXT",
"properties": {
"metadata": {
"key2": "value2"
},
"ttl": 3600,
"fqdn": "recordtxt.privatezone1.com.",
"isAutoRegistered": false,
"txtRecords": [
{
"value": [
"string1",
"string2"
]
}
]
}
}
Definitions
| Name | Description |
|---|---|
|
Aaaa |
An AAAA record. |
| ARecord |
An A record. |
|
Cloud |
An error response from the service. |
|
Cloud |
An error response from the service. |
|
Cname |
A CNAME record. |
|
Mx |
An MX record. |
|
Ptr |
A PTR record. |
|
Record |
Describes a DNS record set (a collection of DNS records with the same name and type) in a Private DNS zone. |
|
Record |
The type of DNS record in this record set. |
|
Soa |
An SOA record. |
|
Srv |
An SRV record. |
|
Txt |
A TXT record. |
AaaaRecord
An AAAA record.
| Name | Type | Description |
|---|---|---|
| ipv6Address |
string |
The IPv6 address of this AAAA record. |
ARecord
An A record.
| Name | Type | Description |
|---|---|---|
| ipv4Address |
string |
The IPv4 address of this A record. |
CloudError
An error response from the service.
| Name | Type | Description |
|---|---|---|
| error |
Cloud error body. |
CloudErrorBody
An error response from the service.
| Name | Type | Description |
|---|---|---|
| code |
string |
An identifier for the error. Codes are invariant and are intended to be consumed programmatically. |
| details |
A list of additional details about the error. |
|
| message |
string |
A message describing the error, intended to be suitable for display in a user interface. |
| target |
string |
The target of the particular error. For example, the name of the property in error. |
CnameRecord
A CNAME record.
| Name | Type | Description |
|---|---|---|
| cname |
string |
The canonical name for this CNAME record. |
MxRecord
An MX record.
| Name | Type | Description |
|---|---|---|
| exchange |
string |
The domain name of the mail host for this MX record. |
| preference |
integer (int32) |
The preference value for this MX record. |
PtrRecord
A PTR record.
| Name | Type | Description |
|---|---|---|
| ptrdname |
string |
The PTR target domain name for this PTR record. |
RecordSet
Describes a DNS record set (a collection of DNS records with the same name and type) in a Private DNS zone.
| Name | Type | Description |
|---|---|---|
| etag |
string |
The ETag of the record set. |
| id |
string |
The ID of the record set. |
| name |
string |
The name of the record set. |
| properties.aRecords |
ARecord[] |
The list of A records in the record set. |
| properties.aaaaRecords |
The list of AAAA records in the record set. |
|
| properties.cnameRecord |
The CNAME record in the record set. |
|
| properties.fqdn |
string |
Fully qualified domain name of the record set. |
| properties.isAutoRegistered |
boolean |
Is the record set auto-registered in the Private DNS zone through a virtual network link? |
| properties.metadata |
object |
The metadata attached to the record set. |
| properties.mxRecords |
Mx |
The list of MX records in the record set. |
| properties.ptrRecords |
The list of PTR records in the record set. |
|
| properties.soaRecord |
The SOA record in the record set. |
|
| properties.srvRecords |
The list of SRV records in the record set. |
|
| properties.ttl |
integer (int64) |
The TTL (time-to-live) of the records in the record set. |
| properties.txtRecords |
The list of TXT records in the record set. |
|
| type |
string |
The type of the record set. |
RecordType
The type of DNS record in this record set.
| Value | Description |
|---|---|
| A | |
| AAAA | |
| CNAME | |
| MX | |
| PTR | |
| SOA | |
| SRV | |
| TXT |
SoaRecord
An SOA record.
| Name | Type | Description |
|---|---|---|
|
string |
The email contact for this SOA record. |
|
| expireTime |
integer (int64) |
The expire time for this SOA record. |
| host |
string |
The domain name of the authoritative name server for this SOA record. |
| minimumTtl |
integer (int64) |
The minimum value for this SOA record. By convention this is used to determine the negative caching duration. |
| refreshTime |
integer (int64) |
The refresh value for this SOA record. |
| retryTime |
integer (int64) |
The retry time for this SOA record. |
| serialNumber |
integer (int64) |
The serial number for this SOA record. |
SrvRecord
An SRV record.
| Name | Type | Description |
|---|---|---|
| port |
integer (int32) |
The port value for this SRV record. |
| priority |
integer (int32) |
The priority value for this SRV record. |
| target |
string |
The target domain name for this SRV record. |
| weight |
integer (int32) |
The weight value for this SRV record. |
TxtRecord
A TXT record.
| Name | Type | Description |
|---|---|---|
| value |
string[] |
The text value of this TXT record. |