Record Sets - Update

Updates a record set within a DNS zone.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/dnsZones/{zoneName}/{recordType}/{relativeRecordSetName}?api-version=2018-03-01-preview

URI Parameters

Name In Required Type Description
subscriptionId
path True
  • string

The ID of the target subscription.

resourceGroupName
path True
  • string

The name of the resource group. The name is case insensitive.

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

zoneName
path True
  • string

The name of the DNS zone (without a terminating dot).

recordType
path True

The type of DNS record in this record set.

relativeRecordSetName
path True
  • string

The name of the record set, relative to the name of the zone.

api-version
query True
  • string

The API version to use for this operation.

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.AAAARecords

The list of AAAA records in the record set.

properties.ARecords

The list of A records in the record set.

properties.CNAMERecord

The CNAME record in the record set.

properties.MXRecords

The list of MX records in the record set.

properties.NSRecords

The list of NS 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

The TTL (time-to-live) of the records in the record set.

properties.TXTRecords

The list of TXT records in the record set.

properties.caaRecords

The list of CAA records in the record set.

properties.metadata
  • object

The metadata attached to 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 A recordset
Patch AAAA recordset
Patch CAA recordset
Patch CNAME recordset
Patch MX recordset
Patch NS recordset
Patch PTR recordset
Patch SOA recordset
Patch SRV recordset
Patch TXT recordset

Patch A recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/A/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/A",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "ARecords": [
      {
        "ipv4Address": "127.0.0.1"
      }
    ]
  }
}

Patch AAAA recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/AAAA/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/AAAA",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "AAAARecords": [
      {
        "ipv6Address": "::1"
      }
    ]
  }
}

Patch CAA recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CAA/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/CAA",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "caaRecords": [
      {
        "flags": 0,
        "tag": "issue",
        "value": "ca.contoso.com"
      }
    ]
  }
}

Patch CNAME recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/CNAME/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/CNAME",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "CNAMERecord": {
      "cname": "contoso.com"
    }
  }
}

Patch MX recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/MX/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/MX",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "MXRecords": [
      {
        "preference": 0,
        "exchange": "mail.contoso.com"
      }
    ]
  }
}

Patch NS recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/NS/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/NS",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "NSRecords": [
      {
        "nsdname": "ns1.contoso.com"
      }
    ]
  }
}

Patch PTR recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/0.0.127.in-addr.arpa/PTR/1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "1",
  "type": "Microsoft.Network/dnsZones/PTR",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "1.0.0.127.in-addr.arpa",
    "PTRRecords": [
      {
        "ptrdname": "localhost"
      }
    ]
  }
}

Patch SOA recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SOA/@",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "@",
  "type": "Microsoft.Network/dnsZones/SOA",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "zone1",
    "SOARecord": {
      "host": "ns1.contoso.com",
      "email": "hostmaster.contoso.com",
      "serialNumber": 1,
      "refreshTime": 3600,
      "retryTime": 300,
      "expireTime": 2419200,
      "minimumTTL": 300
    }
  }
}

Patch SRV recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/SRV/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/SRV",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "SRVRecords": [
      {
        "priority": 0,
        "weight": 10,
        "port": 80,
        "target": "contoso.com"
      }
    ]
  }
}

Patch TXT recordset

Sample Request

PATCH https://management.azure.com/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1?api-version=2018-03-01-preview
{
  "properties": {
    "metadata": {
      "key2": "value2"
    }
  }
}

Sample Response

{
  "id": "/subscriptions/subid/resourceGroups/rg1/providers/Microsoft.Network/dnsZones/zone1/TXT/record1",
  "etag": "00000000-0000-0000-0000-000000000000",
  "name": "record1",
  "type": "Microsoft.Network/dnsZones/TXT",
  "properties": {
    "metadata": {
      "key2": "value2"
    },
    "TTL": 3600,
    "fqdn": "record1.zone1",
    "TXTRecords": [
      {
        "value": [
          "string1",
          "string2"
        ]
      }
    ]
  }
}

Definitions

AaaaRecord

An AAAA record.

ARecord

An A record.

CaaRecord

A CAA record.

CloudError

An error message

CloudErrorBody

The body of an error message

CnameRecord

A CNAME record.

MxRecord

An MX record.

NsRecord

An NS record.

PtrRecord

A PTR record.

RecordSet

Describes a DNS record set (a collection of DNS records with the same name and type).

RecordType

The type of DNS record in this record set.

SoaRecord

An SOA record.

SrvRecord

An SRV record.

TxtRecord

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.

CaaRecord

A CAA record.

Name Type Description
flags
  • integer

The flags for this CAA record as an integer between 0 and 255.

tag
  • string

The tag for this CAA record.

value
  • string

The value for this CAA record.

CloudError

An error message

Name Type Description
error

The error message body

CloudErrorBody

The body of an error message

Name Type Description
code
  • string

The error code

details

Extra error information

message
  • string

A description of what caused the error

target
  • string

The target resource of the error message

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

The preference value for this MX record.

NsRecord

An NS record.

Name Type Description
nsdname
  • string

The name server name for this NS 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).

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.AAAARecords

The list of AAAA records in the record set.

properties.ARecords

The list of A records in the record set.

properties.CNAMERecord

The CNAME record in the record set.

properties.MXRecords

The list of MX records in the record set.

properties.NSRecords

The list of NS 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

The TTL (time-to-live) of the records in the record set.

properties.TXTRecords

The list of TXT records in the record set.

properties.caaRecords

The list of CAA records in the record set.

properties.fqdn
  • string

Fully qualified domain name of the record set.

properties.metadata
  • object

The metadata attached to the record set.

type
  • string

The type of the record set.

RecordType

The type of DNS record in this record set.

Name Type Description
A
  • string
AAAA
  • string
CAA
  • string
CNAME
  • string
MX
  • string
NS
  • string
PTR
  • string
SOA
  • string
SRV
  • string
TXT
  • string

SoaRecord

An SOA record.

Name Type Description
email
  • string

The email contact for this SOA record.

expireTime
  • integer

The expire time for this SOA record.

host
  • string

The domain name of the authoritative name server for this SOA record.

minimumTTL
  • integer

The minimum value for this SOA record. By convention this is used to determine the negative caching duration.

refreshTime
  • integer

The refresh value for this SOA record.

retryTime
  • integer

The retry time for this SOA record.

serialNumber
  • integer

The serial number for this SOA record.

SrvRecord

An SRV record.

Name Type Description
port
  • integer

The port value for this SRV record.

priority
  • integer

The priority value for this SRV record.

target
  • string

The target domain name for this SRV record.

weight
  • integer

The weight value for this SRV record.

TxtRecord

A TXT record.

Name Type Description
value
  • string[]

The text value of this TXT record.