Skip to main content

dns_peerings

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

Overview

Namedns_peerings
TypeResource
Idgoogle.datafusion.dns_peerings

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the dns peering zone. Format: projects/{project}/locations/{location}/instances/{instance}/dnsPeerings/{dns_peering}
descriptionstringOptional. Optional description of the dns zone.
domainstringRequired. The dns name suffix of the zone.
targetNetworkstringOptional. Optional target network to which dns peering should happen.
targetProjectstringOptional. Optional target project to which dns peering should happen.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectprojectsId, locationsId, instancesIdpageSize, pageTokenLists DNS peerings for a given resource.
createinsertprojectsId, locationsId, instancesIddnsPeeringIdCreates DNS peering on the given resource.
deletedeleteprojectsId, locationsId, instancesId, dnsPeeringsIdDeletes DNS peering on the given resource.

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
dnsPeeringsIdstring
instancesIdstring
locationsIdstring
projectsIdstring
dnsPeeringIdstring
pageSizeinteger (int32)
pageTokenstring

SELECT examples

Lists DNS peerings for a given resource.

SELECT
name,
description,
domain,
targetNetwork,
targetProject
FROM google.datafusion.dns_peerings
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND instancesId = '{{ instancesId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';

INSERT examples

Creates DNS peering on the given resource.

INSERT INTO google.datafusion.dns_peerings (
data__name,
data__domain,
data__description,
data__targetProject,
data__targetNetwork,
projectsId,
locationsId,
instancesId,
dnsPeeringId
)
SELECT
'{{ name }}',
'{{ domain }}',
'{{ description }}',
'{{ targetProject }}',
'{{ targetNetwork }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ instancesId }}',
'{{ dnsPeeringId }}'
RETURNING
name,
description,
domain,
targetNetwork,
targetProject
;

DELETE examples

Deletes DNS peering on the given resource.

DELETE FROM google.datafusion.dns_peerings
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND instancesId = '{{ instancesId }}' --required
AND dnsPeeringsId = '{{ dnsPeeringsId }}' --required;