Skip to main content

response_policy_rules

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

Overview

Nameresponse_policy_rules
TypeResource
Idgoogle.dns.response_policy_rules

Fields

NameDatatypeDescription
behaviorstringAnswer this query with a behavior rather than DNS data.
dnsNamestringThe DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
kindstring
localDataobject
ruleNamestringAn identifier for this rule. Must be unique with the ResponsePolicy.

Methods

NameAccessible byRequired ParamsDescription
getSELECTproject, responsePolicy, responsePolicyRuleFetches the representation of an existing Response Policy Rule.
listSELECTproject, responsePolicyEnumerates all Response Policy Rules associated with a project.
createINSERTproject, responsePolicyCreates a new Response Policy Rule.
deleteDELETEproject, responsePolicy, responsePolicyRuleDeletes a previously created Response Policy Rule.
patchUPDATEproject, responsePolicy, responsePolicyRuleApplies a partial update to an existing Response Policy Rule.
updateREPLACEproject, responsePolicy, responsePolicyRuleUpdates an existing Response Policy Rule.

SELECT examples

Enumerates all Response Policy Rules associated with a project.

SELECT
behavior,
dnsName,
kind,
localData,
ruleName
FROM google.dns.response_policy_rules
WHERE project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';

INSERT example

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

/*+ create */
INSERT INTO google.dns.response_policy_rules (
project,
responsePolicy,
ruleName,
dnsName,
localData,
behavior
)
SELECT
'{{ project }}',
'{{ responsePolicy }}',
'{{ ruleName }}',
'{{ dnsName }}',
'{{ localData }}',
'{{ behavior }}'
;

UPDATE example

Updates a response_policy_rules resource.

/*+ update */
UPDATE google.dns.response_policy_rules
SET
ruleName = '{{ ruleName }}',
dnsName = '{{ dnsName }}',
localData = '{{ localData }}',
behavior = '{{ behavior }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}'
AND responsePolicyRule = '{{ responsePolicyRule }}';

REPLACE example

Replaces all fields in the specified response_policy_rules resource.

/*+ update */
REPLACE google.dns.response_policy_rules
SET
ruleName = '{{ ruleName }}',
dnsName = '{{ dnsName }}',
localData = '{{ localData }}',
behavior = '{{ behavior }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}'
AND responsePolicyRule = '{{ responsePolicyRule }}';

DELETE example

Deletes the specified response_policy_rules resource.

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