response_policies
Creates, updates, deletes, gets or lists a response_policies
resource.
Overview
Name | response_policies |
Type | Resource |
Id | google.dns.response_policies |
Fields
Name | Datatype | Description |
---|---|---|
id | string | 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 | |
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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | project, responsePolicy | Fetches the representation of an existing Response Policy. |
list | SELECT | project | Enumerates all Response Policies associated with a project. |
create | INSERT | project | Creates a new Response Policy |
delete | DELETE | project, responsePolicy | Deletes a previously created Response Policy. Fails if the response policy is non-empty or still being referenced by a network. |
patch | UPDATE | project, responsePolicy | Applies a partial update to an existing Response Policy. |
update | REPLACE | project, responsePolicy | Updates an existing Response Policy. |
SELECT
examples
Enumerates all Response Policies associated with a project.
SELECT
id,
description,
gkeClusters,
kind,
labels,
networks,
responsePolicyName
FROM google.dns.response_policies
WHERE project = '{{ project }}';
INSERT
example
Use the following StackQL query and manifest file to create a new response_policies
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.dns.response_policies (
project,
responsePolicyName,
description,
networks,
gkeClusters,
labels
)
SELECT
'{{ project }}',
'{{ responsePolicyName }}',
'{{ description }}',
'{{ networks }}',
'{{ gkeClusters }}',
'{{ labels }}'
;
- name: your_resource_model_name
props:
- name: id
value: string
- name: responsePolicyName
value: string
- name: description
value: string
- name: networks
value:
- - name: networkUrl
value: string
- name: kind
value: string
- name: gkeClusters
value:
- - name: gkeClusterName
value: string
- name: kind
value: string
- name: labels
value: object
- name: kind
value: string
UPDATE
example
Updates a response_policies
resource.
/*+ update */
UPDATE google.dns.response_policies
SET
responsePolicyName = '{{ responsePolicyName }}',
description = '{{ description }}',
networks = '{{ networks }}',
gkeClusters = '{{ gkeClusters }}',
labels = '{{ labels }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';
REPLACE
example
Replaces all fields in the specified response_policies
resource.
/*+ update */
REPLACE google.dns.response_policies
SET
responsePolicyName = '{{ responsePolicyName }}',
description = '{{ description }}',
networks = '{{ networks }}',
gkeClusters = '{{ gkeClusters }}',
labels = '{{ labels }}'
WHERE
project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';
DELETE
example
Deletes the specified response_policies
resource.
/*+ delete */
DELETE FROM google.dns.response_policies
WHERE project = '{{ project }}'
AND responsePolicy = '{{ responsePolicy }}';