dns_zones
Creates, updates, deletes, gets or lists a dns_zones
resource.
Overview
Name | dns_zones |
Type | Resource |
Id | google.servicenetworking.dns_zones |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
consumerPeeringZone | object | The DNS peering zone created in the consumer project. (id: DnsZone) |
producerPrivateZone | object | The private DNS zone created in the shared producer host project. (id: DnsZone) |
Successful response
Name | Datatype | Description |
---|---|---|
dnsZonePairs | array | All pairs of private DNS zones in the shared producer host project and the matching peering zones in the consumer project.. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | servicesId , projectsId , networksId , dnsZonesId | Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project | |
list | select | servicesId , projectsId , networksId | * Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. * | |
add | insert | servicesId | Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project. | |
remove | delete | servicesId | Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project. |
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 |
---|---|---|
dnsZonesId | string | |
networksId | string | |
projectsId | string | |
servicesId | string |
SELECT
examples
- get
- list
Service producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project
SELECT
consumerPeeringZone,
producerPrivateZone
FROM google.servicenetworking.dns_zones
WHERE servicesId = '{{ servicesId }}' -- required
AND projectsId = '{{ projectsId }}' -- required
AND networksId = '{{ networksId }}' -- required
AND dnsZonesId = '{{ dnsZonesId }}' -- required;
- Service producers can use this method to retrieve a list of available DNS zones in the shared producer host project and the matching peering zones in the consumer project. *
SELECT
dnsZonePairs
FROM google.servicenetworking.dns_zones
WHERE servicesId = '{{ servicesId }}' -- required
AND projectsId = '{{ projectsId }}' -- required
AND networksId = '{{ networksId }}' -- required;
INSERT
examples
- add
- Manifest
Service producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.
INSERT INTO google.servicenetworking.dns_zones (
data__consumerNetwork,
data__name,
data__dnsSuffix,
servicesId
)
SELECT
'{{ consumerNetwork }}',
'{{ name }}',
'{{ dnsSuffix }}',
'{{ servicesId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: dns_zones
props:
- name: servicesId
value: string
description: Required parameter for the dns_zones resource.
- name: consumerNetwork
value: string
description: >
Required. The network that the consumer is using to connect with services. Must be in the form of projects/{project}/global/networks/{network} {project} is the project number, as in '12345' {network} is the network name.
- name: name
value: string
description: >
Required. The name for both the private zone in the shared producer host project and the peering zone in the consumer project. Must be unique within both projects. 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: dnsSuffix
value: string
description: >
Required. The DNS name suffix for the zones e.g. `example.com.`. Cloud DNS requires that a DNS suffix ends with a trailing dot.
DELETE
examples
- remove
Service producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.
DELETE FROM google.servicenetworking.dns_zones
WHERE servicesId = '{{ servicesId }}' --required;