blob: 4d28a2522277adee26da6163b85cb3d4591164ad [file] [log] [blame]
Bu Sun Kim715bd7f2019-06-14 16:50:42 -07001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="iam_v1.html">Identity and Access Management (IAM) API</a> . <a href="iam_v1.projects.html">projects</a> . <a href="iam_v1.projects.roles.html">roles</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070078 <code><a href="#create">create(parent, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070079<p class="firstline">Creates a new Role.</p>
80<p class="toc_element">
81 <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
82<p class="firstline">Soft deletes a role. The role is suspended and cannot be used to create new</p>
83<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
85<p class="firstline">Gets a Role definition.</p>
86<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070087 <code><a href="#list">list(parent, pageToken=None, pageSize=None, view=None, showDeleted=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070088<p class="firstline">Lists the Roles defined on a resource.</p>
89<p class="toc_element">
90 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
92<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070093 <code><a href="#patch">patch(name, body=None, updateMask=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094<p class="firstline">Updates a Role definition.</p>
95<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070096 <code><a href="#undelete">undelete(name, body=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070097<p class="firstline">Undelete a Role, bringing it back in its previous state.</p>
98<h3>Method Details</h3>
99<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700100 <code class="details" id="create">create(parent, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700101 <pre>Creates a new Role.
102
103Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700104 parent: string, The `parent` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700105request, namely
106[`projects`](/iam/reference/rest/v1/projects.roles) or
107[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700108resource type&#x27;s `parent` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700109
110* [`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
111 `projects/{PROJECT_ID}`. This method creates project-level
112 [custom roles](/iam/docs/understanding-custom-roles).
113 Example request URL:
114 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
115
116* [`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
117 `organizations/{ORGANIZATION_ID}`. This method creates organization-level
118 [custom roles](/iam/docs/understanding-custom-roles). Example request
119 URL:
120 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
121
122Note: Wildcard (*) values are invalid; you must specify a complete project
123ID or organization ID. (required)
124 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 The object takes the form of:
126
127{ # The request to create a new role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700128 &quot;roleId&quot;: &quot;A String&quot;, # The role ID to use for this role.
129 &quot;role&quot;: { # A role in the Identity and Access Management API. # The Role resource to create.
Bu Sun Kim65020912020-05-20 12:08:20 -0700130 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
131 # It will be ignored in calls to CreateRole and UpdateRole.
132 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
133 # is limited to 100 UTF-8 bytes.
134 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
135 &quot;A String&quot;,
136 ],
137 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
138 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
139 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
140 # selected for a role, the `stage` field will not be included in the
141 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700142 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
143 #
144 # When Role is used in CreateRole, the role name must not be set.
145 #
146 # When Role is used in output and other input such as UpdateRole, the role
147 # name is the complete path, e.g., roles/logging.viewer for predefined roles
148 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700149 },
150 }
151
152 x__xgafv: string, V1 error format.
153 Allowed values
154 1 - v1 error format
155 2 - v2 error format
156
157Returns:
158 An object of the form:
159
160 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
162 # It will be ignored in calls to CreateRole and UpdateRole.
163 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
164 # is limited to 100 UTF-8 bytes.
165 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
166 &quot;A String&quot;,
167 ],
168 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
169 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
170 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
171 # selected for a role, the `stage` field will not be included in the
172 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700173 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
174 #
175 # When Role is used in CreateRole, the role name must not be set.
176 #
177 # When Role is used in output and other input such as UpdateRole, the role
178 # name is the complete path, e.g., roles/logging.viewer for predefined roles
179 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700180 }</pre>
181</div>
182
183<div class="method">
184 <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
185 <pre>Soft deletes a role. The role is suspended and cannot be used to create new
186IAM Policy Bindings.
187The Role will not be included in `ListRoles()` unless `show_deleted` is set
188in the `ListRolesRequest`. The Role contains the deleted boolean set.
189Existing Bindings remains, but are inactive. The Role can be undeleted
190within 7 days. After 7 days the Role is deleted and all Bindings associated
191with the role are removed.
192
193Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700194 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700195request, namely
196[`projects`](/iam/reference/rest/v1/projects.roles) or
197[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700198resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700199
200* [`projects.roles.delete()`](/iam/reference/rest/v1/projects.roles/delete):
201 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only
202 [custom roles](/iam/docs/understanding-custom-roles) that have been
203 created at the project level. Example request URL:
204 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
205
206* [`organizations.roles.delete()`](/iam/reference/rest/v1/organizations.roles/delete):
207 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
208 deletes only [custom roles](/iam/docs/understanding-custom-roles) that
209 have been created at the organization level. Example request URL:
210 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
211
212Note: Wildcard (*) values are invalid; you must specify a complete project
213ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700214 etag: string, Used to perform a consistent read-modify-write.
215 x__xgafv: string, V1 error format.
216 Allowed values
217 1 - v1 error format
218 2 - v2 error format
219
220Returns:
221 An object of the form:
222
223 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700224 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
225 # It will be ignored in calls to CreateRole and UpdateRole.
226 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
227 # is limited to 100 UTF-8 bytes.
228 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
229 &quot;A String&quot;,
230 ],
231 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
232 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
233 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
234 # selected for a role, the `stage` field will not be included in the
235 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700236 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
237 #
238 # When Role is used in CreateRole, the role name must not be set.
239 #
240 # When Role is used in output and other input such as UpdateRole, the role
241 # name is the complete path, e.g., roles/logging.viewer for predefined roles
242 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700243 }</pre>
244</div>
245
246<div class="method">
247 <code class="details" id="get">get(name, x__xgafv=None)</code>
248 <pre>Gets a Role definition.
249
250Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700251 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700252request, namely
253[`roles`](/iam/reference/rest/v1/roles),
254[`projects`](/iam/reference/rest/v1/projects.roles), or
255[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700256resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700257
258* [`roles.get()`](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`.
259 This method returns results from all
260 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
261 Cloud IAM. Example request URL:
262 `https://iam.googleapis.com/v1/roles/{ROLE_NAME}`
263
264* [`projects.roles.get()`](/iam/reference/rest/v1/projects.roles/get):
265 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only
266 [custom roles](/iam/docs/understanding-custom-roles) that have been
267 created at the project level. Example request URL:
268 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
269
270* [`organizations.roles.get()`](/iam/reference/rest/v1/organizations.roles/get):
271 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
272 returns only [custom roles](/iam/docs/understanding-custom-roles) that
273 have been created at the organization level. Example request URL:
274 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
275
276Note: Wildcard (*) values are invalid; you must specify a complete project
277ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700278 x__xgafv: string, V1 error format.
279 Allowed values
280 1 - v1 error format
281 2 - v2 error format
282
283Returns:
284 An object of the form:
285
286 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700287 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
288 # It will be ignored in calls to CreateRole and UpdateRole.
289 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
290 # is limited to 100 UTF-8 bytes.
291 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
292 &quot;A String&quot;,
293 ],
294 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
295 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
296 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
297 # selected for a role, the `stage` field will not be included in the
298 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700299 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
300 #
301 # When Role is used in CreateRole, the role name must not be set.
302 #
303 # When Role is used in output and other input such as UpdateRole, the role
304 # name is the complete path, e.g., roles/logging.viewer for predefined roles
305 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700306 }</pre>
307</div>
308
309<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700310 <code class="details" id="list">list(parent, pageToken=None, pageSize=None, view=None, showDeleted=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700311 <pre>Lists the Roles defined on a resource.
312
313Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 parent: string, The `parent` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700315request, namely
316[`roles`](/iam/reference/rest/v1/roles),
317[`projects`](/iam/reference/rest/v1/projects.roles), or
318[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700319resource type&#x27;s `parent` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700320
321* [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700322 This method doesn&#x27;t require a resource; it simply returns all
Dan O'Mearadd494642020-05-01 07:42:23 -0700323 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
324 Cloud IAM. Example request URL:
325 `https://iam.googleapis.com/v1/roles`
326
327* [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list):
328 `projects/{PROJECT_ID}`. This method lists all project-level
329 [custom roles](/iam/docs/understanding-custom-roles).
330 Example request URL:
331 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
332
333* [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list):
334 `organizations/{ORGANIZATION_ID}`. This method lists all
335 organization-level [custom roles](/iam/docs/understanding-custom-roles).
336 Example request URL:
337 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
338
339Note: Wildcard (*) values are invalid; you must specify a complete project
340ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700341 pageToken: string, Optional pagination token returned in an earlier ListRolesResponse.
Bu Sun Kim65020912020-05-20 12:08:20 -0700342 pageSize: integer, Optional limit on the number of roles to include in the response.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700343 view: string, Optional view for the returned Role objects. When `FULL` is specified,
344the `includedPermissions` field is returned, which includes a list of all
345permissions in the role. The default value is `BASIC`, which does not
346return the `includedPermissions` field.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700347 showDeleted: boolean, Include Roles that have been deleted.
Bu Sun Kim65020912020-05-20 12:08:20 -0700348 x__xgafv: string, V1 error format.
349 Allowed values
350 1 - v1 error format
351 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700352
353Returns:
354 An object of the form:
355
356 { # The response containing the roles defined under a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700357 &quot;roles&quot;: [ # The Roles defined on this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700358 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700359 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
360 # It will be ignored in calls to CreateRole and UpdateRole.
361 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
362 # is limited to 100 UTF-8 bytes.
363 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
364 &quot;A String&quot;,
365 ],
366 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
367 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
368 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
369 # selected for a role, the `stage` field will not be included in the
370 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700371 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
372 #
373 # When Role is used in CreateRole, the role name must not be set.
374 #
375 # When Role is used in output and other input such as UpdateRole, the role
376 # name is the complete path, e.g., roles/logging.viewer for predefined roles
377 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700378 },
379 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700380 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set
381 # `ListRolesRequest.page_token` to this value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700382 }</pre>
383</div>
384
385<div class="method">
386 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
387 <pre>Retrieves the next page of results.
388
389Args:
390 previous_request: The request for the previous page. (required)
391 previous_response: The response from the request for the previous page. (required)
392
393Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700394 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700395 page. Returns None if there are no more items in the collection.
396 </pre>
397</div>
398
399<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700400 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700401 <pre>Updates a Role definition.
402
403Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700404 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700405request, namely
406[`projects`](/iam/reference/rest/v1/projects.roles) or
407[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700408resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700409
410* [`projects.roles.patch()`](/iam/reference/rest/v1/projects.roles/patch):
411 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only
412 [custom roles](/iam/docs/understanding-custom-roles) that have been
413 created at the project level. Example request URL:
414 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
415
416* [`organizations.roles.patch()`](/iam/reference/rest/v1/organizations.roles/patch):
417 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
418 updates only [custom roles](/iam/docs/understanding-custom-roles) that
419 have been created at the organization level. Example request URL:
420 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
421
422Note: Wildcard (*) values are invalid; you must specify a complete project
423ID or organization ID. (required)
424 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700425 The object takes the form of:
426
427{ # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700428 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
429 # It will be ignored in calls to CreateRole and UpdateRole.
430 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
431 # is limited to 100 UTF-8 bytes.
432 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
433 &quot;A String&quot;,
434 ],
435 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
436 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
437 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
438 # selected for a role, the `stage` field will not be included in the
439 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700440 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
441 #
442 # When Role is used in CreateRole, the role name must not be set.
443 #
444 # When Role is used in output and other input such as UpdateRole, the role
445 # name is the complete path, e.g., roles/logging.viewer for predefined roles
446 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700447}
448
449 updateMask: string, A mask describing which fields in the Role have changed.
450 x__xgafv: string, V1 error format.
451 Allowed values
452 1 - v1 error format
453 2 - v2 error format
454
455Returns:
456 An object of the form:
457
458 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700459 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
460 # It will be ignored in calls to CreateRole and UpdateRole.
461 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
462 # is limited to 100 UTF-8 bytes.
463 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
464 &quot;A String&quot;,
465 ],
466 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
467 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
468 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
469 # selected for a role, the `stage` field will not be included in the
470 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700471 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
472 #
473 # When Role is used in CreateRole, the role name must not be set.
474 #
475 # When Role is used in output and other input such as UpdateRole, the role
476 # name is the complete path, e.g., roles/logging.viewer for predefined roles
477 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700478 }</pre>
479</div>
480
481<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700482 <code class="details" id="undelete">undelete(name, body=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700483 <pre>Undelete a Role, bringing it back in its previous state.
484
485Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700486 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700487request, namely
488[`projects`](/iam/reference/rest/v1/projects.roles) or
489[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700490resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700491
492* [`projects.roles.undelete()`](/iam/reference/rest/v1/projects.roles/undelete):
493 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes
494 only [custom roles](/iam/docs/understanding-custom-roles) that have been
495 created at the project level. Example request URL:
496 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
497
498* [`organizations.roles.undelete()`](/iam/reference/rest/v1/organizations.roles/undelete):
499 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
500 undeletes only [custom roles](/iam/docs/understanding-custom-roles) that
501 have been created at the organization level. Example request URL:
502 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
503
504Note: Wildcard (*) values are invalid; you must specify a complete project
505ID or organization ID. (required)
506 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700507 The object takes the form of:
508
509{ # The request to undelete an existing role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700510 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700511 }
512
513 x__xgafv: string, V1 error format.
514 Allowed values
515 1 - v1 error format
516 2 - v2 error format
517
518Returns:
519 An object of the form:
520
521 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700522 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
523 # It will be ignored in calls to CreateRole and UpdateRole.
524 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
525 # is limited to 100 UTF-8 bytes.
526 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
527 &quot;A String&quot;,
528 ],
529 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
530 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
531 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
532 # selected for a role, the `stage` field will not be included in the
533 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700534 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
535 #
536 # When Role is used in CreateRole, the role name must not be set.
537 #
538 # When Role is used in output and other input such as UpdateRole, the role
539 # name is the complete path, e.g., roles/logging.viewer for predefined roles
540 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700541 }</pre>
542</div>
543
544</body></html>