keys
Creates, updates, deletes, gets or lists a keys
resource.
Overview
Name | keys |
Type | Resource |
Id | google.recaptchaenterprise.keys |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name for the Key in the format projects/{project}/keys/{key} . |
androidSettings | object | Settings for keys that can be used by Android apps. (id: GoogleCloudRecaptchaenterpriseV1AndroidKeySettings) |
createTime | string (google-datetime) | Output only. The timestamp corresponding to the creation of this key. |
displayName | string | Required. Human-readable display name of this key. Modifiable by user. |
expressSettings | object | Settings for keys that can be used by reCAPTCHA Express. (id: GoogleCloudRecaptchaenterpriseV1ExpressKeySettings) |
iosSettings | object | Settings for keys that can be used by iOS apps. (id: GoogleCloudRecaptchaenterpriseV1IOSKeySettings) |
labels | object | Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels). |
testingOptions | object | Optional. Options for user acceptance testing. (id: GoogleCloudRecaptchaenterpriseV1TestingOptions) |
wafSettings | object | Optional. Settings for WAF (id: GoogleCloudRecaptchaenterpriseV1WafSettings) |
webSettings | object | Settings for keys that can be used by websites. (id: GoogleCloudRecaptchaenterpriseV1WebKeySettings) |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name for the Key in the format projects/{project}/keys/{key} . |
androidSettings | object | Settings for keys that can be used by Android apps. (id: GoogleCloudRecaptchaenterpriseV1AndroidKeySettings) |
createTime | string (google-datetime) | Output only. The timestamp corresponding to the creation of this key. |
displayName | string | Required. Human-readable display name of this key. Modifiable by user. |
expressSettings | object | Settings for keys that can be used by reCAPTCHA Express. (id: GoogleCloudRecaptchaenterpriseV1ExpressKeySettings) |
iosSettings | object | Settings for keys that can be used by iOS apps. (id: GoogleCloudRecaptchaenterpriseV1IOSKeySettings) |
labels | object | Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels). |
testingOptions | object | Optional. Options for user acceptance testing. (id: GoogleCloudRecaptchaenterpriseV1TestingOptions) |
wafSettings | object | Optional. Settings for WAF (id: GoogleCloudRecaptchaenterpriseV1WafSettings) |
webSettings | object | Settings for keys that can be used by websites. (id: GoogleCloudRecaptchaenterpriseV1WebKeySettings) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , keysId | Returns the specified key. | |
list | select | projectsId | pageSize , pageToken | Returns the list of all keys that belong to a project. |
create | insert | projectsId | Creates a new reCAPTCHA Enterprise key. | |
patch | update | projectsId , keysId | updateMask | Updates the specified key. |
delete | delete | projectsId , keysId | Deletes the specified key. | |
migrate | exec | projectsId , keysId | Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project. |
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 | |
pageSize | integer (int32) | |
pageToken | string | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Returns the specified key.
SELECT
name,
androidSettings,
createTime,
displayName,
expressSettings,
iosSettings,
labels,
testingOptions,
wafSettings,
webSettings
FROM google.recaptchaenterprise.keys
WHERE projectsId = '{{ projectsId }}' -- required
AND keysId = '{{ keysId }}' -- required;
Returns the list of all keys that belong to a project.
SELECT
name,
androidSettings,
createTime,
displayName,
expressSettings,
iosSettings,
labels,
testingOptions,
wafSettings,
webSettings
FROM google.recaptchaenterprise.keys
WHERE projectsId = '{{ projectsId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
INSERT
examples
- create
- Manifest
Creates a new reCAPTCHA Enterprise key.
INSERT INTO google.recaptchaenterprise.keys (
data__name,
data__displayName,
data__webSettings,
data__androidSettings,
data__iosSettings,
data__expressSettings,
data__labels,
data__testingOptions,
data__wafSettings,
projectsId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ webSettings }}',
'{{ androidSettings }}',
'{{ iosSettings }}',
'{{ expressSettings }}',
'{{ labels }}',
'{{ testingOptions }}',
'{{ wafSettings }}',
'{{ projectsId }}'
RETURNING
name,
androidSettings,
createTime,
displayName,
expressSettings,
iosSettings,
labels,
testingOptions,
wafSettings,
webSettings
;
# Description fields are for documentation purposes
- name: keys
props:
- name: projectsId
value: string
description: Required parameter for the keys resource.
- name: name
value: string
description: >
Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
- name: displayName
value: string
description: >
Required. Human-readable display name of this key. Modifiable by user.
- name: webSettings
value: object
description: >
Settings for keys that can be used by websites.
- name: androidSettings
value: object
description: >
Settings for keys that can be used by Android apps.
- name: iosSettings
value: object
description: >
Settings for keys that can be used by iOS apps.
- name: expressSettings
value: object
description: >
Settings for keys that can be used by reCAPTCHA Express.
- name: labels
value: object
description: >
Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
- name: testingOptions
value: object
description: >
Optional. Options for user acceptance testing.
- name: wafSettings
value: object
description: >
Optional. Settings for WAF
UPDATE
examples
- patch
Updates the specified key.
UPDATE google.recaptchaenterprise.keys
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}',
data__webSettings = '{{ webSettings }}',
data__androidSettings = '{{ androidSettings }}',
data__iosSettings = '{{ iosSettings }}',
data__expressSettings = '{{ expressSettings }}',
data__labels = '{{ labels }}',
data__testingOptions = '{{ testingOptions }}',
data__wafSettings = '{{ wafSettings }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND keysId = '{{ keysId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
androidSettings,
createTime,
displayName,
expressSettings,
iosSettings,
labels,
testingOptions,
wafSettings,
webSettings;
DELETE
examples
- delete
Deletes the specified key.
DELETE FROM google.recaptchaenterprise.keys
WHERE projectsId = '{{ projectsId }}' --required
AND keysId = '{{ keysId }}' --required;
Lifecycle Methods
- migrate
Migrates an existing key from reCAPTCHA to reCAPTCHA Enterprise. Once a key is migrated, it can be used from either product. SiteVerify requests are billed as CreateAssessment calls. You must be authenticated as one of the current owners of the reCAPTCHA Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
EXEC google.recaptchaenterprise.keys.migrate
@projectsId='{{ projectsId }}' --required,
@keysId='{{ keysId }}' --required
@@json=
'{
"skipBillingCheck": {{ skipBillingCheck }}
}';