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
Successful response
Name | Datatype | Description |
---|---|---|
behavior | string | Answer this query with a behavior rather than DNS data. |
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. |
Successful response
Name | Datatype | Description |
---|---|---|
behavior | string | Answer this query with a behavior rather than DNS data. |
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__ruleName,
data__dnsName,
data__localData,
data__behavior,
data__kind,
project,
responsePolicy,
clientOperationId
)
SELECT
'{{ ruleName }}',
'{{ dnsName }}',
'{{ localData }}',
'{{ behavior }}',
'{{ kind }}',
'{{ project }}',
'{{ responsePolicy }}',
'{{ clientOperationId }}'
RETURNING
behavior,
dnsName,
kind,
localData,
ruleName
;
# Description fields are for documentation purposes
- name: response_policy_rules
props:
- name: project
value: string
description: Required parameter for the response_policy_rules resource.
- name: responsePolicy
value: string
description: Required parameter for the response_policy_rules resource.
- name: ruleName
value: string
description: >
An identifier for this rule. Must be unique with the ResponsePolicy.
- name: dnsName
value: string
description: >
The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule.
- name: localData
value: object
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.
- name: behavior
value: string
description: >
Answer this query with a behavior rather than DNS data.
valid_values: ['behaviorUnspecified', 'bypassResponsePolicy']
- name: kind
value: string
default: dns#responsePolicyRule
- name: clientOperationId
value: string
UPDATE
examples
- patch
Applies a partial update to an existing Response Policy Rule.
UPDATE google.dns.response_policy_rules
SET
data__ruleName = '{{ ruleName }}',
data__dnsName = '{{ dnsName }}',
data__localData = '{{ localData }}',
data__behavior = '{{ behavior }}',
data__kind = '{{ kind }}'
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__ruleName = '{{ ruleName }}',
data__dnsName = '{{ dnsName }}',
data__localData = '{{ localData }}',
data__behavior = '{{ behavior }}',
data__kind = '{{ kind }}'
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 }}';