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
Success.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
etag | string | The etag of the record set. |
properties | object | The properties of the record set. |
type | string | The type of the record set. |
Success.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
etag | string | The etag of the record set. |
properties | object | The properties of the record set. |
type | string | The type of the record set. |
Success.
Name | Datatype | Description |
---|---|---|
id | string | The ID of the record set. |
name | string | The name of the record set. |
etag | string | The etag of the record set. |
properties | object | The properties of the record set. |
type | string | The type of the record set. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , zoneName , relativeRecordSetName , recordType , subscriptionId | Gets a record set. | |
list_by_type | select | resourceGroupName , zoneName , recordType , subscriptionId | $top , $recordsetnamesuffix | Lists the record sets of a specified type in a DNS zone. |
list_by_dns_zone | select | resourceGroupName , zoneName , subscriptionId | $top , $recordsetnamesuffix | Lists all record sets in a DNS zone. |
create_or_update | insert | resourceGroupName , zoneName , relativeRecordSetName , recordType , subscriptionId | If-Match , If-None-Match | Creates or updates a record set within a DNS zone. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created). |
update | update | resourceGroupName , zoneName , relativeRecordSetName , recordType , subscriptionId | If-Match | Updates a record set within a DNS zone. |
delete | delete | resourceGroupName , zoneName , relativeRecordSetName , recordType , subscriptionId | If-Match | Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted). |
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 |
---|---|---|
recordType | string | The type of DNS record in this record set. |
relativeRecordSetName | string | The name of the record set, relative to the name of the zone. |
resourceGroupName | string | The name of the resource group. The name is case insensitive. |
subscriptionId | string | The ID of the target subscription. |
zoneName | string | The name of the DNS zone (without a terminating dot). |
$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 .<recordSetNameSuffix> |
$top | integer (int32) | The maximum number of record sets to return. If not specified, returns up to 100 record sets. |
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. |
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. |
SELECT
examples
- get
- list_by_type
- list_by_dns_zone
Gets a record set.
SELECT
id,
name,
etag,
properties,
type
FROM azure.dns.record_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND zoneName = '{{ zoneName }}' -- required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' -- required
AND recordType = '{{ recordType }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists the record sets of a specified type in a DNS zone.
SELECT
id,
name,
etag,
properties,
type
FROM azure.dns.record_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND zoneName = '{{ zoneName }}' -- required
AND recordType = '{{ recordType }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $top = '{{ $top }}'
AND $recordsetnamesuffix = '{{ $recordsetnamesuffix }}'
;
Lists all record sets in a DNS zone.
SELECT
id,
name,
etag,
properties,
type
FROM azure.dns.record_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND zoneName = '{{ zoneName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $top = '{{ $top }}'
AND $recordsetnamesuffix = '{{ $recordsetnamesuffix }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a record set within a DNS zone. Record sets of type SOA can be updated but not created (they are created when the DNS zone is created).
INSERT INTO azure.dns.record_sets (
data__etag,
data__properties,
resourceGroupName,
zoneName,
relativeRecordSetName,
recordType,
subscriptionId,
If-Match,
If-None-Match
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ zoneName }}',
'{{ relativeRecordSetName }}',
'{{ recordType }}',
'{{ subscriptionId }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
properties,
type
;
# Description fields are for documentation purposes
- name: record_sets
props:
- name: resourceGroupName
value: string
description: Required parameter for the record_sets resource.
- name: zoneName
value: string
description: Required parameter for the record_sets resource.
- name: relativeRecordSetName
value: string
description: Required parameter for the record_sets resource.
- name: recordType
value: string
description: Required parameter for the record_sets resource.
- name: subscriptionId
value: string
description: Required parameter for the record_sets resource.
- name: etag
value: string
description: |
The etag of the record set.
- name: properties
value: object
description: |
The properties of the record set.
- name: If-Match
value: string
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.
- name: If-None-Match
value: string
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.
UPDATE
examples
- update
Updates a record set within a DNS zone.
UPDATE azure.dns.record_sets
SET
data__etag = '{{ etag }}',
data__properties = '{{ properties }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND zoneName = '{{ zoneName }}' --required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' --required
AND recordType = '{{ recordType }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
type;
DELETE
examples
- delete
Deletes a record set from a DNS zone. This operation cannot be undone. Record sets of type SOA cannot be deleted (they are deleted when the DNS zone is deleted).
DELETE FROM azure.dns.record_sets
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND zoneName = '{{ zoneName }}' --required
AND relativeRecordSetName = '{{ relativeRecordSetName }}' --required
AND recordType = '{{ recordType }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match }}'
;