max_results(int) – Optional. The maximum number of change sets
to return. Defaults to a sensible value set by the API.
page_token(str) – Optional. If present, return the next batch of
change sets, using the value, which must correspond to thenextPageTokenvalue returned in the previous response.
Deprecated: use thepagesproperty of the returned iterator
instead of manually passing the token.
client(google.cloud.dns.client.Client) – (Optional) the client to use. If not passed, falls back to theclientstored on the current zone.
max_results(int) – Optional. The maximum number of resource record
sets to return. Defaults to a sensible value
set by the API.
page_token(str) – Optional. If present, return the next batch of
resource record sets, using the value, which must correspond to
thenextPageTokenvalue returned in the previous response.
Deprecated: use thepagesproperty of the returned iterator
instead of manually passing the token.
client(google.cloud.dns.client.Client) – (Optional) the client to use. If not passed, falls back to theclientstored on the current zone.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [0.35.1 (latest)](/python/docs/reference/dns/latest/zone)\n- [0.35.0](/python/docs/reference/dns/0.35.0/zone)\n- [0.34.2](/python/docs/reference/dns/0.34.2/zone)\n- [0.33.1](/python/docs/reference/dns/0.33.1/zone)\n- [0.32.3](/python/docs/reference/dns/0.32.3/zone)\n- [0.31.0](/python/docs/reference/dns/0.31.0/zone)\n- [0.30.2](/python/docs/reference/dns/0.30.2/zone) \n\nManaged Zones\n=============\n\nDefine API ManagedZones.\n\n### *class* google.cloud.dns.zone.ManagedZone(name, dns_name=None, client=None, description=None)\n\nBases: [`object`](https://docs.python.org/3/library/functions.html#object)\n\nManagedZones are containers for DNS resource records.\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones\u003e\n\n- **Parameters**\n\n - **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- the name of the zone\n\n - **dns_name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- (Optional) the DNS name of the zone. If not passed, then calls to\n `create()` will fail.\n\n - **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- A client which holds credentials and project configuration\n for the zone (which requires a project).\n\n - **description** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- (Optional) the description for the zone. If not passed, defaults to\n the value of 'dns_name'.\n\n#### changes()\n\nConstruct a change set bound to this zone.\n\n- **Return type**\n\n [`google.cloud.dns.changes.Changes`](/python/docs/reference/dns/latest/changes#google.cloud.dns.changes.Changes)\n- **Returns**\n\n a new `Changes` instance\n\n#### create(client=None)\n\nAPI call: create the zone via a PUT request\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones/create\u003e\n\n- **Parameters**\n\n **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n\n#### *property* created()\n\nDatetime at which the zone was created.\n\n- **Return type**\n\n `datetime.datetime`, or `NoneType`\n- **Returns**\n\n the creation time (None until set from the server).\n\n#### delete(client=None)\n\nAPI call: delete the zone via a DELETE request\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones/delete\u003e\n\n- **Parameters**\n\n **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n\n#### *property* description()\n\nDescription of the zone.\n\n- **Return type**\n\n str, or `NoneType`\n- **Returns**\n\n The description as set by the user, or None (the default).\n\n#### exists(client=None)\n\nAPI call: test for the existence of the zone via a GET request\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones/get\u003e\n\n- **Parameters**\n\n **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n- **Return type**\n\n [bool](https://docs.python.org/3/library/functions.html#bool)\n- **Returns**\n\n Boolean indicating existence of the managed zone.\n\n#### *classmethod* from_api_repr(resource, client)\n\nFactory: construct a zone given its API representation\n\n- **Parameters**\n\n - **resource** ([*dict*](https://docs.python.org/3/library/stdtypes.html#dict)) -- zone resource representation returned from the API\n\n - **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- Client which holds credentials and project\n configuration for the zone.\n\n- **Return type**\n\n `google.cloud.dns.zone.ManagedZone`\n- **Returns**\n\n Zone parsed from `resource`.\n\n#### list_changes(max_results=None, page_token=None, client=None)\n\nList change sets for this zone.\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/resourceRecordSets/list\u003e\n\n- **Parameters**\n\n - **max_results** ([*int*](https://docs.python.org/3/library/functions.html#int)) -- Optional. The maximum number of change sets\n to return. Defaults to a sensible value set by the API.\n\n - **page_token** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- Optional. If present, return the next batch of\n change sets, using the value, which must correspond to the\n `nextPageToken` value returned in the previous response.\n Deprecated: use the `pages` property of the returned iterator\n instead of manually passing the token.\n\n - **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n\n- **Return type**\n\n [`Iterator`](https://googleapis.dev/python/google-api-core/latest/page_iterator.html#google.api_core.page_iterator.Iterator)\n- **Returns**\n\n Iterator of [`Changes`](/python/docs/reference/dns/latest/changes#google.cloud.dns.changes.Changes)\n belonging to this zone.\n\n#### list_resource_record_sets(max_results=None, page_token=None, client=None)\n\nList resource record sets for this zone.\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/resourceRecordSets/list\u003e\n\n- **Parameters**\n\n - **max_results** ([*int*](https://docs.python.org/3/library/functions.html#int)) -- Optional. The maximum number of resource record\n sets to return. Defaults to a sensible value\n set by the API.\n\n - **page_token** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- Optional. If present, return the next batch of\n resource record sets, using the value, which must correspond to\n the `nextPageToken` value returned in the previous response.\n Deprecated: use the `pages` property of the returned iterator\n instead of manually passing the token.\n\n - **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n\n- **Return type**\n\n [`Iterator`](https://googleapis.dev/python/google-api-core/latest/page_iterator.html#google.api_core.page_iterator.Iterator)\n- **Returns**\n\n Iterator of [`ResourceRecordSet`](/python/docs/reference/dns/latest/resource-record-set#google.cloud.dns.resource_record_set.ResourceRecordSet)\n belonging to this zone.\n\n#### *property* name_server_set()\n\nNamed set of DNS name servers that all host the same ManagedZones.\n\nMost users will leave this blank.\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones#nameServerSet\u003e\n\n- **Return type**\n\n str, or `NoneType`\n- **Returns**\n\n The name as set by the user, or None (the default).\n\n#### *property* name_servers()\n\nDatetime at which the zone was created.\n\n- **Return type**\n\n list of strings, or `NoneType`.\n- **Returns**\n\n the assigned name servers (None until set from the server).\n\n#### *property* path()\n\nURL path for the zone's APIs.\n\n- **Return type**\n\n [str](https://docs.python.org/3/library/stdtypes.html#str)\n- **Returns**\n\n the path based on project and dataste name.\n\n#### *property* project()\n\nProject bound to the zone.\n\n- **Return type**\n\n [str](https://docs.python.org/3/library/stdtypes.html#str)\n- **Returns**\n\n the project (derived from the client).\n\n#### reload(client=None)\n\nAPI call: refresh zone properties via a GET request\n\nSee\n\u003chttps://cloud.google.com/dns/api/v1/managedZones/get\u003e\n\n- **Parameters**\n\n **client** ([`google.cloud.dns.client.Client`](/python/docs/reference/dns/latest/client#google.cloud.dns.client.Client)) -- (Optional) the client to use. If not passed, falls back to the\n `client` stored on the current zone.\n\n#### resource_record_set(name, record_type, ttl, rrdatas)\n\nConstruct a resource record set bound to this zone.\n\n- **Parameters**\n\n - **name** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- Name of the record set.\n\n - **record_type** ([*str*](https://docs.python.org/3/library/stdtypes.html#str)) -- RR type\n\n - **ttl** ([*int*](https://docs.python.org/3/library/functions.html#int)) -- TTL for the RR, in seconds\n\n - **rrdatas** (*list of string*) -- resource data for the RR\n\n- **Return type**\n\n [`google.cloud.dns.resource_record_set.ResourceRecordSet`](/python/docs/reference/dns/latest/resource-record-set#google.cloud.dns.resource_record_set.ResourceRecordSet)\n- **Returns**\n\n a new `ResourceRecordSet` instance\n\n#### *property* zone_id()\n\nID for the zone resource.\n\n- **Return type**\n\n str, or `NoneType`\n- **Returns**\n\n the ID (None until set from the server)."]]