Skip to main content

dns_zones

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

Overview

Namedns_zones
TypeResource
Idgoogle.servicenetworking.dns_zones

Fields

NameDatatypeDescription
consumerPeeringZoneobjectRepresents a DNS zone resource.
producerPrivateZoneobjectRepresents a DNS zone resource.

Methods

NameAccessible byRequired ParamsDescription
getSELECTdnsZonesId, networksId, projectsId, servicesIdService producers can use this method to retrieve a DNS zone in the shared producer host project and the matching peering zones in consumer project
listSELECTnetworksId, projectsId, servicesId 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.
addINSERTservicesIdService producers can use this method to add private DNS zones in the shared producer host project and matching peering zones in the consumer project.
removeDELETEservicesIdService producers can use this method to remove private DNS zones in the shared producer host project and matching peering zones in the consumer project.

SELECT examples

  • 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
consumerPeeringZone,
producerPrivateZone
FROM google.servicenetworking.dns_zones
WHERE networksId = '{{ networksId }}'
AND projectsId = '{{ projectsId }}'
AND servicesId = '{{ servicesId }}';

INSERT example

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

/*+ create */
INSERT INTO google.servicenetworking.dns_zones (
servicesId,
name,
dnsSuffix,
consumerNetwork
)
SELECT
'{{ servicesId }}',
'{{ name }}',
'{{ dnsSuffix }}',
'{{ consumerNetwork }}'
;

DELETE example

Deletes the specified dns_zones resource.

/*+ delete */
DELETE FROM google.servicenetworking.dns_zones
WHERE servicesId = '{{ servicesId }}';