gcloud dns policies create POLICY --description=DESCRIPTION --networks=[NETWORKS,…] [--alternative-name-servers=[NAME_SERVERS,…]] [--enable-dns64-all-queries] [--enable-inbound-forwarding] [--enable-logging] [--private-alternative-name-servers=[NAME_SERVERS,…]] [GCLOUD_WIDE_FLAG …]
gcloud dns policies create mypolicy --description='My new policy test policy 5' --networks=''To create a new policy with all optional arguments, run:
gcloud dns policies create mypolicy --description='My new policy test policy 5' --networks=network1,network2 --alternative-name-servers=192.168.1.1,192.168.1.2 --enable-inbound-forwarding --enable-logging --enable-dns64-all-queries
To set the project attribute:
policy on the command line with a fully
specified name;
core/project.
POLICYpolicy attribute:
policy on the command line.
--description=DESCRIPTION--networks=[NETWORKS,…]--alternative-name-servers=[NAME_SERVERS,…]--enable-dns64-all-queries--enable-inbound-forwarding--enable-logging--private-alternative-name-servers=[NAME_SERVERS,…]--access-token-file,
--account, --billing-project,
--configuration,
--flags-file,
--flatten, --format, --help, --impersonate-service-account,
--log-http,
--project, --quiet, --trace-token, --user-output-enabled,
--verbosity.
Run $ gcloud help for details.
gcloud alpha dns policies creategcloud beta dns policies create
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-05-27 UTC.