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="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'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 "keyId": "A 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. 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 "done": 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 "error": { # 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 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 133 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 134 { 135 "a_key": "", # Properties of the object. Contains field @type with type URL. 136 }, 137 ], 138 "message": "A String", # 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 "metadata": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 142 }, 143 "name": "A String", # 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 "response": { # 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 "a_key": "", # 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 "createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. 166 "deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. 167 "displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. 168 "etag": "A String", # 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 "keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. 170 "name": "A 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`. 171 "restrictions": { # Describes the restrictions on the key. # Key restrictions. 172 "androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. 173 "allowedApplications": [ # 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 "packageName": "A String", # The package name of the application. 176 "sha1Fingerprint": "A String", # 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 "apiTargets": [ # 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 "methods": [ # 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 "A String", 184 ], 185 "service": "A String", # 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 "browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. 189 "allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. 190 "A String", 191 ], 192 }, 193 "iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. 194 "allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. 195 "A String", 196 ], 197 }, 198 "serverKeyRestrictions": { # 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 "allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. 200 "A String", 201 ], 202 }, 203 }, 204 "uid": "A String", # Output only. Unique id in UUID4 format. 205 "updateTime": "A String", # 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 "done": 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 "error": { # 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 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 221 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 222 { 223 "a_key": "", # Properties of the object. Contains field @type with type URL. 224 }, 225 ], 226 "message": "A String", # 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 "metadata": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 230 }, 231 "name": "A String", # 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 "response": { # 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 "a_key": "", # 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 "done": 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 "error": { # 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 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 257 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 258 { 259 "a_key": "", # Properties of the object. Contains field @type with type URL. 260 }, 261 ], 262 "message": "A String", # 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 "metadata": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 266 }, 267 "name": "A String", # 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 "response": { # 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 "a_key": "", # 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'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 "createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. 290 "deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. 291 "displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. 292 "etag": "A String", # 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 "keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. 294 "name": "A 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`. 295 "restrictions": { # Describes the restrictions on the key. # Key restrictions. 296 "androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. 297 "allowedApplications": [ # 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 "packageName": "A String", # The package name of the application. 300 "sha1Fingerprint": "A String", # 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 "apiTargets": [ # 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 "methods": [ # 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 "A String", 308 ], 309 "service": "A String", # 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 "browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. 313 "allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. 314 "A String", 315 ], 316 }, 317 "iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. 318 "allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. 319 "A String", 320 ], 321 }, 322 "serverKeyRestrictions": { # 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 "allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. 324 "A String", 325 ], 326 }, 327 }, 328 "uid": "A String", # Output only. Unique id in UUID4 format. 329 "updateTime": "A String", # 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 "keyString": "A String", # 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'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 "keys": [ # A list of API keys. 371 { # The representation of a key managed by the API Keys API. 372 "createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. 373 "deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. 374 "displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. 375 "etag": "A String", # 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 "keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. 377 "name": "A 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`. 378 "restrictions": { # Describes the restrictions on the key. # Key restrictions. 379 "androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. 380 "allowedApplications": [ # 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 "packageName": "A String", # The package name of the application. 383 "sha1Fingerprint": "A String", # 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 "apiTargets": [ # 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 "methods": [ # 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 "A String", 391 ], 392 "service": "A String", # 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 "browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. 396 "allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. 397 "A String", 398 ], 399 }, 400 "iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. 401 "allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. 402 "A String", 403 ], 404 }, 405 "serverKeyRestrictions": { # 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 "allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. 407 "A String", 408 ], 409 }, 410 }, 411 "uid": "A String", # Output only. Unique id in UUID4 format. 412 "updateTime": "A String", # Output only. A timestamp identifying the time this key was last updated. 413 }, 414 ], 415 "nextPageToken": "A String", # 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 'execute()' 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'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 "createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. 444 "deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. 445 "displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. 446 "etag": "A String", # 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 "keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. 448 "name": "A 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`. 449 "restrictions": { # Describes the restrictions on the key. # Key restrictions. 450 "androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. 451 "allowedApplications": [ # 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 "packageName": "A String", # The package name of the application. 454 "sha1Fingerprint": "A String", # 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 "apiTargets": [ # 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 "methods": [ # 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 "A String", 462 ], 463 "service": "A String", # 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 "browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. 467 "allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. 468 "A String", 469 ], 470 }, 471 "iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. 472 "allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. 473 "A String", 474 ], 475 }, 476 "serverKeyRestrictions": { # 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 "allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. 478 "A String", 479 ], 480 }, 481 }, 482 "uid": "A String", # Output only. Unique id in UUID4 format. 483 "updateTime": "A String", # 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 "*", 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 "done": 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 "error": { # 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 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 499 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 500 { 501 "a_key": "", # Properties of the object. Contains field @type with type URL. 502 }, 503 ], 504 "message": "A String", # 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 "metadata": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 508 }, 509 "name": "A String", # 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 "response": { # 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 "a_key": "", # 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 "done": 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 "error": { # 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 "code": 42, # The status code, which should be an enum value of google.rpc.Code. 540 "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. 541 { 542 "a_key": "", # Properties of the object. Contains field @type with type URL. 543 }, 544 ], 545 "message": "A String", # 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 "metadata": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 549 }, 550 "name": "A String", # 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 "response": { # 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 "a_key": "", # Properties of the object. Contains field @type with type URL. 553 }, 554}</pre> 555</div> 556 557</body></html>