record_sets
Creates, updates, deletes, gets or lists a record_sets resource.
Overview
| Name | record_sets |
| Type | Resource |
| Id | azure.dns.record_sets |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_type
- list_by_dns_zone
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
AAAARecords | array | The list of AAAA records in the record set. |
ARecords | array | The list of A records in the record set. |
CNAMERecord | object | The CNAME record in the record set. |
MXRecords | array | The list of MX records in the record set. |
NSRecords | array | The list of NS 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. |
caaRecords | array | The list of CAA records in the record set. |
etag | string | The etag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
metadata | object | The metadata attached to the record set. |
provisioningState | string | provisioning State of the record set. |
targetResource | object | A reference to a another resource. |
type | string | The type of the record set. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
AAAARecords | array | The list of AAAA records in the record set. |
ARecords | array | The list of A records in the record set. |
CNAMERecord | object | The CNAME record in the record set. |
MXRecords | array | The list of MX records in the record set. |
NSRecords | array | The list of NS 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. |
caaRecords | array | The list of CAA records in the record set. |
etag | string | The etag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
metadata | object | The metadata attached to the record set. |
provisioningState | string | provisioning State of the record set. |
targetResource | object | A reference to a another resource. |
type | string | The type of the record set. |
| Name | Datatype | Description |
|---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
AAAARecords | array | The list of AAAA records in the record set. |
ARecords | array | The list of A records in the record set. |
CNAMERecord | object | The CNAME record in the record set. |
MXRecords | array | The list of MX records in the record set. |
NSRecords | array | The list of NS 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. |
caaRecords | array | The list of CAA records in the record set. |
etag | string | The etag of the record set. |
fqdn | string | Fully qualified domain name of the record set. |
metadata | object | The metadata attached to the record set. |
provisioningState | string | provisioning State of the record set. |
targetResource | object | A reference to a another resource. |
type | string | The type of the record set. |
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 |
|---|---|---|
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 DNS zone is deleted). Known values are: "A", "AAAA", "CAA", "CNAME", "MX", "NS", "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 | |
zone_name | string | The name of the DNS zone (without a terminating dot). Required. |
$recordsetnamesuffix | string | The suffix label of the record set name that has to be used to filter the record set enumerations. If this parameter is specified, Enumeration will return only 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_by_dns_zone
Gets a record set.
SELECT
id,
name,
AAAARecords,
ARecords,
CNAMERecord,
MXRecords,
NSRecords,
PTRRecords,
SOARecord,
SRVRecords,
TTL,
TXTRecords,
caaRecords,
etag,
fqdn,
metadata,
provisioningState,
targetResource,
type
FROM azure.dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND zone_name = '{{ zone_name }}' -- required
AND relative_record_set_name = '{{ relative_record_set_name }}' -- required
AND record_type = '{{ record_type }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the record sets of a specified type in a DNS zone.
SELECT
id,
name,
AAAARecords,
ARecords,
CNAMERecord,
MXRecords,
NSRecords,
PTRRecords,
SOARecord,
SRVRecords,
TTL,
TXTRecords,
caaRecords,
etag,
fqdn,
metadata,
provisioningState,
targetResource,
type
FROM azure.dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND zone_name = '{{ 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 DNS zone.
SELECT
id,
name,
AAAARecords,
ARecords,
CNAMERecord,
MXRecords,
NSRecords,
PTRRecords,
SOARecord,
SRVRecords,
TTL,
TXTRecords,
caaRecords,
etag,
fqdn,
metadata,
provisioningState,
targetResource,
type
FROM azure.dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND zone_name = '{{ 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 DNS zone.
INSERT INTO azure.dns.record_sets (
etag,
properties,
resource_group_name,
zone_name,
relative_record_set_name,
record_type,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ resource_group_name }}',
'{{ zone_name }}',
'{{ relative_record_set_name }}',
'{{ record_type }}',
'{{ 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: zone_name
value: "{{ zone_name }}"
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: record_type
value: "{{ record_type }}"
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 }}
targetResource:
id: "{{ id }}"
ARecords:
- ipv4Address: "{{ ipv4Address }}"
AAAARecords:
- ipv6Address: "{{ ipv6Address }}"
MXRecords:
- preference: {{ preference }}
exchange: "{{ exchange }}"
NSRecords:
- nsdname: "{{ nsdname }}"
PTRRecords:
- ptrdname: "{{ ptrdname }}"
SRVRecords:
- priority: {{ priority }}
weight: {{ weight }}
port: {{ port }}
target: "{{ target }}"
TXTRecords:
- value: "{{ value }}"
CNAMERecord:
cname: "{{ cname }}"
SOARecord:
host: "{{ host }}"
email: "{{ email }}"
serialNumber: {{ serialNumber }}
refreshTime: {{ refreshTime }}
retryTime: {{ retryTime }}
expireTime: {{ expireTime }}
minimumTTL: {{ minimumTTL }}
caaRecords:
- flags: {{ flags }}
tag: "{{ tag }}"
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 DNS zone.
UPDATE azure.dns.record_sets
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND zone_name = '{{ zone_name }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND record_type = '{{ record_type }}' --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 DNS zone.
REPLACE azure.dns.record_sets
SET
etag = '{{ etag }}',
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND zone_name = '{{ zone_name }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND record_type = '{{ record_type }}' --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 DNS zone. This operation cannot be undone.
DELETE FROM azure.dns.record_sets
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND zone_name = '{{ zone_name }}' --required
AND relative_record_set_name = '{{ relative_record_set_name }}' --required
AND record_type = '{{ record_type }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;
Lifecycle Methods
- list_all_by_dns_zone
Lists all record sets in a DNS zone.
EXEC azure.dns.record_sets.list_all_by_dns_zone
@resource_group_name='{{ resource_group_name }}' --required,
@zone_name='{{ zone_name }}' --required,
@subscription_id='{{ subscription_id }}' --required,
@$top='{{ $top }}',
@$recordsetnamesuffix='{{ $recordsetnamesuffix }}'
;