blob: 6fc63baceca6b7e552c60b79d44c9a055f78ad32 [file] [log] [blame]
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001<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
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070075<h1><a href="iam_v1.html">Identity and Access Management (IAM) API</a> . <a href="iam_v1.projects.html">projects</a> . <a href="iam_v1.projects.serviceAccounts.html">serviceAccounts</a> . <a href="iam_v1.projects.serviceAccounts.keys.html">keys</a></h1>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040079<p class="firstline">Creates a ServiceAccountKey</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080080<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070081 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070082<p class="firstline">Deletes a ServiceAccountKey.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080083<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070084 <code><a href="#get">get(name, publicKeyType=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040085<p class="firstline">Gets the ServiceAccountKey</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080086<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070087 <code><a href="#list">list(name, keyTypes=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070088<p class="firstline">Lists ServiceAccountKeys.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070089<p class="toc_element">
90 <code><a href="#upload">upload(name, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Upload public key for a given service account.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080092<h3>Method Details</h3>
93<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -070094 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040095 <pre>Creates a ServiceAccountKey
96and returns it.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097
98Args:
Dan O'Mearadd494642020-05-01 07:42:23 -070099 name: string, Required. The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700100`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
101Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
102the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400103`unique_id` of the service account. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700104 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800105 The object takes the form of:
106
107{ # The service account key create request.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108 "privateKeyType": "A String", # The output format of the private key. The default value is
109 # `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File
110 # format.
Dan O'Mearadd494642020-05-01 07:42:23 -0700111 "keyAlgorithm": "A String", # Which type of key and algorithm to use for the key.
112 # The default is currently a 2K RSA key. However this may change in the
113 # future.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800114 }
115
116 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400117 Allowed values
118 1 - v1 error format
119 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800120
121Returns:
122 An object of the form:
123
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400124 { # Represents a service account key.
125 #
126 # A service account has two sets of key-pairs: user-managed, and
127 # system-managed.
128 #
129 # User-managed key-pairs can be created and deleted by users. Users are
130 # responsible for rotating these keys periodically to ensure security of
131 # their service accounts. Users retain the private key of these key-pairs,
132 # and Google retains ONLY the public key.
133 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700134 # System-managed keys are automatically rotated by Google, and are used for
135 # signing for a maximum of two weeks. The rotation process is probabilistic,
136 # and usage of the new key will gradually ramp up and down over the key's
137 # lifetime. We recommend caching the public key set for a service account for
138 # no more than 24 hours to ensure you have access to the latest keys.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400139 #
140 # Public keys for all service accounts are also published at the OAuth2
141 # Service Account API.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700142 "keyOrigin": "A String", # The key origin.
143 "validAfterTime": "A String", # The key can be used after this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700144 "keyType": "A String", # The key type.
Thomas Coffee2f245372017-03-27 10:39:26 -0700145 "validBeforeTime": "A String", # The key can be used before this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700146 # For system-managed key pairs, this timestamp is the end time for the
147 # private key signing operation. The public key could still be used
148 # for verification for a few hours after this time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400149 "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700150 # responses. Make sure to keep the private key data secure because it
151 # allows for the assertion of the service account identity.
152 # When base64 decoded, the private key data can be used to authenticate with
153 # Google API client libraries and with
Dan O'Mearadd494642020-05-01 07:42:23 -0700154 # &lt;a href="/sdk/gcloud/reference/auth/activate-service-account"&gt;gcloud
155 # auth activate-service-account&lt;/a&gt;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400156 "privateKeyType": "A String", # The output format for the private key.
157 # Only provided in `CreateServiceAccountKey` responses, not
158 # in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
159 #
160 # Google never exposes system-managed private keys, and never retains
161 # user-managed private keys.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700162 "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700163 "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 "name": "A String", # The resource name of the service account key in the following format
165 # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800166 }</pre>
167</div>
168
169<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700170 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700171 <pre>Deletes a ServiceAccountKey.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800172
173Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700174 name: string, Required. The resource name of the service account key in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700175`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
176Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
177the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400178`unique_id` of the service account. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800179 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400180 Allowed values
181 1 - v1 error format
182 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800183
184Returns:
185 An object of the form:
186
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400187 { # A generic empty message that you can re-use to avoid defining duplicated
188 # empty messages in your APIs. A typical example is to use it as the request
189 # or the response type of an API method. For instance:
190 #
191 # service Foo {
192 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
193 # }
194 #
195 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800196 }</pre>
197</div>
198
199<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700200 <code class="details" id="get">get(name, publicKeyType=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400201 <pre>Gets the ServiceAccountKey
202by key id.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800203
204Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700205 name: string, Required. The resource name of the service account key in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400207
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700208Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
209the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400210`unique_id` of the service account. (required)
211 publicKeyType: string, The output format of the public key requested.
212X509_PEM is the default output format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800213 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400214 Allowed values
215 1 - v1 error format
216 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800217
218Returns:
219 An object of the form:
220
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400221 { # Represents a service account key.
222 #
223 # A service account has two sets of key-pairs: user-managed, and
224 # system-managed.
225 #
226 # User-managed key-pairs can be created and deleted by users. Users are
227 # responsible for rotating these keys periodically to ensure security of
228 # their service accounts. Users retain the private key of these key-pairs,
229 # and Google retains ONLY the public key.
230 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700231 # System-managed keys are automatically rotated by Google, and are used for
232 # signing for a maximum of two weeks. The rotation process is probabilistic,
233 # and usage of the new key will gradually ramp up and down over the key's
234 # lifetime. We recommend caching the public key set for a service account for
235 # no more than 24 hours to ensure you have access to the latest keys.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400236 #
237 # Public keys for all service accounts are also published at the OAuth2
238 # Service Account API.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700239 "keyOrigin": "A String", # The key origin.
240 "validAfterTime": "A String", # The key can be used after this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700241 "keyType": "A String", # The key type.
Thomas Coffee2f245372017-03-27 10:39:26 -0700242 "validBeforeTime": "A String", # The key can be used before this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700243 # For system-managed key pairs, this timestamp is the end time for the
244 # private key signing operation. The public key could still be used
245 # for verification for a few hours after this time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400246 "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700247 # responses. Make sure to keep the private key data secure because it
248 # allows for the assertion of the service account identity.
249 # When base64 decoded, the private key data can be used to authenticate with
250 # Google API client libraries and with
Dan O'Mearadd494642020-05-01 07:42:23 -0700251 # &lt;a href="/sdk/gcloud/reference/auth/activate-service-account"&gt;gcloud
252 # auth activate-service-account&lt;/a&gt;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400253 "privateKeyType": "A String", # The output format for the private key.
254 # Only provided in `CreateServiceAccountKey` responses, not
255 # in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
256 #
257 # Google never exposes system-managed private keys, and never retains
258 # user-managed private keys.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700259 "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700260 "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700261 "name": "A String", # The resource name of the service account key in the following format
262 # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800263 }</pre>
264</div>
265
266<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700267 <code class="details" id="list">list(name, keyTypes=None, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700268 <pre>Lists ServiceAccountKeys.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800269
270Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700271 name: string, Required. The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700272`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400273
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700274Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from
275the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400276`unique_id` of the service account. (required)
277 keyTypes: string, Filters the types of keys the user wants to include in the list
278response. Duplicate key types are not allowed. If no key type
279is provided, all keys are returned. (repeated)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800280 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400281 Allowed values
282 1 - v1 error format
283 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800284
285Returns:
286 An object of the form:
287
288 { # The service account keys list response.
289 "keys": [ # The public keys for the service account.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400290 { # Represents a service account key.
291 #
292 # A service account has two sets of key-pairs: user-managed, and
293 # system-managed.
294 #
295 # User-managed key-pairs can be created and deleted by users. Users are
296 # responsible for rotating these keys periodically to ensure security of
297 # their service accounts. Users retain the private key of these key-pairs,
298 # and Google retains ONLY the public key.
299 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700300 # System-managed keys are automatically rotated by Google, and are used for
301 # signing for a maximum of two weeks. The rotation process is probabilistic,
302 # and usage of the new key will gradually ramp up and down over the key's
303 # lifetime. We recommend caching the public key set for a service account for
304 # no more than 24 hours to ensure you have access to the latest keys.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400305 #
306 # Public keys for all service accounts are also published at the OAuth2
307 # Service Account API.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700308 "keyOrigin": "A String", # The key origin.
309 "validAfterTime": "A String", # The key can be used after this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700310 "keyType": "A String", # The key type.
Thomas Coffee2f245372017-03-27 10:39:26 -0700311 "validBeforeTime": "A String", # The key can be used before this timestamp.
Dan O'Mearadd494642020-05-01 07:42:23 -0700312 # For system-managed key pairs, this timestamp is the end time for the
313 # private key signing operation. The public key could still be used
314 # for verification for a few hours after this time.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400315 "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey`
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700316 # responses. Make sure to keep the private key data secure because it
317 # allows for the assertion of the service account identity.
318 # When base64 decoded, the private key data can be used to authenticate with
319 # Google API client libraries and with
Dan O'Mearadd494642020-05-01 07:42:23 -0700320 # &lt;a href="/sdk/gcloud/reference/auth/activate-service-account"&gt;gcloud
321 # auth activate-service-account&lt;/a&gt;.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400322 "privateKeyType": "A String", # The output format for the private key.
323 # Only provided in `CreateServiceAccountKey` responses, not
324 # in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
325 #
326 # Google never exposes system-managed private keys, and never retains
327 # user-managed private keys.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700328 "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700329 "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700330 "name": "A String", # The resource name of the service account key in the following format
331 # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800332 },
333 ],
334 }</pre>
335</div>
336
Dan O'Mearadd494642020-05-01 07:42:23 -0700337<div class="method">
338 <code class="details" id="upload">upload(name, body=None, x__xgafv=None)</code>
339 <pre>Upload public key for a given service account.
340This rpc will create a
341ServiceAccountKey that has the
342provided public key and returns it.
343
344Args:
345 name: string, The resource name of the service account in the following format:
346`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
347Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
348the account. The `ACCOUNT` value can be the `email` address or the
349`unique_id` of the service account. (required)
350 body: object, The request body.
351 The object takes the form of:
352
353{ # The service account key upload request.
354 "publicKeyData": "A String", # A field that allows clients to upload their own public key. If set,
355 # use this public key data to create a service account key for given
356 # service account.
357 # Please note, the expected format for this field is X509_PEM.
358 }
359
360 x__xgafv: string, V1 error format.
361 Allowed values
362 1 - v1 error format
363 2 - v2 error format
364
365Returns:
366 An object of the form:
367
368 { # Represents a service account key.
369 #
370 # A service account has two sets of key-pairs: user-managed, and
371 # system-managed.
372 #
373 # User-managed key-pairs can be created and deleted by users. Users are
374 # responsible for rotating these keys periodically to ensure security of
375 # their service accounts. Users retain the private key of these key-pairs,
376 # and Google retains ONLY the public key.
377 #
378 # System-managed keys are automatically rotated by Google, and are used for
379 # signing for a maximum of two weeks. The rotation process is probabilistic,
380 # and usage of the new key will gradually ramp up and down over the key's
381 # lifetime. We recommend caching the public key set for a service account for
382 # no more than 24 hours to ensure you have access to the latest keys.
383 #
384 # Public keys for all service accounts are also published at the OAuth2
385 # Service Account API.
386 "keyOrigin": "A String", # The key origin.
387 "validAfterTime": "A String", # The key can be used after this timestamp.
388 "keyType": "A String", # The key type.
389 "validBeforeTime": "A String", # The key can be used before this timestamp.
390 # For system-managed key pairs, this timestamp is the end time for the
391 # private key signing operation. The public key could still be used
392 # for verification for a few hours after this time.
393 "privateKeyData": "A String", # The private key data. Only provided in `CreateServiceAccountKey`
394 # responses. Make sure to keep the private key data secure because it
395 # allows for the assertion of the service account identity.
396 # When base64 decoded, the private key data can be used to authenticate with
397 # Google API client libraries and with
398 # &lt;a href="/sdk/gcloud/reference/auth/activate-service-account"&gt;gcloud
399 # auth activate-service-account&lt;/a&gt;.
400 "privateKeyType": "A String", # The output format for the private key.
401 # Only provided in `CreateServiceAccountKey` responses, not
402 # in `GetServiceAccountKey` or `ListServiceAccountKey` responses.
403 #
404 # Google never exposes system-managed private keys, and never retains
405 # user-managed private keys.
406 "keyAlgorithm": "A String", # Specifies the algorithm (and possibly key size) for the key.
407 "publicKeyData": "A String", # The public key data. Only provided in `GetServiceAccountKey` responses.
408 "name": "A String", # The resource name of the service account key in the following format
409 # `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
410 }</pre>
411</div>
412
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800413</body></html>