response_policies
Creates, updates, deletes, gets or lists a response_policies
resource.
Overview
Name | response_policies |
Type | Resource |
Id | google.dns.response_policies |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
id | string (int64) | Unique identifier for the resource; defined by the server (output only). |
description | string | User-provided description for this Response Policy. |
gkeClusters | array | The list of Google Kubernetes Engine clusters to which this response policy is applied. |
kind | string | (default: dns#responsePolicy) |
labels | object | User labels. |
networks | array | List of network names specifying networks to which this policy is applied. |
responsePolicyName | string | User assigned name for this Response Policy. |
Successful response
Name | Datatype | Description |
---|---|---|
id | string (int64) | Unique identifier for the resource; defined by the server (output only). |
description | string | User-provided description for this Response Policy. |
gkeClusters | array | The list of Google Kubernetes Engine clusters to which this response policy is applied. |
kind | string | (default: dns#responsePolicy) |
labels | object | User labels. |
networks | array | List of network names specifying networks to which this policy is applied. |
responsePolicyName | string | User assigned name for this Response Policy. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | project , responsePolicy | clientOperationId | Fetches the representation of an existing Response Policy. |
list | select | project | maxResults , pageToken | Enumerates all Response Policies associated with a project. |
create | insert | project | clientOperationId | Creates a new Response Policy |
patch | update | project , responsePolicy | clientOperationId | Applies a partial update to an existing Response Policy. |
update | replace | project , responsePolicy | clientOperationId | Updates an existing Response Policy. |
delete | delete | project , responsePolicy | clientOperationId | Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network. |
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 | |
clientOperationId | string | |
maxResults | integer (int32) | |
pageToken | string |
SELECT
examples
- get
- list
Fetches the representation of an existing Response Policy.
SELECT
id,
description,
gkeClusters,
kind,
labels,
networks,
responsePolicyName
FROM google.dns.response_policies
WHERE project = '{{ project }}' -- required
AND responsePolicy = '{{ responsePolicy }}' -- required
AND clientOperationId = '{{ clientOperationId }}';
Enumerates all Response Policies associated with a project.
SELECT
id,
description,
gkeClusters,
kind,
labels,
networks,
responsePolicyName
FROM google.dns.response_policies
WHERE project = '{{ project }}' -- required
AND maxResults = '{{ maxResults }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a new Response Policy
INSERT INTO google.dns.response_policies (
data__id,
data__responsePolicyName,
data__description,
data__networks,
data__gkeClusters,
data__labels,
data__kind,
project,
clientOperationId
)
SELECT
'{{ id }}',
'{{ responsePolicyName }}',
'{{ description }}',
'{{ networks }}',
'{{ gkeClusters }}',
'{{ labels }}',
'{{ kind }}',
'{{ project }}',
'{{ clientOperationId }}'
RETURNING
id,
description,
gkeClusters,
kind,
labels,
networks,
responsePolicyName
;
# Description fields are for documentation purposes
- name: response_policies
props:
- name: project
value: string
description: Required parameter for the response_policies resource.
- name: id
value: string
description: >
Unique identifier for the resource; defined by the server (output only).
- name: responsePolicyName
value: string
description: >
User assigned name for this Response Policy.
- name: description
value: string
description: >
User-provided description for this Response Policy.
- name: networks
value: array
description: >
List of network names specifying networks to which this policy is applied.
- name: gkeClusters
value: array
description: >
The list of Google Kubernetes Engine clusters to which this response policy is applied.
- name: labels
value: object
description: >
User labels.
- name: kind
value: string
default: dns#responsePolicy
- name: clientOperationId
value: string
UPDATE
examples
- patch
Applies a partial update to an existing Response Policy.
UPDATE google.dns.response_policies
SET
data__id = '{{ id }}',
data__responsePolicyName = '{{ responsePolicyName }}',
data__description = '{{ description }}',
data__networks = '{{ networks }}',
data__gkeClusters = '{{ gkeClusters }}',
data__labels = '{{ labels }}',
data__kind = '{{ kind }}'
WHERE
project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
responsePolicy;
REPLACE
examples
- update
Updates an existing Response Policy.
REPLACE google.dns.response_policies
SET
data__id = '{{ id }}',
data__responsePolicyName = '{{ responsePolicyName }}',
data__description = '{{ description }}',
data__networks = '{{ networks }}',
data__gkeClusters = '{{ gkeClusters }}',
data__labels = '{{ labels }}',
data__kind = '{{ kind }}'
WHERE
project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND clientOperationId = '{{ clientOperationId}}'
RETURNING
responsePolicy;
DELETE
examples
- delete
Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network.
DELETE FROM google.dns.response_policies
WHERE project = '{{ project }}' --required
AND responsePolicy = '{{ responsePolicy }}' --required
AND clientOperationId = '{{ clientOperationId }}';