keys_policy
Creates, updates, deletes, gets or lists a keys_policy resource.
Overview
| Name | keys_policy |
| Type | Resource |
| Id | google.recaptchaenterprise.keys_policy |
Fields
The following fields are returned by SELECT queries:
- get_policy
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Resource name for this policy. Format: "projects/{project}/keys/{key}/policy" for a policy under a key. |
challengeRuleGroups | array | Optional. Rules to configure the behavior of reCAPTCHA for showing a challenge. Rule groups are evaluated in order. Evaluation stops when the first matching rule group is found. |
clientSettings | object | Required. Configuration for clients protected by this policy. (id: GoogleCloudRecaptchaenterpriseV1ClientSettings) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_policy | select | projectsId, keysId | Get the policy for a key. | |
update_policy | update | projectsId, keysId | updateMask | Updates the policy for a key. |
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 |
|---|---|---|
keysId | string | |
projectsId | string | |
updateMask | string (google-fieldmask) |
SELECT examples
- get_policy
Get the policy for a key.
SELECT
name,
challengeRuleGroups,
clientSettings
FROM google.recaptchaenterprise.keys_policy
WHERE projectsId = '{{ projectsId }}' -- required
AND keysId = '{{ keysId }}' -- required
;
UPDATE examples
- update_policy
Updates the policy for a key.
UPDATE google.recaptchaenterprise.keys_policy
SET
data__clientSettings = '{{ clientSettings }}',
data__name = '{{ name }}',
data__challengeRuleGroups = '{{ challengeRuleGroups }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND keysId = '{{ keysId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
challengeRuleGroups,
clientSettings;