blob: a9c4920964581b408b3b359b6300ec96e87af6da [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 Kimd059ad82020-07-22 17:02:09 -070079<p class="firstline">Creates a new custom Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070080<p class="toc_element">
81 <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Deletes a custom Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
84 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070085<p class="firstline">Gets the definition of a Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
Bu Sun Kimd059ad82020-07-22 17:02:09 -070087 <code><a href="#list">list(parent, pageSize=None, view=None, showDeleted=None, pageToken=None, x__xgafv=None)</a></code></p>
88<p class="firstline">Lists every predefined Role that IAM supports, or every custom role</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070089<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 Kimd059ad82020-07-22 17:02:09 -070094<p class="firstline">Updates the definition of a custom Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070095<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 Kimd059ad82020-07-22 17:02:09 -070097<p class="firstline">Undeletes a custom Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070098<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 Kimd059ad82020-07-22 17:02:09 -0700101 <pre>Creates a new custom Role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102
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;role&quot;: { # A role in the Identity and Access Management API. # The Role resource to create.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700129 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
130 #
131 # When Role is used in CreateRole, the role name must not be set.
132 #
133 # When Role is used in output and other input such as UpdateRole, the role
134 # name is the complete path, e.g., roles/logging.viewer for predefined roles
135 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
136 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
137 # It will be ignored in calls to CreateRole and UpdateRole.
138 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
139 # is limited to 100 UTF-8 bytes.
140 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
141 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
142 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
143 &quot;A String&quot;,
144 ],
145 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
146 # selected for a role, the `stage` field will not be included in the
147 # returned definition for the role.
148 },
149 &quot;roleId&quot;: &quot;A String&quot;, # The role ID to use for this role.
150 #
151 # A role ID may contain alphanumeric characters, underscores (`_`), and
152 # periods (`.`). It must contain a minimum of 3 characters and a maximum of
153 # 64 characters.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700154 }
155
156 x__xgafv: string, V1 error format.
157 Allowed values
158 1 - v1 error format
159 2 - v2 error format
160
161Returns:
162 An object of the form:
163
164 { # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700165 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
166 #
167 # When Role is used in CreateRole, the role name must not be set.
168 #
169 # When Role is used in output and other input such as UpdateRole, the role
170 # name is the complete path, e.g., roles/logging.viewer for predefined roles
171 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
172 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
173 # It will be ignored in calls to CreateRole and UpdateRole.
174 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
175 # is limited to 100 UTF-8 bytes.
176 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
177 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
178 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
179 &quot;A String&quot;,
180 ],
181 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
182 # selected for a role, the `stage` field will not be included in the
183 # returned definition for the role.
184 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700185</div>
186
187<div class="method">
188 <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700189 <pre>Deletes a custom Role.
190
191When you delete a custom role, the following changes occur immediately:
192
193* You cannot bind a member to the custom role in an IAM
194Policy.
195* Existing bindings to the custom role are not changed, but they have no
196effect.
197* By default, the response from ListRoles does not include the custom
198role.
199
200You have 7 days to undelete the custom role. After 7 days, the following
201changes occur:
202
203* The custom role is permanently deleted and cannot be recovered.
204* If an IAM policy contains a binding to the custom role, the binding is
205permanently removed.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700206
207Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700208 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700209request, namely
210[`projects`](/iam/reference/rest/v1/projects.roles) or
211[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700212resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700213
214* [`projects.roles.delete()`](/iam/reference/rest/v1/projects.roles/delete):
215 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes only
216 [custom roles](/iam/docs/understanding-custom-roles) that have been
217 created at the project level. Example request URL:
218 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
219
220* [`organizations.roles.delete()`](/iam/reference/rest/v1/organizations.roles/delete):
221 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
222 deletes only [custom roles](/iam/docs/understanding-custom-roles) that
223 have been created at the organization level. Example request URL:
224 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
225
226Note: Wildcard (*) values are invalid; you must specify a complete project
227ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700228 etag: string, Used to perform a consistent read-modify-write.
229 x__xgafv: string, V1 error format.
230 Allowed values
231 1 - v1 error format
232 2 - v2 error format
233
234Returns:
235 An object of the form:
236
237 { # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700238 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
239 #
240 # When Role is used in CreateRole, the role name must not be set.
241 #
242 # When Role is used in output and other input such as UpdateRole, the role
243 # name is the complete path, e.g., roles/logging.viewer for predefined roles
244 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
245 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
246 # It will be ignored in calls to CreateRole and UpdateRole.
247 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
248 # is limited to 100 UTF-8 bytes.
249 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
250 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
251 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
252 &quot;A String&quot;,
253 ],
254 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
255 # selected for a role, the `stage` field will not be included in the
256 # returned definition for the role.
257 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700258</div>
259
260<div class="method">
261 <code class="details" id="get">get(name, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700262 <pre>Gets the definition of a Role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700263
264Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700265 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700266request, namely
267[`roles`](/iam/reference/rest/v1/roles),
268[`projects`](/iam/reference/rest/v1/projects.roles), or
269[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700270resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700271
272* [`roles.get()`](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`.
273 This method returns results from all
274 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
275 Cloud IAM. Example request URL:
276 `https://iam.googleapis.com/v1/roles/{ROLE_NAME}`
277
278* [`projects.roles.get()`](/iam/reference/rest/v1/projects.roles/get):
279 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only
280 [custom roles](/iam/docs/understanding-custom-roles) that have been
281 created at the project level. Example request URL:
282 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
283
284* [`organizations.roles.get()`](/iam/reference/rest/v1/organizations.roles/get):
285 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
286 returns only [custom roles](/iam/docs/understanding-custom-roles) that
287 have been created at the organization level. Example request URL:
288 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
289
290Note: Wildcard (*) values are invalid; you must specify a complete project
291ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700292 x__xgafv: string, V1 error format.
293 Allowed values
294 1 - v1 error format
295 2 - v2 error format
296
297Returns:
298 An object of the form:
299
300 { # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700301 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
302 #
303 # When Role is used in CreateRole, the role name must not be set.
304 #
305 # When Role is used in output and other input such as UpdateRole, the role
306 # name is the complete path, e.g., roles/logging.viewer for predefined roles
307 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
308 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
309 # It will be ignored in calls to CreateRole and UpdateRole.
310 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
311 # is limited to 100 UTF-8 bytes.
312 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
313 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
314 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
315 &quot;A String&quot;,
316 ],
317 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
318 # selected for a role, the `stage` field will not be included in the
319 # returned definition for the role.
320 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700321</div>
322
323<div class="method">
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700324 <code class="details" id="list">list(parent, pageSize=None, view=None, showDeleted=None, pageToken=None, x__xgafv=None)</code>
325 <pre>Lists every predefined Role that IAM supports, or every custom role
326that is defined for an organization or project.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700327
328Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700329 parent: string, The `parent` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700330request, namely
331[`roles`](/iam/reference/rest/v1/roles),
332[`projects`](/iam/reference/rest/v1/projects.roles), or
333[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700334resource type&#x27;s `parent` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700335
336* [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700337 This method doesn&#x27;t require a resource; it simply returns all
Dan O'Mearadd494642020-05-01 07:42:23 -0700338 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
339 Cloud IAM. Example request URL:
340 `https://iam.googleapis.com/v1/roles`
341
342* [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list):
343 `projects/{PROJECT_ID}`. This method lists all project-level
344 [custom roles](/iam/docs/understanding-custom-roles).
345 Example request URL:
346 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
347
348* [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list):
349 `organizations/{ORGANIZATION_ID}`. This method lists all
350 organization-level [custom roles](/iam/docs/understanding-custom-roles).
351 Example request URL:
352 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
353
354Note: Wildcard (*) values are invalid; you must specify a complete project
355ID or organization ID. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700356 pageSize: integer, Optional limit on the number of roles to include in the response.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700357
358The default is 300, and the maximum is 1,000.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700359 view: string, Optional view for the returned Role objects. When `FULL` is specified,
360the `includedPermissions` field is returned, which includes a list of all
361permissions in the role. The default value is `BASIC`, which does not
362return the `includedPermissions` field.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700363 showDeleted: boolean, Include Roles that have been deleted.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700364 pageToken: string, Optional pagination token returned in an earlier ListRolesResponse.
Bu Sun Kim65020912020-05-20 12:08:20 -0700365 x__xgafv: string, V1 error format.
366 Allowed values
367 1 - v1 error format
368 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700369
370Returns:
371 An object of the form:
372
373 { # The response containing the roles defined under a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700374 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set
375 # `ListRolesRequest.page_token` to this value.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700376 &quot;roles&quot;: [ # The Roles defined on this resource.
377 { # A role in the Identity and Access Management API.
378 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
379 #
380 # When Role is used in CreateRole, the role name must not be set.
381 #
382 # When Role is used in output and other input such as UpdateRole, the role
383 # name is the complete path, e.g., roles/logging.viewer for predefined roles
384 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
385 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
386 # It will be ignored in calls to CreateRole and UpdateRole.
387 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
388 # is limited to 100 UTF-8 bytes.
389 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
390 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
391 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
392 &quot;A String&quot;,
393 ],
394 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
395 # selected for a role, the `stage` field will not be included in the
396 # returned definition for the role.
397 },
398 ],
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700399 }</pre>
400</div>
401
402<div class="method">
403 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
404 <pre>Retrieves the next page of results.
405
406Args:
407 previous_request: The request for the previous page. (required)
408 previous_response: The response from the request for the previous page. (required)
409
410Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700411 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700412 page. Returns None if there are no more items in the collection.
413 </pre>
414</div>
415
416<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700417 <code class="details" id="patch">patch(name, body=None, updateMask=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700418 <pre>Updates the definition of a custom Role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700419
420Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700421 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700422request, namely
423[`projects`](/iam/reference/rest/v1/projects.roles) or
424[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700425resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700426
427* [`projects.roles.patch()`](/iam/reference/rest/v1/projects.roles/patch):
428 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates only
429 [custom roles](/iam/docs/understanding-custom-roles) that have been
430 created at the project level. Example request URL:
431 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
432
433* [`organizations.roles.patch()`](/iam/reference/rest/v1/organizations.roles/patch):
434 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
435 updates only [custom roles](/iam/docs/understanding-custom-roles) that
436 have been created at the organization level. Example request URL:
437 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
438
439Note: Wildcard (*) values are invalid; you must specify a complete project
440ID or organization ID. (required)
441 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700442 The object takes the form of:
443
444{ # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700445 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
446 #
447 # When Role is used in CreateRole, the role name must not be set.
448 #
449 # When Role is used in output and other input such as UpdateRole, the role
450 # name is the complete path, e.g., roles/logging.viewer for predefined roles
451 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
452 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
453 # It will be ignored in calls to CreateRole and UpdateRole.
454 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
455 # is limited to 100 UTF-8 bytes.
456 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
457 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
458 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
459 &quot;A String&quot;,
460 ],
461 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
462 # selected for a role, the `stage` field will not be included in the
463 # returned definition for the role.
464 }
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700465
466 updateMask: string, A mask describing which fields in the Role have changed.
467 x__xgafv: string, V1 error format.
468 Allowed values
469 1 - v1 error format
470 2 - v2 error format
471
472Returns:
473 An object of the form:
474
475 { # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700476 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
477 #
478 # When Role is used in CreateRole, the role name must not be set.
479 #
480 # When Role is used in output and other input such as UpdateRole, the role
481 # name is the complete path, e.g., roles/logging.viewer for predefined roles
482 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
483 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
484 # It will be ignored in calls to CreateRole and UpdateRole.
485 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
486 # is limited to 100 UTF-8 bytes.
487 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
488 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
489 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
490 &quot;A String&quot;,
491 ],
492 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
493 # selected for a role, the `stage` field will not be included in the
494 # returned definition for the role.
495 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700496</div>
497
498<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700499 <code class="details" id="undelete">undelete(name, body=None, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700500 <pre>Undeletes a custom Role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700501
502Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700503 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700504request, namely
505[`projects`](/iam/reference/rest/v1/projects.roles) or
506[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700507resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700508
509* [`projects.roles.undelete()`](/iam/reference/rest/v1/projects.roles/undelete):
510 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes
511 only [custom roles](/iam/docs/understanding-custom-roles) that have been
512 created at the project level. Example request URL:
513 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
514
515* [`organizations.roles.undelete()`](/iam/reference/rest/v1/organizations.roles/undelete):
516 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
517 undeletes only [custom roles](/iam/docs/understanding-custom-roles) that
518 have been created at the organization level. Example request URL:
519 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
520
521Note: Wildcard (*) values are invalid; you must specify a complete project
522ID or organization ID. (required)
523 body: object, The request body.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700524 The object takes the form of:
525
526{ # The request to undelete an existing role.
Bu Sun Kim65020912020-05-20 12:08:20 -0700527 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700528 }
529
530 x__xgafv: string, V1 error format.
531 Allowed values
532 1 - v1 error format
533 2 - v2 error format
534
535Returns:
536 An object of the form:
537
538 { # A role in the Identity and Access Management API.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700539 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
540 #
541 # When Role is used in CreateRole, the role name must not be set.
542 #
543 # When Role is used in output and other input such as UpdateRole, the role
544 # name is the complete path, e.g., roles/logging.viewer for predefined roles
545 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
546 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
547 # It will be ignored in calls to CreateRole and UpdateRole.
548 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
549 # is limited to 100 UTF-8 bytes.
550 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
551 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
552 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
553 &quot;A String&quot;,
554 ],
555 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
556 # selected for a role, the `stage` field will not be included in the
557 # returned definition for the role.
558 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700559</div>
560
561</body></html>