Debian Codegraph @

docs/dyn/recaptchaenterprise_v1.projects.keys.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="recaptchaenterprise_v1.html">reCAPTCHA Enterprise API</a> . <a href="recaptchaenterprise_v1.projects.html">projects</a> . <a href="recaptchaenterprise_v1.projects.keys.html">keys</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#addIpOverride">addIpOverride(name, body=None, x__xgafv=None)</a></code></p>
79 <p class="firstline">Adds an IP override to a key. The following restrictions hold: * The maximum number of IP overrides per key is 1000. * For any conflict (such as IP already exists or IP part of an existing IP range), an error is returned.</p>
80 <p class="toc_element">
81 <code><a href="#close">close()</a></code></p>
82 <p class="firstline">Close httplib2 connections.</p>
83 <p class="toc_element">
84 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Creates a new reCAPTCHA Enterprise key.</p>
86 <p class="toc_element">
87 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Deletes the specified key.</p>
89 <p class="toc_element">
90 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
91 <p class="firstline">Returns the specified key.</p>
92 <p class="toc_element">
93 <code><a href="#getMetrics">getMetrics(name, x__xgafv=None)</a></code></p>
94 <p class="firstline">Get some aggregated metrics for a Key. This data can be used to build dashboards.</p>
95 <p class="toc_element">
96 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Returns the list of all keys that belong to a project.</p>
98 <p class="toc_element">
99 <code><a href="#listIpOverrides">listIpOverrides(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
100 <p class="firstline">Lists all IP overrides for a key.</p>
101 <p class="toc_element">
102 <code><a href="#listIpOverrides_next">listIpOverrides_next()</a></code></p>
103 <p class="firstline">Retrieves the next page of results.</p>
104 <p class="toc_element">
105 <code><a href="#list_next">list_next()</a></code></p>
106 <p class="firstline">Retrieves the next page of results.</p>
107 <p class="toc_element">
108 <code><a href="#migrate">migrate(name, body=None, x__xgafv=None)</a></code></p>
109 <p class="firstline">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.</p>
110 <p class="toc_element">
111 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
112 <p class="firstline">Updates the specified key.</p>
113 <p class="toc_element">
114 <code><a href="#removeIpOverride">removeIpOverride(name, body=None, x__xgafv=None)</a></code></p>
115 <p class="firstline">Removes an IP override from a key. The following restrictions hold: * If the IP isn't found in an existing IP override, a `NOT_FOUND` error is returned. * If the IP is found in an existing IP override, but the override type does not match, a `NOT_FOUND` error is returned.</p>
116 <p class="toc_element">
117 <code><a href="#retrieveLegacySecretKey">retrieveLegacySecretKey(x__xgafv=None)</a></code></p>
118 <p class="firstline">Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.</p>
119 <h3>Method Details</h3>
120 <div class="method">
121 <code class="details" id="addIpOverride">addIpOverride(name, body=None, x__xgafv=None)</code>
122 <pre>Adds an IP override to a key. The following restrictions hold: * The maximum number of IP overrides per key is 1000. * For any conflict (such as IP already exists or IP part of an existing IP range), an error is returned.
123
124 Args:
125 name: string, Required. The name of the key to which the IP override is added, in the format `projects/{project}/keys/{key}`. (required)
126 body: object, The request body.
127 The object takes the form of:
128
129 { # The AddIpOverride request message.
130 &quot;ipOverrideData&quot;: { # Information about the IP or IP range override. # Required. IP override added to the key.
131 &quot;ip&quot;: &quot;A String&quot;, # Required. The IP address to override (can be IPv4, IPv6 or CIDR). The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. The IP override must be a public IP address. Example of IPv4: 168.192.5.6 Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B Example of IPv4 with CIDR: 168.192.5.0/24 Example of IPv6 with CIDR: 2001:0DB8:1234::/48
132 &quot;overrideType&quot;: &quot;A String&quot;, # Required. Describes the type of IP override.
133 },
134 }
135
136 x__xgafv: string, V1 error format.
137 Allowed values
138 1 - v1 error format
139 2 - v2 error format
140
141 Returns:
142 An object of the form:
143
144 { # Response for AddIpOverride.
145 }</pre>
146 </div>
147
148 <div class="method">
149 <code class="details" id="close">close()</code>
150 <pre>Close httplib2 connections.</pre>
151 </div>
152
153 <div class="method">
154 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
155 <pre>Creates a new reCAPTCHA Enterprise key.
156
157 Args:
158 parent: string, Required. The name of the project in which the key is created, in the format `projects/{project}`. (required)
159 body: object, The request body.
160 The object takes the form of:
161
162 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
163 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
164 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
165 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
166 &quot;A String&quot;,
167 ],
168 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
169 },
170 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
171 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
172 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
173 },
174 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
175 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
176 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
177 &quot;A String&quot;,
178 ],
179 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
180 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
181 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
182 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
183 },
184 },
185 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
186 &quot;a_key&quot;: &quot;A String&quot;,
187 },
188 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
189 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
190 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
191 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
192 },
193 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
194 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
195 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
196 },
197 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
198 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
199 &quot;allowAmpTraffic&quot;: True or False, # 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.
200 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
201 &quot;A String&quot;,
202 ],
203 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
204 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
205 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
206 &quot;a_key&quot;: { # Per-action challenge settings.
207 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
208 },
209 },
210 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
211 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
212 },
213 },
214 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
215 },
216 }
217
218 x__xgafv: string, V1 error format.
219 Allowed values
220 1 - v1 error format
221 2 - v2 error format
222
223 Returns:
224 An object of the form:
225
226 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
227 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
228 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
229 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
230 &quot;A String&quot;,
231 ],
232 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
233 },
234 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
235 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
236 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
237 },
238 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
239 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
240 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
241 &quot;A String&quot;,
242 ],
243 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
244 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
245 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
246 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
247 },
248 },
249 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
250 &quot;a_key&quot;: &quot;A String&quot;,
251 },
252 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
253 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
254 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
255 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
256 },
257 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
258 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
259 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
260 },
261 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
262 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
263 &quot;allowAmpTraffic&quot;: True or False, # 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.
264 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
265 &quot;A String&quot;,
266 ],
267 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
268 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
269 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
270 &quot;a_key&quot;: { # Per-action challenge settings.
271 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
272 },
273 },
274 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
275 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
276 },
277 },
278 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
279 },
280 }</pre>
281 </div>
282
283 <div class="method">
284 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
285 <pre>Deletes the specified key.
286
287 Args:
288 name: string, Required. The name of the key to be deleted, in the format `projects/{project}/keys/{key}`. (required)
289 x__xgafv: string, V1 error format.
290 Allowed values
291 1 - v1 error format
292 2 - v2 error format
293
294 Returns:
295 An object of the form:
296
297 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
298 }</pre>
299 </div>
300
301 <div class="method">
302 <code class="details" id="get">get(name, x__xgafv=None)</code>
303 <pre>Returns the specified key.
304
305 Args:
306 name: string, Required. The name of the requested key, in the format `projects/{project}/keys/{key}`. (required)
307 x__xgafv: string, V1 error format.
308 Allowed values
309 1 - v1 error format
310 2 - v2 error format
311
312 Returns:
313 An object of the form:
314
315 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
316 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
317 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
318 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
319 &quot;A String&quot;,
320 ],
321 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
322 },
323 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
324 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
325 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
326 },
327 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
328 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
329 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
330 &quot;A String&quot;,
331 ],
332 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
333 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
334 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
335 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
336 },
337 },
338 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
339 &quot;a_key&quot;: &quot;A String&quot;,
340 },
341 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
342 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
343 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
344 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
345 },
346 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
347 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
348 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
349 },
350 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
351 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
352 &quot;allowAmpTraffic&quot;: True or False, # 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.
353 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
354 &quot;A String&quot;,
355 ],
356 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
357 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
358 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
359 &quot;a_key&quot;: { # Per-action challenge settings.
360 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
361 },
362 },
363 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
364 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
365 },
366 },
367 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
368 },
369 }</pre>
370 </div>
371
372 <div class="method">
373 <code class="details" id="getMetrics">getMetrics(name, x__xgafv=None)</code>
374 <pre>Get some aggregated metrics for a Key. This data can be used to build dashboards.
375
376 Args:
377 name: string, Required. The name of the requested metrics, in the format `projects/{project}/keys/{key}/metrics`. (required)
378 x__xgafv: string, V1 error format.
379 Allowed values
380 1 - v1 error format
381 2 - v2 error format
382
383 Returns:
384 An object of the form:
385
386 { # Metrics for a single Key.
387 &quot;challengeMetrics&quot;: [ # Metrics are continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE) have challenge-based data.
388 { # Metrics related to challenges.
389 &quot;failedCount&quot;: &quot;A String&quot;, # Count of submitted challenge solutions that were incorrect or otherwise deemed suspicious such that a subsequent challenge was triggered.
390 &quot;nocaptchaCount&quot;: &quot;A String&quot;, # Count of nocaptchas (successful verification without a challenge) issued.
391 &quot;pageloadCount&quot;: &quot;A String&quot;, # Count of reCAPTCHA checkboxes or badges rendered. This is mostly equivalent to a count of pageloads for pages that include reCAPTCHA.
392 &quot;passedCount&quot;: &quot;A String&quot;, # Count of nocaptchas (successful verification without a challenge) plus submitted challenge solutions that were correct and resulted in verification.
393 },
394 ],
395 &quot;name&quot;: &quot;A String&quot;, # Output only. Identifier. The name of the metrics, in the format `projects/{project}/keys/{key}/metrics`.
396 &quot;scoreMetrics&quot;: [ # Metrics are continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.
397 { # Metrics related to scoring.
398 &quot;actionMetrics&quot;: { # Action-based metrics. The map key is the action name which specified by the site owners at time of the &quot;execute&quot; client-side call.
399 &quot;a_key&quot;: { # Score distribution.
400 &quot;scoreBuckets&quot;: { # Map key is score value multiplied by 100. The scores are discrete values between [0, 1]. The maximum number of buckets is on order of a few dozen, but typically much lower (ie. 10).
401 &quot;a_key&quot;: &quot;A String&quot;,
402 },
403 },
404 },
405 &quot;overallMetrics&quot;: { # Score distribution. # Aggregated score metrics for all traffic.
406 &quot;scoreBuckets&quot;: { # Map key is score value multiplied by 100. The scores are discrete values between [0, 1]. The maximum number of buckets is on order of a few dozen, but typically much lower (ie. 10).
407 &quot;a_key&quot;: &quot;A String&quot;,
408 },
409 },
410 },
411 ],
412 &quot;startTime&quot;: &quot;A String&quot;, # Inclusive start time aligned to a day in the America/Los_Angeles (Pacific) timezone.
413 }</pre>
414 </div>
415
416 <div class="method">
417 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
418 <pre>Returns the list of all keys that belong to a project.
419
420 Args:
421 parent: string, Required. The name of the project that contains the keys that is listed, in the format `projects/{project}`. (required)
422 pageSize: integer, Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.
423 pageToken: string, Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
424 x__xgafv: string, V1 error format.
425 Allowed values
426 1 - v1 error format
427 2 - v2 error format
428
429 Returns:
430 An object of the form:
431
432 { # Response to request to list keys in a project.
433 &quot;keys&quot;: [ # Key details.
434 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
435 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
436 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
437 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
438 &quot;A String&quot;,
439 ],
440 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
441 },
442 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
443 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
444 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
445 },
446 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
447 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
448 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
449 &quot;A String&quot;,
450 ],
451 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
452 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
453 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
454 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
455 },
456 },
457 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
458 &quot;a_key&quot;: &quot;A String&quot;,
459 },
460 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
461 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
462 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
463 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
464 },
465 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
466 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
467 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
468 },
469 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
470 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
471 &quot;allowAmpTraffic&quot;: True or False, # 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.
472 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
473 &quot;A String&quot;,
474 ],
475 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
476 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
477 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
478 &quot;a_key&quot;: { # Per-action challenge settings.
479 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
480 },
481 },
482 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
483 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
484 },
485 },
486 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
487 },
488 },
489 ],
490 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results. It is set to empty if no keys remain in results.
491 }</pre>
492 </div>
493
494 <div class="method">
495 <code class="details" id="listIpOverrides">listIpOverrides(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
496 <pre>Lists all IP overrides for a key.
497
498 Args:
499 parent: string, Required. The parent key for which the IP overrides are listed, in the format `projects/{project}/keys/{key}`. (required)
500 pageSize: integer, Optional. The maximum number of overrides to return. Default is 10. Max limit is 100. If the number of overrides is less than the page_size, all overrides are returned. If the page size is more than 100, it is coerced to 100.
501 pageToken: string, Optional. The next_page_token value returned from a previous ListIpOverridesRequest, if any.
502 x__xgafv: string, V1 error format.
503 Allowed values
504 1 - v1 error format
505 2 - v2 error format
506
507 Returns:
508 An object of the form:
509
510 { # Response for ListIpOverrides.
511 &quot;ipOverrides&quot;: [ # IP Overrides details.
512 { # Information about the IP or IP range override.
513 &quot;ip&quot;: &quot;A String&quot;, # Required. The IP address to override (can be IPv4, IPv6 or CIDR). The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. The IP override must be a public IP address. Example of IPv4: 168.192.5.6 Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B Example of IPv4 with CIDR: 168.192.5.0/24 Example of IPv6 with CIDR: 2001:0DB8:1234::/48
514 &quot;overrideType&quot;: &quot;A String&quot;, # Required. Describes the type of IP override.
515 },
516 ],
517 &quot;nextPageToken&quot;: &quot;A String&quot;, # Token to retrieve the next page of results. If this field is empty, no keys remain in the results.
518 }</pre>
519 </div>
520
521 <div class="method">
522 <code class="details" id="listIpOverrides_next">listIpOverrides_next()</code>
523 <pre>Retrieves the next page of results.
524
525 Args:
526 previous_request: The request for the previous page. (required)
527 previous_response: The response from the request for the previous page. (required)
528
529 Returns:
530 A request object that you can call &#x27;execute()&#x27; on to request the next
531 page. Returns None if there are no more items in the collection.
532 </pre>
533 </div>
534
535 <div class="method">
536 <code class="details" id="list_next">list_next()</code>
537 <pre>Retrieves the next page of results.
538
539 Args:
540 previous_request: The request for the previous page. (required)
541 previous_response: The response from the request for the previous page. (required)
542
543 Returns:
544 A request object that you can call &#x27;execute()&#x27; on to request the next
545 page. Returns None if there are no more items in the collection.
546 </pre>
547 </div>
548
549 <div class="method">
550 <code class="details" id="migrate">migrate(name, body=None, x__xgafv=None)</code>
551 <pre>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.
552
553 Args:
554 name: string, Required. The name of the key to be migrated, in the format `projects/{project}/keys/{key}`. (required)
555 body: object, The request body.
556 The object takes the form of:
557
558 { # The migrate key request message.
559 &quot;skipBillingCheck&quot;: True or False, # Optional. If true, skips the billing check. A reCAPTCHA Enterprise key or migrated key behaves differently than a reCAPTCHA (non-Enterprise version) key when you reach a quota limit (see https://docs.cloud.google.com/recaptcha/quotas#quota_limit). To avoid any disruption of your usage, we check that a billing account is present. If your usage of reCAPTCHA is under the free quota, you can safely skip the billing check and proceed with the migration. See https://cloud.google.com/recaptcha/docs/billing-information.
560 }
561
562 x__xgafv: string, V1 error format.
563 Allowed values
564 1 - v1 error format
565 2 - v2 error format
566
567 Returns:
568 An object of the form:
569
570 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
571 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
572 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
573 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
574 &quot;A String&quot;,
575 ],
576 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
577 },
578 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
579 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
580 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
581 },
582 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
583 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
584 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
585 &quot;A String&quot;,
586 ],
587 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
588 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
589 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
590 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
591 },
592 },
593 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
594 &quot;a_key&quot;: &quot;A String&quot;,
595 },
596 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
597 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
598 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
599 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
600 },
601 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
602 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
603 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
604 },
605 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
606 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
607 &quot;allowAmpTraffic&quot;: True or False, # 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.
608 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
609 &quot;A String&quot;,
610 ],
611 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
612 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
613 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
614 &quot;a_key&quot;: { # Per-action challenge settings.
615 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
616 },
617 },
618 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
619 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
620 },
621 },
622 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
623 },
624 }</pre>
625 </div>
626
627 <div class="method">
628 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
629 <pre>Updates the specified key.
630
631 Args:
632 name: string, Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`. (required)
633 body: object, The request body.
634 The object takes the form of:
635
636 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
637 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
638 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
639 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
640 &quot;A String&quot;,
641 ],
642 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
643 },
644 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
645 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
646 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
647 },
648 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
649 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
650 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
651 &quot;A String&quot;,
652 ],
653 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
654 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
655 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
656 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
657 },
658 },
659 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
660 &quot;a_key&quot;: &quot;A String&quot;,
661 },
662 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
663 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
664 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
665 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
666 },
667 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
668 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
669 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
670 },
671 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
672 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
673 &quot;allowAmpTraffic&quot;: True or False, # 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.
674 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
675 &quot;A String&quot;,
676 ],
677 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
678 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
679 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
680 &quot;a_key&quot;: { # Per-action challenge settings.
681 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
682 },
683 },
684 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
685 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
686 },
687 },
688 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
689 },
690 }
691
692 updateMask: string, Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields are updated.
693 x__xgafv: string, V1 error format.
694 Allowed values
695 1 - v1 error format
696 2 - v2 error format
697
698 Returns:
699 An object of the form:
700
701 { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
702 &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
703 &quot;allowAllPackageNames&quot;: True or False, # Optional. If set to true, allowed_package_names are not enforced.
704 &quot;allowedPackageNames&quot;: [ # Optional. Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27; Each key supports a maximum of 250 package names. To use a key on more apps, set `allow_all_package_names` to true. When this is set, you are responsible for validating the package name by checking the `token_properties.android_package_name` field in each assessment response against your list of allowed package names.
705 &quot;A String&quot;,
706 ],
707 &quot;supportNonGoogleAppStoreDistribution&quot;: True or False, # Optional. Set to true for keys that are used in an Android application that is available for download in app stores in addition to the Google Play Store.
708 },
709 &quot;createTime&quot;: &quot;A String&quot;, # Output only. The timestamp corresponding to the creation of this key.
710 &quot;displayName&quot;: &quot;A String&quot;, # Required. Human-readable display name of this key. Modifiable by user.
711 &quot;expressSettings&quot;: { # Settings specific to keys that can be used for reCAPTCHA Express. # Settings for keys that can be used by reCAPTCHA Express.
712 },
713 &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
714 &quot;allowAllBundleIds&quot;: True or False, # Optional. If set to true, allowed_bundle_ids are not enforced.
715 &quot;allowedBundleIds&quot;: [ # Optional. iOS bundle IDs of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27; Each key supports a maximum of 250 bundle IDs. To use a key on more apps, set `allow_all_bundle_ids` to true. When this is set, you are responsible for validating the bundle id by checking the `token_properties.ios_bundle_id` field in each assessment response against your list of allowed bundle IDs.
716 &quot;A String&quot;,
717 ],
718 &quot;appleDeveloperId&quot;: { # Contains fields that are required to perform Apple-specific integrity checks. # Optional. Apple Developer account details for the app that is protected by the reCAPTCHA Key. reCAPTCHA leverages platform-specific checks like Apple App Attest and Apple DeviceCheck to protect your app from abuse. Providing these fields allows reCAPTCHA to get a better assessment of the integrity of your app.
719 &quot;keyId&quot;: &quot;A String&quot;, # Required. The Apple developer key ID (10-character string).
720 &quot;privateKey&quot;: &quot;A String&quot;, # Required. Input only. A private key (downloaded as a text file with a .p8 file extension) generated for your Apple Developer account. Ensure that Apple DeviceCheck is enabled for the private key.
721 &quot;teamId&quot;: &quot;A String&quot;, # Required. The Apple team ID (10-character string) owning the provisioning profile used to build your application.
722 },
723 },
724 &quot;labels&quot;: { # Optional. See [Creating and managing labels] (https://cloud.google.com/recaptcha/docs/labels).
725 &quot;a_key&quot;: &quot;A String&quot;,
726 },
727 &quot;name&quot;: &quot;A String&quot;, # Identifier. The resource name for the Key in the format `projects/{project}/keys/{key}`.
728 &quot;testingOptions&quot;: { # Options for user acceptance testing. # Optional. Options for user acceptance testing.
729 &quot;testingChallenge&quot;: &quot;A String&quot;, # Optional. For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
730 &quot;testingScore&quot;: 3.14, # Optional. All assessments for this Key return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
731 },
732 &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Optional. Settings for Web Application Firewall (WAF).
733 &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) feature for which this key is enabled.
734 &quot;wafService&quot;: &quot;A String&quot;, # Required. The Web Application Firewall (WAF) service that uses this key.
735 },
736 &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
737 &quot;allowAllDomains&quot;: True or False, # Optional. If set to true, it means allowed_domains are not enforced.
738 &quot;allowAmpTraffic&quot;: True or False, # 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.
739 &quot;allowedDomains&quot;: [ # 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: &#x27;example.com&#x27; or &#x27;subdomain.example.com&#x27; Each key supports a maximum of 250 domains. To use a key on more domains, set `allow_all_domains` to true. When this is set, you are responsible for validating the hostname by checking the `token_properties.hostname` field in each assessment response against your list of allowed domains.
740 &quot;A String&quot;,
741 ],
742 &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Optional. Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for `IntegrationType` CHECKBOX, INVISIBLE or POLICY_BASED_CHALLENGE.
743 &quot;challengeSettings&quot;: { # Settings for POLICY_BASED_CHALLENGE keys to control when a challenge is triggered. # Optional. Challenge settings.
744 &quot;actionSettings&quot;: { # Optional. The action to score threshold map. The action name should be the same as the action name passed in the `data-action` attribute (see https://cloud.google.com/recaptcha/docs/actions-website). Action names are case-insensitive. There is a maximum of 100 action settings. An action name has a maximum length of 100.
745 &quot;a_key&quot;: { # Per-action challenge settings.
746 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
747 },
748 },
749 &quot;defaultSettings&quot;: { # Per-action challenge settings. # Required. Defines when a challenge is triggered (unless the default threshold is overridden for the given action, see `action_settings`).
750 &quot;scoreThreshold&quot;: 3.14, # Required. A challenge is triggered if the end-user score is below that threshold. Value must be between 0 and 1 (inclusive).
751 },
752 },
753 &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
754 },
755 }</pre>
756 </div>
757
758 <div class="method">
759 <code class="details" id="removeIpOverride">removeIpOverride(name, body=None, x__xgafv=None)</code>
760 <pre>Removes an IP override from a key. The following restrictions hold: * If the IP isn&#x27;t found in an existing IP override, a `NOT_FOUND` error is returned. * If the IP is found in an existing IP override, but the override type does not match, a `NOT_FOUND` error is returned.
761
762 Args:
763 name: string, Required. The name of the key from which the IP override is removed, in the format `projects/{project}/keys/{key}`. (required)
764 body: object, The request body.
765 The object takes the form of:
766
767 { # The RemoveIpOverride request message.
768 &quot;ipOverrideData&quot;: { # Information about the IP or IP range override. # Required. IP override to be removed from the key.
769 &quot;ip&quot;: &quot;A String&quot;, # Required. The IP address to override (can be IPv4, IPv6 or CIDR). The IP override must be a valid IPv4 or IPv6 address, or a CIDR range. The IP override must be a public IP address. Example of IPv4: 168.192.5.6 Example of IPv6: 2001:0000:130F:0000:0000:09C0:876A:130B Example of IPv4 with CIDR: 168.192.5.0/24 Example of IPv6 with CIDR: 2001:0DB8:1234::/48
770 &quot;overrideType&quot;: &quot;A String&quot;, # Required. Describes the type of IP override.
771 },
772 }
773
774 x__xgafv: string, V1 error format.
775 Allowed values
776 1 - v1 error format
777 2 - v2 error format
778
779 Returns:
780 An object of the form:
781
782 { # Response for RemoveIpOverride.
783 }</pre>
784 </div>
785
786 <div class="method">
787 <code class="details" id="retrieveLegacySecretKey">retrieveLegacySecretKey(x__xgafv=None)</code>
788 <pre>Returns the secret key related to the specified public key. You must use the legacy secret key only in a 3rd party integration with legacy reCAPTCHA.
789
790 Args:
791 x__xgafv: string, V1 error format.
792 Allowed values
793 1 - v1 error format
794 2 - v2 error format
795
796 Returns:
797 An object of the form:
798
799 { # Secret key is used only in legacy reCAPTCHA. It must be used in a 3rd party integration with legacy reCAPTCHA.
800 &quot;legacySecretKey&quot;: &quot;A String&quot;, # The secret key (also known as shared secret) authorizes communication between your application backend and the reCAPTCHA Enterprise server to create an assessment. The secret key needs to be kept safe for security purposes.
801 }</pre>
802 </div>
803
804 </body></html>