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="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>
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(name, body=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Creates a ServiceAccountKey.</p>
83<p class="toc_element">
84  <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
85<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>
86<p class="toc_element">
87  <code><a href="#disable">disable(name, body=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Disable a ServiceAccountKey. A disabled service account key can be enabled through EnableServiceAccountKey.</p>
89<p class="toc_element">
90  <code><a href="#enable">enable(name, body=None, x__xgafv=None)</a></code></p>
91<p class="firstline">Enable a ServiceAccountKey.</p>
92<p class="toc_element">
93  <code><a href="#get">get(name, publicKeyType=None, x__xgafv=None)</a></code></p>
94<p class="firstline">Gets a ServiceAccountKey.</p>
95<p class="toc_element">
96  <code><a href="#list">list(name, keyTypes=None, x__xgafv=None)</a></code></p>
97<p class="firstline">Lists every ServiceAccountKey for a service account.</p>
98<p class="toc_element">
99  <code><a href="#upload">upload(name, body=None, x__xgafv=None)</a></code></p>
100<p class="firstline">Creates a ServiceAccountKey, using a public key that you provide.</p>
101<h3>Method Details</h3>
102<div class="method">
103    <code class="details" id="close">close()</code>
104  <pre>Close httplib2 connections.</pre>
105</div>
106
107<div class="method">
108    <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
109  <pre>Creates a ServiceAccountKey.
110
111Args:
112  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)
113  body: object, The request body.
114    The object takes the form of:
115
116{ # The service account key create request.
117  &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.
118  &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.
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    { # 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. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.
130  &quot;disabled&quot;: True or False, # The key status.
131  &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
132  &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
133  &quot;keyType&quot;: &quot;A String&quot;, # The key type.
134  &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}`.
135  &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.
136  &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.
137  &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
138  &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
139  &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.
140}</pre>
141</div>
142
143<div class="method">
144    <code class="details" id="delete">delete(name, x__xgafv=None)</code>
145  <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.
146
147Args:
148  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)
149  x__xgafv: string, V1 error format.
150    Allowed values
151      1 - v1 error format
152      2 - v2 error format
153
154Returns:
155  An object of the form:
156
157    { # 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 `{}`.
158}</pre>
159</div>
160
161<div class="method">
162    <code class="details" id="disable">disable(name, body=None, x__xgafv=None)</code>
163  <pre>Disable a ServiceAccountKey. A disabled service account key can be enabled through EnableServiceAccountKey.
164
165Args:
166  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)
167  body: object, The request body.
168    The object takes the form of:
169
170{ # The service account key disable request.
171}
172
173  x__xgafv: string, V1 error format.
174    Allowed values
175      1 - v1 error format
176      2 - v2 error format
177
178Returns:
179  An object of the form:
180
181    { # 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 `{}`.
182}</pre>
183</div>
184
185<div class="method">
186    <code class="details" id="enable">enable(name, body=None, x__xgafv=None)</code>
187  <pre>Enable a ServiceAccountKey.
188
189Args:
190  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)
191  body: object, The request body.
192    The object takes the form of:
193
194{ # The service account key enable request.
195}
196
197  x__xgafv: string, V1 error format.
198    Allowed values
199      1 - v1 error format
200      2 - v2 error format
201
202Returns:
203  An object of the form:
204
205    { # 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 `{}`.
206}</pre>
207</div>
208
209<div class="method">
210    <code class="details" id="get">get(name, publicKeyType=None, x__xgafv=None)</code>
211  <pre>Gets a ServiceAccountKey.
212
213Args:
214  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)
215  publicKeyType: string, The output format of the public key requested. X509_PEM is the default output format.
216    Allowed values
217      TYPE_NONE - Unspecified. Returns nothing here.
218      TYPE_X509_PEM_FILE - X509 PEM format.
219      TYPE_RAW_PUBLIC_KEY - Raw public key.
220  x__xgafv: string, V1 error format.
221    Allowed values
222      1 - v1 error format
223      2 - v2 error format
224
225Returns:
226  An object of the form:
227
228    { # 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. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.
229  &quot;disabled&quot;: True or False, # The key status.
230  &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
231  &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
232  &quot;keyType&quot;: &quot;A String&quot;, # The key type.
233  &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}`.
234  &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.
235  &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.
236  &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
237  &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
238  &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.
239}</pre>
240</div>
241
242<div class="method">
243    <code class="details" id="list">list(name, keyTypes=None, x__xgafv=None)</code>
244  <pre>Lists every ServiceAccountKey for a service account.
245
246Args:
247  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)
248  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)
249    Allowed values
250      KEY_TYPE_UNSPECIFIED - Unspecified key type. The presence of this in the message will immediately result in an error.
251      USER_MANAGED - User-managed keys (managed and rotated by the user).
252      SYSTEM_MANAGED - System-managed keys (managed and rotated by Google).
253  x__xgafv: string, V1 error format.
254    Allowed values
255      1 - v1 error format
256      2 - v2 error format
257
258Returns:
259  An object of the form:
260
261    { # The service account keys list response.
262  &quot;keys&quot;: [ # The public keys for the service account.
263    { # 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. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.
264      &quot;disabled&quot;: True or False, # The key status.
265      &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
266      &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
267      &quot;keyType&quot;: &quot;A String&quot;, # The key type.
268      &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}`.
269      &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.
270      &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.
271      &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
272      &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
273      &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.
274    },
275  ],
276}</pre>
277</div>
278
279<div class="method">
280    <code class="details" id="upload">upload(name, body=None, x__xgafv=None)</code>
281  <pre>Creates a ServiceAccountKey, using a public key that you provide.
282
283Args:
284  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)
285  body: object, The request body.
286    The object takes the form of:
287
288{ # The service account key upload request.
289  &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.
290}
291
292  x__xgafv: string, V1 error format.
293    Allowed values
294      1 - v1 error format
295      2 - v2 error format
296
297Returns:
298  An object of the form:
299
300    { # 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. If you cache the public key set for a service account, we recommend that you update the cache every 15 minutes. User-managed keys can be added and removed at any time, so it is important to update the cache frequently. For Google-managed keys, Google will publish a key at least 6 hours before it is first used for signing and will keep publishing it for at least 6 hours after it was last used for signing. Public keys for all service accounts are also published at the OAuth2 Service Account API.
301  &quot;disabled&quot;: True or False, # The key status.
302  &quot;keyAlgorithm&quot;: &quot;A String&quot;, # Specifies the algorithm (and possibly key size) for the key.
303  &quot;keyOrigin&quot;: &quot;A String&quot;, # The key origin.
304  &quot;keyType&quot;: &quot;A String&quot;, # The key type.
305  &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}`.
306  &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.
307  &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.
308  &quot;publicKeyData&quot;: &quot;A String&quot;, # The public key data. Only provided in `GetServiceAccountKey` responses.
309  &quot;validAfterTime&quot;: &quot;A String&quot;, # The key can be used after this timestamp.
310  &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.
311}</pre>
312</div>
313
314</body></html>