zones
Creates, updates, deletes, gets or lists a zones
resource.
Overview
Name | zones |
Type | Resource |
Id | azure.dns.zones |
Fields
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list
Success.
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag of the zone. |
properties | object | The properties of the zone. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Success.
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag of the zone. |
properties | object | The properties of the zone. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Success.
Name | Datatype | Description |
---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} |
name | string | The name of the resource |
etag | string | The etag of the zone. |
properties | object | The properties of the zone. |
systemData | object | Metadata pertaining to creation and last modification of the resource. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , zoneName , subscriptionId | Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone. | |
list_by_resource_group | select | resourceGroupName , subscriptionId | $top | Lists the DNS zones within a resource group. |
list | select | subscriptionId | $top | Lists the DNS zones in all resource groups in a subscription. |
create_or_update | insert | resourceGroupName , zoneName , subscriptionId | If-Match , If-None-Match | Creates or updates a DNS zone. Does not modify DNS records within the zone. |
update | update | resourceGroupName , zoneName , subscriptionId | If-Match | Updates a DNS zone. Does not modify DNS records within the zone. |
delete | delete | resourceGroupName , zoneName , subscriptionId | If-Match | Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. 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.
Name | Datatype | Description |
---|---|---|
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). |
$top | integer (int32) | The maximum number of DNS zones to return. If not specified, returns up to 100 zones. |
If-Match | string | The etag of the DNS zone. Omit this value to always delete the current zone. Specify the last-seen etag value to prevent accidentally deleting any concurrent changes. |
If-None-Match | string | Set to '*' to allow a new DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. |
SELECT
examples
- get
- list_by_resource_group
- list
Gets a DNS zone. Retrieves the zone properties, but not the record sets within the zone.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.dns.zones
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND zoneName = '{{ zoneName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Lists the DNS zones within a resource group.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.dns.zones
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $top = '{{ $top }}'
;
Lists the DNS zones in all resource groups in a subscription.
SELECT
id,
name,
etag,
properties,
systemData,
type
FROM azure.dns.zones
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $top = '{{ $top }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates a DNS zone. Does not modify DNS records within the zone.
INSERT INTO azure.dns.zones (
data__etag,
data__properties,
resourceGroupName,
zoneName,
subscriptionId,
If-Match,
If-None-Match
)
SELECT
'{{ etag }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ zoneName }}',
'{{ subscriptionId }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: zones
props:
- name: resourceGroupName
value: string
description: Required parameter for the zones resource.
- name: zoneName
value: string
description: Required parameter for the zones resource.
- name: subscriptionId
value: string
description: Required parameter for the zones resource.
- name: etag
value: string
description: |
The etag of the zone.
- name: properties
value: object
description: |
The properties of the zone.
- name: If-Match
value: string
description: The etag of the DNS zone. Omit this value to always overwrite the current zone. 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 DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored.
UPDATE
examples
- update
Updates a DNS zone. Does not modify DNS records within the zone.
UPDATE azure.dns.zones
SET
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND zoneName = '{{ zoneName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
properties,
systemData,
type;
DELETE
examples
- delete
Deletes a DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone.
DELETE FROM azure.dns.zones
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND zoneName = '{{ zoneName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
AND If-Match = '{{ If-Match }}'
;