View operations on managed zones
Cloud DNS records managed zone updates that you make (modifying descriptions
or configuring DNSSEC state) as operations. Managed zone creation and
deletion are not recorded; deletion of a managed zone also deletes recorded
operations on the zone.
These operations are independent of
changes that you make to the resources
within the managed zone. You can use the Google Cloud CLI or the REST API to see
the history of these updates.
Permissions required for this task
To perform this task, you must have been granted the following permissions
or the following IAM roles.
Permissions
dns.managedZoneOperations.list
dns.managedZoneOperations.get
Roles
Display audit log of operations
gcloud
Run the following command:
gcloud dns operations list --zones="ZONE_NAME"
Replace ZONE_NAME
with the name of a DNS zone in
your project.
This command prints the JSON formatted resource record sets for
the first 100 records. You can specify an additional parameter:
--limit
: maximum number of operations to list
Python
from apiclient import errors
from apiclient.discovery import build
PROJECT_NAME='PROJECT_NAME'
ZONE_NAME='ZONE_NAME'
try:
service = build('dns', 'v1')
response = service.operations().list(project=PROJECT_NAME,
managedZone=ZONE_NAME).execute()
print(response)
except errors.HttpError, error:
print('An error occurred: %s' % error)
Replace the following:
PROJECT_NAME
: the name of your project
ZONE_NAME
: the name of a DNS zone in your project
What's next
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 2025-08-07 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eCloud DNS records managed zone updates, such as modifying descriptions or configuring DNSSEC state, are recorded as operations.\u003c/p\u003e\n"],["\u003cp\u003eYou can use the Google Cloud CLI or the REST API to view the history of managed zone update operations, which are separate from changes to resources within the zone.\u003c/p\u003e\n"],["\u003cp\u003eTo view these operations, you must have either the \u003ccode\u003edns.managedZoneOperations.list\u003c/code\u003e and \u003ccode\u003edns.managedZoneOperations.get\u003c/code\u003e permissions or the \u003ccode\u003eroles/dns.admin\u003c/code\u003e role.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egcloud dns operations list --zones="ZONE_NAME"\u003c/code\u003e command can be used to display a JSON-formatted list of managed zone operations, with an optional \u003ccode\u003e--limit\u003c/code\u003e parameter to specify the number of operations.\u003c/p\u003e\n"],["\u003cp\u003eThe Python code provided can also be used to programmatically display the managed zone operations.\u003c/p\u003e\n"]]],[],null,[]]