blob: 430359657162ea6a111109376b1e79dadd910e69 [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></h1>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080076<h2>Instance Methods</h2>
77<p class="toc_element">
78 <code><a href="iam_v1.projects.serviceAccounts.keys.html">keys()</a></code>
79</p>
80<p class="firstline">Returns the keys Resource.</p>
81
82<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070083 <code><a href="#create">create(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070084<p class="firstline">Creates a ServiceAccount.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080085<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070086 <code><a href="#delete">delete(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070087<p class="firstline">Deletes a ServiceAccount.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080088<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089 <code><a href="#disable">disable(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070090<p class="firstline">Disables a ServiceAccount immediately.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070091<p class="toc_element">
92 <code><a href="#enable">enable(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070093<p class="firstline">Enables a ServiceAccount that was disabled by</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="toc_element">
Thomas Coffee2f245372017-03-27 10:39:26 -070095 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070096<p class="firstline">Gets a ServiceAccount.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -080097<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070098 <code><a href="#getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070099<p class="firstline">Gets the IAM policy that is attached to a ServiceAccount. This IAM</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800100<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700101 <code><a href="#list">list(name, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
102<p class="firstline">Lists every ServiceAccount that belongs to a specific project.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800103<p class="toc_element">
104 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
105<p class="firstline">Retrieves the next page of results.</p>
106<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700107 <code><a href="#patch">patch(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700108<p class="firstline">Patches a ServiceAccount.</p>
109<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700110 <code><a href="#setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700111<p class="firstline">Sets the IAM policy that is attached to a ServiceAccount.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800112<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700113 <code><a href="#signBlob">signBlob(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700114<p class="firstline">**Note:** This method is deprecated and will stop working on July 1, 2021.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800115<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700116 <code><a href="#signJwt">signJwt(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700117<p class="firstline">**Note:** This method is deprecated and will stop working on July 1, 2021.</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800118<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700119 <code><a href="#testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700120<p class="firstline">Tests whether the caller has the specified permissions on a</p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400121<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700122 <code><a href="#undelete">undelete(name, body=None, x__xgafv=None)</a></code></p>
123<p class="firstline">Restores a deleted ServiceAccount.</p>
124<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -0700125 <code><a href="#update">update(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700126<p class="firstline">**Note:** We are in the process of deprecating this method. Use</p>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800127<h3>Method Details</h3>
128<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700129 <code class="details" id="create">create(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700130 <pre>Creates a ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800131
132Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400133 name: string, Required. The resource name of the project associated with the service
134accounts, such as `projects/my-project-123`. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700135 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800136 The object takes the form of:
137
138{ # The service account create request.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700139 &quot;accountId&quot;: &quot;A String&quot;, # Required. The account id that is used to generate the service account
140 # email address and a stable unique id. It is unique within a project,
141 # must be 6-30 characters long, and match the regular expression
142 # `[a-z]([-a-z0-9]*[a-z0-9])` to comply with RFC1035.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700143 &quot;serviceAccount&quot;: { # An IAM service account. # The ServiceAccount resource to
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700144 # create. Currently, only the following values are user assignable:
Dan O'Mearadd494642020-05-01 07:42:23 -0700145 # `display_name` and `description`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700146 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700147 # A service account is an account for an application or a virtual machine (VM)
148 # instance, not a person. You can use a service account to call Google APIs. To
149 # learn more, read the [overview of service
150 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700151 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700152 # When you create a service account, you specify the project ID that owns the
153 # service account, as well as a name that must be unique within the project.
154 # IAM uses these values to create an email address that identifies the service
155 # account.
156 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
157 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
158 #
159 # Each service account retains its unique ID even if you delete the service
160 # account. For example, if you delete a service account, then create a new
161 # service account with the same name, the new service account has a different
162 # unique ID than the deleted service account.
163 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
164 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
165 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
166 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
167 #
168 # Use one of the following formats:
169 #
170 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
171 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
172 #
173 # As an alternative, you can use the `-` wildcard character instead of the
174 # project ID:
175 #
176 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
177 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
178 #
179 # When possible, avoid using the `-` wildcard character, because it can cause
180 # response messages to contain misleading error codes. For example, if you
181 # try to get the service account
182 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
183 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
184 # Found` error.
185 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
186 # length is 100 UTF-8 bytes.
187 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
188 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
189 # maximum length is 256 UTF-8 bytes.
190 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800191 }
192
193 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400194 Allowed values
195 1 - v1 error format
196 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800197
198Returns:
199 An object of the form:
200
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700201 { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700202 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700203 # A service account is an account for an application or a virtual machine (VM)
204 # instance, not a person. You can use a service account to call Google APIs. To
205 # learn more, read the [overview of service
206 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700207 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700208 # When you create a service account, you specify the project ID that owns the
209 # service account, as well as a name that must be unique within the project.
210 # IAM uses these values to create an email address that identifies the service
211 # account.
212 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
213 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
214 #
215 # Each service account retains its unique ID even if you delete the service
216 # account. For example, if you delete a service account, then create a new
217 # service account with the same name, the new service account has a different
218 # unique ID than the deleted service account.
219 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
220 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
221 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
222 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
223 #
224 # Use one of the following formats:
225 #
226 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
227 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
228 #
229 # As an alternative, you can use the `-` wildcard character instead of the
230 # project ID:
231 #
232 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
233 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
234 #
235 # When possible, avoid using the `-` wildcard character, because it can cause
236 # response messages to contain misleading error codes. For example, if you
237 # try to get the service account
238 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
239 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
240 # Found` error.
241 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
242 # length is 100 UTF-8 bytes.
243 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
244 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
245 # maximum length is 256 UTF-8 bytes.
246 }</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800247</div>
248
249<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700250 <code class="details" id="delete">delete(name, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700251 <pre>Deletes a ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800252
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700253**Warning:** After you delete a service account, you might not be able to
254undelete it. If you know that you need to re-enable the service account in
255the future, use DisableServiceAccount instead.
256
257If you delete a service account, IAM permanently removes the service
258account 30 days later. Google Cloud cannot recover the service account
259after it is permanently removed, even if you file a support request.
260
261To help avoid unplanned outages, we recommend that you disable the service
262account before you delete it. Use DisableServiceAccount to disable the
263service account, then wait at least 24 hours and watch for unintended
264consequences. If there are no unintended consequences, you can delete the
265service account.
266
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800267Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700268 name: string, Required. The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700269`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
270Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
271the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400272`unique_id` of the service account. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800273 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400274 Allowed values
275 1 - v1 error format
276 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800277
278Returns:
279 An object of the form:
280
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400281 { # A generic empty message that you can re-use to avoid defining duplicated
282 # empty messages in your APIs. A typical example is to use it as the request
283 # or the response type of an API method. For instance:
284 #
285 # service Foo {
286 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
287 # }
288 #
289 # The JSON representation for `Empty` is empty JSON object `{}`.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800290 }</pre>
291</div>
292
293<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700294 <code class="details" id="disable">disable(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700295 <pre>Disables a ServiceAccount immediately.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700296
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700297If an application uses the service account to authenticate, that
298application can no longer call Google APIs or access Google Cloud
299resources. Existing access tokens for the service account are rejected, and
300requests for new access tokens will fail.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700301
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700302To re-enable the service account, use EnableServiceAccount. After you
303re-enable the service account, its existing access tokens will be accepted,
304and you can request new access tokens.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700305
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700306To help avoid unplanned outages, we recommend that you disable the service
307account before you delete it. Use this method to disable the service
308account, then wait at least 24 hours and watch for unintended consequences.
309If there are no unintended consequences, you can delete the service account
310with DeleteServiceAccount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311
312Args:
313 name: string, The resource name of the service account in the following format:
314`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
315Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
316the account. The `ACCOUNT` value can be the `email` address or the
317`unique_id` of the service account. (required)
318 body: object, The request body.
319 The object takes the form of:
320
321{ # The service account disable request.
322 }
323
324 x__xgafv: string, V1 error format.
325 Allowed values
326 1 - v1 error format
327 2 - v2 error format
328
329Returns:
330 An object of the form:
331
332 { # A generic empty message that you can re-use to avoid defining duplicated
333 # empty messages in your APIs. A typical example is to use it as the request
334 # or the response type of an API method. For instance:
335 #
336 # service Foo {
337 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
338 # }
339 #
340 # The JSON representation for `Empty` is empty JSON object `{}`.
341 }</pre>
342</div>
343
344<div class="method">
345 <code class="details" id="enable">enable(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700346 <pre>Enables a ServiceAccount that was disabled by
347DisableServiceAccount.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700348
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700349If the service account is already enabled, then this method has no effect.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700350
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700351If the service account was disabled by other means—for example, if Google
352disabled the service account because it was compromised—you cannot use this
353method to enable the service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700354
355Args:
356 name: string, The resource name of the service account in the following format:
Dan O'Mearadd494642020-05-01 07:42:23 -0700357`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
Dan O'Mearadd494642020-05-01 07:42:23 -0700359the account. The `ACCOUNT` value can be the `email` address or the
360`unique_id` of the service account. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700361 body: object, The request body.
362 The object takes the form of:
363
364{ # The service account enable request.
365 }
366
367 x__xgafv: string, V1 error format.
368 Allowed values
369 1 - v1 error format
370 2 - v2 error format
371
372Returns:
373 An object of the form:
374
375 { # A generic empty message that you can re-use to avoid defining duplicated
376 # empty messages in your APIs. A typical example is to use it as the request
377 # or the response type of an API method. For instance:
378 #
379 # service Foo {
380 # rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
381 # }
382 #
383 # The JSON representation for `Empty` is empty JSON object `{}`.
384 }</pre>
385</div>
386
387<div class="method">
Thomas Coffee2f245372017-03-27 10:39:26 -0700388 <code class="details" id="get">get(name, x__xgafv=None)</code>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700389 <pre>Gets a ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800390
391Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700392 name: string, Required. The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700393`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
394Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
395the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400396`unique_id` of the service account. (required)
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800397 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400398 Allowed values
399 1 - v1 error format
400 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800401
402Returns:
403 An object of the form:
404
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700405 { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700406 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700407 # A service account is an account for an application or a virtual machine (VM)
408 # instance, not a person. You can use a service account to call Google APIs. To
409 # learn more, read the [overview of service
410 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700411 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700412 # When you create a service account, you specify the project ID that owns the
413 # service account, as well as a name that must be unique within the project.
414 # IAM uses these values to create an email address that identifies the service
415 # account.
416 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
417 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
418 #
419 # Each service account retains its unique ID even if you delete the service
420 # account. For example, if you delete a service account, then create a new
421 # service account with the same name, the new service account has a different
422 # unique ID than the deleted service account.
423 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
424 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
425 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
426 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
427 #
428 # Use one of the following formats:
429 #
430 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
431 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
432 #
433 # As an alternative, you can use the `-` wildcard character instead of the
434 # project ID:
435 #
436 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
437 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
438 #
439 # When possible, avoid using the `-` wildcard character, because it can cause
440 # response messages to contain misleading error codes. For example, if you
441 # try to get the service account
442 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
443 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
444 # Found` error.
445 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
446 # length is 100 UTF-8 bytes.
447 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
448 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
449 # maximum length is 256 UTF-8 bytes.
450 }</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800451</div>
452
453<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700454 <code class="details" id="getIamPolicy">getIamPolicy(resource, options_requestedPolicyVersion=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700455 <pre>Gets the IAM policy that is attached to a ServiceAccount. This IAM
456policy specifies which members have access to the service account.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800457
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700458This method does not tell you whether the service account has been granted
459any roles on other resources. To check whether a service account has role
460grants on a resource, use the `getIamPolicy` method for that resource. For
461example, to view the role grants for a project, call the Resource Manager
462API&#x27;s
463[`projects.getIamPolicy`](https://cloud.google.com/resource-manager/reference/rest/v1/projects/getIamPolicy)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700464method.
465
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800466Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400467 resource: string, REQUIRED: The resource for which the policy is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -0700468See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700469 options_requestedPolicyVersion: integer, Optional. The policy format version to be returned.
470
471Valid values are 0, 1, and 3. Requests specifying an invalid value will be
472rejected.
473
474Requests for policies with any conditional bindings must specify version 3.
475Policies without any conditional bindings may specify any valid value or
476leave the field unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700477
478To learn which resources support conditions in their IAM policies, see the
479[IAM
480documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800481 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400482 Allowed values
483 1 - v1 error format
484 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800485
486Returns:
487 An object of the form:
488
Dan O'Mearadd494642020-05-01 07:42:23 -0700489 { # An Identity and Access Management (IAM) policy, which specifies access
490 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400491 #
492 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700493 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
494 # `members` to a single `role`. Members can be user accounts, service accounts,
495 # Google groups, and domains (such as G Suite). A `role` is a named list of
496 # permissions; each `role` can be an IAM predefined role or a user-created
497 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400498 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700499 # For some types of Google Cloud resources, a `binding` can also specify a
500 # `condition`, which is a logical expression that allows access to a resource
501 # only if the expression evaluates to `true`. A condition can add constraints
502 # based on attributes of the request, the resource, or both. To learn which
503 # resources support conditions in their IAM policies, see the
504 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -0700505 #
506 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400507 #
508 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700509 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400510 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700511 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
512 # &quot;members&quot;: [
513 # &quot;user:mike@example.com&quot;,
514 # &quot;group:admins@example.com&quot;,
515 # &quot;domain:google.com&quot;,
516 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400517 # ]
518 # },
519 # {
Bu Sun Kim65020912020-05-20 12:08:20 -0700520 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700521 # &quot;members&quot;: [
522 # &quot;user:eve@example.com&quot;
523 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700524 # &quot;condition&quot;: {
525 # &quot;title&quot;: &quot;expirable access&quot;,
526 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
527 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -0700528 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400529 # }
Dan O'Mearadd494642020-05-01 07:42:23 -0700530 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700531 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
532 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400533 # }
534 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700535 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700536 #
537 # bindings:
538 # - members:
539 # - user:mike@example.com
540 # - group:admins@example.com
541 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -0700542 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
543 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700544 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -0700545 # - user:eve@example.com
546 # role: roles/resourcemanager.organizationViewer
547 # condition:
548 # title: expirable access
549 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -0700550 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -0700551 # - etag: BwWWja0YfJA=
552 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700553 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400554 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -0700555 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -0700556 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
557 # prevent simultaneous updates of a policy from overwriting each other.
558 # It is strongly suggested that systems make use of the `etag` in the
559 # read-modify-write cycle to perform policy updates in order to avoid race
560 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
561 # systems are expected to put that etag in the request to `setIamPolicy` to
562 # ensure that their change will be applied to the same version of the policy.
563 #
564 # **Important:** If you use IAM Conditions, you must include the `etag` field
565 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
566 # you to overwrite a version `3` policy with a version `1` policy, and all of
567 # the conditions in the version `3` policy are lost.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700568 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
569 { # Specifies the audit configuration for a service.
570 # The configuration determines which permission types are logged, and what
571 # identities, if any, are exempted from logging.
572 # An AuditConfig must have one or more AuditLogConfigs.
573 #
574 # If there are AuditConfigs for both `allServices` and a specific service,
575 # the union of the two AuditConfigs is used for that service: the log_types
576 # specified in each AuditConfig are enabled, and the exempted_members in each
577 # AuditLogConfig are exempted.
578 #
579 # Example Policy with multiple AuditConfigs:
580 #
581 # {
582 # &quot;audit_configs&quot;: [
583 # {
584 # &quot;service&quot;: &quot;allServices&quot;,
585 # &quot;audit_log_configs&quot;: [
586 # {
587 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
588 # &quot;exempted_members&quot;: [
589 # &quot;user:jose@example.com&quot;
590 # ]
591 # },
592 # {
593 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
594 # },
595 # {
596 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
597 # }
598 # ]
599 # },
600 # {
601 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
602 # &quot;audit_log_configs&quot;: [
603 # {
604 # &quot;log_type&quot;: &quot;DATA_READ&quot;
605 # },
606 # {
607 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
608 # &quot;exempted_members&quot;: [
609 # &quot;user:aliya@example.com&quot;
610 # ]
611 # }
612 # ]
613 # }
614 # ]
615 # }
616 #
617 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
618 # logging. It also exempts jose@example.com from DATA_READ logging, and
619 # aliya@example.com from DATA_WRITE logging.
620 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
621 { # Provides the configuration for logging a type of permissions.
622 # Example:
623 #
624 # {
625 # &quot;audit_log_configs&quot;: [
626 # {
627 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
628 # &quot;exempted_members&quot;: [
629 # &quot;user:jose@example.com&quot;
630 # ]
631 # },
632 # {
633 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
634 # }
635 # ]
636 # }
637 #
638 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
639 # jose@example.com from DATA_READ logging.
640 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
641 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
642 # permission.
643 # Follows the same format of Binding.members.
644 &quot;A String&quot;,
645 ],
646 },
647 ],
648 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
649 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
650 # `allServices` is a special value that covers all services.
651 },
652 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700653 &quot;version&quot;: 42, # Specifies the format of the policy.
654 #
655 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
656 # are rejected.
657 #
658 # Any operation that affects conditional role bindings must specify version
659 # `3`. This requirement applies to the following operations:
660 #
661 # * Getting a policy that includes a conditional role binding
662 # * Adding a conditional role binding to a policy
663 # * Changing a conditional role binding in a policy
664 # * Removing any role binding, with or without a condition, from a policy
665 # that includes conditions
666 #
667 # **Important:** If you use IAM Conditions, you must include the `etag` field
668 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
669 # you to overwrite a version `3` policy with a version `1` policy, and all of
670 # the conditions in the version `3` policy are lost.
671 #
672 # If a policy does not include any conditions, operations on that policy may
673 # specify any valid version or leave the field unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700674 #
675 # To learn which resources support conditions in their IAM policies, see the
676 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -0700677 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -0700678 # `condition` that determines how and when the `bindings` are applied. Each
679 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800680 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700681 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400682 # `members` can have the following values:
683 #
684 # * `allUsers`: A special identifier that represents anyone who is
685 # on the internet; with or without a Google account.
686 #
687 # * `allAuthenticatedUsers`: A special identifier that represents anyone
688 # who is authenticated with a Google account or a service account.
689 #
690 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -0700691 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400692 #
693 #
694 # * `serviceAccount:{emailid}`: An email address that represents a service
695 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
696 #
697 # * `group:{emailid}`: An email address that represents a Google group.
698 # For example, `admins@example.com`.
699 #
Dan O'Mearadd494642020-05-01 07:42:23 -0700700 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
701 # identifier) representing a user that has been recently deleted. For
702 # example, `alice@example.com?uid=123456789012345678901`. If the user is
703 # recovered, this value reverts to `user:{emailid}` and the recovered user
704 # retains the role in the binding.
705 #
706 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
707 # unique identifier) representing a service account that has been recently
708 # deleted. For example,
709 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
710 # If the service account is undeleted, this value reverts to
711 # `serviceAccount:{emailid}` and the undeleted service account retains the
712 # role in the binding.
713 #
714 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
715 # identifier) representing a Google group that has been recently
716 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
717 # the group is recovered, this value reverts to `group:{emailid}` and the
718 # recovered group retains the role in the binding.
719 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400720 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700721 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400722 # users of that domain. For example, `google.com` or `example.com`.
723 #
Bu Sun Kim65020912020-05-20 12:08:20 -0700724 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800725 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700726 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
727 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700728 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
729 #
730 # If the condition evaluates to `true`, then this binding applies to the
731 # current request.
732 #
733 # If the condition evaluates to `false`, then this binding does not apply to
734 # the current request. However, a different role binding might grant the same
735 # role to one or more of the members in this binding.
736 #
737 # To learn which resources support conditions in their IAM policies, see the
738 # [IAM
739 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
740 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
741 # are documented at https://github.com/google/cel-spec.
742 #
743 # Example (Comparison):
744 #
745 # title: &quot;Summary size limit&quot;
746 # description: &quot;Determines if a summary is less than 100 chars&quot;
747 # expression: &quot;document.summary.size() &lt; 100&quot;
748 #
749 # Example (Equality):
750 #
751 # title: &quot;Requestor is owner&quot;
752 # description: &quot;Determines if requestor is the document owner&quot;
753 # expression: &quot;document.owner == request.auth.claims.email&quot;
754 #
755 # Example (Logic):
756 #
757 # title: &quot;Public documents&quot;
758 # description: &quot;Determine whether the document should be publicly visible&quot;
759 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
760 #
761 # Example (Data Manipulation):
762 #
763 # title: &quot;Notification string&quot;
764 # description: &quot;Create a notification string with a timestamp.&quot;
765 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
766 #
767 # The exact variables and functions that may be referenced within an expression
768 # are determined by the service that evaluates it. See the service
769 # documentation for additional information.
770 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
771 # describes the expression, e.g. when hovered over it in a UI.
772 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
773 # reporting, e.g. a file name and a position in the file.
774 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
775 # syntax.
776 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
777 # its purpose. This can be used e.g. in UIs which allow to enter the
778 # expression.
779 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700780 },
781 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800782 }</pre>
783</div>
784
785<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700786 <code class="details" id="list">list(name, pageSize=None, pageToken=None, x__xgafv=None)</code>
787 <pre>Lists every ServiceAccount that belongs to a specific project.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800788
789Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400790 name: string, Required. The resource name of the project associated with the service
791accounts, such as `projects/my-project-123`. (required)
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400792 pageSize: integer, Optional limit on the number of service accounts to include in the
793response. Further accounts can subsequently be obtained by including the
794ListServiceAccountsResponse.next_page_token
795in a subsequent request.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700796
797The default is 20, and the maximum is 100.
798 pageToken: string, Optional pagination token returned in an earlier
799ListServiceAccountsResponse.next_page_token.
Bu Sun Kim65020912020-05-20 12:08:20 -0700800 x__xgafv: string, V1 error format.
801 Allowed values
802 1 - v1 error format
803 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800804
805Returns:
806 An object of the form:
807
808 { # The service account list response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700809 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400810 # ListServiceAccountsRequest.page_token
811 # to this value.
Bu Sun Kim65020912020-05-20 12:08:20 -0700812 &quot;accounts&quot;: [ # The list of matching service accounts.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700813 { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700814 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700815 # A service account is an account for an application or a virtual machine (VM)
816 # instance, not a person. You can use a service account to call Google APIs. To
817 # learn more, read the [overview of service
818 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700819 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700820 # When you create a service account, you specify the project ID that owns the
821 # service account, as well as a name that must be unique within the project.
822 # IAM uses these values to create an email address that identifies the service
823 # account.
824 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
825 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
826 #
827 # Each service account retains its unique ID even if you delete the service
828 # account. For example, if you delete a service account, then create a new
829 # service account with the same name, the new service account has a different
830 # unique ID than the deleted service account.
831 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
832 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
833 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
834 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
835 #
836 # Use one of the following formats:
837 #
838 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
839 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
840 #
841 # As an alternative, you can use the `-` wildcard character instead of the
842 # project ID:
843 #
844 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
845 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
846 #
847 # When possible, avoid using the `-` wildcard character, because it can cause
848 # response messages to contain misleading error codes. For example, if you
849 # try to get the service account
850 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
851 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
852 # Found` error.
853 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
854 # length is 100 UTF-8 bytes.
855 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
856 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
857 # maximum length is 256 UTF-8 bytes.
858 },
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800859 ],
860 }</pre>
861</div>
862
863<div class="method">
864 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
865 <pre>Retrieves the next page of results.
866
867Args:
868 previous_request: The request for the previous page. (required)
869 previous_response: The response from the request for the previous page. (required)
870
871Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700872 A request object that you can call &#x27;execute()&#x27; on to request the next
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -0800873 page. Returns None if there are no more items in the collection.
874 </pre>
875</div>
876
877<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700878 <code class="details" id="patch">patch(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700879 <pre>Patches a ServiceAccount.
880
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700881Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700882 name: string, The resource name of the service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700883
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700884Use one of the following formats:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700885
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700886* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
887* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
888
889As an alternative, you can use the `-` wildcard character instead of the
890project ID:
891
892* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
893* `projects/-/serviceAccounts/{UNIQUE_ID}`
894
895When possible, avoid using the `-` wildcard character, because it can cause
896response messages to contain misleading error codes. For example, if you
897try to get the service account
898`projects/-/serviceAccounts/fake@example.com`, which does not exist, the
899response contains an HTTP `403 Forbidden` error instead of a `404 Not
900Found` error. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -0700901 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700902 The object takes the form of:
903
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700904{ # The request for
905 # PatchServiceAccount.
906 #
907 # You can patch only the `display_name` and `description` fields. You must use
908 # the `update_mask` field to specify which of these fields you want to patch.
909 #
910 # Only the fields specified in the request are guaranteed to be returned in
911 # the response. Other fields may be empty in the response.
912 &quot;serviceAccount&quot;: { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700913 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700914 # A service account is an account for an application or a virtual machine (VM)
915 # instance, not a person. You can use a service account to call Google APIs. To
916 # learn more, read the [overview of service
917 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700918 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700919 # When you create a service account, you specify the project ID that owns the
920 # service account, as well as a name that must be unique within the project.
921 # IAM uses these values to create an email address that identifies the service
922 # account.
923 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
924 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
925 #
926 # Each service account retains its unique ID even if you delete the service
927 # account. For example, if you delete a service account, then create a new
928 # service account with the same name, the new service account has a different
929 # unique ID than the deleted service account.
930 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
931 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
932 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
933 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
934 #
935 # Use one of the following formats:
936 #
937 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
938 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
939 #
940 # As an alternative, you can use the `-` wildcard character instead of the
941 # project ID:
942 #
943 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
944 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
945 #
946 # When possible, avoid using the `-` wildcard character, because it can cause
947 # response messages to contain misleading error codes. For example, if you
948 # try to get the service account
949 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
950 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
951 # Found` error.
952 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
953 # length is 100 UTF-8 bytes.
954 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
955 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
956 # maximum length is 256 UTF-8 bytes.
957 },
Bu Sun Kim65020912020-05-20 12:08:20 -0700958 &quot;updateMask&quot;: &quot;A String&quot;,
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700959 }
960
961 x__xgafv: string, V1 error format.
962 Allowed values
963 1 - v1 error format
964 2 - v2 error format
965
966Returns:
967 An object of the form:
968
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700969 { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700970 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700971 # A service account is an account for an application or a virtual machine (VM)
972 # instance, not a person. You can use a service account to call Google APIs. To
973 # learn more, read the [overview of service
974 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700975 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700976 # When you create a service account, you specify the project ID that owns the
977 # service account, as well as a name that must be unique within the project.
978 # IAM uses these values to create an email address that identifies the service
979 # account.
980 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
981 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
982 #
983 # Each service account retains its unique ID even if you delete the service
984 # account. For example, if you delete a service account, then create a new
985 # service account with the same name, the new service account has a different
986 # unique ID than the deleted service account.
987 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
988 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
989 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
990 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
991 #
992 # Use one of the following formats:
993 #
994 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
995 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
996 #
997 # As an alternative, you can use the `-` wildcard character instead of the
998 # project ID:
999 #
1000 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
1001 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
1002 #
1003 # When possible, avoid using the `-` wildcard character, because it can cause
1004 # response messages to contain misleading error codes. For example, if you
1005 # try to get the service account
1006 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
1007 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
1008 # Found` error.
1009 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
1010 # length is 100 UTF-8 bytes.
1011 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
1012 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
1013 # maximum length is 256 UTF-8 bytes.
1014 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001015</div>
1016
1017<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001018 <code class="details" id="setIamPolicy">setIamPolicy(resource, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001019 <pre>Sets the IAM policy that is attached to a ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001020
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001021Use this method to grant or revoke access to the service account. For
1022example, you could grant a member the ability to impersonate the service
1023account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001024
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001025This method does not enable the service account to access other resources.
1026To grant roles to a service account on a resource, follow these steps:
1027
10281. Call the resource&#x27;s `getIamPolicy` method to get its current IAM policy.
10292. Edit the policy so that it binds the service account to an IAM role for
1030the resource.
10313. Call the resource&#x27;s `setIamPolicy` method to update its IAM policy.
1032
1033For detailed instructions, see
1034[Granting roles to a service account for specific
1035resources](https://cloud.google.com/iam/help/service-accounts/granting-access-to-service-accounts).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001036
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001037Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001038 resource: string, REQUIRED: The resource for which the policy is being specified.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001039See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001040 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001041 The object takes the form of:
1042
1043{ # Request message for `SetIamPolicy` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001044 &quot;policy&quot;: { # An Identity and Access Management (IAM) policy, which specifies access # REQUIRED: The complete policy to be applied to the `resource`. The size of
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001045 # the policy is limited to a few 10s of KB. An empty policy is a
1046 # valid policy but certain Cloud Platform services (such as Projects)
1047 # might reject them.
Dan O'Mearadd494642020-05-01 07:42:23 -07001048 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001049 #
1050 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001051 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1052 # `members` to a single `role`. Members can be user accounts, service accounts,
1053 # Google groups, and domains (such as G Suite). A `role` is a named list of
1054 # permissions; each `role` can be an IAM predefined role or a user-created
1055 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001056 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001057 # For some types of Google Cloud resources, a `binding` can also specify a
1058 # `condition`, which is a logical expression that allows access to a resource
1059 # only if the expression evaluates to `true`. A condition can add constraints
1060 # based on attributes of the request, the resource, or both. To learn which
1061 # resources support conditions in their IAM policies, see the
1062 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001063 #
1064 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001065 #
1066 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001067 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001068 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001069 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1070 # &quot;members&quot;: [
1071 # &quot;user:mike@example.com&quot;,
1072 # &quot;group:admins@example.com&quot;,
1073 # &quot;domain:google.com&quot;,
1074 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001075 # ]
1076 # },
1077 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001078 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001079 # &quot;members&quot;: [
1080 # &quot;user:eve@example.com&quot;
1081 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001082 # &quot;condition&quot;: {
1083 # &quot;title&quot;: &quot;expirable access&quot;,
1084 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1085 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001086 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001087 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001088 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001089 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1090 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001091 # }
1092 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001093 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001094 #
1095 # bindings:
1096 # - members:
1097 # - user:mike@example.com
1098 # - group:admins@example.com
1099 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001100 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1101 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001102 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001103 # - user:eve@example.com
1104 # role: roles/resourcemanager.organizationViewer
1105 # condition:
1106 # title: expirable access
1107 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001108 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001109 # - etag: BwWWja0YfJA=
1110 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001111 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001112 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001113 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001114 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1115 # prevent simultaneous updates of a policy from overwriting each other.
1116 # It is strongly suggested that systems make use of the `etag` in the
1117 # read-modify-write cycle to perform policy updates in order to avoid race
1118 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1119 # systems are expected to put that etag in the request to `setIamPolicy` to
1120 # ensure that their change will be applied to the same version of the policy.
1121 #
1122 # **Important:** If you use IAM Conditions, you must include the `etag` field
1123 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1124 # you to overwrite a version `3` policy with a version `1` policy, and all of
1125 # the conditions in the version `3` policy are lost.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001126 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1127 { # Specifies the audit configuration for a service.
1128 # The configuration determines which permission types are logged, and what
1129 # identities, if any, are exempted from logging.
1130 # An AuditConfig must have one or more AuditLogConfigs.
1131 #
1132 # If there are AuditConfigs for both `allServices` and a specific service,
1133 # the union of the two AuditConfigs is used for that service: the log_types
1134 # specified in each AuditConfig are enabled, and the exempted_members in each
1135 # AuditLogConfig are exempted.
1136 #
1137 # Example Policy with multiple AuditConfigs:
1138 #
1139 # {
1140 # &quot;audit_configs&quot;: [
1141 # {
1142 # &quot;service&quot;: &quot;allServices&quot;,
1143 # &quot;audit_log_configs&quot;: [
1144 # {
1145 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1146 # &quot;exempted_members&quot;: [
1147 # &quot;user:jose@example.com&quot;
1148 # ]
1149 # },
1150 # {
1151 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1152 # },
1153 # {
1154 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
1155 # }
1156 # ]
1157 # },
1158 # {
1159 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
1160 # &quot;audit_log_configs&quot;: [
1161 # {
1162 # &quot;log_type&quot;: &quot;DATA_READ&quot;
1163 # },
1164 # {
1165 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1166 # &quot;exempted_members&quot;: [
1167 # &quot;user:aliya@example.com&quot;
1168 # ]
1169 # }
1170 # ]
1171 # }
1172 # ]
1173 # }
1174 #
1175 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1176 # logging. It also exempts jose@example.com from DATA_READ logging, and
1177 # aliya@example.com from DATA_WRITE logging.
1178 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1179 { # Provides the configuration for logging a type of permissions.
1180 # Example:
1181 #
1182 # {
1183 # &quot;audit_log_configs&quot;: [
1184 # {
1185 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1186 # &quot;exempted_members&quot;: [
1187 # &quot;user:jose@example.com&quot;
1188 # ]
1189 # },
1190 # {
1191 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1192 # }
1193 # ]
1194 # }
1195 #
1196 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1197 # jose@example.com from DATA_READ logging.
1198 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1199 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1200 # permission.
1201 # Follows the same format of Binding.members.
1202 &quot;A String&quot;,
1203 ],
1204 },
1205 ],
1206 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1207 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1208 # `allServices` is a special value that covers all services.
1209 },
1210 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001211 &quot;version&quot;: 42, # Specifies the format of the policy.
1212 #
1213 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1214 # are rejected.
1215 #
1216 # Any operation that affects conditional role bindings must specify version
1217 # `3`. This requirement applies to the following operations:
1218 #
1219 # * Getting a policy that includes a conditional role binding
1220 # * Adding a conditional role binding to a policy
1221 # * Changing a conditional role binding in a policy
1222 # * Removing any role binding, with or without a condition, from a policy
1223 # that includes conditions
1224 #
1225 # **Important:** If you use IAM Conditions, you must include the `etag` field
1226 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1227 # you to overwrite a version `3` policy with a version `1` policy, and all of
1228 # the conditions in the version `3` policy are lost.
1229 #
1230 # If a policy does not include any conditions, operations on that policy may
1231 # specify any valid version or leave the field unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001232 #
1233 # To learn which resources support conditions in their IAM policies, see the
1234 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001235 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001236 # `condition` that determines how and when the `bindings` are applied. Each
1237 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001238 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001239 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001240 # `members` can have the following values:
1241 #
1242 # * `allUsers`: A special identifier that represents anyone who is
1243 # on the internet; with or without a Google account.
1244 #
1245 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1246 # who is authenticated with a Google account or a service account.
1247 #
1248 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001249 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001250 #
1251 #
1252 # * `serviceAccount:{emailid}`: An email address that represents a service
1253 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1254 #
1255 # * `group:{emailid}`: An email address that represents a Google group.
1256 # For example, `admins@example.com`.
1257 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001258 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1259 # identifier) representing a user that has been recently deleted. For
1260 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1261 # recovered, this value reverts to `user:{emailid}` and the recovered user
1262 # retains the role in the binding.
1263 #
1264 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1265 # unique identifier) representing a service account that has been recently
1266 # deleted. For example,
1267 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1268 # If the service account is undeleted, this value reverts to
1269 # `serviceAccount:{emailid}` and the undeleted service account retains the
1270 # role in the binding.
1271 #
1272 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1273 # identifier) representing a Google group that has been recently
1274 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1275 # the group is recovered, this value reverts to `group:{emailid}` and the
1276 # recovered group retains the role in the binding.
1277 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001278 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001279 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001280 # users of that domain. For example, `google.com` or `example.com`.
1281 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001282 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001283 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001284 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1285 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001286 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1287 #
1288 # If the condition evaluates to `true`, then this binding applies to the
1289 # current request.
1290 #
1291 # If the condition evaluates to `false`, then this binding does not apply to
1292 # the current request. However, a different role binding might grant the same
1293 # role to one or more of the members in this binding.
1294 #
1295 # To learn which resources support conditions in their IAM policies, see the
1296 # [IAM
1297 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1298 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1299 # are documented at https://github.com/google/cel-spec.
1300 #
1301 # Example (Comparison):
1302 #
1303 # title: &quot;Summary size limit&quot;
1304 # description: &quot;Determines if a summary is less than 100 chars&quot;
1305 # expression: &quot;document.summary.size() &lt; 100&quot;
1306 #
1307 # Example (Equality):
1308 #
1309 # title: &quot;Requestor is owner&quot;
1310 # description: &quot;Determines if requestor is the document owner&quot;
1311 # expression: &quot;document.owner == request.auth.claims.email&quot;
1312 #
1313 # Example (Logic):
1314 #
1315 # title: &quot;Public documents&quot;
1316 # description: &quot;Determine whether the document should be publicly visible&quot;
1317 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1318 #
1319 # Example (Data Manipulation):
1320 #
1321 # title: &quot;Notification string&quot;
1322 # description: &quot;Create a notification string with a timestamp.&quot;
1323 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1324 #
1325 # The exact variables and functions that may be referenced within an expression
1326 # are determined by the service that evaluates it. See the service
1327 # documentation for additional information.
1328 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1329 # describes the expression, e.g. when hovered over it in a UI.
1330 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1331 # reporting, e.g. a file name and a position in the file.
1332 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1333 # syntax.
1334 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1335 # its purpose. This can be used e.g. in UIs which allow to enter the
1336 # expression.
1337 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001338 },
1339 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001340 },
Bu Sun Kim65020912020-05-20 12:08:20 -07001341 &quot;updateMask&quot;: &quot;A String&quot;, # OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001342 # the fields in the mask will be modified. If no mask is provided, the
1343 # following default mask is used:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001344 #
1345 # `paths: &quot;bindings, etag&quot;`
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001346 }
1347
1348 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001349 Allowed values
1350 1 - v1 error format
1351 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001352
1353Returns:
1354 An object of the form:
1355
Dan O'Mearadd494642020-05-01 07:42:23 -07001356 { # An Identity and Access Management (IAM) policy, which specifies access
1357 # controls for Google Cloud resources.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001358 #
1359 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001360 # A `Policy` is a collection of `bindings`. A `binding` binds one or more
1361 # `members` to a single `role`. Members can be user accounts, service accounts,
1362 # Google groups, and domains (such as G Suite). A `role` is a named list of
1363 # permissions; each `role` can be an IAM predefined role or a user-created
1364 # custom role.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001365 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001366 # For some types of Google Cloud resources, a `binding` can also specify a
1367 # `condition`, which is a logical expression that allows access to a resource
1368 # only if the expression evaluates to `true`. A condition can add constraints
1369 # based on attributes of the request, the resource, or both. To learn which
1370 # resources support conditions in their IAM policies, see the
1371 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Dan O'Mearadd494642020-05-01 07:42:23 -07001372 #
1373 # **JSON example:**
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001374 #
1375 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001376 # &quot;bindings&quot;: [
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001377 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001378 # &quot;role&quot;: &quot;roles/resourcemanager.organizationAdmin&quot;,
1379 # &quot;members&quot;: [
1380 # &quot;user:mike@example.com&quot;,
1381 # &quot;group:admins@example.com&quot;,
1382 # &quot;domain:google.com&quot;,
1383 # &quot;serviceAccount:my-project-id@appspot.gserviceaccount.com&quot;
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001384 # ]
1385 # },
1386 # {
Bu Sun Kim65020912020-05-20 12:08:20 -07001387 # &quot;role&quot;: &quot;roles/resourcemanager.organizationViewer&quot;,
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001388 # &quot;members&quot;: [
1389 # &quot;user:eve@example.com&quot;
1390 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001391 # &quot;condition&quot;: {
1392 # &quot;title&quot;: &quot;expirable access&quot;,
1393 # &quot;description&quot;: &quot;Does not grant access after Sep 2020&quot;,
1394 # &quot;expression&quot;: &quot;request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)&quot;,
Dan O'Mearadd494642020-05-01 07:42:23 -07001395 # }
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001396 # }
Dan O'Mearadd494642020-05-01 07:42:23 -07001397 # ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001398 # &quot;etag&quot;: &quot;BwWWja0YfJA=&quot;,
1399 # &quot;version&quot;: 3
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001400 # }
1401 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001402 # **YAML example:**
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001403 #
1404 # bindings:
1405 # - members:
1406 # - user:mike@example.com
1407 # - group:admins@example.com
1408 # - domain:google.com
Dan O'Mearadd494642020-05-01 07:42:23 -07001409 # - serviceAccount:my-project-id@appspot.gserviceaccount.com
1410 # role: roles/resourcemanager.organizationAdmin
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001411 # - members:
Dan O'Mearadd494642020-05-01 07:42:23 -07001412 # - user:eve@example.com
1413 # role: roles/resourcemanager.organizationViewer
1414 # condition:
1415 # title: expirable access
1416 # description: Does not grant access after Sep 2020
Bu Sun Kim65020912020-05-20 12:08:20 -07001417 # expression: request.time &lt; timestamp(&#x27;2020-10-01T00:00:00.000Z&#x27;)
Dan O'Mearadd494642020-05-01 07:42:23 -07001418 # - etag: BwWWja0YfJA=
1419 # - version: 3
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001420 #
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001421 # For a description of IAM and its features, see the
Dan O'Mearadd494642020-05-01 07:42:23 -07001422 # [IAM documentation](https://cloud.google.com/iam/docs/).
Bu Sun Kim65020912020-05-20 12:08:20 -07001423 &quot;etag&quot;: &quot;A String&quot;, # `etag` is used for optimistic concurrency control as a way to help
1424 # prevent simultaneous updates of a policy from overwriting each other.
1425 # It is strongly suggested that systems make use of the `etag` in the
1426 # read-modify-write cycle to perform policy updates in order to avoid race
1427 # conditions: An `etag` is returned in the response to `getIamPolicy`, and
1428 # systems are expected to put that etag in the request to `setIamPolicy` to
1429 # ensure that their change will be applied to the same version of the policy.
1430 #
1431 # **Important:** If you use IAM Conditions, you must include the `etag` field
1432 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1433 # you to overwrite a version `3` policy with a version `1` policy, and all of
1434 # the conditions in the version `3` policy are lost.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001435 &quot;auditConfigs&quot;: [ # Specifies cloud audit logging configuration for this policy.
1436 { # Specifies the audit configuration for a service.
1437 # The configuration determines which permission types are logged, and what
1438 # identities, if any, are exempted from logging.
1439 # An AuditConfig must have one or more AuditLogConfigs.
1440 #
1441 # If there are AuditConfigs for both `allServices` and a specific service,
1442 # the union of the two AuditConfigs is used for that service: the log_types
1443 # specified in each AuditConfig are enabled, and the exempted_members in each
1444 # AuditLogConfig are exempted.
1445 #
1446 # Example Policy with multiple AuditConfigs:
1447 #
1448 # {
1449 # &quot;audit_configs&quot;: [
1450 # {
1451 # &quot;service&quot;: &quot;allServices&quot;,
1452 # &quot;audit_log_configs&quot;: [
1453 # {
1454 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1455 # &quot;exempted_members&quot;: [
1456 # &quot;user:jose@example.com&quot;
1457 # ]
1458 # },
1459 # {
1460 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1461 # },
1462 # {
1463 # &quot;log_type&quot;: &quot;ADMIN_READ&quot;
1464 # }
1465 # ]
1466 # },
1467 # {
1468 # &quot;service&quot;: &quot;sampleservice.googleapis.com&quot;,
1469 # &quot;audit_log_configs&quot;: [
1470 # {
1471 # &quot;log_type&quot;: &quot;DATA_READ&quot;
1472 # },
1473 # {
1474 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;,
1475 # &quot;exempted_members&quot;: [
1476 # &quot;user:aliya@example.com&quot;
1477 # ]
1478 # }
1479 # ]
1480 # }
1481 # ]
1482 # }
1483 #
1484 # For sampleservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1485 # logging. It also exempts jose@example.com from DATA_READ logging, and
1486 # aliya@example.com from DATA_WRITE logging.
1487 &quot;auditLogConfigs&quot;: [ # The configuration for logging of each type of permission.
1488 { # Provides the configuration for logging a type of permissions.
1489 # Example:
1490 #
1491 # {
1492 # &quot;audit_log_configs&quot;: [
1493 # {
1494 # &quot;log_type&quot;: &quot;DATA_READ&quot;,
1495 # &quot;exempted_members&quot;: [
1496 # &quot;user:jose@example.com&quot;
1497 # ]
1498 # },
1499 # {
1500 # &quot;log_type&quot;: &quot;DATA_WRITE&quot;
1501 # }
1502 # ]
1503 # }
1504 #
1505 # This enables &#x27;DATA_READ&#x27; and &#x27;DATA_WRITE&#x27; logging, while exempting
1506 # jose@example.com from DATA_READ logging.
1507 &quot;logType&quot;: &quot;A String&quot;, # The log type that this config enables.
1508 &quot;exemptedMembers&quot;: [ # Specifies the identities that do not cause logging for this type of
1509 # permission.
1510 # Follows the same format of Binding.members.
1511 &quot;A String&quot;,
1512 ],
1513 },
1514 ],
1515 &quot;service&quot;: &quot;A String&quot;, # Specifies a service that will be enabled for audit logging.
1516 # For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1517 # `allServices` is a special value that covers all services.
1518 },
1519 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001520 &quot;version&quot;: 42, # Specifies the format of the policy.
1521 #
1522 # Valid values are `0`, `1`, and `3`. Requests that specify an invalid value
1523 # are rejected.
1524 #
1525 # Any operation that affects conditional role bindings must specify version
1526 # `3`. This requirement applies to the following operations:
1527 #
1528 # * Getting a policy that includes a conditional role binding
1529 # * Adding a conditional role binding to a policy
1530 # * Changing a conditional role binding in a policy
1531 # * Removing any role binding, with or without a condition, from a policy
1532 # that includes conditions
1533 #
1534 # **Important:** If you use IAM Conditions, you must include the `etag` field
1535 # whenever you call `setIamPolicy`. If you omit this field, then IAM allows
1536 # you to overwrite a version `3` policy with a version `1` policy, and all of
1537 # the conditions in the version `3` policy are lost.
1538 #
1539 # If a policy does not include any conditions, operations on that policy may
1540 # specify any valid version or leave the field unset.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001541 #
1542 # To learn which resources support conditions in their IAM policies, see the
1543 # [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
Bu Sun Kim65020912020-05-20 12:08:20 -07001544 &quot;bindings&quot;: [ # Associates a list of `members` to a `role`. Optionally, may specify a
Dan O'Mearadd494642020-05-01 07:42:23 -07001545 # `condition` that determines how and when the `bindings` are applied. Each
1546 # of the `bindings` must contain at least one member.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001547 { # Associates `members` with a `role`.
Bu Sun Kim65020912020-05-20 12:08:20 -07001548 &quot;members&quot;: [ # Specifies the identities requesting access for a Cloud Platform resource.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001549 # `members` can have the following values:
1550 #
1551 # * `allUsers`: A special identifier that represents anyone who is
1552 # on the internet; with or without a Google account.
1553 #
1554 # * `allAuthenticatedUsers`: A special identifier that represents anyone
1555 # who is authenticated with a Google account or a service account.
1556 #
1557 # * `user:{emailid}`: An email address that represents a specific Google
Dan O'Mearadd494642020-05-01 07:42:23 -07001558 # account. For example, `alice@example.com` .
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001559 #
1560 #
1561 # * `serviceAccount:{emailid}`: An email address that represents a service
1562 # account. For example, `my-other-app@appspot.gserviceaccount.com`.
1563 #
1564 # * `group:{emailid}`: An email address that represents a Google group.
1565 # For example, `admins@example.com`.
1566 #
Dan O'Mearadd494642020-05-01 07:42:23 -07001567 # * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique
1568 # identifier) representing a user that has been recently deleted. For
1569 # example, `alice@example.com?uid=123456789012345678901`. If the user is
1570 # recovered, this value reverts to `user:{emailid}` and the recovered user
1571 # retains the role in the binding.
1572 #
1573 # * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus
1574 # unique identifier) representing a service account that has been recently
1575 # deleted. For example,
1576 # `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
1577 # If the service account is undeleted, this value reverts to
1578 # `serviceAccount:{emailid}` and the undeleted service account retains the
1579 # role in the binding.
1580 #
1581 # * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique
1582 # identifier) representing a Google group that has been recently
1583 # deleted. For example, `admins@example.com?uid=123456789012345678901`. If
1584 # the group is recovered, this value reverts to `group:{emailid}` and the
1585 # recovered group retains the role in the binding.
1586 #
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -04001587 #
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001588 # * `domain:{domain}`: The G Suite domain (primary) that represents all the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001589 # users of that domain. For example, `google.com` or `example.com`.
1590 #
Bu Sun Kim65020912020-05-20 12:08:20 -07001591 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001592 ],
Bu Sun Kim65020912020-05-20 12:08:20 -07001593 &quot;role&quot;: &quot;A String&quot;, # Role that is assigned to `members`.
1594 # For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001595 &quot;condition&quot;: { # Represents a textual expression in the Common Expression Language (CEL) # The condition that is associated with this binding.
1596 #
1597 # If the condition evaluates to `true`, then this binding applies to the
1598 # current request.
1599 #
1600 # If the condition evaluates to `false`, then this binding does not apply to
1601 # the current request. However, a different role binding might grant the same
1602 # role to one or more of the members in this binding.
1603 #
1604 # To learn which resources support conditions in their IAM policies, see the
1605 # [IAM
1606 # documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
1607 # syntax. CEL is a C-like expression language. The syntax and semantics of CEL
1608 # are documented at https://github.com/google/cel-spec.
1609 #
1610 # Example (Comparison):
1611 #
1612 # title: &quot;Summary size limit&quot;
1613 # description: &quot;Determines if a summary is less than 100 chars&quot;
1614 # expression: &quot;document.summary.size() &lt; 100&quot;
1615 #
1616 # Example (Equality):
1617 #
1618 # title: &quot;Requestor is owner&quot;
1619 # description: &quot;Determines if requestor is the document owner&quot;
1620 # expression: &quot;document.owner == request.auth.claims.email&quot;
1621 #
1622 # Example (Logic):
1623 #
1624 # title: &quot;Public documents&quot;
1625 # description: &quot;Determine whether the document should be publicly visible&quot;
1626 # expression: &quot;document.type != &#x27;private&#x27; &amp;&amp; document.type != &#x27;internal&#x27;&quot;
1627 #
1628 # Example (Data Manipulation):
1629 #
1630 # title: &quot;Notification string&quot;
1631 # description: &quot;Create a notification string with a timestamp.&quot;
1632 # expression: &quot;&#x27;New message received at &#x27; + string(document.create_time)&quot;
1633 #
1634 # The exact variables and functions that may be referenced within an expression
1635 # are determined by the service that evaluates it. See the service
1636 # documentation for additional information.
1637 &quot;description&quot;: &quot;A String&quot;, # Optional. Description of the expression. This is a longer text which
1638 # describes the expression, e.g. when hovered over it in a UI.
1639 &quot;location&quot;: &quot;A String&quot;, # Optional. String indicating the location of the expression for error
1640 # reporting, e.g. a file name and a position in the file.
1641 &quot;expression&quot;: &quot;A String&quot;, # Textual representation of an expression in Common Expression Language
1642 # syntax.
1643 &quot;title&quot;: &quot;A String&quot;, # Optional. Title for the expression, i.e. a short string describing
1644 # its purpose. This can be used e.g. in UIs which allow to enter the
1645 # expression.
1646 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001647 },
1648 ],
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001649 }</pre>
1650</div>
1651
1652<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001653 <code class="details" id="signBlob">signBlob(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001654 <pre>**Note:** This method is deprecated and will stop working on July 1, 2021.
1655Use the
1656[`signBlob`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signBlob)
1657method in the IAM Service Account Credentials API instead. If you currently
1658use this method, see the [migration
1659guide](https://cloud.google.com/iam/help/credentials/migrate-api) for
1660instructions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001661
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001662Signs a blob using the system-managed private key for a ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001663
1664Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001665 name: string, Required. Deprecated. [Migrate to Service Account Credentials
1666API](https://cloud.google.com/iam/help/credentials/migrate-api).
1667
1668The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001669`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
1670Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
1671the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001672`unique_id` of the service account. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001673 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001674 The object takes the form of:
1675
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001676{ # Deprecated. [Migrate to Service Account Credentials
1677 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1678 #
1679 # The service account sign blob request.
1680 &quot;bytesToSign&quot;: &quot;A String&quot;, # Required. Deprecated. [Migrate to Service Account Credentials
1681 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1682 #
1683 # The bytes to sign.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001684 }
1685
1686 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001687 Allowed values
1688 1 - v1 error format
1689 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001690
1691Returns:
1692 An object of the form:
1693
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001694 { # Deprecated. [Migrate to Service Account Credentials
1695 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1696 #
1697 # The service account sign blob response.
1698 &quot;signature&quot;: &quot;A String&quot;, # Deprecated. [Migrate to Service Account Credentials
1699 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1700 #
1701 # The signed blob.
1702 &quot;keyId&quot;: &quot;A String&quot;, # Deprecated. [Migrate to Service Account Credentials
1703 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1704 #
1705 # The id of the key used to sign the blob.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001706 }</pre>
1707</div>
1708
1709<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001710 <code class="details" id="signJwt">signJwt(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001711 <pre>**Note:** This method is deprecated and will stop working on July 1, 2021.
1712Use the
1713[`signJwt`](https://cloud.google.com/iam/help/rest-credentials/v1/projects.serviceAccounts/signJwt)
1714method in the IAM Service Account Credentials API instead. If you currently
1715use this method, see the [migration
1716guide](https://cloud.google.com/iam/help/credentials/migrate-api) for
1717instructions.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001718
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001719Signs a JSON Web Token (JWT) using the system-managed private key for a
1720ServiceAccount.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001721
1722Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001723 name: string, Required. Deprecated. [Migrate to Service Account Credentials
1724API](https://cloud.google.com/iam/help/credentials/migrate-api).
1725
1726The resource name of the service account in the following format:
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001727`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}`.
1728Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
1729the account. The `ACCOUNT` value can be the `email` address or the
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001730`unique_id` of the service account. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001731 body: object, The request body.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001732 The object takes the form of:
1733
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001734{ # Deprecated. [Migrate to Service Account Credentials
1735 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1736 #
1737 # The service account sign JWT request.
1738 &quot;payload&quot;: &quot;A String&quot;, # Required. Deprecated. [Migrate to Service Account Credentials
1739 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1740 #
1741 # The JWT payload to sign. Must be a serialized JSON object that contains a
1742 # JWT Claims Set. For example: `{&quot;sub&quot;: &quot;user@example.com&quot;, &quot;iat&quot;: 313435}`
1743 #
1744 # If the JWT Claims Set contains an expiration time (`exp`) claim, it must be
1745 # an integer timestamp that is not in the past and no more than 1 hour in the
1746 # future.
1747 #
1748 # If the JWT Claims Set does not contain an expiration time (`exp`) claim,
1749 # this claim is added automatically, with a timestamp that is 1 hour in the
1750 # future.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001751 }
1752
1753 x__xgafv: string, V1 error format.
1754 Allowed values
1755 1 - v1 error format
1756 2 - v2 error format
1757
1758Returns:
1759 An object of the form:
1760
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001761 { # Deprecated. [Migrate to Service Account Credentials
1762 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1763 #
1764 # The service account sign JWT response.
1765 &quot;signedJwt&quot;: &quot;A String&quot;, # Deprecated. [Migrate to Service Account Credentials
1766 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1767 #
1768 # The signed JWT.
1769 &quot;keyId&quot;: &quot;A String&quot;, # Deprecated. [Migrate to Service Account Credentials
1770 # API](https://cloud.google.com/iam/help/credentials/migrate-api).
1771 #
1772 # The id of the key used to sign the JWT.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001773 }</pre>
1774</div>
1775
1776<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001777 <code class="details" id="testIamPermissions">testIamPermissions(resource, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001778 <pre>Tests whether the caller has the specified permissions on a
1779ServiceAccount.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001780
1781Args:
1782 resource: string, REQUIRED: The resource for which the policy detail is being requested.
Sai Cheemalapatie833b792017-03-24 15:06:46 -07001783See the operation documentation for the appropriate value for this field. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001784 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001785 The object takes the form of:
1786
1787{ # Request message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001788 &quot;permissions&quot;: [ # The set of permissions to check for the `resource`. Permissions with
1789 # wildcards (such as &#x27;*&#x27; or &#x27;storage.*&#x27;) are not allowed. For more
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001790 # information see
1791 # [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
Bu Sun Kim65020912020-05-20 12:08:20 -07001792 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001793 ],
1794 }
1795
1796 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001797 Allowed values
1798 1 - v1 error format
1799 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001800
1801Returns:
1802 An object of the form:
1803
1804 { # Response message for `TestIamPermissions` method.
Bu Sun Kim65020912020-05-20 12:08:20 -07001805 &quot;permissions&quot;: [ # A subset of `TestPermissionsRequest.permissions` that the caller is
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001806 # allowed.
Bu Sun Kim65020912020-05-20 12:08:20 -07001807 &quot;A String&quot;,
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001808 ],
1809 }</pre>
1810</div>
1811
1812<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001813 <code class="details" id="undelete">undelete(name, body=None, x__xgafv=None)</code>
1814 <pre>Restores a deleted ServiceAccount.
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001815
1816**Important:** It is not always possible to restore a deleted service
1817account. Use this method only as a last resort.
1818
1819After you delete a service account, IAM permanently removes the service
1820account 30 days later. There is no way to restore a deleted service account
1821that has been permanently removed.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001822
1823Args:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001824 name: string, The resource name of the service account in the following format:
Dan O'Mearadd494642020-05-01 07:42:23 -07001825`projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT_UNIQUE_ID}`.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001826Using `-` as a wildcard for the `PROJECT_ID` will infer the project from
1827the account. (required)
1828 body: object, The request body.
1829 The object takes the form of:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001830
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001831{ # The service account undelete request.
1832 }
1833
1834 x__xgafv: string, V1 error format.
1835 Allowed values
1836 1 - v1 error format
1837 2 - v2 error format
1838
1839Returns:
1840 An object of the form:
1841
1842 {
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001843 &quot;restoredAccount&quot;: { # An IAM service account. # Metadata for the restored service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001844 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001845 # A service account is an account for an application or a virtual machine (VM)
1846 # instance, not a person. You can use a service account to call Google APIs. To
1847 # learn more, read the [overview of service
1848 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001849 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001850 # When you create a service account, you specify the project ID that owns the
1851 # service account, as well as a name that must be unique within the project.
1852 # IAM uses these values to create an email address that identifies the service
1853 # account.
1854 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
1855 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
1856 #
1857 # Each service account retains its unique ID even if you delete the service
1858 # account. For example, if you delete a service account, then create a new
1859 # service account with the same name, the new service account has a different
1860 # unique ID than the deleted service account.
1861 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
1862 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
1863 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
1864 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
1865 #
1866 # Use one of the following formats:
1867 #
1868 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
1869 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
1870 #
1871 # As an alternative, you can use the `-` wildcard character instead of the
1872 # project ID:
1873 #
1874 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
1875 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
1876 #
1877 # When possible, avoid using the `-` wildcard character, because it can cause
1878 # response messages to contain misleading error codes. For example, if you
1879 # try to get the service account
1880 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
1881 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
1882 # Found` error.
1883 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
1884 # length is 100 UTF-8 bytes.
1885 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
1886 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
1887 # maximum length is 256 UTF-8 bytes.
1888 },
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001889 }</pre>
1890</div>
1891
1892<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -07001893 <code class="details" id="update">update(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001894 <pre>**Note:** We are in the process of deprecating this method. Use
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001895PatchServiceAccount instead.
1896
1897Updates a ServiceAccount.
1898
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001899You can update only the `display_name` and `description` fields.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001900
1901Args:
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001902 name: string, The resource name of the service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001903
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001904Use one of the following formats:
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001905
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001906* `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
1907* `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
1908
1909As an alternative, you can use the `-` wildcard character instead of the
1910project ID:
1911
1912* `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
1913* `projects/-/serviceAccounts/{UNIQUE_ID}`
1914
1915When possible, avoid using the `-` wildcard character, because it can cause
1916response messages to contain misleading error codes. For example, if you
1917try to get the service account
1918`projects/-/serviceAccounts/fake@example.com`, which does not exist, the
1919response contains an HTTP `403 Forbidden` error instead of a `404 Not
1920Found` error. (required)
Dan O'Mearadd494642020-05-01 07:42:23 -07001921 body: object, The request body.
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001922 The object takes the form of:
1923
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001924{ # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001925 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001926 # A service account is an account for an application or a virtual machine (VM)
1927 # instance, not a person. You can use a service account to call Google APIs. To
1928 # learn more, read the [overview of service
1929 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001930 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001931 # When you create a service account, you specify the project ID that owns the
1932 # service account, as well as a name that must be unique within the project.
1933 # IAM uses these values to create an email address that identifies the service
1934 # account.
1935 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
1936 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
1937 #
1938 # Each service account retains its unique ID even if you delete the service
1939 # account. For example, if you delete a service account, then create a new
1940 # service account with the same name, the new service account has a different
1941 # unique ID than the deleted service account.
1942 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
1943 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
1944 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
1945 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
1946 #
1947 # Use one of the following formats:
1948 #
1949 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
1950 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
1951 #
1952 # As an alternative, you can use the `-` wildcard character instead of the
1953 # project ID:
1954 #
1955 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
1956 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
1957 #
1958 # When possible, avoid using the `-` wildcard character, because it can cause
1959 # response messages to contain misleading error codes. For example, if you
1960 # try to get the service account
1961 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
1962 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
1963 # Found` error.
1964 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
1965 # length is 100 UTF-8 bytes.
1966 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
1967 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
1968 # maximum length is 256 UTF-8 bytes.
1969 }
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001970
1971 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -04001972 Allowed values
1973 1 - v1 error format
1974 2 - v2 error format
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08001975
1976Returns:
1977 An object of the form:
1978
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001979 { # An IAM service account.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001980 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001981 # A service account is an account for an application or a virtual machine (VM)
1982 # instance, not a person. You can use a service account to call Google APIs. To
1983 # learn more, read the [overview of service
1984 # accounts](https://cloud.google.com/iam/help/service-accounts/overview).
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001985 #
Bu Sun Kimd059ad82020-07-22 17:02:09 -07001986 # When you create a service account, you specify the project ID that owns the
1987 # service account, as well as a name that must be unique within the project.
1988 # IAM uses these values to create an email address that identifies the service
1989 # account.
1990 &quot;disabled&quot;: True or False, # Output only. Whether the service account is disabled.
1991 &quot;uniqueId&quot;: &quot;A String&quot;, # Output only. The unique, stable numeric ID for the service account.
1992 #
1993 # Each service account retains its unique ID even if you delete the service
1994 # account. For example, if you delete a service account, then create a new
1995 # service account with the same name, the new service account has a different
1996 # unique ID than the deleted service account.
1997 &quot;projectId&quot;: &quot;A String&quot;, # Output only. The ID of the project that owns the service account.
1998 &quot;etag&quot;: &quot;A String&quot;, # Deprecated. Do not use.
1999 &quot;email&quot;: &quot;A String&quot;, # Output only. The email address of the service account.
2000 &quot;name&quot;: &quot;A String&quot;, # The resource name of the service account.
2001 #
2002 # Use one of the following formats:
2003 #
2004 # * `projects/{PROJECT_ID}/serviceAccounts/{EMAIL_ADDRESS}`
2005 # * `projects/{PROJECT_ID}/serviceAccounts/{UNIQUE_ID}`
2006 #
2007 # As an alternative, you can use the `-` wildcard character instead of the
2008 # project ID:
2009 #
2010 # * `projects/-/serviceAccounts/{EMAIL_ADDRESS}`
2011 # * `projects/-/serviceAccounts/{UNIQUE_ID}`
2012 #
2013 # When possible, avoid using the `-` wildcard character, because it can cause
2014 # response messages to contain misleading error codes. For example, if you
2015 # try to get the service account
2016 # `projects/-/serviceAccounts/fake@example.com`, which does not exist, the
2017 # response contains an HTTP `403 Forbidden` error instead of a `404 Not
2018 # Found` error.
2019 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable name for the service account. The maximum
2020 # length is 100 UTF-8 bytes.
2021 &quot;oauth2ClientId&quot;: &quot;A String&quot;, # Output only. The OAuth 2.0 client ID for the service account.
2022 &quot;description&quot;: &quot;A String&quot;, # Optional. A user-specified, human-readable description of the service account. The
2023 # maximum length is 256 UTF-8 bytes.
2024 }</pre>
Jon Wayne Parrott36e41bc2016-02-19 16:02:29 -08002025</div>
2026
2027</body></html>