• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, 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
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, 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="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
81  <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a new reCAPTCHA Enterprise key.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Deletes the specified key.</p>
86<p class="toc_element">
87  <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88<p class="firstline">Returns the specified key.</p>
89<p class="toc_element">
90  <code><a href="#getMetrics">getMetrics(name, x__xgafv=None)</a></code></p>
91<p class="firstline">Get some aggregated metrics for a Key. This data can be used to build dashboards.</p>
92<p class="toc_element">
93  <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Returns the list of all keys that belong to a project.</p>
95<p class="toc_element">
96  <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
97<p class="firstline">Retrieves the next page of results.</p>
98<p class="toc_element">
99  <code><a href="#migrate">migrate(name, body=None, x__xgafv=None)</a></code></p>
100<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 Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.</p>
101<p class="toc_element">
102  <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
103<p class="firstline">Updates the specified key.</p>
104<h3>Method Details</h3>
105<div class="method">
106    <code class="details" id="close">close()</code>
107  <pre>Close httplib2 connections.</pre>
108</div>
109
110<div class="method">
111    <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
112  <pre>Creates a new reCAPTCHA Enterprise key.
113
114Args:
115  parent: string, Required. The name of the project in which the key will be created, in the format &quot;projects/{project}&quot;. (required)
116  body: object, The request body.
117    The object takes the form of:
118
119{ # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
120  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
121    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
122    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
123      &quot;A String&quot;,
124    ],
125  },
126  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
127  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
128  &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
129    &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
130    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
131      &quot;A String&quot;,
132    ],
133  },
134  &quot;labels&quot;: { # See Creating and managing labels.
135    &quot;a_key&quot;: &quot;A String&quot;,
136  },
137  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
138  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
139    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
140    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
141  },
142  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
143    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
144    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
145  },
146  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
147    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
148    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
149    &quot;allowedDomains&quot;: [ # 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;
150      &quot;A String&quot;,
151    ],
152    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
153    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
154  },
155}
156
157  x__xgafv: string, V1 error format.
158    Allowed values
159      1 - v1 error format
160      2 - v2 error format
161
162Returns:
163  An object of the form:
164
165    { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
166  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
167    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
168    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
169      &quot;A String&quot;,
170    ],
171  },
172  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
173  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
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, # If set to true, allowed_bundle_ids are not enforced.
176    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
177      &quot;A String&quot;,
178    ],
179  },
180  &quot;labels&quot;: { # See Creating and managing labels.
181    &quot;a_key&quot;: &quot;A String&quot;,
182  },
183  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
184  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
185    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
186    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
187  },
188  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
189    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
190    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
191  },
192  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
193    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
194    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
195    &quot;allowedDomains&quot;: [ # 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;
196      &quot;A String&quot;,
197    ],
198    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
199    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
200  },
201}</pre>
202</div>
203
204<div class="method">
205    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
206  <pre>Deletes the specified key.
207
208Args:
209  name: string, Required. The name of the key to be deleted, in the format &quot;projects/{project}/keys/{key}&quot;. (required)
210  x__xgafv: string, V1 error format.
211    Allowed values
212      1 - v1 error format
213      2 - v2 error format
214
215Returns:
216  An object of the form:
217
218    { # 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); } The JSON representation for `Empty` is empty JSON object `{}`.
219}</pre>
220</div>
221
222<div class="method">
223    <code class="details" id="get">get(name, x__xgafv=None)</code>
224  <pre>Returns the specified key.
225
226Args:
227  name: string, Required. The name of the requested key, in the format &quot;projects/{project}/keys/{key}&quot;. (required)
228  x__xgafv: string, V1 error format.
229    Allowed values
230      1 - v1 error format
231      2 - v2 error format
232
233Returns:
234  An object of the form:
235
236    { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
237  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
238    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
239    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
240      &quot;A String&quot;,
241    ],
242  },
243  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
244  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
245  &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
246    &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
247    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
248      &quot;A String&quot;,
249    ],
250  },
251  &quot;labels&quot;: { # See Creating and managing labels.
252    &quot;a_key&quot;: &quot;A String&quot;,
253  },
254  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
255  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
256    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
257    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
258  },
259  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
260    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
261    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
262  },
263  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
264    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
265    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
266    &quot;allowedDomains&quot;: [ # 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;
267      &quot;A String&quot;,
268    ],
269    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
270    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
271  },
272}</pre>
273</div>
274
275<div class="method">
276    <code class="details" id="getMetrics">getMetrics(name, x__xgafv=None)</code>
277  <pre>Get some aggregated metrics for a Key. This data can be used to build dashboards.
278
279Args:
280  name: string, Required. The name of the requested metrics, in the format &quot;projects/{project}/keys/{key}/metrics&quot;. (required)
281  x__xgafv: string, V1 error format.
282    Allowed values
283      1 - v1 error format
284      2 - v2 error format
285
286Returns:
287  An object of the form:
288
289    { # Metrics for a single Key.
290  &quot;challengeMetrics&quot;: [ # Metrics will be continuous and in order by dates, and in the granularity of day. Only challenge-based keys (CHECKBOX, INVISIBLE), will have challenge-based data.
291    { # Metrics related to challenges.
292      &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.
293      &quot;nocaptchaCount&quot;: &quot;A String&quot;, # Count of nocaptchas (successful verification without a challenge) issued.
294      &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.
295      &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.
296    },
297  ],
298  &quot;name&quot;: &quot;A String&quot;, # Output only. The name of the metrics, in the format &quot;projects/{project}/keys/{key}/metrics&quot;.
299  &quot;scoreMetrics&quot;: [ # Metrics will be continuous and in order by dates, and in the granularity of day. All Key types should have score-based data.
300    { # Metrics related to scoring.
301      &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. Populated only for SCORE keys.
302        &quot;a_key&quot;: { # Score distribution.
303          &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).
304            &quot;a_key&quot;: &quot;A String&quot;,
305          },
306        },
307      },
308      &quot;overallMetrics&quot;: { # Score distribution. # Aggregated score metrics for all traffic.
309        &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).
310          &quot;a_key&quot;: &quot;A String&quot;,
311        },
312      },
313    },
314  ],
315  &quot;startTime&quot;: &quot;A String&quot;, # Inclusive start time aligned to a day (UTC).
316}</pre>
317</div>
318
319<div class="method">
320    <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
321  <pre>Returns the list of all keys that belong to a project.
322
323Args:
324  parent: string, Required. The name of the project that contains the keys that will be listed, in the format &quot;projects/{project}&quot;. (required)
325  pageSize: integer, Optional. The maximum number of keys to return. Default is 10. Max limit is 1000.
326  pageToken: string, Optional. The next_page_token value returned from a previous. ListKeysRequest, if any.
327  x__xgafv: string, V1 error format.
328    Allowed values
329      1 - v1 error format
330      2 - v2 error format
331
332Returns:
333  An object of the form:
334
335    { # Response to request to list keys in a project.
336  &quot;keys&quot;: [ # Key details.
337    { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
338      &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
339        &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
340        &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
341          &quot;A String&quot;,
342        ],
343      },
344      &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
345      &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
346      &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
347        &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
348        &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
349          &quot;A String&quot;,
350        ],
351      },
352      &quot;labels&quot;: { # See Creating and managing labels.
353        &quot;a_key&quot;: &quot;A String&quot;,
354      },
355      &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
356      &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
357        &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
358        &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
359      },
360      &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
361        &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
362        &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
363      },
364      &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
365        &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
366        &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
367        &quot;allowedDomains&quot;: [ # 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;
368          &quot;A String&quot;,
369        ],
370        &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
371        &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
372      },
373    },
374  ],
375  &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.
376}</pre>
377</div>
378
379<div class="method">
380    <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
381  <pre>Retrieves the next page of results.
382
383Args:
384  previous_request: The request for the previous page. (required)
385  previous_response: The response from the request for the previous page. (required)
386
387Returns:
388  A request object that you can call &#x27;execute()&#x27; on to request the next
389  page. Returns None if there are no more items in the collection.
390    </pre>
391</div>
392
393<div class="method">
394    <code class="details" id="migrate">migrate(name, body=None, x__xgafv=None)</code>
395  <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 Site Key, and your user must have the reCAPTCHA Enterprise Admin IAM role in the destination project.
396
397Args:
398  name: string, Required. The name of the key to be migrated, in the format &quot;projects/{project}/keys/{key}&quot;. (required)
399  body: object, The request body.
400    The object takes the form of:
401
402{ # The migrate key request message.
403}
404
405  x__xgafv: string, V1 error format.
406    Allowed values
407      1 - v1 error format
408      2 - v2 error format
409
410Returns:
411  An object of the form:
412
413    { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
414  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
415    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
416    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
417      &quot;A String&quot;,
418    ],
419  },
420  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
421  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
422  &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
423    &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
424    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
425      &quot;A String&quot;,
426    ],
427  },
428  &quot;labels&quot;: { # See Creating and managing labels.
429    &quot;a_key&quot;: &quot;A String&quot;,
430  },
431  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
432  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
433    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
434    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
435  },
436  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
437    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
438    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
439  },
440  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
441    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
442    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
443    &quot;allowedDomains&quot;: [ # 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;
444      &quot;A String&quot;,
445    ],
446    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
447    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
448  },
449}</pre>
450</div>
451
452<div class="method">
453    <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
454  <pre>Updates the specified key.
455
456Args:
457  name: string, The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;. (required)
458  body: object, The request body.
459    The object takes the form of:
460
461{ # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
462  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
463    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
464    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
465      &quot;A String&quot;,
466    ],
467  },
468  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
469  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
470  &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
471    &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
472    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
473      &quot;A String&quot;,
474    ],
475  },
476  &quot;labels&quot;: { # See Creating and managing labels.
477    &quot;a_key&quot;: &quot;A String&quot;,
478  },
479  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
480  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
481    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
482    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
483  },
484  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
485    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
486    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
487  },
488  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
489    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
490    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
491    &quot;allowedDomains&quot;: [ # 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;
492      &quot;A String&quot;,
493    ],
494    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
495    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
496  },
497}
498
499  updateMask: string, Optional. The mask to control which fields of the key get updated. If the mask is not present, all fields will be updated.
500  x__xgafv: string, V1 error format.
501    Allowed values
502      1 - v1 error format
503      2 - v2 error format
504
505Returns:
506  An object of the form:
507
508    { # A key used to identify and configure applications (web and/or mobile) that use reCAPTCHA Enterprise.
509  &quot;androidSettings&quot;: { # Settings specific to keys that can be used by Android apps. # Settings for keys that can be used by Android apps.
510    &quot;allowAllPackageNames&quot;: True or False, # If set to true, allowed_package_names are not enforced.
511    &quot;allowedPackageNames&quot;: [ # Android package names of apps allowed to use the key. Example: &#x27;com.companyname.appname&#x27;
512      &quot;A String&quot;,
513    ],
514  },
515  &quot;createTime&quot;: &quot;A String&quot;, # The timestamp corresponding to the creation of this Key.
516  &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key. Modifiable by user.
517  &quot;iosSettings&quot;: { # Settings specific to keys that can be used by iOS apps. # Settings for keys that can be used by iOS apps.
518    &quot;allowAllBundleIds&quot;: True or False, # If set to true, allowed_bundle_ids are not enforced.
519    &quot;allowedBundleIds&quot;: [ # iOS bundle ids of apps allowed to use the key. Example: &#x27;com.companyname.productname.appname&#x27;
520      &quot;A String&quot;,
521    ],
522  },
523  &quot;labels&quot;: { # See Creating and managing labels.
524    &quot;a_key&quot;: &quot;A String&quot;,
525  },
526  &quot;name&quot;: &quot;A String&quot;, # The resource name for the Key in the format &quot;projects/{project}/keys/{key}&quot;.
527  &quot;testingOptions&quot;: { # Options for user acceptance testing. # Options for user acceptance testing.
528    &quot;testingChallenge&quot;: &quot;A String&quot;, # For challenge-based keys only (CHECKBOX, INVISIBLE), all challenge requests for this site will return nocaptcha if NOCAPTCHA, or an unsolvable challenge if CHALLENGE.
529    &quot;testingScore&quot;: 3.14, # All assessments for this Key will return this score. Must be between 0 (likely not legitimate) and 1 (likely legitimate) inclusive.
530  },
531  &quot;wafSettings&quot;: { # Settings specific to keys that can be used for WAF (Web Application Firewall). # Settings for WAF
532    &quot;wafFeature&quot;: &quot;A String&quot;, # Required. The WAF feature for which this key is enabled.
533    &quot;wafService&quot;: &quot;A String&quot;, # Required. The WAF service that uses this key.
534  },
535  &quot;webSettings&quot;: { # Settings specific to keys that can be used by websites. # Settings for keys that can be used by websites.
536    &quot;allowAllDomains&quot;: True or False, # If set to true, it means allowed_domains will not be enforced.
537    &quot;allowAmpTraffic&quot;: True or False, # If set to true, the key can be used on AMP (Accelerated Mobile Pages) websites. This is supported only for the SCORE integration type.
538    &quot;allowedDomains&quot;: [ # 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;
539      &quot;A String&quot;,
540    ],
541    &quot;challengeSecurityPreference&quot;: &quot;A String&quot;, # Settings for the frequency and difficulty at which this key triggers captcha challenges. This should only be specified for IntegrationTypes CHECKBOX and INVISIBLE.
542    &quot;integrationType&quot;: &quot;A String&quot;, # Required. Describes how this key is integrated with the website.
543  },
544}</pre>
545</div>
546
547</body></html>