Share via


az network private-dns zone

Manage Private DNS zones.

Commands

Name Description Type Status
az network private-dns zone create

Create a Private DNS zone.

Core GA
az network private-dns zone delete

Delete a Private DNS zone.

Core GA
az network private-dns zone export

Export a Private DNS zone as a DNS zone file.

Core GA
az network private-dns zone import

Create a Private DNS zone using a DNS zone file.

Core GA
az network private-dns zone list

List Private DNS zones.

Core GA
az network private-dns zone show

Get a Private DNS zone.

Core GA
az network private-dns zone update

Update a Private DNS zone's properties. Does not modify Private DNS records or virtual network links within the zone.

Core GA
az network private-dns zone wait

Place the CLI in a waiting state until a condition is met.

Core GA

az network private-dns zone create

Experimental Preview Deprecated

Create a Private DNS zone.

az network private-dns zone create --name
                                   --resource-group
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--tags]

Examples

Create a Private DNS zone using a fully qualified domain name.

az network private-dns zone create -g MyResourceGroup -n www.mysite.com

Required Parameters

--name -n
Experimental Preview Deprecated

Name of the Private DNS zone.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--no-wait
Experimental Preview Deprecated

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--tags
Experimental Preview Deprecated

Resource tags for the Private DNS zone. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone delete

Experimental Preview Deprecated

Delete a Private DNS zone.

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.

az network private-dns zone delete [--ids]
                                   [--if-match]
                                   [--name]
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--resource-group]
                                   [--subscription]
                                   [--yes]

Examples

Delete a Private DNS zone using a fully qualified domain name.

az network private-dns zone delete -g MyResourceGroup -n www.mysite.com

Required Parameters

Optional Parameters

--ids
Experimental Preview Deprecated

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--if-match
Experimental Preview Deprecated

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.

--name -n
Experimental Preview Deprecated

Name of the Private DNS zone.

--no-wait
Experimental Preview Deprecated

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y
Experimental Preview Deprecated

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone export

Experimental Preview Deprecated

Export a Private DNS zone as a DNS zone file.

az network private-dns zone export --name
                                   --resource-group
                                   [--file-name]

Examples

Export a Private DNS zone as a DNS zone file.

az network private-dns zone export -g MyResourceGroup -n www.mysite.com -f mysite_com_zone.txt

Required Parameters

--name -n
Experimental Preview Deprecated

The name of the Private DNS zone.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

--file-name -f
Experimental Preview Deprecated

Path to the Private DNS zone file to save.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone import

Experimental Preview Deprecated

Create a Private DNS zone using a DNS zone file.

az network private-dns zone import --file-name
                                   --name
                                   --resource-group

Examples

Import a local zone file into a Private DNS zone resource.

az network private-dns zone import -g MyResourceGroup -n MyZone -f /path/to/zone/file

Required Parameters

--file-name -f
Experimental Preview Deprecated

Path to the Private DNS zone file to import.

--name -n
Experimental Preview Deprecated

The name of the Private DNS zone.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Optional Parameters

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone list

Experimental Preview Deprecated

List Private DNS zones.

az network private-dns zone list [--max-items]
                                 [--next-token]
                                 [--resource-group]

Examples

List Private DNS zones in a resource group.

az network private-dns zone list -g MyResourceGroup

Required Parameters

Optional Parameters

--max-items
Experimental Preview Deprecated

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token
Experimental Preview Deprecated

Token to specify where to start paginating. This is the token value from a previously truncated response.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone show

Experimental Preview Deprecated

Get a Private DNS zone.

az network private-dns zone show [--ids]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]

Examples

Get a Private DNS zone using a fully qualified domain name.

az network private-dns zone show -g MyResourceGroup -n www.mysite.com

Required Parameters

Optional Parameters

--ids
Experimental Preview Deprecated

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name -n
Experimental Preview Deprecated

Name of the Private DNS zone.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone update

Experimental Preview Deprecated

Update a Private DNS zone's properties. Does not modify Private DNS records or virtual network links within the zone.

az network private-dns zone update [--add]
                                   [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--ids]
                                   [--if-match]
                                   [--name]
                                   [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                   [--remove]
                                   [--resource-group]
                                   [--set]
                                   [--subscription]
                                   [--tags]

Examples

Update a Private DNS zone properties to change the user-defined value of a previously set tag.

az network private-dns zone update -g MyResourceGroup -n www.mysite.com --tags CostCenter=Marketing

Required Parameters

Optional Parameters

--add
Experimental Preview Deprecated

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--force-string
Experimental Preview Deprecated

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--ids
Experimental Preview Deprecated

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--if-match
Experimental Preview Deprecated

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.

--name -n
Experimental Preview Deprecated

Name of the Private DNS zone.

--no-wait
Experimental Preview Deprecated

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--remove
Experimental Preview Deprecated

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--set
Experimental Preview Deprecated

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--tags
Experimental Preview Deprecated

Resource tags for the Private DNS zone. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az network private-dns zone wait

Experimental Preview Deprecated

Place the CLI in a waiting state until a condition is met.

az network private-dns zone wait [--created]
                                 [--custom]
                                 [--deleted]
                                 [--exists]
                                 [--ids]
                                 [--interval]
                                 [--name]
                                 [--resource-group]
                                 [--subscription]
                                 [--timeout]
                                 [--updated]

Examples

Required Parameters

Optional Parameters

--created
Experimental Preview Deprecated

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom
Experimental Preview Deprecated

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted
Experimental Preview Deprecated

Wait until deleted.

Default value: False
--exists
Experimental Preview Deprecated

Wait until the resource exists.

Default value: False
--ids
Experimental Preview Deprecated

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval
Experimental Preview Deprecated

Polling interval in seconds.

Default value: 30
--name -n
Experimental Preview Deprecated

Name of the Private DNS zone.

--resource-group -g
Experimental Preview Deprecated

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--timeout
Experimental Preview Deprecated

Maximum wait in seconds.

Default value: 3600
--updated
Experimental Preview Deprecated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.