blob: c8f66c9f9f7510806ca239f1c06ba408d699d964 [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">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070078 <code><a href="#close">close()</a></code></p>
79<p class="firstline">Close httplib2 connections.</p>
80<p class="toc_element">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070081 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
Bu Sun Kimd059ad82020-07-22 17:02:09 -070082<p class="firstline">Gets the definition of a Role.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070083<p class="toc_element">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -070084 <code><a href="#list">list(pageSize=None, pageToken=None, showDeleted=None, view=None, parent=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070085<p class="firstline">Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.</p>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -070086<p class="toc_element">
87 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p>
88<p class="firstline">Retrieves the next page of results.</p>
89<p class="toc_element">
Dan O'Mearadd494642020-05-01 07:42:23 -070090 <code><a href="#queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</a></code></p>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070091<p class="firstline">Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.</p>
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -040092<p class="toc_element">
93 <code><a href="#queryGrantableRoles_next">queryGrantableRoles_next(previous_request, previous_response)</a></code></p>
94<p class="firstline">Retrieves the next page of results.</p>
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -070095<h3>Method Details</h3>
96<div class="method">
Dmitry Frenkel3e17f892020-10-06 16:46:05 -070097 <code class="details" id="close">close()</code>
98 <pre>Close httplib2 connections.</pre>
99</div>
100
101<div class="method">
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700102 <code class="details" id="get">get(name, x__xgafv=None)</code>
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700103 <pre>Gets the definition of a Role.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700104
105Args:
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700106 name: string, The `name` parameter&#x27;s value depends on the target resource for the request, namely [`roles`](/iam/reference/rest/v1/roles), [`projects`](/iam/reference/rest/v1/projects.roles), or [`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type&#x27;s `name` value format is described below: * [`roles.get()`](/iam/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](/iam/docs/understanding-roles#predefined_roles) in Cloud IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * [`projects.roles.get()`](/iam/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](/iam/docs/understanding-custom-roles) that have been created at the project level. Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}` * [`organizations.roles.get()`](/iam/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](/iam/docs/understanding-custom-roles) that have been created at the organization level. Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID. (required)
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700107 x__xgafv: string, V1 error format.
108 Allowed values
109 1 - v1 error format
110 2 - v2 error format
111
112Returns:
113 An object of the form:
114
115 { # A role in the Identity and Access Management API.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700116 &quot;name&quot;: &quot;A String&quot;, # The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700117 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700118 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.
119 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.
120 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role.
121 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700122 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
123 &quot;A String&quot;,
124 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700125 }</pre>
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700126</div>
127
128<div class="method">
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700129 <code class="details" id="list">list(pageSize=None, pageToken=None, showDeleted=None, view=None, parent=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700130 <pre>Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700131
132Args:
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700133 pageSize: integer, Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.
134 pageToken: string, Optional pagination token returned in an earlier ListRolesResponse.
135 showDeleted: boolean, Include Roles that have been deleted.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700136 view: string, Optional view for the returned Role objects. When `FULL` is specified, the `includedPermissions` field is returned, which includes a list of all permissions in the role. The default value is `BASIC`, which does not return the `includedPermissions` field.
137 Allowed values
138 BASIC - Omits the `included_permissions` field. This is the default value.
139 FULL - Returns all fields.
140 parent: string, The `parent` parameter&#x27;s value depends on the target resource for the request, namely [`roles`](/iam/reference/rest/v1/roles), [`projects`](/iam/reference/rest/v1/projects.roles), or [`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type&#x27;s `parent` value format is described below: * [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string. This method doesn&#x27;t require a resource; it simply returns all [predefined roles](/iam/docs/understanding-roles#predefined_roles) in Cloud IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` Note: Wildcard (*) values are invalid; you must specify a complete project ID or organization ID.
Bu Sun Kim65020912020-05-20 12:08:20 -0700141 x__xgafv: string, V1 error format.
142 Allowed values
143 1 - v1 error format
144 2 - v2 error format
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700145
146Returns:
147 An object of the form:
148
149 { # The response containing the roles defined under a resource.
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700150 &quot;roles&quot;: [ # The Roles defined on this resource.
151 { # A role in the Identity and Access Management API.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700152 &quot;name&quot;: &quot;A String&quot;, # The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700153 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700154 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.
155 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.
156 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role.
157 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700158 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
159 &quot;A String&quot;,
160 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700161 },
Bu Sun Kimd059ad82020-07-22 17:02:09 -0700162 ],
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700163 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set `ListRolesRequest.page_token` to this value.
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700164 }</pre>
165</div>
166
167<div class="method">
168 <code class="details" id="list_next">list_next(previous_request, previous_response)</code>
169 <pre>Retrieves the next page of results.
170
171Args:
172 previous_request: The request for the previous page. (required)
173 previous_response: The response from the request for the previous page. (required)
174
175Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700176 A request object that you can call &#x27;execute()&#x27; on to request the next
Bu Sun Kim715bd7f2019-06-14 16:50:42 -0700177 page. Returns None if there are no more items in the collection.
178 </pre>
179</div>
180
181<div class="method">
Dan O'Mearadd494642020-05-01 07:42:23 -0700182 <code class="details" id="queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</code>
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700183 <pre>Lists roles that can be granted on a Google Cloud resource. A role is grantable if the IAM policy for the resource can contain bindings to the role.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700184
185Args:
Dan O'Mearadd494642020-05-01 07:42:23 -0700186 body: object, The request body.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700187 The object takes the form of:
188
189{ # The grantable role query request.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700190 &quot;fullResourceName&quot;: &quot;A String&quot;, # Required. The full resource name to query from the list of grantable roles. The name follows the Google Cloud Platform resource format. For example, a Cloud Platform project with id `my-project` will be named `//cloudresourcemanager.googleapis.com/projects/my-project`.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700191 &quot;pageToken&quot;: &quot;A String&quot;, # Optional pagination token returned in an earlier QueryGrantableRolesResponse.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700192 &quot;pageSize&quot;: 42, # Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 1,000.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700193 &quot;view&quot;: &quot;A String&quot;,
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700194 }
195
196 x__xgafv: string, V1 error format.
Sai Cheemalapatic30d2b52017-03-13 12:12:03 -0400197 Allowed values
198 1 - v1 error format
199 2 - v2 error format
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700200
201Returns:
202 An object of the form:
203
204 { # The grantable role query response.
Bu Sun Kim65020912020-05-20 12:08:20 -0700205 &quot;roles&quot;: [ # The list of matching roles.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700206 { # A role in the Identity and Access Management API.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700207 &quot;name&quot;: &quot;A String&quot;, # The name of the role. When Role is used in CreateRole, the role name must not be set. When Role is used in output and other input such as UpdateRole, the role name is the complete path, e.g., roles/logging.viewer for predefined roles and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700208 &quot;description&quot;: &quot;A String&quot;, # Optional. A human-readable description for the role.
Bu Sun Kim673ec5c2020-11-16 11:05:03 -0700209 &quot;deleted&quot;: True or False, # The current deleted state of the role. This field is read only. It will be ignored in calls to CreateRole and UpdateRole.
210 &quot;title&quot;: &quot;A String&quot;, # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes.
211 &quot;stage&quot;: &quot;A String&quot;, # The current launch stage of the role. If the `ALPHA` launch stage has been selected for a role, the `stage` field will not be included in the returned definition for the role.
212 &quot;etag&quot;: &quot;A String&quot;, # Used to perform a consistent read-modify-write.
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700213 &quot;includedPermissions&quot;: [ # The names of the permissions this role grants when bound in an IAM policy.
214 &quot;A String&quot;,
215 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700216 },
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700217 ],
Dmitry Frenkel3e17f892020-10-06 16:46:05 -0700218 &quot;nextPageToken&quot;: &quot;A String&quot;, # To retrieve the next page of results, set `QueryGrantableRolesRequest.page_token` to this value.
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700219 }</pre>
220</div>
221
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400222<div class="method">
223 <code class="details" id="queryGrantableRoles_next">queryGrantableRoles_next(previous_request, previous_response)</code>
224 <pre>Retrieves the next page of results.
225
226Args:
227 previous_request: The request for the previous page. (required)
228 previous_response: The response from the request for the previous page. (required)
229
230Returns:
Bu Sun Kim65020912020-05-20 12:08:20 -0700231 A request object that you can call &#x27;execute()&#x27; on to request the next
Sai Cheemalapati4ba8c232017-06-06 18:46:08 -0400232 page. Returns None if there are no more items in the collection.
233 </pre>
234</div>
235
Sai Cheemalapatiea3a5e12016-10-12 14:05:53 -0700236</body></html>