private_zones
Creates, updates, deletes, gets or lists a private_zones resource.
Overview
| Name | private_zones |
| Type | Resource |
| Id | azure.private_dns.private_zones |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_resource_group
- 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. |
etag | string | The ETag of the zone. |
internalId | string | Private zone internal Id. |
location | string | The Azure Region where the resource lives. |
maxNumberOfRecordSets | integer | The maximum number of record sets that can be created in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinks | integer | The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinksWithRegistration | integer | The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
numberOfRecordSets | integer | The current number of record sets in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinks | integer | The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinksWithRegistration | integer | The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
provisioningState | string | The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". |
tags | object | Resource tags. |
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. |
etag | string | The ETag of the zone. |
internalId | string | Private zone internal Id. |
location | string | The Azure Region where the resource lives. |
maxNumberOfRecordSets | integer | The maximum number of record sets that can be created in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinks | integer | The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinksWithRegistration | integer | The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
numberOfRecordSets | integer | The current number of record sets in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinks | integer | The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinksWithRegistration | integer | The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
provisioningState | string | The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". |
tags | object | Resource tags. |
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. |
etag | string | The ETag of the zone. |
internalId | string | Private zone internal Id. |
location | string | The Azure Region where the resource lives. |
maxNumberOfRecordSets | integer | The maximum number of record sets that can be created in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinks | integer | The maximum number of virtual networks that can be linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
maxNumberOfVirtualNetworkLinksWithRegistration | integer | The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
numberOfRecordSets | integer | The current number of record sets in this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinks | integer | The current number of virtual networks that are linked to this Private DNS zone. This is a read-only property and any attempt to set this value will be ignored. |
numberOfVirtualNetworkLinksWithRegistration | integer | The current number of virtual networks that are linked to this Private DNS zone with registration enabled. This is a read-only property and any attempt to set this value will be ignored. |
provisioningState | string | The provisioning state of the resource. This is a read-only property and any attempt to set this value will be ignored. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". |
tags | object | Resource tags. |
type | string | The type of the resource. Example - 'Microsoft.Network/privateDnsZones'. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, private_zone_name, subscription_id | Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone. | |
list_by_resource_group | select | resource_group_name, subscription_id | $top | Lists the Private DNS zones within a resource group. |
list | select | subscription_id | $top | Lists the Private DNS zones in all resource groups in a subscription. |
create_or_update | insert | resource_group_name, private_zone_name, subscription_id | If-Match, If-None-Match | Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone. |
update | update | resource_group_name, private_zone_name, subscription_id | If-Match | Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone. |
create_or_update | replace | resource_group_name, private_zone_name, subscription_id | If-Match, If-None-Match | Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone. |
delete | delete | resource_group_name, private_zone_name, subscription_id | If-Match | Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed. |
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. |
resource_group_name | string | The name of the resource group. Required. |
subscription_id | string | |
$top | integer | The maximum number of Private DNS zones to return. If not specified, returns up to 100 zones. Default value is None. |
If-Match | string | The ETag of the Private DNS zone. Omit this value to always delete the current zone. 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 Private DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. Default value is None. |
SELECT examples
- get
- list_by_resource_group
- list
Gets a Private DNS zone. Retrieves the zone properties, but not the virtual networks links or the record sets within the zone.
SELECT
id,
name,
etag,
internalId,
location,
maxNumberOfRecordSets,
maxNumberOfVirtualNetworkLinks,
maxNumberOfVirtualNetworkLinksWithRegistration,
numberOfRecordSets,
numberOfVirtualNetworkLinks,
numberOfVirtualNetworkLinksWithRegistration,
provisioningState,
tags,
type
FROM azure.private_dns.private_zones
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND private_zone_name = '{{ private_zone_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists the Private DNS zones within a resource group.
SELECT
id,
name,
etag,
internalId,
location,
maxNumberOfRecordSets,
maxNumberOfVirtualNetworkLinks,
maxNumberOfVirtualNetworkLinksWithRegistration,
numberOfRecordSets,
numberOfVirtualNetworkLinks,
numberOfVirtualNetworkLinksWithRegistration,
provisioningState,
tags,
type
FROM azure.private_dns.private_zones
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
;
Lists the Private DNS zones in all resource groups in a subscription.
SELECT
id,
name,
etag,
internalId,
location,
maxNumberOfRecordSets,
maxNumberOfVirtualNetworkLinks,
maxNumberOfVirtualNetworkLinksWithRegistration,
numberOfRecordSets,
numberOfVirtualNetworkLinks,
numberOfVirtualNetworkLinksWithRegistration,
provisioningState,
tags,
type
FROM azure.private_dns.private_zones
WHERE subscription_id = '{{ subscription_id }}' -- required
AND $top = '{{ $top }}'
;
INSERT examples
- create_or_update
- Manifest
Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone.
INSERT INTO azure.private_dns.private_zones (
tags,
location,
etag,
resource_group_name,
private_zone_name,
subscription_id,
If-Match,
If-None-Match
)
SELECT
'{{ tags }}',
'{{ location }}',
'{{ etag }}',
'{{ resource_group_name }}',
'{{ private_zone_name }}',
'{{ subscription_id }}',
'{{ If-Match }}',
'{{ If-None-Match }}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type
;
# Description fields are for documentation purposes
- name: private_zones
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the private_zones resource.
- name: private_zone_name
value: "{{ private_zone_name }}"
description: Required parameter for the private_zones resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the private_zones resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The Azure Region where the resource lives.
- name: etag
value: "{{ etag }}"
description: |
The ETag of the zone.
- name: If-Match
value: "{{ If-Match }}"
description: The ETag of the Private DNS zone. Omit this value to always overwrite the current zone. Specify the last-seen ETag value to prevent accidentally overwriting any concurrent changes. Default value is None.
description: The ETag of the Private DNS zone. Omit this value to always overwrite the current zone. 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 Private DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. Default value is None.
description: Set to '*' to allow a new Private DNS zone to be created, but to prevent updating an existing zone. Other values will be ignored. Default value is None.
UPDATE examples
- update
Updates a Private DNS zone. Does not modify virtual network links or DNS records within the zone.
UPDATE azure.private_dns.private_zones
SET
tags = '{{ tags }}',
location = '{{ location }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
REPLACE examples
- create_or_update
Creates or updates a Private DNS zone. Does not modify Links to virtual networks or DNS records within the zone.
REPLACE azure.private_dns.private_zones
SET
tags = '{{ tags }}',
location = '{{ location }}',
etag = '{{ etag }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match}}'
AND If-None-Match = '{{ If-None-Match}}'
RETURNING
id,
name,
etag,
location,
properties,
tags,
type;
DELETE examples
- delete
Deletes a Private DNS zone. WARNING: All DNS records in the zone will also be deleted. This operation cannot be undone. Private DNS zone cannot be deleted unless all virtual network links to it are removed.
DELETE FROM azure.private_dns.private_zones
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND private_zone_name = '{{ private_zone_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND If-Match = '{{ If-Match }}'
;