Skip to main content

managed_zones

Creates, updates, deletes, gets or lists a managed_zones resource.

Overview

Namemanaged_zones
TypeResource
Idgoogle.dns.managed_zones

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
idstring (uint64)Unique identifier for the resource; defined by the server (output only)
namestringUser 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.
cloudLoggingConfigobjectCloud Logging configurations for publicly visible zones. (id: ManagedZoneCloudLoggingConfig)
creationTimestringThe time that this resource was created on the server. This is in RFC3339 text format. Output only.
descriptionstringA 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.
dnsNamestringThe DNS name of this managed zone, for instance "example.com.".
dnssecConfigobjectDNSSEC configuration. (id: ManagedZoneDnsSecConfig)
forwardingConfigobjectThe 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. (id: ManagedZoneForwardingConfig)
kindstring (default: dns#managedZone)
labelsobjectUser labels.
nameServerSetstringOptionally 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.
nameServersarrayDelegate your managed_zone to these virtual name servers; defined by the server (output only)
peeringConfigobjectThe presence of this field indicates that DNS Peering is enabled for this zone. The value of this field contains the network to peer with. (id: ManagedZonePeeringConfig)
privateVisibilityConfigobjectFor privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. (id: ManagedZonePrivateVisibilityConfig)
reverseLookupConfigobjectThe 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. (id: ManagedZoneReverseLookupConfig)
serviceDirectoryConfigobjectThis field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones. (id: ManagedZoneServiceDirectoryConfig)
visibilitystringThe zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectproject, managedZoneclientOperationIdFetches the representation of an existing ManagedZone.
listselectprojectmaxResults, pageToken, dnsNameEnumerates ManagedZones that have been created but not yet deleted.
createinsertprojectclientOperationIdCreates a new ManagedZone.
patchupdateproject, managedZoneclientOperationIdApplies a partial update to an existing ManagedZone.
updatereplaceproject, managedZoneclientOperationIdUpdates an existing ManagedZone.
deletedeleteproject, managedZoneclientOperationIdDeletes a previously created ManagedZone.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
managedZonestring
projectstring
clientOperationIdstring
dnsNamestring
maxResultsinteger (int32)
pageTokenstring

SELECT examples

Fetches the representation of an existing ManagedZone.

SELECT
id,
name,
cloudLoggingConfig,
creationTime,
description,
dnsName,
dnssecConfig,
forwardingConfig,
kind,
labels,
nameServerSet,
nameServers,
peeringConfig,
privateVisibilityConfig,
reverseLookupConfig,
serviceDirectoryConfig,
visibility
FROM google.dns.managed_zones
WHERE project = '{{ project }}' -- required
AND managedZone = '{{ managedZone }}' -- required
AND clientOperationId = '{{ clientOperationId }}';

INSERT examples

Creates a new ManagedZone.

INSERT INTO google.dns.managed_zones (
data__name,
data__dnsName,
data__description,
data__id,
data__nameServers,
data__creationTime,
data__dnssecConfig,
data__nameServerSet,
data__visibility,
data__privateVisibilityConfig,
data__forwardingConfig,
data__labels,
data__peeringConfig,
data__reverseLookupConfig,
data__serviceDirectoryConfig,
data__cloudLoggingConfig,
data__kind,
project,
clientOperationId
)
SELECT
'{{ name }}',
'{{ dnsName }}',
'{{ description }}',
'{{ id }}',
'{{ nameServers }}',
'{{ creationTime }}',
'{{ dnssecConfig }}',
'{{ nameServerSet }}',
'{{ visibility }}',
'{{ privateVisibilityConfig }}',
'{{ forwardingConfig }}',
'{{ labels }}',
'{{ peeringConfig }}',
'{{ reverseLookupConfig }}',
'{{ serviceDirectoryConfig }}',
'{{ cloudLoggingConfig }}',
'{{ kind }}',
'{{ project }}',
'{{ clientOperationId }}'
RETURNING
id,
name,
cloudLoggingConfig,
creationTime,
description,
dnsName,
dnssecConfig,
forwardingConfig,
kind,
labels,
nameServerSet,
nameServers,
peeringConfig,
privateVisibilityConfig,
reverseLookupConfig,
serviceDirectoryConfig,
visibility
;

UPDATE examples

Applies a partial update to an existing ManagedZone.

UPDATE google.dns.managed_zones
SET
data__name = '{{ name }}',
data__dnsName = '{{ dnsName }}',
data__description = '{{ description }}',
data__id = '{{ id }}',
data__nameServers = '{{ nameServers }}',
data__creationTime = '{{ creationTime }}',
data__dnssecConfig = '{{ dnssecConfig }}',
data__nameServerSet = '{{ nameServerSet }}',
data__visibility = '{{ visibility }}',
data__privateVisibilityConfig = '{{ privateVisibilityConfig }}',
data__forwardingConfig = '{{ forwardingConfig }}',
data__labels = '{{ labels }}',
data__peeringConfig = '{{ peeringConfig }}',
data__reverseLookupConfig = '{{ reverseLookupConfig }}',
data__serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
data__cloudLoggingConfig = '{{ cloudLoggingConfig }}',
data__kind = '{{ kind }}'
WHERE
project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
id,
dnsKeyContext,
kind,
startTime,
status,
type,
user,
zoneContext;

REPLACE examples

Updates an existing ManagedZone.

REPLACE google.dns.managed_zones
SET
data__name = '{{ name }}',
data__dnsName = '{{ dnsName }}',
data__description = '{{ description }}',
data__id = '{{ id }}',
data__nameServers = '{{ nameServers }}',
data__creationTime = '{{ creationTime }}',
data__dnssecConfig = '{{ dnssecConfig }}',
data__nameServerSet = '{{ nameServerSet }}',
data__visibility = '{{ visibility }}',
data__privateVisibilityConfig = '{{ privateVisibilityConfig }}',
data__forwardingConfig = '{{ forwardingConfig }}',
data__labels = '{{ labels }}',
data__peeringConfig = '{{ peeringConfig }}',
data__reverseLookupConfig = '{{ reverseLookupConfig }}',
data__serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
data__cloudLoggingConfig = '{{ cloudLoggingConfig }}',
data__kind = '{{ kind }}'
WHERE
project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
id,
dnsKeyContext,
kind,
startTime,
status,
type,
user,
zoneContext;

DELETE examples

Deletes a previously created ManagedZone.

DELETE FROM google.dns.managed_zones
WHERE project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId }}';