managed_zones
Creates, updates, deletes, gets or lists a managed_zones resource.
Overview
| Name | managed_zones |
| Type | Resource |
| Id | google.dns.managed_zones |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | Unique identifier for the resource; defined by the server (output only) |
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. |
cloudLoggingConfig | object | Cloud Logging configurations for publicly visible zones. (id: 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 | object | DNSSEC configuration. (id: ManagedZoneDnsSecConfig) |
forwardingConfig | 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. (id: ManagedZoneForwardingConfig) |
kind | string | (default: dns#managedZone) |
labels | object | User labels. |
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 | array | Delegate your managed_zone to these virtual name servers; defined by the server (output only) |
peeringConfig | 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. (id: ManagedZonePeeringConfig) |
privateVisibilityConfig | object | For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. (id: ManagedZonePrivateVisibilityConfig) |
reverseLookupConfig | 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. (id: ManagedZoneReverseLookupConfig) |
serviceDirectoryConfig | object | This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones. (id: ManagedZoneServiceDirectoryConfig) |
visibility | string | The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. (public, private) |
| Name | Datatype | Description |
|---|---|---|
id | string (uint64) | Unique identifier for the resource; defined by the server (output only) |
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. |
cloudLoggingConfig | object | Cloud Logging configurations for publicly visible zones. (id: 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 | object | DNSSEC configuration. (id: ManagedZoneDnsSecConfig) |
forwardingConfig | 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. (id: ManagedZoneForwardingConfig) |
kind | string | (default: dns#managedZone) |
labels | object | User labels. |
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 | array | Delegate your managed_zone to these virtual name servers; defined by the server (output only) |
peeringConfig | 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. (id: ManagedZonePeeringConfig) |
privateVisibilityConfig | object | For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from. (id: ManagedZonePrivateVisibilityConfig) |
reverseLookupConfig | 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. (id: ManagedZoneReverseLookupConfig) |
serviceDirectoryConfig | object | This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones. (id: ManagedZoneServiceDirectoryConfig) |
visibility | string | The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources. (public, private) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, managedZone | clientOperationId | Fetches the representation of an existing ManagedZone. |
list | select | project | maxResults, pageToken, dnsName | Enumerates ManagedZones that have been created but not yet deleted. |
create | insert | project | clientOperationId | Creates a new ManagedZone. Note: While dns.managedZones.create is the baseline permission required to invoke this method, additional permissions are required if the managed zone configuration references other resources. |
patch | update | project, managedZone | clientOperationId | Applies a partial update to an existing ManagedZone. |
update | replace | project, managedZone | clientOperationId | Updates an existing ManagedZone. |
delete | delete | project, managedZone | clientOperationId | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
managedZone | string | |
project | string | |
clientOperationId | string | |
dnsName | string | |
maxResults | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
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 }}'
;
Enumerates ManagedZones that have been created but not yet deleted.
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 maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
AND dnsName = '{{ dnsName }}'
;
INSERT examples
- create
- Manifest
Creates a new ManagedZone. Note: While dns.managedZones.create is the baseline permission required to invoke this method, additional permissions are required if the managed zone configuration references other resources.
INSERT INTO google.dns.managed_zones (
data__nameServerSet,
data__dnsName,
data__forwardingConfig,
data__serviceDirectoryConfig,
data__privateVisibilityConfig,
data__cloudLoggingConfig,
data__nameServers,
data__description,
data__peeringConfig,
data__kind,
data__id,
data__dnssecConfig,
data__labels,
data__name,
data__visibility,
data__creationTime,
data__reverseLookupConfig,
project,
clientOperationId
)
SELECT
'{{ nameServerSet }}',
'{{ dnsName }}',
'{{ forwardingConfig }}',
'{{ serviceDirectoryConfig }}',
'{{ privateVisibilityConfig }}',
'{{ cloudLoggingConfig }}',
'{{ nameServers }}',
'{{ description }}',
'{{ peeringConfig }}',
'{{ kind }}',
'{{ id }}',
'{{ dnssecConfig }}',
'{{ labels }}',
'{{ name }}',
'{{ visibility }}',
'{{ creationTime }}',
'{{ reverseLookupConfig }}',
'{{ project }}',
'{{ clientOperationId }}'
RETURNING
id,
name,
cloudLoggingConfig,
creationTime,
description,
dnsName,
dnssecConfig,
forwardingConfig,
kind,
labels,
nameServerSet,
nameServers,
peeringConfig,
privateVisibilityConfig,
reverseLookupConfig,
serviceDirectoryConfig,
visibility
;
# Description fields are for documentation purposes
- name: managed_zones
props:
- name: project
value: "{{ project }}"
description: Required parameter for the managed_zones resource.
- name: nameServerSet
value: "{{ nameServerSet }}"
description: |
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.
- name: dnsName
value: "{{ dnsName }}"
description: |
The DNS name of this managed zone, for instance "example.com.".
- name: forwardingConfig
description: |
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.
value:
targetNameServers:
- kind: "{{ kind }}"
ipv4Address: "{{ ipv4Address }}"
forwardingPath: "{{ forwardingPath }}"
ipv6Address: "{{ ipv6Address }}"
domainName: "{{ domainName }}"
kind: "{{ kind }}"
- name: serviceDirectoryConfig
description: |
This field links to the associated service directory namespace. Do not set this field for public zones or forwarding zones.
value:
namespace:
namespaceUrl: "{{ namespaceUrl }}"
deletionTime: "{{ deletionTime }}"
kind: "{{ kind }}"
kind: "{{ kind }}"
- name: privateVisibilityConfig
description: |
For privately visible zones, the set of Virtual Private Cloud resources that the zone is visible from.
value:
gkeClusters:
- kind: "{{ kind }}"
gkeClusterName: "{{ gkeClusterName }}"
networks:
- networkUrl: "{{ networkUrl }}"
kind: "{{ kind }}"
kind: "{{ kind }}"
- name: cloudLoggingConfig
description: |
Cloud Logging configurations for publicly visible zones.
value:
enableLogging: {{ enableLogging }}
kind: "{{ kind }}"
- name: nameServers
value:
- "{{ nameServers }}"
description: |
Delegate your managed_zone to these virtual name servers; defined by the server (output only)
- name: description
value: "{{ description }}"
description: |
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.
- name: peeringConfig
description: |
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.
value:
targetNetwork:
kind: "{{ kind }}"
networkUrl: "{{ networkUrl }}"
deactivateTime: "{{ deactivateTime }}"
kind: "{{ kind }}"
- name: kind
value: "{{ kind }}"
default: dns#managedZone
- name: id
value: "{{ id }}"
description: |
Unique identifier for the resource; defined by the server (output only)
- name: dnssecConfig
description: |
DNSSEC configuration.
value:
defaultKeySpecs:
- keyLength: {{ keyLength }}
kind: "{{ kind }}"
keyType: "{{ keyType }}"
algorithm: "{{ algorithm }}"
kind: "{{ kind }}"
state: "{{ state }}"
nonExistence: "{{ nonExistence }}"
- name: labels
value: "{{ labels }}"
description: |
User labels.
- name: name
value: "{{ name }}"
description: |
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.
- name: visibility
value: "{{ visibility }}"
description: |
The zone's visibility: public zones are exposed to the Internet, while private zones are visible only to Virtual Private Cloud resources.
valid_values: ['public', 'private']
- name: creationTime
value: "{{ creationTime }}"
description: |
The time that this resource was created on the server. This is in RFC3339 text format. Output only.
- name: reverseLookupConfig
description: |
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.
value:
kind: "{{ kind }}"
- name: clientOperationId
value: "{{ clientOperationId }}"
UPDATE examples
- patch
Applies a partial update to an existing ManagedZone.
UPDATE google.dns.managed_zones
SET
data__nameServerSet = '{{ nameServerSet }}',
data__dnsName = '{{ dnsName }}',
data__forwardingConfig = '{{ forwardingConfig }}',
data__serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
data__privateVisibilityConfig = '{{ privateVisibilityConfig }}',
data__cloudLoggingConfig = '{{ cloudLoggingConfig }}',
data__nameServers = '{{ nameServers }}',
data__description = '{{ description }}',
data__peeringConfig = '{{ peeringConfig }}',
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__dnssecConfig = '{{ dnssecConfig }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__visibility = '{{ visibility }}',
data__creationTime = '{{ creationTime }}',
data__reverseLookupConfig = '{{ reverseLookupConfig }}'
WHERE
project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
id,
dnsKeyContext,
kind,
startTime,
status,
type,
user,
zoneContext;
REPLACE examples
- update
Updates an existing ManagedZone.
REPLACE google.dns.managed_zones
SET
data__nameServerSet = '{{ nameServerSet }}',
data__dnsName = '{{ dnsName }}',
data__forwardingConfig = '{{ forwardingConfig }}',
data__serviceDirectoryConfig = '{{ serviceDirectoryConfig }}',
data__privateVisibilityConfig = '{{ privateVisibilityConfig }}',
data__cloudLoggingConfig = '{{ cloudLoggingConfig }}',
data__nameServers = '{{ nameServers }}',
data__description = '{{ description }}',
data__peeringConfig = '{{ peeringConfig }}',
data__kind = '{{ kind }}',
data__id = '{{ id }}',
data__dnssecConfig = '{{ dnssecConfig }}',
data__labels = '{{ labels }}',
data__name = '{{ name }}',
data__visibility = '{{ visibility }}',
data__creationTime = '{{ creationTime }}',
data__reverseLookupConfig = '{{ reverseLookupConfig }}'
WHERE
project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
id,
dnsKeyContext,
kind,
startTime,
status,
type,
user,
zoneContext;
DELETE examples
- delete
Deletes a previously created ManagedZone.
DELETE FROM google.dns.managed_zones
WHERE project = '{{ project }}' --required
AND managedZone = '{{ managedZone }}' --required
AND clientOperationId = '{{ clientOperationId }}'
;