Skip to main content

record_sets

Creates, updates, deletes, gets or lists a record_sets resource.

Overview

Namerecord_sets
TypeResource
Idazure.private_dns.record_sets

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. # pylint: disable=line-too-long
namestringThe name of the resource.
aRecordsarrayThe list of A records in the record set.
aaaaRecordsarrayThe list of AAAA records in the record set.
cnameRecordobjectThe CNAME record in the record set.
etagstringThe ETag of the record set.
fqdnstringFully qualified domain name of the record set.
isAutoRegisteredbooleanIs the record set auto-registered in the Private DNS zone through a virtual network link?.
metadataobjectThe metadata attached to the record set.
mxRecordsarrayThe list of MX records in the record set.
ptrRecordsarrayThe list of PTR records in the record set.
soaRecordobjectThe SOA record in the record set.
srvRecordsarrayThe list of SRV records in the record set.
ttlintegerThe TTL (time-to-live) of the records in the record set.
txtRecordsarrayThe list of TXT records in the record set.
typestringThe type of the resource. Example - 'Microsoft.Network/privateDnsZones'.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, private_zone_name, record_type, relative_record_set_name, subscription_idGets a record set.
list_by_typeselectresource_group_name, private_zone_name, record_type, subscription_id$top, $recordsetnamesuffixLists the record sets of a specified type in a Private DNS zone.
listselectresource_group_name, private_zone_name, subscription_id$top, $recordsetnamesuffixLists all record sets in a Private DNS zone.
create_or_updateinsertresource_group_name, private_zone_name, record_type, relative_record_set_name, subscription_idIf-Match, If-None-MatchCreates or updates a record set within a Private DNS zone.
updateupdateresource_group_name, private_zone_name, record_type, relative_record_set_name, subscription_idIf-MatchUpdates a record set within a Private DNS zone.
create_or_updatereplaceresource_group_name, private_zone_name, record_type, relative_record_set_name, subscription_idIf-Match, If-None-MatchCreates or updates a record set within a Private DNS zone.
deletedeleteresource_group_name, private_zone_name, record_type, relative_record_set_name, subscription_idIf-MatchDeletes a record set from a Private DNS zone. This operation cannot be undone.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
private_zone_namestringThe name of the Private DNS zone (without a terminating dot). Required.
record_typestringThe type of DNS record in this record set. Record sets of type SOA cannot be deleted (they are deleted when the Private DNS zone is deleted). Known values are: "A", "AAAA", "CNAME", "MX", "PTR", "SOA", "SRV", and "TXT". Required.
relative_record_set_namestringThe name of the record set, relative to the name of the zone. Required.
resource_group_namestringThe name of the resource group. Required.
subscription_idstring
$recordsetnamesuffixstringThe suffix label of the record set name to be used to filter the record set enumeration. If this parameter is specified, the returned enumeration will only contain records that end with ".". Default value is None.
$topintegerThe maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None.
If-MatchstringThe ETag of the record set. Omit this value to always delete the current record set. Specify the last-seen ETag value to prevent accidentally deleting any concurrent changes. Default value is None.
If-None-MatchstringSet to '*' to allow a new record set to be created, but to prevent updating an existing record set. Other values will be ignored. Default value is None.

SELECT examples

Gets a record set.

SELECT
id,
name,
aRecords,
aaaaRecords,
cnameRecord,
etag,
fqdn,
isAutoRegistered,
metadata,
mxRecords,
ptrRecords,
soaRecord,
srvRecords,
ttl,
txtRecords,
type
FROM azure.private_dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_zone_name = '{{ private_zone_name }}' -- required
AND record_type = '{{ record_type }}' -- required
AND relative_record_set_name = '{{ relative_record_set_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

INSERT examples

Creates or updates a record set within a Private DNS zone.

INSERT INTO azure.private_dns.record_sets (
etag,
properties,
resource_group_name,
private_zone_name,
record_type,
relative_record_set_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ private_zone_name }}',
'{{ record_type }}',
'{{ relative_record_set_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;

UPDATE examples

Updates a record set within a Private DNS zone.

UPDATE azure.private_dns.record_sets
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND record_type = '{{ record_type }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

REPLACE examples

Creates or updates a record set within a Private DNS zone.

REPLACE azure.private_dns.record_sets
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND record_type = '{{ record_type }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
etag,
properties,
type;

DELETE examples

Deletes a record set from a Private DNS zone. This operation cannot be undone.

DELETE FROM azure.private_dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND record_type = '{{ record_type }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;