blob: 32d7fc7670f50501c0b8b6e8e645ba0d019011ec [file] [log] [blame]
yoshi-code-bot3dd15272021-04-21 15:07:48 -07001<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="apikeys_v2.html">API Keys API</a> . <a href="apikeys_v2.projects.html">projects</a> . <a href="apikeys_v2.projects.locations.html">locations</a> . <a href="apikeys_v2.projects.locations.keys.html">keys</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="#clone">clone(name, body=None, x__xgafv=None)</a></code></p>
79<p class="firstline">Clones the existing key's restriction and display name to a new API key. The service account must have the `apikeys.keys.get` and `apikeys.keys.create` permissions in the project. NOTE: Key is a global resource; hence the only supported value for location is `global`.</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, keyId=None, x__xgafv=None)</a></code></p>
85<p class="firstline">Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
86<p class="toc_element">
87 <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
89<p class="toc_element">
90 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
91<p class="firstline">Gets the metadata for an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
92<p class="toc_element">
93 <code><a href="#getKeyString">getKeyString(name, x__xgafv=None)</a></code></p>
94<p class="firstline">Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
95<p class="toc_element">
96 <code><a href="#list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Lists the API keys owned by a project. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
98<p class="toc_element">
99 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
100<p class="firstline">Retrieves the next page of results.</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">Patches the modifiable fields of an API key. The key string of the API key isn't included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
104<p class="toc_element">
105 <code><a href="#undelete">undelete(name, body=None, x__xgafv=None)</a></code></p>
106<p class="firstline">Undeletes an API key which was deleted within 30 days. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
107<h3>Method Details</h3>
108<div class="method">
109 <code class="details" id="clone">clone(name, body=None, x__xgafv=None)</code>
110 <pre>Clones the existing key&#x27;s restriction and display name to a new API key. The service account must have the `apikeys.keys.get` and `apikeys.keys.create` permissions in the project. NOTE: Key is a global resource; hence the only supported value for location is `global`.
111
112Args:
113 name: string, Required. The resource name of the API key to be cloned in the same project. (required)
114 body: object, The request body.
115 The object takes the form of:
116
117{ # Request message for `CloneKey` method.
118 &quot;keyId&quot;: &quot;A String&quot;, # User specified key id (optional). If specified, it will become the final component of the key resource name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the id must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. The id must NOT be a UUID-like string.
119}
120
121 x__xgafv: string, V1 error format.
122 Allowed values
123 1 - v1 error format
124 2 - v2 error format
125
126Returns:
127 An object of the form:
128
129 { # This resource represents a long-running operation that is the result of a network API call.
130 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
131 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
132 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
133 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
134 {
135 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
136 },
137 ],
138 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
139 },
140 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
141 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
142 },
143 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
144 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
145 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
146 },
147}</pre>
148</div>
149
150<div class="method">
151 <code class="details" id="close">close()</code>
152 <pre>Close httplib2 connections.</pre>
153</div>
154
155<div class="method">
156 <code class="details" id="create">create(parent, body=None, keyId=None, x__xgafv=None)</code>
157 <pre>Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.
158
159Args:
160 parent: string, Required. The project in which the API key is created. (required)
161 body: object, The request body.
162 The object takes the form of:
163
164{ # The representation of a key managed by the API Keys API.
165 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
166 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
167 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
168 &quot;etag&quot;: &quot;A String&quot;, # Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
169 &quot;keyString&quot;: &quot;A String&quot;, # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method.
170 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the key. The `name` has the form: `projects//locations/global/keys/`. For example: `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` NOTE: Key is a global resource; hence the only supported value for location is `global`.
171 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
172 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
173 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
174 { # Identifier of an Android application for key use.
175 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
176 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
177 },
178 ],
179 },
180 &quot;apiTargets&quot;: [ # A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
181 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
182 &quot;methods&quot;: [ # Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
183 &quot;A String&quot;,
184 ],
185 &quot;service&quot;: &quot;A String&quot;, # The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
186 },
187 ],
188 &quot;browserKeyRestrictions&quot;: { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key.
189 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
190 &quot;A String&quot;,
191 ],
192 },
193 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
194 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
195 &quot;A String&quot;,
196 ],
197 },
198 &quot;serverKeyRestrictions&quot;: { # The IP addresses of callers that are allowed to use the key. # The IP addresses of callers that are allowed to use the key.
199 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
200 &quot;A String&quot;,
201 ],
202 },
203 },
204 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
205 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
206}
207
208 keyId: string, User specified key id (optional). If specified, it will become the final component of the key resource name. The id must be unique within the project, must conform with RFC-1034, is restricted to lower-cased letters, and has a maximum length of 63 characters. In another word, the id must match the regular expression: `[a-z]([a-z0-9-]{0,61}[a-z0-9])?`. The id must NOT be a UUID-like string.
209 x__xgafv: string, V1 error format.
210 Allowed values
211 1 - v1 error format
212 2 - v2 error format
213
214Returns:
215 An object of the form:
216
217 { # This resource represents a long-running operation that is the result of a network API call.
218 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
219 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
220 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
221 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
222 {
223 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
224 },
225 ],
226 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
227 },
228 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
229 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
230 },
231 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
232 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
233 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
234 },
235}</pre>
236</div>
237
238<div class="method">
239 <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
240 <pre>Deletes an API key. Deleted key can be retrieved within 30 days of deletion. Afterward, key will be purged from the project. NOTE: Key is a global resource; hence the only supported value for location is `global`.
241
242Args:
243 name: string, Required. The resource name of the API key to be deleted. (required)
244 etag: string, Optional. The etag known to the client for the expected state of the key. This is to be used for optimistic concurrency.
245 x__xgafv: string, V1 error format.
246 Allowed values
247 1 - v1 error format
248 2 - v2 error format
249
250Returns:
251 An object of the form:
252
253 { # This resource represents a long-running operation that is the result of a network API call.
254 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
255 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
256 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
257 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
258 {
259 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
260 },
261 ],
262 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
263 },
264 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
265 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
266 },
267 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
268 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
269 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
270 },
271}</pre>
272</div>
273
274<div class="method">
275 <code class="details" id="get">get(name, x__xgafv=None)</code>
276 <pre>Gets the metadata for an API key. The key string of the API key isn&#x27;t included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.
277
278Args:
279 name: string, Required. The resource name of the API key to get. (required)
280 x__xgafv: string, V1 error format.
281 Allowed values
282 1 - v1 error format
283 2 - v2 error format
284
285Returns:
286 An object of the form:
287
288 { # The representation of a key managed by the API Keys API.
289 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
290 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
291 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
292 &quot;etag&quot;: &quot;A String&quot;, # Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
293 &quot;keyString&quot;: &quot;A String&quot;, # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method.
294 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the key. The `name` has the form: `projects//locations/global/keys/`. For example: `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` NOTE: Key is a global resource; hence the only supported value for location is `global`.
295 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
296 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
297 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
298 { # Identifier of an Android application for key use.
299 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
300 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
301 },
302 ],
303 },
304 &quot;apiTargets&quot;: [ # A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
305 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
306 &quot;methods&quot;: [ # Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
307 &quot;A String&quot;,
308 ],
309 &quot;service&quot;: &quot;A String&quot;, # The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
310 },
311 ],
312 &quot;browserKeyRestrictions&quot;: { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key.
313 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
314 &quot;A String&quot;,
315 ],
316 },
317 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
318 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
319 &quot;A String&quot;,
320 ],
321 },
322 &quot;serverKeyRestrictions&quot;: { # The IP addresses of callers that are allowed to use the key. # The IP addresses of callers that are allowed to use the key.
323 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
324 &quot;A String&quot;,
325 ],
326 },
327 },
328 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
329 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
330}</pre>
331</div>
332
333<div class="method">
334 <code class="details" id="getKeyString">getKeyString(name, x__xgafv=None)</code>
335 <pre>Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.
336
337Args:
338 name: string, Required. The resource name of the API key to be retrieved. (required)
339 x__xgafv: string, V1 error format.
340 Allowed values
341 1 - v1 error format
342 2 - v2 error format
343
344Returns:
345 An object of the form:
346
347 { # Response message for `GetKeyString` method.
348 &quot;keyString&quot;: &quot;A String&quot;, # An encrypted and signed value of the key.
349}</pre>
350</div>
351
352<div class="method">
353 <code class="details" id="list">list(parent, filter=None, pageSize=None, pageToken=None, x__xgafv=None)</code>
354 <pre>Lists the API keys owned by a project. The key string of the API key isn&#x27;t included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.
355
356Args:
357 parent: string, Required. Lists all API keys associated with this project. (required)
358 filter: string, Optional. Only list keys that conform to the specified filter. The allowed filter strings are `state:ACTIVE` and `state:DELETED`. By default, ListKeys returns only active keys.
359 pageSize: integer, Optional. Specifies the maximum number of results to be returned at a time.
360 pageToken: string, Optional. Requests a specific page of results.
361 x__xgafv: string, V1 error format.
362 Allowed values
363 1 - v1 error format
364 2 - v2 error format
365
366Returns:
367 An object of the form:
368
369 { # Response message for `ListKeys` method.
370 &quot;keys&quot;: [ # A list of API keys.
371 { # The representation of a key managed by the API Keys API.
372 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
373 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
374 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
375 &quot;etag&quot;: &quot;A String&quot;, # Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
376 &quot;keyString&quot;: &quot;A String&quot;, # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method.
377 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the key. The `name` has the form: `projects//locations/global/keys/`. For example: `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` NOTE: Key is a global resource; hence the only supported value for location is `global`.
378 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
379 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
380 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
381 { # Identifier of an Android application for key use.
382 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
383 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
384 },
385 ],
386 },
387 &quot;apiTargets&quot;: [ # A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
388 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
389 &quot;methods&quot;: [ # Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
390 &quot;A String&quot;,
391 ],
392 &quot;service&quot;: &quot;A String&quot;, # The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
393 },
394 ],
395 &quot;browserKeyRestrictions&quot;: { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key.
396 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
397 &quot;A String&quot;,
398 ],
399 },
400 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
401 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
402 &quot;A String&quot;,
403 ],
404 },
405 &quot;serverKeyRestrictions&quot;: { # The IP addresses of callers that are allowed to use the key. # The IP addresses of callers that are allowed to use the key.
406 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
407 &quot;A String&quot;,
408 ],
409 },
410 },
411 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
412 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
413 },
414 ],
415 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token for the next page of results.
416}</pre>
417</div>
418
419<div class="method">
420 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
421 <pre>Retrieves the next page of results.
422
423Args:
424 previous_request: The request for the previous page. (required)
425 previous_response: The response from the request for the previous page. (required)
426
427Returns:
428 A request object that you can call &#x27;execute()&#x27; on to request the next
429 page. Returns None if there are no more items in the collection.
430 </pre>
431</div>
432
433<div class="method">
434 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
435 <pre>Patches the modifiable fields of an API key. The key string of the API key isn&#x27;t included in the response. NOTE: Key is a global resource; hence the only supported value for location is `global`.
436
437Args:
438 name: string, Output only. The resource name of the key. The `name` has the form: `projects//locations/global/keys/`. For example: `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` NOTE: Key is a global resource; hence the only supported value for location is `global`. (required)
439 body: object, The request body.
440 The object takes the form of:
441
442{ # The representation of a key managed by the API Keys API.
443 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
444 &quot;deleteTime&quot;: &quot;A String&quot;, # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty.
445 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
446 &quot;etag&quot;: &quot;A String&quot;, # Output only. A checksum computed by the server based on the current value of the Key resource. This may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding.
447 &quot;keyString&quot;: &quot;A String&quot;, # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method.
448 &quot;name&quot;: &quot;A String&quot;, # Output only. The resource name of the key. The `name` has the form: `projects//locations/global/keys/`. For example: `projects/123456867718/locations/global/keys/b7ff1f9f-8275-410a-94dd-3855ee9b5dd2` NOTE: Key is a global resource; hence the only supported value for location is `global`.
449 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
450 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
451 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
452 { # Identifier of an Android application for key use.
453 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
454 &quot;sha1Fingerprint&quot;: &quot;A String&quot;, # The SHA1 fingerprint of the application. For example, both sha1 formats are acceptable : DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09 or DA39A3EE5E6B4B0D3255BFEF95601890AFD80709. Output format is the latter.
455 },
456 ],
457 },
458 &quot;apiTargets&quot;: [ # A restriction for a specific service and optionally one or more specific methods. Requests are allowed if they match any of these restrictions. If no restrictions are specified, all targets are allowed.
459 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
460 &quot;methods&quot;: [ # Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
461 &quot;A String&quot;,
462 ],
463 &quot;service&quot;: &quot;A String&quot;, # The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use [`gcloud services list`](/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
464 },
465 ],
466 &quot;browserKeyRestrictions&quot;: { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key.
467 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
468 &quot;A String&quot;,
469 ],
470 },
471 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
472 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
473 &quot;A String&quot;,
474 ],
475 },
476 &quot;serverKeyRestrictions&quot;: { # The IP addresses of callers that are allowed to use the key. # The IP addresses of callers that are allowed to use the key.
477 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
478 &quot;A String&quot;,
479 ],
480 },
481 },
482 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
483 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
484}
485
486 updateMask: string, The field mask specifies which fields to be updated as part of this request. All other fields are ignored. Mutable fields are: `display_name` and `restrictions`. If an update mask is not provided, the service treats it as an implied mask equivalent to all allowed fields that are set on the wire. If the field mask has a special value &quot;*&quot;, the service treats it equivalent to replace all allowed mutable fields.
487 x__xgafv: string, V1 error format.
488 Allowed values
489 1 - v1 error format
490 2 - v2 error format
491
492Returns:
493 An object of the form:
494
495 { # This resource represents a long-running operation that is the result of a network API call.
496 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
497 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
498 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
499 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
500 {
501 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
502 },
503 ],
504 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
505 },
506 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
507 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
508 },
509 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
510 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
511 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
512 },
513}</pre>
514</div>
515
516<div class="method">
517 <code class="details" id="undelete">undelete(name, body=None, x__xgafv=None)</code>
518 <pre>Undeletes an API key which was deleted within 30 days. NOTE: Key is a global resource; hence the only supported value for location is `global`.
519
520Args:
521 name: string, Required. The resource name of the API key to be undeleted. (required)
522 body: object, The request body.
523 The object takes the form of:
524
525{ # Request message for `UndeleteKey` method.
526}
527
528 x__xgafv: string, V1 error format.
529 Allowed values
530 1 - v1 error format
531 2 - v2 error format
532
533Returns:
534 An object of the form:
535
536 { # This resource represents a long-running operation that is the result of a network API call.
537 &quot;done&quot;: True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.
538 &quot;error&quot;: { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation.
539 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
540 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
541 {
542 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
543 },
544 ],
545 &quot;message&quot;: &quot;A String&quot;, # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
546 },
547 &quot;metadata&quot;: { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
548 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
549 },
550 &quot;name&quot;: &quot;A String&quot;, # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.
551 &quot;response&quot;: { # The normal response of the operation in case of success. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`.
552 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
553 },
554}</pre>
555</div>
556
557</body></html>