googleRecaptchaEnterpriseKey
The RecaptchaEnterprise Key resource
Example Usage - android_key
A basic test of recaptcha enterprise key that can be used by Android apps
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.recaptchaEnterpriseKey.RecaptchaEnterpriseKey(this, "primary", {
android_settings: [
{
allow_all_package_names: true,
allowed_package_names: [],
},
],
display_name: "display-name-one",
labels: [
{
"label-one": "value-one",
},
],
project: "my-project-name",
testing_options: [
{
testing_score: 0.8,
},
],
});
Example Usage - ios_key
A basic test of recaptcha enterprise key that can be used by iOS apps
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.recaptchaEnterpriseKey.RecaptchaEnterpriseKey(this, "primary", {
display_name: "display-name-one",
ios_settings: [
{
allow_all_bundle_ids: true,
allowed_bundle_ids: [],
},
],
labels: [
{
"label-one": "value-one",
},
],
project: "my-project-name",
testing_options: [
{
testing_score: 1,
},
],
});
Example Usage - minimal_key
A minimal test of recaptcha enterprise key
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.recaptchaEnterpriseKey.RecaptchaEnterpriseKey(this, "primary", {
display_name: "display-name-one",
labels: [{}],
project: "my-project-name",
web_settings: [
{
allow_all_domains: true,
integration_type: "SCORE",
},
],
});
Example Usage - web_key
A basic test of recaptcha enterprise key that can be used by websites
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.recaptchaEnterpriseKey.RecaptchaEnterpriseKey(this, "primary", {
display_name: "display-name-one",
labels: [
{
"label-one": "value-one",
},
],
project: "my-project-name",
testing_options: [
{
testing_challenge: "NOCAPTCHA",
testing_score: 0.5,
},
],
web_settings: [
{
allow_all_domains: true,
allowed_domains: [],
challenge_security_preference: "USABILITY",
integration_type: "CHECKBOX",
},
],
});
Example Usage - web_score_key
A basic test of recaptcha enterprise key with score integration type that can be used by websites
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as google from "./.gen/providers/google";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: google.
For a more precise conversion please use the --provider flag in convert.*/
new google.recaptchaEnterpriseKey.RecaptchaEnterpriseKey(this, "primary", {
display_name: "display-name-one",
labels: [
{
"label-one": "value-one",
},
],
project: "my-project-name",
testing_options: [
{
testing_score: 0.5,
},
],
web_settings: [
{
allow_all_domains: true,
allow_amp_traffic: false,
allowed_domains: [],
integration_type: "SCORE",
},
],
});
Argument Reference
The following arguments are supported:
displayName
- (Required) Human-readable display name of this key. Modifiable by user.
-
androidSettings
- (Optional) Settings for keys that can be used by Android apps. -
iosSettings
- (Optional) Settings for keys that can be used by iOS apps. -
labels
- (Optional) See Creating and managing labels. -
project
- (Optional) The project for the resource -
testingOptions
- (Optional) Options for user acceptance testing. -
webSettings
- (Optional) Settings for keys that can be used by websites.
The androidSettings
block supports:
-
allowAllPackageNames
- (Optional) If set to true, it means allowed_package_names will not be enforced. -
allowedPackageNames
- (Optional) Android package names of apps allowed to use the key. Example: 'com.companyname.appname'
The iosSettings
block supports:
-
allowAllBundleIds
- (Optional) If set to true, it means allowed_bundle_ids will not be enforced. -
allowedBundleIds
- (Optional) iOS bundle ids of apps allowed to use the key. Example: 'com.companyname.productname.appname'
The testingOptions
block supports:
-
testingChallenge
- (Optional) For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if UNSOLVABLE_CHALLENGE. Possible values: TESTING_CHALLENGE_UNSPECIFIED, NOCAPTCHA, UNSOLVABLE_CHALLENGE -
testingScore
- (Optional) All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
The webSettings
block supports:
-
allowAllDomains
- (Optional) If set to true, it means allowed_domains will not be enforced. -
allowAmpTraffic
- (Optional) If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type. -
allowedDomains
- (Optional) Domains or subdomains of websites allowed to use the key. All subdomains of an allowed domain are automatically allowed. A valid domain requires a host and must not include any path, port, query or fragment. Examples: 'example.com' or 'subdomain.example.com' -
challengeSecurityPreference
- (Optional) Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE. Possible values: CHALLENGE_SECURITY_PREFERENCE_UNSPECIFIED, USABILITY, BALANCE, SECURITY -
integrationType
- (Required) Required. Describes how this key is integrated with the website. Possible values: SCORE, CHECKBOX, INVISIBLE
Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatprojects/{{project}}/keys/{{name}}
-
createTime
- The timestamp corresponding to the creation of this Key. -
name
- The resource name for the Key in the format "projects/{project}/keys/{key}".
Timeouts
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.
Import
Key can be imported using any of these accepted formats: