Skip to main content

response_policies

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

Overview

Nameresponse_policies
TypeResource
Idgoogle.dns.response_policies

Fields

NameDatatypeDescription
idstringUnique identifier for the resource; defined by the server (output only).
descriptionstringUser-provided description for this Response Policy.
gkeClustersarrayThe list of Google Kubernetes Engine clusters to which this response policy is applied.
kindstring
labelsobjectUser labels.
networksarrayList of network names specifying networks to which this policy is applied.
responsePolicyNamestringUser assigned name for this Response Policy.

Methods

NameAccessible byRequired ParamsDescription
getSELECTproject, responsePolicyFetches the representation of an existing Response Policy.
listSELECTprojectEnumerates all Response Policies associated with a project.
createINSERTprojectCreates a new Response Policy
deleteDELETEproject, responsePolicyDeletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.
patchUPDATEproject, responsePolicyApplies a partial update to an existing Response Policy.
updateREPLACEproject, responsePolicyUpdates an existing Response Policy.

SELECT examples

Enumerates all Response Policies associated with a project.

SELECT
id,
description,
gkeClusters,
kind,
labels,
networks,
responsePolicyName
FROM google.dns.response_policies
WHERE project = '{{ project }}';

INSERT example

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

/*+ create */
INSERT INTO google.dns.response_policies (
project,
responsePolicyName,
description,
networks,
gkeClusters,
labels
)
SELECT
'{{ project }}',
'{{ responsePolicyName }}',
'{{ description }}',
'{{ networks }}',
'{{ gkeClusters }}',
'{{ labels }}'
;

UPDATE example

Updates a response_policies resource.

/*+ update */
UPDATE google.dns.response_policies
SET
responsePolicyName = '{{ responsePolicyName }}',
description = '{{ description }}',
networks = '{{ networks }}',
gkeClusters = '{{ gkeClusters }}',
labels = '{{ labels }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';

REPLACE example

Replaces all fields in the specified response_policies resource.

/*+ update */
REPLACE google.dns.response_policies
SET
responsePolicyName = '{{ responsePolicyName }}',
description = '{{ description }}',
networks = '{{ networks }}',
gkeClusters = '{{ gkeClusters }}',
labels = '{{ labels }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';

DELETE example

Deletes the specified response_policies resource.

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