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:

Success.

NameDatatypeDescription
idstringThe ID of the record set.
namestringThe name of the record set.
etagstringThe ETag of the record set.
propertiesobjectThe properties of the record set.
typestringThe type of the record set.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresourceGroupName, privateZoneName, recordType, relativeRecordSetName, subscriptionIdGets a record set.
list_by_typeselectresourceGroupName, privateZoneName, recordType, subscriptionId$top, $recordsetnamesuffixLists the record sets of a specified type in a Private DNS zone.
listselectresourceGroupName, privateZoneName, subscriptionId$top, $recordsetnamesuffixLists all record sets in a Private DNS zone.
create_or_updateinsertresourceGroupName, privateZoneName, recordType, relativeRecordSetName, subscriptionIdIf-Match, If-None-MatchCreates or updates a record set within a Private DNS zone.
updateupdateresourceGroupName, privateZoneName, recordType, relativeRecordSetName, subscriptionIdIf-MatchUpdates a record set within a Private DNS zone.
deletedeleteresourceGroupName, privateZoneName, recordType, relativeRecordSetName, subscriptionIdIf-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
privateZoneNamestringThe name of the Private DNS zone (without a terminating dot).
recordTypestringThe 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).
relativeRecordSetNamestringThe name of the record set, relative to the name of the zone.
resourceGroupNamestringThe name of the resource group.
subscriptionIdstringGets subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
$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 ".<recordsetnamesuffix>".
$topinteger (int32)The maximum number of record sets to return. If not specified, returns up to 100 record sets.
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.
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.

SELECT examples

Gets a record set.

SELECT
id,
name,
etag,
properties,
type
FROM azure.private_dns.record_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND privateZoneName = '{{ privateZoneName }}' -- required
AND recordType = '{{ recordType }}' -- required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;

INSERT examples

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

INSERT INTO azure.private_dns.record_sets (
data__etag,
data__properties,
resourceGroupName,
privateZoneName,
recordType,
relativeRecordSetName,
subscriptionId,
If-Match,
If-None-Match
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ privateZoneName }}',
'{{ recordType }}',
'{{ relativeRecordSetName }}',
'{{ subscriptionId }}',
'{{ 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
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND privateZoneName = '{{ privateZoneName }}' --required
AND recordType = '{{ recordType }}' --required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-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 resourceGroupName = '{{ resourceGroupName }}' --required
AND privateZoneName = '{{ privateZoneName }}' --required
AND recordType = '{{ recordType }}' --required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match }}'
;