record_sets
Creates, updates, deletes, gets or lists a record_sets resource.
Overview
| Name | record_sets |
| Type | Resource |
| Id | azure.private_dns.record_sets |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_type
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. # pylint: disable=line-too-long |
name | string | The name of the resource. |
aRecords | array | The list of A records in the record set. |
aaaaRecords | array | The list of AAAA records in the record set. |
cnameRecord | object | The CNAME record in the record set. |
etag | string | The ETag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
isAutoRegistered | boolean | Is the record set auto-registered in the Private DNS zone through a virtual network link?. |
metadata | object | The metadata attached to the record set. |
mxRecords | array | The list of MX records in the record set. |
ptrRecords | array | The list of PTR records in the record set. |
soaRecord | object | The SOA record in the record set. |
srvRecords | array | The list of SRV records in the record set. |
ttl | integer | The TTL (time-to-live) of the records in the record set. |
txtRecords | array | The list of TXT records in the record set. |
type | string | The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. # pylint: disable=line-too-long |
name | string | The name of the resource. |
aRecords | array | The list of A records in the record set. |
aaaaRecords | array | The list of AAAA records in the record set. |
cnameRecord | object | The CNAME record in the record set. |
etag | string | The ETag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
isAutoRegistered | boolean | Is the record set auto-registered in the Private DNS zone through a virtual network link?. |
metadata | object | The metadata attached to the record set. |
mxRecords | array | The list of MX records in the record set. |
ptrRecords | array | The list of PTR records in the record set. |
soaRecord | object | The SOA record in the record set. |
srvRecords | array | The list of SRV records in the record set. |
ttl | integer | The TTL (time-to-live) of the records in the record set. |
txtRecords | array | The list of TXT records in the record set. |
type | string | The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource Id for the resource. Example - '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/privateDnsZones/{privateDnsZoneName}'. # pylint: disable=line-too-long |
name | string | The name of the resource. |
aRecords | array | The list of A records in the record set. |
aaaaRecords | array | The list of AAAA records in the record set. |
cnameRecord | object | The CNAME record in the record set. |
etag | string | The ETag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
isAutoRegistered | boolean | Is the record set auto-registered in the Private DNS zone through a virtual network link?. |
metadata | object | The metadata attached to the record set. |
mxRecords | array | The list of MX records in the record set. |
ptrRecords | array | The list of PTR records in the record set. |
soaRecord | object | The SOA record in the record set. |
srvRecords | array | The list of SRV records in the record set. |
ttl | integer | The TTL (time-to-live) of the records in the record set. |
txtRecords | array | The list of TXT records in the record set. |
type | string | The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. |
Methods
The following methods are available for this resource:
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.
| Name | Datatype | Description |
|---|---|---|
private_zone_name | string | The name of the Private DNS zone (without a terminating dot). Required. |
record_type | string | The 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_name | string | The name of the record set, relative to the name of the zone. Required. |
resource_group_name | string | The name of the resource group. Required. |
subscription_id | string | |
$recordsetnamesuffix | string | The 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. |
$top | integer | The maximum number of record sets to return. If not specified, returns up to 100 record sets. Default value is None. |
If-Match | string | The 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-Match | string | Set 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
- get
- list_by_type
- list
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
;
Lists the record sets of a specified type in a Private DNS zone.
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 subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $recordsetnamesuffix = '{{ $recordsetnamesuffix }}'
;
Lists all record sets in a Private DNS zone.
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 subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
AND $recordsetnamesuffix = '{{ $recordsetnamesuffix }}'
;
INSERT examples
- create_or_update
- Manifest
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
;
# Description fields are for documentation purposes
- name: record_sets
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the record_sets resource.
- name: private_zone_name
value: "{{ private_zone_name }}"
description: Required parameter for the record_sets resource.
- name: record_type
value: "{{ record_type }}"
description: Required parameter for the record_sets resource.
- name: relative_record_set_name
value: "{{ relative_record_set_name }}"
description: Required parameter for the record_sets resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the record_sets resource.
- name: etag
value: "{{ etag }}"
description: |
The ETag of the record set.
- name: properties
value:
metadata: "{{ metadata }}"
ttl: {{ ttl }}
aRecords:
- ipv4Address: "{{ ipv4Address }}"
aaaaRecords:
- ipv6Address: "{{ ipv6Address }}"
cnameRecord:
cname: "{{ cname }}"
mxRecords:
- preference: {{ preference }}
exchange: "{{ exchange }}"
ptrRecords:
- ptrdname: "{{ ptrdname }}"
soaRecord:
host: "{{ host }}"
email: "{{ email }}"
serialNumber: {{ serialNumber }}
refreshTime: {{ refreshTime }}
retryTime: {{ retryTime }}
expireTime: {{ expireTime }}
minimumTtl: {{ minimumTtl }}
srvRecords:
- priority: {{ priority }}
weight: {{ weight }}
port: {{ port }}
target: "{{ target }}"
txtRecords:
- value: "{{ value }}"
- name: If-Match
value: "{{ If-Match }}"
description: 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 any concurrent changes. Default value is None.
description: 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 any concurrent changes. Default value is None.
- name: If-None-Match
value: "{{ If-None-Match }}"
description: Set 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.
description: Set 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.
UPDATE examples
- update
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
- create_or_update
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
- delete
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 }}'
;