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

NameDatatypeDescription
idstringUnique 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.
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.
cloudLoggingConfigobjectCloud Logging configurations for publicly visible zones.
creationTimestringThe time that this resource was created on the server. This is in RFC3339 text format. Output only.
dnsNamestringThe DNS name of this managed zone, for instance "example.com.".
dnssecConfigobject
forwardingConfigobject
kindstring
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)
peeringConfigobject
privateVisibilityConfigobject
reverseLookupConfigobject
serviceDirectoryConfigobjectContains information about Service Directory-backed zones.
visibilitystringThe zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.

Methods

NameAccessible byRequired ParamsDescription
getSELECTmanagedZone, projectFetches the representation of an existing ManagedZone.
listSELECTprojectEnumerates ManagedZones that have been created but not yet deleted.
createINSERTprojectCreates a new ManagedZone.
deleteDELETEmanagedZone, projectDeletes a previously created ManagedZone.
patchUPDATEmanagedZone, projectApplies a partial update to an existing ManagedZone.
updateREPLACEmanagedZone, projectUpdates an existing ManagedZone.

SELECT examples

Enumerates ManagedZones that have been created but not yet deleted.

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

INSERT example

Use the following StackQL query and manifest file to create a new managed_zones resource.

/*+ create */
INSERT INTO google.dns.managed_zones (
project,
name,
dnsName,
description,
nameServers,
creationTime,
dnssecConfig,
nameServerSet,
visibility,
privateVisibilityConfig,
forwardingConfig,
labels,
peeringConfig,
reverseLookupConfig,
serviceDirectoryConfig,
cloudLoggingConfig
)
SELECT
'{{ project }}',
'{{ name }}',
'{{ dnsName }}',
'{{ description }}',
'{{ nameServers }}',
'{{ creationTime }}',
'{{ dnssecConfig }}',
'{{ nameServerSet }}',
'{{ visibility }}',
'{{ privateVisibilityConfig }}',
'{{ forwardingConfig }}',
'{{ labels }}',
'{{ peeringConfig }}',
'{{ reverseLookupConfig }}',
'{{ serviceDirectoryConfig }}',
'{{ cloudLoggingConfig }}'
;

UPDATE example

Updates a managed_zones resource.

/*+ update */
UPDATE google.dns.managed_zones
SET
name = '{{ name }}',
dnsName = '{{ dnsName }}',
description = '{{ description }}',
nameServers = '{{ nameServers }}',
creationTime = '{{ creationTime }}',
dnssecConfig = '{{ dnssecConfig }}',
nameServerSet = '{{ nameServerSet }}',
visibility = '{{ visibility }}',
privateVisibilityConfig = '{{ privateVisibilityConfig }}',
forwardingConfig = '{{ forwardingConfig }}',
labels = '{{ labels }}',
peeringConfig = '{{ peeringConfig }}',
reverseLookupConfig = '{{ reverseLookupConfig }}',
serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
cloudLoggingConfig = '{{ cloudLoggingConfig }}'
WHERE
managedZone = '{{ managedZone }}'
AND project = '{{ project }}';

REPLACE example

Replaces all fields in the specified managed_zones resource.

/*+ update */
REPLACE google.dns.managed_zones
SET
name = '{{ name }}',
dnsName = '{{ dnsName }}',
description = '{{ description }}',
nameServers = '{{ nameServers }}',
creationTime = '{{ creationTime }}',
dnssecConfig = '{{ dnssecConfig }}',
nameServerSet = '{{ nameServerSet }}',
visibility = '{{ visibility }}',
privateVisibilityConfig = '{{ privateVisibilityConfig }}',
forwardingConfig = '{{ forwardingConfig }}',
labels = '{{ labels }}',
peeringConfig = '{{ peeringConfig }}',
reverseLookupConfig = '{{ reverseLookupConfig }}',
serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
cloudLoggingConfig = '{{ cloudLoggingConfig }}'
WHERE
managedZone = '{{ managedZone }}'
AND project = '{{ project }}';

DELETE example

Deletes the specified managed_zones resource.

/*+ delete */
DELETE FROM google.dns.managed_zones
WHERE managedZone = '{{ managedZone }}'
AND project = '{{ project }}';