| 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 "projects//locations/global". (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 |
"annotations": { # 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 |
"a_key": "A String", |
| 122 |
}, |
| 123 |
"createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. |
| 124 |
"deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. |
| 125 |
"displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. |
| 126 |
"etag": "A String", # 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 |
"keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. |
| 128 |
"name": "A 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`. |
| 129 |
"restrictions": { # Describes the restrictions on the key. # Key restrictions. |
| 130 |
"androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. |
| 131 |
"allowedApplications": [ # 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 |
"packageName": "A String", # The package name of the application. |
| 134 |
"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. |
| 135 |
}, |
| 136 |
], |
| 137 |
}, |
| 138 |
"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. |
| 139 |
{ # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive. |
| 140 |
"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*` |
| 141 |
"A String", |
| 142 |
], |
| 143 |
"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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project. |
| 144 |
}, |
| 145 |
], |
| 146 |
"browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. |
| 147 |
"allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. |
| 148 |
"A String", |
| 149 |
], |
| 150 |
}, |
| 151 |
"iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. |
| 152 |
"allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. |
| 153 |
"A String", |
| 154 |
], |
| 155 |
}, |
| 156 |
"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. |
| 157 |
"allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. |
| 158 |
"A String", |
| 159 |
], |
| 160 |
}, |
| 161 |
}, |
| 162 |
"serviceAccountEmail": "A String", # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to. |
| 163 |
"uid": "A String", # Output only. Unique id in UUID4 format. |
| 164 |
"updateTime": "A String", # 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 |
"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. |
| 178 |
"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. |
| 179 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 180 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 181 |
{ |
| 182 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 183 |
}, |
| 184 |
], |
| 185 |
"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. |
| 186 |
}, |
| 187 |
"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. |
| 188 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 189 |
}, |
| 190 |
"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}`. |
| 191 |
"response": { # 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 |
"a_key": "", # 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 |
"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. |
| 214 |
"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. |
| 215 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 216 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 217 |
{ |
| 218 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 219 |
}, |
| 220 |
], |
| 221 |
"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. |
| 222 |
}, |
| 223 |
"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. |
| 224 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 225 |
}, |
| 226 |
"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}`. |
| 227 |
"response": { # 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 |
"a_key": "", # 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'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 |
"annotations": { # 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 |
"a_key": "A String", |
| 250 |
}, |
| 251 |
"createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. |
| 252 |
"deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. |
| 253 |
"displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. |
| 254 |
"etag": "A String", # 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 |
"keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. |
| 256 |
"name": "A 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`. |
| 257 |
"restrictions": { # Describes the restrictions on the key. # Key restrictions. |
| 258 |
"androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. |
| 259 |
"allowedApplications": [ # 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 |
"packageName": "A String", # The package name of the application. |
| 262 |
"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. |
| 263 |
}, |
| 264 |
], |
| 265 |
}, |
| 266 |
"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. |
| 267 |
{ # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive. |
| 268 |
"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*` |
| 269 |
"A String", |
| 270 |
], |
| 271 |
"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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project. |
| 272 |
}, |
| 273 |
], |
| 274 |
"browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. |
| 275 |
"allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. |
| 276 |
"A String", |
| 277 |
], |
| 278 |
}, |
| 279 |
"iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. |
| 280 |
"allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. |
| 281 |
"A String", |
| 282 |
], |
| 283 |
}, |
| 284 |
"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. |
| 285 |
"allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. |
| 286 |
"A String", |
| 287 |
], |
| 288 |
}, |
| 289 |
}, |
| 290 |
"serviceAccountEmail": "A String", # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to. |
| 291 |
"uid": "A String", # Output only. Unique id in UUID4 format. |
| 292 |
"updateTime": "A String", # 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 |
"keyString": "A String", # 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'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 "projects//locations/global". (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 |
"keys": [ # A list of API keys. |
| 334 |
{ # The representation of a key managed by the API Keys API. |
| 335 |
"annotations": { # 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 |
"a_key": "A String", |
| 337 |
}, |
| 338 |
"createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. |
| 339 |
"deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. |
| 340 |
"displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. |
| 341 |
"etag": "A String", # 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 |
"keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. |
| 343 |
"name": "A 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`. |
| 344 |
"restrictions": { # Describes the restrictions on the key. # Key restrictions. |
| 345 |
"androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. |
| 346 |
"allowedApplications": [ # 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 |
"packageName": "A String", # The package name of the application. |
| 349 |
"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. |
| 350 |
}, |
| 351 |
], |
| 352 |
}, |
| 353 |
"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. |
| 354 |
{ # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive. |
| 355 |
"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*` |
| 356 |
"A String", |
| 357 |
], |
| 358 |
"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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project. |
| 359 |
}, |
| 360 |
], |
| 361 |
"browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. |
| 362 |
"allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. |
| 363 |
"A String", |
| 364 |
], |
| 365 |
}, |
| 366 |
"iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. |
| 367 |
"allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. |
| 368 |
"A String", |
| 369 |
], |
| 370 |
}, |
| 371 |
"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. |
| 372 |
"allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. |
| 373 |
"A String", |
| 374 |
], |
| 375 |
}, |
| 376 |
}, |
| 377 |
"serviceAccountEmail": "A String", # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to. |
| 378 |
"uid": "A String", # Output only. Unique id in UUID4 format. |
| 379 |
"updateTime": "A String", # Output only. A timestamp identifying the time this key was last updated. |
| 380 |
}, |
| 381 |
], |
| 382 |
"nextPageToken": "A String", # 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 'execute()' 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'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 |
"annotations": { # 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 |
"a_key": "A String", |
| 412 |
}, |
| 413 |
"createTime": "A String", # Output only. A timestamp identifying the time this key was originally created. |
| 414 |
"deleteTime": "A String", # Output only. A timestamp when this key was deleted. If the resource is not deleted, this must be empty. |
| 415 |
"displayName": "A String", # Human-readable display name of this key that you can modify. The maximum length is 63 characters. |
| 416 |
"etag": "A String", # 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 |
"keyString": "A String", # Output only. An encrypted and signed value held by this key. This field can be accessed only through the `GetKeyString` method. |
| 418 |
"name": "A 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`. |
| 419 |
"restrictions": { # Describes the restrictions on the key. # Key restrictions. |
| 420 |
"androidKeyRestrictions": { # The Android apps that are allowed to use the key. # The Android apps that are allowed to use the key. |
| 421 |
"allowedApplications": [ # 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 |
"packageName": "A String", # The package name of the application. |
| 424 |
"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. |
| 425 |
}, |
| 426 |
], |
| 427 |
}, |
| 428 |
"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. |
| 429 |
{ # A restriction for a specific service and optionally one or multiple specific methods. Both fields are case insensitive. |
| 430 |
"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*` |
| 431 |
"A String", |
| 432 |
], |
| 433 |
"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`](https://cloud.google.com/sdk/gcloud/reference/services/list) to get a list of services that are enabled in the project. |
| 434 |
}, |
| 435 |
], |
| 436 |
"browserKeyRestrictions": { # The HTTP referrers (websites) that are allowed to use the key. # The HTTP referrers (websites) that are allowed to use the key. |
| 437 |
"allowedReferrers": [ # A list of regular expressions for the referrer URLs that are allowed to make API calls with this key. |
| 438 |
"A String", |
| 439 |
], |
| 440 |
}, |
| 441 |
"iosKeyRestrictions": { # The iOS apps that are allowed to use the key. # The iOS apps that are allowed to use the key. |
| 442 |
"allowedBundleIds": [ # A list of bundle IDs that are allowed when making API calls with this key. |
| 443 |
"A String", |
| 444 |
], |
| 445 |
}, |
| 446 |
"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. |
| 447 |
"allowedIps": [ # A list of the caller IP addresses that are allowed to make API calls with this key. |
| 448 |
"A String", |
| 449 |
], |
| 450 |
}, |
| 451 |
}, |
| 452 |
"serviceAccountEmail": "A String", # Optional. The email address of [the service account](https://cloud.google.com/iam/docs/service-accounts) the key is bound to. |
| 453 |
"uid": "A String", # Output only. Unique id in UUID4 format. |
| 454 |
"updateTime": "A String", # 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 "*", 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 |
"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. |
| 468 |
"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. |
| 469 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 470 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 471 |
{ |
| 472 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 473 |
}, |
| 474 |
], |
| 475 |
"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. |
| 476 |
}, |
| 477 |
"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. |
| 478 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 479 |
}, |
| 480 |
"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}`. |
| 481 |
"response": { # 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 |
"a_key": "", # 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 |
"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. |
| 509 |
"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. |
| 510 |
"code": 42, # The status code, which should be an enum value of google.rpc.Code. |
| 511 |
"details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. |
| 512 |
{ |
| 513 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 514 |
}, |
| 515 |
], |
| 516 |
"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. |
| 517 |
}, |
| 518 |
"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. |
| 519 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 520 |
}, |
| 521 |
"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}`. |
| 522 |
"response": { # 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 |
"a_key": "", # Properties of the object. Contains field @type with type URL. |
| 524 |
}, |
| 525 |
}</pre> |
| 526 |
</div> |
| 527 |
|
| 528 |
</body></html> |