ManagedZones

For a list of methods for this resource, see the end of this page.

Resource representations

A zone is a subtree of the DNS namespace under one administrative responsibility. A ManagedZone is a resource that represents a DNS zone hosted by the Cloud DNS service.

{
  "kind": "dns#managedZone",
  "name": string,
  "dnsName": string,
  "description": string,
  "id": unsigned long,
  "nameServers": [
    string
  ],
  "creationTime": string,
  "dnssecConfig": {
    "kind": "dns#managedZoneDnsSecConfig",
    "state": string,
    "defaultKeySpecs": [
      {
        "kind": "dns#dnsKeySpec",
        "keyType": string,
        "algorithm": string,
        "keyLength": unsigned integer
      }
    ],
    "nonExistence": string
  },
  "nameServerSet": string,
  "visibility": string,
  "privateVisibilityConfig": {
    "kind": "dns#managedZonePrivateVisibilityConfig",
    "networks": [
      {
        "kind": "dns#managedZonePrivateVisibilityConfigNetwork",
        "networkUrl": string
      }
    ],
    "gkeClusters": [
      {
        "kind": "dns#managedZonePrivateVisibilityConfigGKECluster",
        "gkeClusterName": string
      }
    ]
  },
  "forwardingConfig": {
    "kind": "dns#managedZoneForwardingConfig",
    "targetNameServers": [
      {
        "kind": "dns#managedZoneForwardingConfigNameServerTarget",
        "ipv4Address": string,
        "forwardingPath": string
      }
    ]
  },
  "labels": {
    (key): string
  },
  "peeringConfig": {
    "kind": "dns#managedZonePeeringConfig",
    "targetNetwork": {
      "kind": "dns#managedZonePeeringConfigTargetNetwork",
      "networkUrl": string,
      "deactivateTime": string
    }
  },
  "reverseLookupConfig": {
    "kind": "dns#managedZoneReverseLookupConfig"
  },
  "serviceDirectoryConfig": {
    "kind": "dns#managedZoneServiceDirectoryConfig",
    "namespace": {
      "kind": "dns#managedZoneServiceDirectoryConfigNamespace",
      "namespaceUrl": string,
      "deletionTime": string
    }
  },
  "cloudLoggingConfig": {
    "kind": "dns#managedZoneCloudLoggingConfig",
    "enableLogging": boolean
  }
}
Property name Value Description Notes
cloudLoggingConfig nested object
cloudLoggingConfig.enableLogging boolean If set, enable query logging for this ManagedZone. False by default, making logging opt-in.
cloudLoggingConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneCloudLoggingConfig".
creationTime string The time that this resource was created on the server. This is in RFC3339 text format. Output only.
description string A mutable string of at most 1024 characters associated with this resource for the user's convenience. Has no effect on the managed zone's function.
dnsName string The DNS name of this managed zone, for instance "example.com.".
dnssecConfig nested object DNSSEC configuration.
dnssecConfig.defaultKeySpecs[] list Specifies parameters for generating initial DnsKeys for this ManagedZone. Can only be changed while the state is OFF.
dnssecConfig.defaultKeySpecs[].algorithm string String mnemonic specifying the DNSSEC algorithm of this key.

Acceptable values are:
  • "ecdsap256sha256"
  • "ecdsap384sha384"
  • "rsasha1"
  • "rsasha256"
  • "rsasha512"
dnssecConfig.defaultKeySpecs[].keyLength unsigned integer Length of the keys in bits.
dnssecConfig.defaultKeySpecs[].keyType string Specifies whether this is a key signing key (KSK) or a zone signing key (ZSK). Key signing keys have the Secure Entry Point flag set and, when active, are only used to sign resource record sets of type DNSKEY. Zone signing keys do not have the Secure Entry Point flag set and are used to sign all other types of resource record sets.

Acceptable values are:
  • "keySigning"
  • "zoneSigning"
dnssecConfig.defaultKeySpecs[].kind string Identifies what kind of resource this is. Value: the fixed string "dns#dnsKeySpec".
dnssecConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneDnsSecConfig".
dnssecConfig.nonExistence string Specifies the mechanism for authenticated denial-of-existence responses. Can only be changed while the state is OFF.

Acceptable values are:
  • "nsec"
  • "nsec3"
dnssecConfig.state string Specifies whether DNSSEC is enabled, and what mode it is in.

Acceptable values are:
  • "off"
  • "on"
  • "transfer"
forwardingConfig nested object The presence for this field indicates that outbound forwarding is enabled for this zone. The value of this field contains the set of destinations to forward to.
forwardingConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneForwardingConfig".
forwardingConfig.targetNameServers[] list List of target name servers to forward to. Cloud DNS selects the best available name server if more than one target is given.
forwardingConfig.targetNameServers[].forwardingPath string Forwarding path for this NameServerTarget. If unset or set to DEFAULT, Cloud DNS makes forwarding decisions based on IP address ranges; that is, RFC1918 addresses go to the VPC network, non-RFC1918 addresses go to the internet. When set to PRIVATE, Cloud DNS always sends queries through the VPC network for this target.

Acceptable values are:
  • "default"
  • "private"
forwardingConfig.targetNameServers[].ipv4Address string IPv4 address of a target name server.
forwardingConfig.targetNameServers[].kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneForwardingConfigNameServerTarget".
id unsigned long Unique identifier for the resource; defined by the server (output only)
kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZone".
labels object User labels.
labels.(key) string
name string User assigned name for this resource. Must be unique within the project. The name must be 1-63 characters long, must begin with a letter, end with a letter or digit, and only contain lowercase letters, digits or dashes.
nameServerSet string Optionally specifies the NameServerSet for this ManagedZone. A NameServerSet is a set of DNS name servers that all host the same ManagedZones. Most users leave this field unset. If you need to use this field, contact your account team.
nameServers[] list Delegate your managed_zone to these virtual name servers; defined by the server (output only)
peeringConfig nested object The presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with.
peeringConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZonePeeringConfig".
peeringConfig.targetNetwork nested object The network with which to peer.
peeringConfig.targetNetwork.deactivateTime string The time at which the zone was deactivated, in RFC 3339 date-time format. An empty string indicates that the peering connection is active. The producer network can deactivate a zone. The zone is automatically deactivated if the producer network that the zone targeted is deleted. Output only.
peeringConfig.targetNetwork.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZonePeeringConfigTargetNetwork".
peeringConfig.targetNetwork.networkUrl string The fully qualified URL of the VPC network to forward queries to. This should be formatted like https://!www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
privateVisibilityConfig nested object For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
privateVisibilityConfig.gkeClusters[] list The list of Google Kubernetes Engine clusters that can see this zone.
privateVisibilityConfig.gkeClusters[].gkeClusterName string The resource name of the cluster to bind this ManagedZone to. This should be specified in the format like: projects/*/locations/*/clusters/*. This is referenced from GKE projects.locations.clusters.get API: https://cloud.google.com/kubernetes-engine/docs/reference/rest/v1/projects.locations.clusters/get
privateVisibilityConfig.gkeClusters[].kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZonePrivateVisibilityConfigGKECluster".
privateVisibilityConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZonePrivateVisibilityConfig".
privateVisibilityConfig.networks[] list The list of VPC networks that can see this zone.
privateVisibilityConfig.networks[].kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZonePrivateVisibilityConfigNetwork".
privateVisibilityConfig.networks[].networkUrl string The fully qualified URL of the VPC network to bind to. Format this URL like https://!www.googleapis.com/compute/v1/projects/{project}/global/networks/{network}
reverseLookupConfig nested object The presence of this field indicates that this is a managed reverse lookup zone and Cloud DNS resolves reverse lookup queries using automatically configured records for VPC resources. This only applies to networks listed under private_visibility_config.
reverseLookupConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneReverseLookupConfig".
serviceDirectoryConfig nested object This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones.
serviceDirectoryConfig.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneServiceDirectoryConfig".
serviceDirectoryConfig.namespace nested object Contains information about the namespace associated with the zone.
serviceDirectoryConfig.namespace.deletionTime string The time that the namespace backing this zone was deleted; an empty string if it still exists. This is in RFC3339 text format. Output only.
serviceDirectoryConfig.namespace.kind string Identifies what kind of resource this is. Value: the fixed string "dns#managedZoneServiceDirectoryConfigNamespace".
serviceDirectoryConfig.namespace.namespaceUrl string The fully qualified URL of the namespace associated with the zone. Format must be https://!servicedirectory.googleapis.com/v1/projects/{project}/locations/{location}/namespaces/{namespace}
visibility string The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.

Acceptable values are:
  • "private"
  • "public"

Methods

create
Creates a new ManagedZone.
delete
Deletes a previously created ManagedZone.
get
Fetches the representation of an existing ManagedZone.
getiampolicy
Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.
list
Enumerates ManagedZones that have been created but not yet deleted.
patch
Applies a partial update to an existing ManagedZone.
setiampolicy
Sets the access control policy on the specified resource. Replaces any existing policy.

Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` errors.
testiampermissions
Returns permissions that a caller has on the specified resource. If the resource does not exist, this returns an empty set of permissions, not a `NOT_FOUND` error.

Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.
update
Updates an existing ManagedZone.