Resource: ResponsePolicyRule
A Response Policy Rule is a selector that applies its behavior to queries that match the selector. Selectors are DNS names, which may be wildcards or exact matches. Each DNS query subject to a Response Policy matches at most one ResponsePolicyRule, as identified by the dnsName field with the longest matching suffix.
JSON representation |
---|
{ "ruleName": string, "kind": string, // Union field |
Fields | |
---|---|
ruleName |
An identifier for this rule. Must be unique with the ResponsePolicy. |
kind |
|
Union field
|
|
dnsName |
The DNS name (wildcard or exact) to apply this rule to. Must be unique within the Response Policy Rule. |
Union field
|
|
localData |
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. |
behavior |
Answer this query with a behavior rather than DNS data. |
LocalData
JSON representation |
---|
{
"localDatas": [
{
object ( |
Fields | |
---|---|
localDatas[] |
All resource record sets for this selector, one per resource record type. The name must match the dnsName. |
Behavior
Enums | |
---|---|
behaviorUnspecified |
|
bypassResponsePolicy |
Skip a less-specific Response Policy Rule and let the query logic continue. This mechanism, when used with wildcard selectors, lets you exempt specific subdomains from a broader Response Policy Rule and direct the queries to the public internet instead. For example, if the following rules exist:
A query for foo.example.com skips the wildcard rule. This functionality also facilitates allowlisting. Response Policy Zones (RPZs) can be applied at multiple levels within the hierarchy: for example, an organization, a folder, a project, or a VPC network. If an RPZ rule is applied at a higher level, adding a |
Methods |
|
---|---|
|
Creates a new Response Policy Rule. |
|
Deletes a previously created Response Policy Rule. |
|
Fetches the representation of an existing Response Policy Rule. |
|
Enumerates all Response Policy Rules associated with a project. |
|
Applies a partial update to an existing Response Policy Rule. |
|
Updates an existing Response Policy Rule. |