- gcloud alpha dns record-sets import - import record-sets into your managed-zone
(ALPHA)This command imports record-sets contained within the specified record-sets file into your managed-zone. Note that NS records for the origin of the zone, and the SOA NS field, are not imported since name-servers are managed by Cloud DNS. By default, record-sets cannot be imported if there are any conflicts. A conflict exists if an existing record-set has the same name and type as a record-set that is being imported. In contrast, if the --delete-all-existing flag is used, the imported record-sets will replace all the records-sets currently in the managed-zone.
- POSITIONAL ARGUMENTS
- File from which record-sets should be imported.
- REQUIRED FLAGS
- Name of the managed-zone whose record-sets you want to manage.
- OPTIONAL FLAGS
- Indicates that all existing record-sets should be deleted before importing the record-sets in the records-file.
- Indicates that NS records for the origin of a zone should be imported if defined
- Indicates that the input records-file is in BIND zone format. If omitted, indicates that the records-file is in YAML format.
- GCLOUD WIDE FLAGS
These flags are available to all commands: --account, --billing-project, --configuration, --flags-file, --flatten, --format, --help, --impersonate-service-account,
--log-http, --project, --quiet, --trace-token, --user-output-enabled,
$ gcloud helpfor details.
To import record-sets from a yaml record-sets file, run:
$ gcloud alpha dns record-sets import YAML_RECORDS_FILE \ --zone=MANAGED_ZONE
To import record-sets from a zone file, run:
$ gcloud alpha dns record-sets import ZONE_FILE --zone-file-format \ --zone=MANAGED_ZONE
To replace all the record-sets in your zone with records from a yaml file, run:
$ gcloud alpha dns record-sets import YAML_RECORDS_FILE \ --delete-all-existing --zone=MANAGED_ZONE
- This command is currently in ALPHA and may change without notice. If this command fails with API permission errors despite specifying the right project, you may be trying to access an API with an invitation-only early access whitelist. These variants are also available:
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 2020-01-07.