blob: 3144803b2a401176b5a51f5043c69f10bc75e398 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070081 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Creates 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="#delete">delete(name, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.</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="#get">get(name, publicKeyType=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070088<p class="firstline">Gets a ServiceAccountKey.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080089<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070090 <code><a href="#list">list(name, keyTypes=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070091<p class="firstline">Lists every ServiceAccountKey for a service account.</p>
Dan O'Mearadd494642020-05-01 07:42:23 -070092<p class="toc_element">
93 <code><a href="#upload">upload(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070094<p class="firstline">Creates a ServiceAccountKey, using a public key that you provide.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080095<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700102 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103 <pre>Creates a ServiceAccountKey.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800104
105Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 name: string, Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800108 The object takes the form of:
109
110{ # The service account key create request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700111 &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Which type of key and algorithm to use for the key. The default is currently a 2K RSA key. However this may change in the future.
112 &quot;privateKeyType&quot;: &quot;A String&quot;, # The output format of the private key. The default value is `TYPE_GOOGLE_CREDENTIALS_FILE`, which is the Google Credentials File format.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800113 }
114
115 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400116 Allowed values
117 1 - v1 error format
118 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800119
120Returns:
121 An object of the form:
122
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700123 { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key&#x27;s lifetime. We recommend caching the public key set for a service account for no more than 24 hours to ensure you have access to the latest keys. Public keys for all service accounts are also published at the OAuth2 Service Account API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700124 &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125 &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700126 &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700127 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700128 &quot;keyType&quot;: &quot;A String&quot;, # The key type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700129 &quot;privateKeyType&quot;: &quot;A String&quot;, # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
130 &quot;validBeforeTime&quot;: &quot;A String&quot;, # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
131 &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
132 &quot;privateKeyData&quot;: &quot;A String&quot;, # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800133 }</pre>
134</div>
135
136<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700137 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700138 <pre>Deletes a ServiceAccountKey. Deleting a service account key does not revoke short-lived credentials that have been issued based on the service account key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800139
140Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700141 name: string, Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800142 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400143 Allowed values
144 1 - v1 error format
145 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800146
147Returns:
148 An object of the form:
149
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700150 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800151 }</pre>
152</div>
153
154<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700155 <code class="details" id="get">get(name, publicKeyType=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700156 <pre>Gets a ServiceAccountKey.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800157
158Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700159 name: string, Required. The resource name of the service account key in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required)
160 publicKeyType: string, The output format of the public key requested. X509_PEM is the default output format.
161 Allowed values
162 TYPE_NONE - Unspecified. Returns nothing here.
163 TYPE_X509_PEM_FILE - X509 PEM format.
164 TYPE_RAW_PUBLIC_KEY - Raw public key.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800165 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400166 Allowed values
167 1 - v1 error format
168 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800169
170Returns:
171 An object of the form:
172
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700173 { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key&#x27;s lifetime. We recommend caching the public key set for a service account for no more than 24 hours to ensure you have access to the latest keys. Public keys for all service accounts are also published at the OAuth2 Service Account API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700174 &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700175 &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700176 &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700177 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700178 &quot;keyType&quot;: &quot;A String&quot;, # The key type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700179 &quot;privateKeyType&quot;: &quot;A String&quot;, # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
180 &quot;validBeforeTime&quot;: &quot;A String&quot;, # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
181 &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
182 &quot;privateKeyData&quot;: &quot;A String&quot;, # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800183 }</pre>
184</div>
185
186<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700187 <code class="details" id="list">list(name, keyTypes=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700188 <pre>Lists every ServiceAccountKey for a service account.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800189
190Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700191 name: string, Required. The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID`, will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required)
192 keyTypes: string, Filters the types of keys the user wants to include in the list response. Duplicate key types are not allowed. If no key type is provided, all keys are returned. (repeated)
193 Allowed values
194 KEY_TYPE_UNSPECIFIED - Unspecified key type. The presence of this in the message will immediately result in an error.
195 USER_MANAGED - User-managed keys (managed and rotated by the user).
196 SYSTEM_MANAGED - System-managed keys (managed and rotated by Google).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800197 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400198 Allowed values
199 1 - v1 error format
200 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800201
202Returns:
203 An object of the form:
204
205 { # The service account keys list response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;keys&quot;: [ # The public keys for the service account.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700207 { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key&#x27;s lifetime. We recommend caching the public key set for a service account for no more than 24 hours to ensure you have access to the latest keys. Public keys for all service accounts are also published at the OAuth2 Service Account API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700208 &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700209 &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700210 &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700211 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700212 &quot;keyType&quot;: &quot;A String&quot;, # The key type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 &quot;privateKeyType&quot;: &quot;A String&quot;, # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
214 &quot;validBeforeTime&quot;: &quot;A String&quot;, # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
215 &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
216 &quot;privateKeyData&quot;: &quot;A String&quot;, # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800217 },
218 ],
219 }</pre>
220</div>
221
Dan O'Mearadd494642020-05-01 07:42:23 -0700222<div class="method">
223 <code class="details" id="upload">upload(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700224 <pre>Creates a ServiceAccountKey, using a public key that you provide.
Dan O'Mearadd494642020-05-01 07:42:23 -0700225
226Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700227 name: string, The resource name of the service account in the following format: `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`. Using `-` as a wildcard for the `PROJECT_ID` will infer the project from the account. The `ACCOUNT` value can be the `email` address or the `unique_id` of the service account. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700228 body: object, The request body.
229 The object takes the form of:
230
231{ # The service account key upload request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700232 &quot;publicKeyData&quot;: &quot;A String&quot;, # A field that allows clients to upload their own public key. If set, use this public key data to create a service account key for given service account. Please note, the expected format for this field is X509_PEM.
Dan O'Mearadd494642020-05-01 07:42:23 -0700233 }
234
235 x__xgafv: string, V1 error format.
236 Allowed values
237 1 - v1 error format
238 2 - v2 error format
239
240Returns:
241 An object of the form:
242
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700243 { # Represents a service account key. A service account has two sets of key-pairs: user-managed, and system-managed. User-managed key-pairs can be created and deleted by users. Users are responsible for rotating these keys periodically to ensure security of their service accounts. Users retain the private key of these key-pairs, and Google retains ONLY the public key. System-managed keys are automatically rotated by Google, and are used for signing for a maximum of two weeks. The rotation process is probabilistic, and usage of the new key will gradually ramp up and down over the key&#x27;s lifetime. We recommend caching the public key set for a service account for no more than 24 hours to ensure you have access to the latest keys. Public keys for all service accounts are also published at the OAuth2 Service Account API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700244 &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700245 &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700246 &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700247 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account key in the following format `projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700248 &quot;keyType&quot;: &quot;A String&quot;, # The key type.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700249 &quot;privateKeyType&quot;: &quot;A String&quot;, # The output format for the private key. Only provided in `CreateServiceAccountKey` responses, not in `GetServiceAccountKey` or `ListServiceAccountKey` responses. Google never exposes system-managed private keys, and never retains user-managed private keys.
250 &quot;validBeforeTime&quot;: &quot;A String&quot;, # The key can be used before this timestamp. For system-managed key pairs, this timestamp is the end time for the private key signing operation. The public key could still be used for verification for a few hours after this time.
251 &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
252 &quot;privateKeyData&quot;: &quot;A String&quot;, # The private key data. Only provided in `CreateServiceAccountKey` responses. Make sure to keep the private key data secure because it allows for the assertion of the service account identity. When base64 decoded, the private key data can be used to authenticate with Google API client libraries and with gcloud auth activate-service-account.
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 }</pre>
254</div>
255
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800256</body></html>