blob: 6ab1358f7dccb43322e5b6091c9b78a0c3c2cec5 [file] [log] [blame]
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -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
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.roles.html">roles</a></h1>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070076<h2>Instance Methods</h2>
77<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070078 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
79<p class="firstline">Gets a Role definition.</p>
80<p class="toc_element">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -070081 <code><a href="#list">list(showDeleted=None, pageToken=None, pageSize=None, view=None, parent=None, x__xgafv=None)</a></code></p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070082<p class="firstline">Lists the Roles defined on a resource.</p>
83<p class="toc_element">
84 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
85<p class="firstline">Retrieves the next page of results.</p>
86<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070087 <code><a href="#queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</a></code></p>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -040088<p class="firstline">Queries roles that can be granted on a particular resource.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040089<p class="toc_element">
90 <code><a href="#queryGrantableRoles_next">queryGrantableRoles_next(previous_request, previous_response)</a></code></p>
91<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070092<h3>Method Details</h3>
93<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070094 <code class="details" id="get">get(name, x__xgafv=None)</code>
95 <pre>Gets a Role definition.
96
97Args:
Bu Sun Kim65020912020-05-20 12:08:20 -070098 name: string, The `name` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -070099request, namely
100[`roles`](/iam/reference/rest/v1/roles),
101[`projects`](/iam/reference/rest/v1/projects.roles), or
102[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700103resource type&#x27;s `name` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700104
105* [`roles.get()`](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`.
106 This method returns results from all
107 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
108 Cloud IAM. Example request URL:
109 `https://iam.googleapis.com/v1/roles/{ROLE_NAME}`
110
111* [`projects.roles.get()`](/iam/reference/rest/v1/projects.roles/get):
112 `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only
113 [custom roles](/iam/docs/understanding-custom-roles) that have been
114 created at the project level. Example request URL:
115 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`
116
117* [`organizations.roles.get()`](/iam/reference/rest/v1/organizations.roles/get):
118 `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
119 returns only [custom roles](/iam/docs/understanding-custom-roles) that
120 have been created at the organization level. Example request URL:
121 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`
122
123Note: Wildcard (*) values are invalid; you must specify a complete project
124ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700125 x__xgafv: string, V1 error format.
126 Allowed values
127 1 - v1 error format
128 2 - v2 error format
129
130Returns:
131 An object of the form:
132
133 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700134 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
135 # It will be ignored in calls to CreateRole and UpdateRole.
136 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
137 # is limited to 100 UTF-8 bytes.
138 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
139 &quot;A String&quot;,
140 ],
141 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
142 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
143 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
144 # selected for a role, the `stage` field will not be included in the
145 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700146 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
147 #
148 # When Role is used in CreateRole, the role name must not be set.
149 #
150 # When Role is used in output and other input such as UpdateRole, the role
151 # name is the complete path, e.g., roles/logging.viewer for predefined roles
152 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700153 }</pre>
154</div>
155
156<div class="method">
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700157 <code class="details" id="list">list(showDeleted=None, pageToken=None, pageSize=None, view=None, parent=None, x__xgafv=None)</code>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700158 <pre>Lists the Roles defined on a resource.
159
160Args:
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700161 showDeleted: boolean, Include Roles that have been deleted.
162 pageToken: string, Optional pagination token returned in an earlier ListRolesResponse.
163 pageSize: integer, Optional limit on the number of roles to include in the response.
164 view: string, Optional view for the returned Role objects. When `FULL` is specified,
165the `includedPermissions` field is returned, which includes a list of all
166permissions in the role. The default value is `BASIC`, which does not
167return the `includedPermissions` field.
Bu Sun Kim65020912020-05-20 12:08:20 -0700168 parent: string, The `parent` parameter&#x27;s value depends on the target resource for the
Dan O'Mearadd494642020-05-01 07:42:23 -0700169request, namely
170[`roles`](/iam/reference/rest/v1/roles),
171[`projects`](/iam/reference/rest/v1/projects.roles), or
172[`organizations`](/iam/reference/rest/v1/organizations.roles). Each
Bu Sun Kim65020912020-05-20 12:08:20 -0700173resource type&#x27;s `parent` value format is described below:
Dan O'Mearadd494642020-05-01 07:42:23 -0700174
175* [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string.
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 This method doesn&#x27;t require a resource; it simply returns all
Dan O'Mearadd494642020-05-01 07:42:23 -0700177 [predefined roles](/iam/docs/understanding-roles#predefined_roles) in
178 Cloud IAM. Example request URL:
179 `https://iam.googleapis.com/v1/roles`
180
181* [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list):
182 `projects/{PROJECT_ID}`. This method lists all project-level
183 [custom roles](/iam/docs/understanding-custom-roles).
184 Example request URL:
185 `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles`
186
187* [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list):
188 `organizations/{ORGANIZATION_ID}`. This method lists all
189 organization-level [custom roles](/iam/docs/understanding-custom-roles).
190 Example request URL:
191 `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles`
192
193Note: Wildcard (*) values are invalid; you must specify a complete project
194ID or organization ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 x__xgafv: string, V1 error format.
196 Allowed values
197 1 - v1 error format
198 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700199
200Returns:
201 An object of the form:
202
203 { # The response containing the roles defined under a resource.
Bu Sun Kim65020912020-05-20 12:08:20 -0700204 &quot;roles&quot;: [ # The Roles defined on this resource.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700205 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700206 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
207 # It will be ignored in calls to CreateRole and UpdateRole.
208 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
209 # is limited to 100 UTF-8 bytes.
210 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
211 &quot;A String&quot;,
212 ],
213 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
214 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
215 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
216 # selected for a role, the `stage` field will not be included in the
217 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700218 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
219 #
220 # When Role is used in CreateRole, the role name must not be set.
221 #
222 # When Role is used in output and other input such as UpdateRole, the role
223 # name is the complete path, e.g., roles/logging.viewer for predefined roles
224 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700225 },
226 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700227 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set
228 # `ListRolesRequest.page_token` to this value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700229 }</pre>
230</div>
231
232<div class="method">
233 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
234 <pre>Retrieves the next page of results.
235
236Args:
237 previous_request: The request for the previous page. (required)
238 previous_response: The response from the request for the previous page. (required)
239
240Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700241 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700242 page. Returns None if there are no more items in the collection.
243 </pre>
244</div>
245
246<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700247 <code class="details" id="queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</code>
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400248 <pre>Queries roles that can be granted on a particular resource.
249A role is grantable if it can be used as the role in a binding for a policy
250for that resource.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700251
252Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700253 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700254 The object takes the form of:
255
256{ # The grantable role query request.
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The full resource name to query from the list of grantable roles.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400258 #
259 # The name follows the Google Cloud Platform resource format.
260 # For example, a Cloud Platform project with id `my-project` will be named
261 # `//cloudresourcemanager.googleapis.com/projects/my-project`.
Bu Sun Kim65020912020-05-20 12:08:20 -0700262 &quot;pageToken&quot;: &quot;A String&quot;, # Optional pagination token returned in an earlier
263 # QueryGrantableRolesResponse.
264 &quot;pageSize&quot;: 42, # Optional limit on the number of roles to include in the response.
265 &quot;view&quot;: &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700266 }
267
268 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400269 Allowed values
270 1 - v1 error format
271 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700272
273Returns:
274 An object of the form:
275
276 { # The grantable role query response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700277 &quot;roles&quot;: [ # The list of matching roles.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700278 { # A role in the Identity and Access Management API.
Bu Sun Kim65020912020-05-20 12:08:20 -0700279 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only.
280 # It will be ignored in calls to CreateRole and UpdateRole.
281 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this
282 # is limited to 100 UTF-8 bytes.
283 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
284 &quot;A String&quot;,
285 ],
286 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
287 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
288 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been
289 # selected for a role, the `stage` field will not be included in the
290 # returned definition for the role.
Bu Sun Kim4ed7d3f2020-05-27 12:20:54 -0700291 &quot;name&quot;: &quot;A String&quot;, # The name of the role.
292 #
293 # When Role is used in CreateRole, the role name must not be set.
294 #
295 # When Role is used in output and other input such as UpdateRole, the role
296 # name is the complete path, e.g., roles/logging.viewer for predefined roles
297 # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700298 },
299 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700300 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set
301 # `QueryGrantableRolesRequest.page_token` to this value.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700302 }</pre>
303</div>
304
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400305<div class="method">
306 <code class="details" id="queryGrantableRoles_next">queryGrantableRoles_next(previous_request, previous_response)</code>
307 <pre>Retrieves the next page of results.
308
309Args:
310 previous_request: The request for the previous page. (required)
311 previous_response: The response from the request for the previous page. (required)
312
313Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700314 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400315 page. Returns None if there are no more items in the collection.
316 </pre>
317</div>
318
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700319</body></html>