| 1 |
<html><body> |
| 2 |
<style> |
| 3 |
|
| 4 |
body, 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 |
|
| 15 |
body { |
| 16 |
font-size: 13px; |
| 17 |
padding: 1em; |
| 18 |
} |
| 19 |
|
| 20 |
h1 { |
| 21 |
font-size: 26px; |
| 22 |
margin-bottom: 1em; |
| 23 |
} |
| 24 |
|
| 25 |
h2 { |
| 26 |
font-size: 24px; |
| 27 |
margin-bottom: 1em; |
| 28 |
} |
| 29 |
|
| 30 |
h3 { |
| 31 |
font-size: 20px; |
| 32 |
margin-bottom: 1em; |
| 33 |
margin-top: 1em; |
| 34 |
} |
| 35 |
|
| 36 |
pre, code { |
| 37 |
line-height: 1.5; |
| 38 |
font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; |
| 39 |
} |
| 40 |
|
| 41 |
pre { |
| 42 |
margin-top: 0.5em; |
| 43 |
} |
| 44 |
|
| 45 |
h1, h2, h3, p { |
| 46 |
font-family: Arial, sans serif; |
| 47 |
} |
| 48 |
|
| 49 |
h1, 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.roles.html">roles</a></h1> |
| 76 |
<h2>Instance Methods</h2> |
| 77 |
<p class="toc_element"> |
| 78 |
<code><a href="#close">close()</a></code></p> |
| 79 |
<p class="firstline">Close httplib2 connections.</p> |
| 80 |
<p class="toc_element"> |
| 81 |
<code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
| 82 |
<p class="firstline">Gets the definition of a Role.</p> |
| 83 |
<p class="toc_element"> |
| 84 |
<code><a href="#list">list(pageSize=None, pageToken=None, parent=None, showDeleted=None, view=None, x__xgafv=None)</a></code></p> |
| 85 |
<p class="firstline">Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project.</p> |
| 86 |
<p class="toc_element"> |
| 87 |
<code><a href="#list_next">list_next()</a></code></p> |
| 88 |
<p class="firstline">Retrieves the next page of results.</p> |
| 89 |
<p class="toc_element"> |
| 90 |
<code><a href="#queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</a></code></p> |
| 91 |
<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> |
| 92 |
<p class="toc_element"> |
| 93 |
<code><a href="#queryGrantableRoles_next">queryGrantableRoles_next()</a></code></p> |
| 94 |
<p class="firstline">Retrieves the next page of results.</p> |
| 95 |
<h3>Method Details</h3> |
| 96 |
<div class="method"> |
| 97 |
<code class="details" id="close">close()</code> |
| 98 |
<pre>Close httplib2 connections.</pre> |
| 99 |
</div> |
| 100 |
|
| 101 |
<div class="method"> |
| 102 |
<code class="details" id="get">get(name, x__xgafv=None)</code> |
| 103 |
<pre>Gets the definition of a Role. |
| 104 |
|
| 105 |
Args: |
| 106 |
name: string, The `name` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `name` value format is described below: * [roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/roles/get): `roles/{ROLE_NAME}`. This method returns results from all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles/{ROLE_NAME}` * [projects.roles.get](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/get): `projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/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](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/get): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method returns only [custom roles](https://cloud.google.com/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) |
| 107 |
x__xgafv: string, V1 error format. |
| 108 |
Allowed values |
| 109 |
1 - v1 error format |
| 110 |
2 - v2 error format |
| 111 |
|
| 112 |
Returns: |
| 113 |
An object of the form: |
| 114 |
|
| 115 |
{ # A role in the Identity and Access Management API. |
| 116 |
"deleted": 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. |
| 117 |
"description": "A String", # Optional. A human-readable description for the role. |
| 118 |
"etag": "A String", # Used to perform a consistent read-modify-write. |
| 119 |
"includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 120 |
"A String", |
| 121 |
], |
| 122 |
"name": "A String", # 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. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |
| 123 |
"stage": "A String", # 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. |
| 124 |
"title": "A String", # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| 125 |
}</pre> |
| 126 |
</div> |
| 127 |
|
| 128 |
<div class="method"> |
| 129 |
<code class="details" id="list">list(pageSize=None, pageToken=None, parent=None, showDeleted=None, view=None, x__xgafv=None)</code> |
| 130 |
<pre>Lists every predefined Role that IAM supports, or every custom role that is defined for an organization or project. |
| 131 |
|
| 132 |
Args: |
| 133 |
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 |
parent: string, The `parent` parameter's value depends on the target resource for the request, namely [roles](https://cloud.google.com/iam/docs/reference/rest/v1/roles), [projects](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [organizations](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each resource type's `parent` value format is described below: * [roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/roles/list): An empty string. This method doesn't require a resource; it simply returns all [predefined roles](https://cloud.google.com/iam/docs/understanding-roles#predefined_roles) in IAM. Example request URL: `https://iam.googleapis.com/v1/roles` * [projects.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/list): `projects/{PROJECT_ID}`. This method lists all project-level [custom roles](https://cloud.google.com/iam/docs/understanding-custom-roles). Example request URL: `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` * [organizations.roles.list](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/list): `organizations/{ORGANIZATION_ID}`. This method lists all organization-level [custom roles](https://cloud.google.com/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. |
| 136 |
showDeleted: boolean, Include Roles that have been deleted. |
| 137 |
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. |
| 138 |
Allowed values |
| 139 |
BASIC - Omits the `included_permissions` field. This is the default value. |
| 140 |
FULL - Returns all fields. |
| 141 |
x__xgafv: string, V1 error format. |
| 142 |
Allowed values |
| 143 |
1 - v1 error format |
| 144 |
2 - v2 error format |
| 145 |
|
| 146 |
Returns: |
| 147 |
An object of the form: |
| 148 |
|
| 149 |
{ # The response containing the roles defined under a resource. |
| 150 |
"nextPageToken": "A String", # To retrieve the next page of results, set `ListRolesRequest.page_token` to this value. |
| 151 |
"roles": [ # The Roles defined on this resource. |
| 152 |
{ # A role in the Identity and Access Management API. |
| 153 |
"deleted": 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. |
| 154 |
"description": "A String", # Optional. A human-readable description for the role. |
| 155 |
"etag": "A String", # Used to perform a consistent read-modify-write. |
| 156 |
"includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 157 |
"A String", |
| 158 |
], |
| 159 |
"name": "A String", # 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. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |
| 160 |
"stage": "A String", # 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. |
| 161 |
"title": "A String", # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| 162 |
}, |
| 163 |
], |
| 164 |
}</pre> |
| 165 |
</div> |
| 166 |
|
| 167 |
<div class="method"> |
| 168 |
<code class="details" id="list_next">list_next()</code> |
| 169 |
<pre>Retrieves the next page of results. |
| 170 |
|
| 171 |
Args: |
| 172 |
previous_request: The request for the previous page. (required) |
| 173 |
previous_response: The response from the request for the previous page. (required) |
| 174 |
|
| 175 |
Returns: |
| 176 |
A request object that you can call 'execute()' on to request the next |
| 177 |
page. Returns None if there are no more items in the collection. |
| 178 |
</pre> |
| 179 |
</div> |
| 180 |
|
| 181 |
<div class="method"> |
| 182 |
<code class="details" id="queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</code> |
| 183 |
<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. |
| 184 |
|
| 185 |
Args: |
| 186 |
body: object, The request body. |
| 187 |
The object takes the form of: |
| 188 |
|
| 189 |
{ # The grantable role query request. |
| 190 |
"fullResourceName": "A String", # Required. 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`. |
| 191 |
"pageSize": 42, # Optional limit on the number of roles to include in the response. The default is 300, and the maximum is 2,000. |
| 192 |
"pageToken": "A String", # Optional pagination token returned in an earlier QueryGrantableRolesResponse. |
| 193 |
"view": "A String", |
| 194 |
} |
| 195 |
|
| 196 |
x__xgafv: string, V1 error format. |
| 197 |
Allowed values |
| 198 |
1 - v1 error format |
| 199 |
2 - v2 error format |
| 200 |
|
| 201 |
Returns: |
| 202 |
An object of the form: |
| 203 |
|
| 204 |
{ # The grantable role query response. |
| 205 |
"nextPageToken": "A String", # To retrieve the next page of results, set `QueryGrantableRolesRequest.page_token` to this value. |
| 206 |
"roles": [ # The list of matching roles. |
| 207 |
{ # A role in the Identity and Access Management API. |
| 208 |
"deleted": 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. |
| 209 |
"description": "A String", # Optional. A human-readable description for the role. |
| 210 |
"etag": "A String", # Used to perform a consistent read-modify-write. |
| 211 |
"includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 212 |
"A String", |
| 213 |
], |
| 214 |
"name": "A String", # 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. For example, `roles/logging.viewer` for predefined roles, `organizations/{ORGANIZATION_ID}/roles/myRole` for organization-level custom roles, and `projects/{PROJECT_ID}/roles/myRole` for project-level custom roles. |
| 215 |
"stage": "A String", # 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. |
| 216 |
"title": "A String", # Optional. A human-readable title for the role. Typically this is limited to 100 UTF-8 bytes. |
| 217 |
}, |
| 218 |
], |
| 219 |
}</pre> |
| 220 |
</div> |
| 221 |
|
| 222 |
<div class="method"> |
| 223 |
<code class="details" id="queryGrantableRoles_next">queryGrantableRoles_next()</code> |
| 224 |
<pre>Retrieves the next page of results. |
| 225 |
|
| 226 |
Args: |
| 227 |
previous_request: The request for the previous page. (required) |
| 228 |
previous_response: The response from the request for the previous page. (required) |
| 229 |
|
| 230 |
Returns: |
| 231 |
A request object that you can call 'execute()' on to request the next |
| 232 |
page. Returns None if there are no more items in the collection. |
| 233 |
</pre> |
| 234 |
</div> |
| 235 |
|
| 236 |
</body></html> |