Debian Codegraph @

docs/dyn/apikeys_v2.projects.locations.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="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="#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, keyId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.</p>
83 <p class="toc_element">
84 <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
85 <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>
86 <p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88 <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>
89 <p class="toc_element">
90 <code><a href="#getKeyString">getKeyString(name, x__xgafv=None)</a></code></p>
91 <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>
92 <p class="toc_element">
93 <code><a href="#list">list(parent, pageSize=None, pageToken=None, showDeleted=None, x__xgafv=None)</a></code></p>
94 <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>
95 <p class="toc_element">
96 <code><a href="#list_next">list_next()</a></code></p>
97 <p class="firstline">Retrieves the next page of results.</p>
98 <p class="toc_element">
99 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
100 <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>
101 <p class="toc_element">
102 <code><a href="#undelete">undelete(name, body=None, x__xgafv=None)</a></code></p>
103 <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>
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, keyId=None, x__xgafv=None)</code>
112 <pre>Creates a new API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.
113
114 Args:
115 parent: string, Required. The project in which the API key is created. The parent field must be in format of &quot;projects//locations/global&quot;. (required)
116 body: object, The request body.
117 The object takes the form of:
118
119 { # The representation of a key managed by the API Keys API.
120 &quot;annotations&quot;: { # Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
121 &quot;a_key&quot;: &quot;A String&quot;,
122 },
123 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
124 &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.
125 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
126 &quot;etag&quot;: &quot;A String&quot;, # 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. See https://google.aip.dev/154.
127 &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.
128 &quot;name&quot;: &quot;A String&quot;, # Identifier. 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`.
129 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
130 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
131 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
132 { # Identifier of an Android application for key use.
133 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
134 &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.
135 },
136 ],
137 },
138 &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.
139 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
140 &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*`
141 &quot;A String&quot;,
142 ],
143 &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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
144 },
145 ],
146 &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.
147 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
148 &quot;A String&quot;,
149 ],
150 },
151 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
152 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
153 &quot;A String&quot;,
154 ],
155 },
156 &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.
157 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
158 &quot;A String&quot;,
159 ],
160 },
161 },
162 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to.
163 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
164 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
165 }
166
167 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.
168 x__xgafv: string, V1 error format.
169 Allowed values
170 1 - v1 error format
171 2 - v2 error format
172
173 Returns:
174 An object of the form:
175
176 { # This resource represents a long-running operation that is the result of a network API call.
177 &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.
178 &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.
179 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
180 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
181 {
182 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
183 },
184 ],
185 &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.
186 },
187 &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.
188 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
189 },
190 &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}`.
191 &quot;response&quot;: { # The normal, successful response of the operation. 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`.
192 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
193 },
194 }</pre>
195 </div>
196
197 <div class="method">
198 <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
199 <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`.
200
201 Args:
202 name: string, Required. The resource name of the API key to be deleted. (required)
203 etag: string, Optional. The etag known to the client for the expected state of the key. This is to be used for optimistic concurrency.
204 x__xgafv: string, V1 error format.
205 Allowed values
206 1 - v1 error format
207 2 - v2 error format
208
209 Returns:
210 An object of the form:
211
212 { # This resource represents a long-running operation that is the result of a network API call.
213 &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.
214 &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.
215 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
216 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
217 {
218 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
219 },
220 ],
221 &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.
222 },
223 &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.
224 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
225 },
226 &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}`.
227 &quot;response&quot;: { # The normal, successful response of the operation. 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`.
228 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
229 },
230 }</pre>
231 </div>
232
233 <div class="method">
234 <code class="details" id="get">get(name, x__xgafv=None)</code>
235 <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`.
236
237 Args:
238 name: string, Required. The resource name of the API key to get. (required)
239 x__xgafv: string, V1 error format.
240 Allowed values
241 1 - v1 error format
242 2 - v2 error format
243
244 Returns:
245 An object of the form:
246
247 { # The representation of a key managed by the API Keys API.
248 &quot;annotations&quot;: { # Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
249 &quot;a_key&quot;: &quot;A String&quot;,
250 },
251 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
252 &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.
253 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
254 &quot;etag&quot;: &quot;A String&quot;, # 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. See https://google.aip.dev/154.
255 &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.
256 &quot;name&quot;: &quot;A String&quot;, # Identifier. 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`.
257 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
258 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
259 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
260 { # Identifier of an Android application for key use.
261 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
262 &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.
263 },
264 ],
265 },
266 &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.
267 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
268 &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*`
269 &quot;A String&quot;,
270 ],
271 &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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
272 },
273 ],
274 &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.
275 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
276 &quot;A String&quot;,
277 ],
278 },
279 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
280 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
281 &quot;A String&quot;,
282 ],
283 },
284 &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.
285 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
286 &quot;A String&quot;,
287 ],
288 },
289 },
290 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to.
291 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
292 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
293 }</pre>
294 </div>
295
296 <div class="method">
297 <code class="details" id="getKeyString">getKeyString(name, x__xgafv=None)</code>
298 <pre>Get the key string for an API key. NOTE: Key is a global resource; hence the only supported value for location is `global`.
299
300 Args:
301 name: string, Required. The resource name of the API key to be retrieved. (required)
302 x__xgafv: string, V1 error format.
303 Allowed values
304 1 - v1 error format
305 2 - v2 error format
306
307 Returns:
308 An object of the form:
309
310 { # Response message for `GetKeyString` method.
311 &quot;keyString&quot;: &quot;A String&quot;, # An encrypted and signed value of the key.
312 }</pre>
313 </div>
314
315 <div class="method">
316 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, showDeleted=None, x__xgafv=None)</code>
317 <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`.
318
319 Args:
320 parent: string, Required. Lists all API keys associated with this project. The parent field must be in format of &quot;projects//locations/global&quot;. (required)
321 pageSize: integer, Optional. Specifies the maximum number of results to be returned at a time.
322 pageToken: string, Optional. Requests a specific page of results.
323 showDeleted: boolean, Optional. Indicate that keys deleted in the past 30 days should also be returned.
324 x__xgafv: string, V1 error format.
325 Allowed values
326 1 - v1 error format
327 2 - v2 error format
328
329 Returns:
330 An object of the form:
331
332 { # Response message for `ListKeys` method.
333 &quot;keys&quot;: [ # A list of API keys.
334 { # The representation of a key managed by the API Keys API.
335 &quot;annotations&quot;: { # Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
336 &quot;a_key&quot;: &quot;A String&quot;,
337 },
338 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
339 &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.
340 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
341 &quot;etag&quot;: &quot;A String&quot;, # 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. See https://google.aip.dev/154.
342 &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.
343 &quot;name&quot;: &quot;A String&quot;, # Identifier. 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`.
344 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
345 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
346 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
347 { # Identifier of an Android application for key use.
348 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
349 &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.
350 },
351 ],
352 },
353 &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.
354 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
355 &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*`
356 &quot;A String&quot;,
357 ],
358 &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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
359 },
360 ],
361 &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.
362 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
363 &quot;A String&quot;,
364 ],
365 },
366 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
367 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
368 &quot;A String&quot;,
369 ],
370 },
371 &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.
372 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
373 &quot;A String&quot;,
374 ],
375 },
376 },
377 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to.
378 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
379 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
380 },
381 ],
382 &quot;nextPageToken&quot;: &quot;A String&quot;, # The pagination token for the next page of results.
383 }</pre>
384 </div>
385
386 <div class="method">
387 <code class="details" id="list_next">list_next()</code>
388 <pre>Retrieves the next page of results.
389
390 Args:
391 previous_request: The request for the previous page. (required)
392 previous_response: The response from the request for the previous page. (required)
393
394 Returns:
395 A request object that you can call &#x27;execute()&#x27; on to request the next
396 page. Returns None if there are no more items in the collection.
397 </pre>
398 </div>
399
400 <div class="method">
401 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
402 <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`.
403
404 Args:
405 name: string, Identifier. 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)
406 body: object, The request body.
407 The object takes the form of:
408
409 { # The representation of a key managed by the API Keys API.
410 &quot;annotations&quot;: { # Annotations is an unstructured key-value map stored with a policy that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying objects.
411 &quot;a_key&quot;: &quot;A String&quot;,
412 },
413 &quot;createTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was originally created.
414 &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.
415 &quot;displayName&quot;: &quot;A String&quot;, # Human-readable display name of this key that you can modify. The maximum length is 63 characters.
416 &quot;etag&quot;: &quot;A String&quot;, # 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. See https://google.aip.dev/154.
417 &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.
418 &quot;name&quot;: &quot;A String&quot;, # Identifier. 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`.
419 &quot;restrictions&quot;: { # Describes the restrictions on the key. # Key restrictions.
420 &quot;androidKeyRestrictions&quot;: { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key.
421 &quot;allowedApplications&quot;: [ # A list of Android applications that are allowed to make API calls with this key.
422 { # Identifier of an Android application for key use.
423 &quot;packageName&quot;: &quot;A String&quot;, # The package name of the application.
424 &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.
425 },
426 ],
427 },
428 &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.
429 { # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive.
430 &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*`
431 &quot;A String&quot;,
432 ],
433 &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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project.
434 },
435 ],
436 &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.
437 &quot;allowedReferrers&quot;: [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key.
438 &quot;A String&quot;,
439 ],
440 },
441 &quot;iosKeyRestrictions&quot;: { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key.
442 &quot;allowedBundleIds&quot;: [ # A list of bundle IDs that are allowed when making API calls with this key.
443 &quot;A String&quot;,
444 ],
445 },
446 &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.
447 &quot;allowedIps&quot;: [ # A list of the caller IP addresses that are allowed to make API calls with this key.
448 &quot;A String&quot;,
449 ],
450 },
451 },
452 &quot;serviceAccountEmail&quot;: &quot;A String&quot;, # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to.
453 &quot;uid&quot;: &quot;A String&quot;, # Output only. Unique id in UUID4 format.
454 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. A timestamp identifying the time this key was last updated.
455 }
456
457 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`, `restrictions`, and `annotations`. 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.
458 x__xgafv: string, V1 error format.
459 Allowed values
460 1 - v1 error format
461 2 - v2 error format
462
463 Returns:
464 An object of the form:
465
466 { # This resource represents a long-running operation that is the result of a network API call.
467 &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.
468 &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.
469 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
470 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
471 {
472 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
473 },
474 ],
475 &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.
476 },
477 &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.
478 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
479 },
480 &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}`.
481 &quot;response&quot;: { # The normal, successful response of the operation. 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`.
482 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
483 },
484 }</pre>
485 </div>
486
487 <div class="method">
488 <code class="details" id="undelete">undelete(name, body=None, x__xgafv=None)</code>
489 <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`.
490
491 Args:
492 name: string, Required. The resource name of the API key to be undeleted. (required)
493 body: object, The request body.
494 The object takes the form of:
495
496 { # Request message for `UndeleteKey` method.
497 }
498
499 x__xgafv: string, V1 error format.
500 Allowed values
501 1 - v1 error format
502 2 - v2 error format
503
504 Returns:
505 An object of the form:
506
507 { # This resource represents a long-running operation that is the result of a network API call.
508 &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.
509 &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.
510 &quot;code&quot;: 42, # The status code, which should be an enum value of google.rpc.Code.
511 &quot;details&quot;: [ # A list of messages that carry the error details. There is a common set of message types for APIs to use.
512 {
513 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
514 },
515 ],
516 &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.
517 },
518 &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.
519 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
520 },
521 &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}`.
522 &quot;response&quot;: { # The normal, successful response of the operation. 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`.
523 &quot;a_key&quot;: &quot;&quot;, # Properties of the object. Contains field @type with type URL.
524 },
525 }</pre>
526 </div>
527
528 </body></html>