response_policy_rules
Creates, updates, deletes, gets or lists a response_policy_rules resource.
Overview
| Name | response_policy_rules |
| Type | Resource |
| Id | google.dns.response_policy_rules |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
behavior | string | Answer this query with a behavior rather than DNS data. (behaviorUnspecified, bypassResponsePolicy) |
dnsName | string | The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule. |
kind | string | (default: dns#responsePolicyRule) |
localData | object | Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. (id: ResponsePolicyRuleLocalData) |
ruleName | string | An identifier for this rule. Must be unique with the ResponsePolicy. |
| Name | Datatype | Description |
|---|---|---|
behavior | string | Answer this query with a behavior rather than DNS data. (behaviorUnspecified, bypassResponsePolicy) |
dnsName | string | The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule. |
kind | string | (default: dns#responsePolicyRule) |
localData | object | Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed. (id: ResponsePolicyRuleLocalData) |
ruleName | string | An identifier for this rule. Must be unique with the ResponsePolicy. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | project, responsePolicy, responsePolicyRule | clientOperationId | Fetches the representation of an existing Response Policy Rule. |
list | select | project, responsePolicy | maxResults, pageToken | Enumerates all Response Policy Rules associated with a project. |
create | insert | project, responsePolicy | clientOperationId | Creates a new Response Policy Rule. |
patch | update | project, responsePolicy, responsePolicyRule | clientOperationId | Applies a partial update to an existing Response Policy Rule. |
update | replace | project, responsePolicy, responsePolicyRule | clientOperationId | Updates an existing Response Policy Rule. |
delete | delete | project, responsePolicy, responsePolicyRule | clientOperationId | Deletes a previously created Response Policy Rule. |
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 |
|---|---|---|
project | string | |
responsePolicy | string | |
responsePolicyRule | string | |
clientOperationId | string | |
maxResults | integer (int32) | |
pageToken | string |
SELECT examples
- get
- list
Fetches the representation of an existing Response Policy Rule.
SELECT
behavior,
dnsName,
kind,
localData,
ruleName
FROM google.dns.response_policy_rules
WHERE project = '{{ project }}' -- required
AND responsePolicy = '{{ responsePolicy }}' -- required
AND responsePolicyRule = '{{ responsePolicyRule }}' -- required
AND clientOperationId = '{{ clientOperationId }}'
;
Enumerates all Response Policy Rules associated with a project.
SELECT
behavior,
dnsName,
kind,
localData,
ruleName
FROM google.dns.response_policy_rules
WHERE project = '{{ project }}' -- required
AND responsePolicy = '{{ responsePolicy }}' -- required
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}'
;
INSERT examples
- create
- Manifest
Creates a new Response Policy Rule.
INSERT INTO google.dns.response_policy_rules (
data__behavior,
data__kind,
data__ruleName,
data__dnsName,
data__localData,
project,
responsePolicy,
clientOperationId
)
SELECT
'{{ behavior }}',
'{{ kind }}',
'{{ ruleName }}',
'{{ dnsName }}',
'{{ localData }}',
'{{ project }}',
'{{ responsePolicy }}',
'{{ clientOperationId }}'
RETURNING
behavior,
dnsName,
kind,
localData,
ruleName
;
# Description fields are for documentation purposes
- name: response_policy_rules
props:
- name: project
value: "{{ project }}"
description: Required parameter for the response_policy_rules resource.
- name: responsePolicy
value: "{{ responsePolicy }}"
description: Required parameter for the response_policy_rules resource.
- name: behavior
value: "{{ behavior }}"
description: |
Answer this query with a behavior rather than DNS data.
valid_values: ['behaviorUnspecified', 'bypassResponsePolicy']
- name: kind
value: "{{ kind }}"
default: dns#responsePolicyRule
- name: ruleName
value: "{{ ruleName }}"
description: |
An identifier for this rule. Must be unique with the ResponsePolicy.
- name: dnsName
value: "{{ dnsName }}"
description: |
The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
- name: localData
description: |
Answer this query directly with DNS data. These ResourceRecordSets override any other DNS behavior for the matched name; in particular they override private zones, the public internet, and GCP internal DNS. No SOA nor NS types are allowed.
value:
localDatas:
- routingPolicy:
geo:
enableFencing: {{ enableFencing }}
kind: "{{ kind }}"
items:
- kind: "{{ kind }}"
location: "{{ location }}"
rrdatas: "{{ rrdatas }}"
signatureRrdatas: "{{ signatureRrdatas }}"
healthCheckedTargets:
internalLoadBalancers: "{{ internalLoadBalancers }}"
externalEndpoints: "{{ externalEndpoints }}"
primaryBackup:
primaryTargets:
internalLoadBalancers: "{{ internalLoadBalancers }}"
externalEndpoints: "{{ externalEndpoints }}"
kind: "{{ kind }}"
trickleTraffic: {{ trickleTraffic }}
backupGeoTargets:
enableFencing: {{ enableFencing }}
kind: "{{ kind }}"
items: "{{ items }}"
healthCheck: "{{ healthCheck }}"
kind: "{{ kind }}"
wrr:
items:
- weight: {{ weight }}
kind: "{{ kind }}"
rrdatas: "{{ rrdatas }}"
signatureRrdatas: "{{ signatureRrdatas }}"
healthCheckedTargets:
internalLoadBalancers: "{{ internalLoadBalancers }}"
externalEndpoints: "{{ externalEndpoints }}"
kind: "{{ kind }}"
kind: "{{ kind }}"
ttl: {{ ttl }}
rrdatas: "{{ rrdatas }}"
signatureRrdatas: "{{ signatureRrdatas }}"
type: "{{ type }}"
name: "{{ name }}"
- name: clientOperationId
value: "{{ clientOperationId }}"
UPDATE examples
- patch
Applies a partial update to an existing Response Policy Rule.
UPDATE google.dns.response_policy_rules
SET
data__behavior = '{{ behavior }}',
data__kind = '{{ kind }}',
data__ruleName = '{{ ruleName }}',
data__dnsName = '{{ dnsName }}',
data__localData = '{{ localData }}'
WHERE
project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND responsePolicyRule = '{{ responsePolicyRule }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
responsePolicyRule;
REPLACE examples
- update
Updates an existing Response Policy Rule.
REPLACE google.dns.response_policy_rules
SET
data__behavior = '{{ behavior }}',
data__kind = '{{ kind }}',
data__ruleName = '{{ ruleName }}',
data__dnsName = '{{ dnsName }}',
data__localData = '{{ localData }}'
WHERE
project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND responsePolicyRule = '{{ responsePolicyRule }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
responsePolicyRule;
DELETE examples
- delete
Deletes a previously created Response Policy Rule.
DELETE FROM google.dns.response_policy_rules
WHERE project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND responsePolicyRule = '{{ responsePolicyRule }}' --required
AND clientOperationId = '{{ clientOperationId }}'
;