Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 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 | |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 75 | <h1><a href="iam_v1.html">Identity and Access Management (IAM) API</a> . <a href="iam_v1.roles.html">roles</a></h1> |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 76 | <h2>Instance Methods</h2> |
| 77 | <p class="toc_element"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 78 | <code><a href="#get">get(name, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 79 | <p class="firstline">Gets the definition of a Role.</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 80 | <p class="toc_element"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 81 | <code><a href="#list">list(showDeleted=None, parent=None, view=None, pageToken=None, pageSize=None, x__xgafv=None)</a></code></p> |
| 82 | <p class="firstline">Lists every predefined Role that IAM supports, or every custom role</p> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 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'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 87 | <code><a href="#queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</a></code></p> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 88 | <p class="firstline">Lists roles that can be granted on a Google Cloud resource. A role is</p> |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 89 | <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 Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 92 | <h3>Method Details</h3> |
| 93 | <div class="method"> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 94 | <code class="details" id="get">get(name, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 95 | <pre>Gets the definition of a Role. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 96 | |
| 97 | Args: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 98 | name: string, The `name` parameter's value depends on the target resource for the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 99 | request, 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 Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 103 | resource type's `name` value format is described below: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 104 | |
| 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 | |
| 123 | Note: Wildcard (*) values are invalid; you must specify a complete project |
| 124 | ID or organization ID. (required) |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 125 | x__xgafv: string, V1 error format. |
| 126 | Allowed values |
| 127 | 1 - v1 error format |
| 128 | 2 - v2 error format |
| 129 | |
| 130 | Returns: |
| 131 | An object of the form: |
| 132 | |
| 133 | { # A role in the Identity and Access Management API. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 134 | "name": "A String", # The name of the role. |
| 135 | # |
| 136 | # When Role is used in CreateRole, the role name must not be set. |
| 137 | # |
| 138 | # When Role is used in output and other input such as UpdateRole, the role |
| 139 | # name is the complete path, e.g., roles/logging.viewer for predefined roles |
| 140 | # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. |
| 141 | "deleted": True or False, # The current deleted state of the role. This field is read only. |
| 142 | # It will be ignored in calls to CreateRole and UpdateRole. |
| 143 | "title": "A String", # Optional. A human-readable title for the role. Typically this |
| 144 | # is limited to 100 UTF-8 bytes. |
| 145 | "description": "A String", # Optional. A human-readable description for the role. |
| 146 | "etag": "A String", # Used to perform a consistent read-modify-write. |
| 147 | "includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 148 | "A String", |
| 149 | ], |
| 150 | "stage": "A String", # The current launch stage of the role. If the `ALPHA` launch stage has been |
| 151 | # selected for a role, the `stage` field will not be included in the |
| 152 | # returned definition for the role. |
| 153 | }</pre> |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 154 | </div> |
| 155 | |
| 156 | <div class="method"> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 157 | <code class="details" id="list">list(showDeleted=None, parent=None, view=None, pageToken=None, pageSize=None, x__xgafv=None)</code> |
| 158 | <pre>Lists every predefined Role that IAM supports, or every custom role |
| 159 | that is defined for an organization or project. |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 160 | |
| 161 | Args: |
Bu Sun Kim | 4ed7d3f | 2020-05-27 12:20:54 -0700 | [diff] [blame] | 162 | showDeleted: boolean, Include Roles that have been deleted. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 163 | parent: string, The `parent` parameter's value depends on the target resource for the |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 164 | request, namely |
| 165 | [`roles`](/iam/reference/rest/v1/roles), |
| 166 | [`projects`](/iam/reference/rest/v1/projects.roles), or |
| 167 | [`organizations`](/iam/reference/rest/v1/organizations.roles). Each |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 168 | resource type's `parent` value format is described below: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 169 | |
| 170 | * [`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 171 | This method doesn't require a resource; it simply returns all |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 172 | [predefined roles](/iam/docs/understanding-roles#predefined_roles) in |
| 173 | Cloud IAM. Example request URL: |
| 174 | `https://iam.googleapis.com/v1/roles` |
| 175 | |
| 176 | * [`projects.roles.list()`](/iam/reference/rest/v1/projects.roles/list): |
| 177 | `projects/{PROJECT_ID}`. This method lists all project-level |
| 178 | [custom roles](/iam/docs/understanding-custom-roles). |
| 179 | Example request URL: |
| 180 | `https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` |
| 181 | |
| 182 | * [`organizations.roles.list()`](/iam/reference/rest/v1/organizations.roles/list): |
| 183 | `organizations/{ORGANIZATION_ID}`. This method lists all |
| 184 | organization-level [custom roles](/iam/docs/understanding-custom-roles). |
| 185 | Example request URL: |
| 186 | `https://iam.googleapis.com/v1/organizations/{ORGANIZATION_ID}/roles` |
| 187 | |
| 188 | Note: Wildcard (*) values are invalid; you must specify a complete project |
| 189 | ID or organization ID. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 190 | view: string, Optional view for the returned Role objects. When `FULL` is specified, |
| 191 | the `includedPermissions` field is returned, which includes a list of all |
| 192 | permissions in the role. The default value is `BASIC`, which does not |
| 193 | return the `includedPermissions` field. |
| 194 | pageToken: string, Optional pagination token returned in an earlier ListRolesResponse. |
| 195 | pageSize: integer, Optional limit on the number of roles to include in the response. |
| 196 | |
| 197 | The default is 300, and the maximum is 1,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 198 | x__xgafv: string, V1 error format. |
| 199 | Allowed values |
| 200 | 1 - v1 error format |
| 201 | 2 - v2 error format |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 202 | |
| 203 | Returns: |
| 204 | An object of the form: |
| 205 | |
| 206 | { # The response containing the roles defined under a resource. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 207 | "nextPageToken": "A String", # To retrieve the next page of results, set |
| 208 | # `ListRolesRequest.page_token` to this value. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 209 | "roles": [ # The Roles defined on this resource. |
| 210 | { # A role in the Identity and Access Management API. |
| 211 | "name": "A String", # The name of the role. |
| 212 | # |
| 213 | # When Role is used in CreateRole, the role name must not be set. |
| 214 | # |
| 215 | # When Role is used in output and other input such as UpdateRole, the role |
| 216 | # name is the complete path, e.g., roles/logging.viewer for predefined roles |
| 217 | # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. |
| 218 | "deleted": True or False, # The current deleted state of the role. This field is read only. |
| 219 | # It will be ignored in calls to CreateRole and UpdateRole. |
| 220 | "title": "A String", # Optional. A human-readable title for the role. Typically this |
| 221 | # is limited to 100 UTF-8 bytes. |
| 222 | "description": "A String", # Optional. A human-readable description for the role. |
| 223 | "etag": "A String", # Used to perform a consistent read-modify-write. |
| 224 | "includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 225 | "A String", |
| 226 | ], |
| 227 | "stage": "A String", # The current launch stage of the role. If the `ALPHA` launch stage has been |
| 228 | # selected for a role, the `stage` field will not be included in the |
| 229 | # returned definition for the role. |
| 230 | }, |
| 231 | ], |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 232 | }</pre> |
| 233 | </div> |
| 234 | |
| 235 | <div class="method"> |
| 236 | <code class="details" id="list_next">list_next(previous_request, previous_response)</code> |
| 237 | <pre>Retrieves the next page of results. |
| 238 | |
| 239 | Args: |
| 240 | previous_request: The request for the previous page. (required) |
| 241 | previous_response: The response from the request for the previous page. (required) |
| 242 | |
| 243 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 244 | A request object that you can call 'execute()' on to request the next |
Bu Sun Kim | 715bd7f | 2019-06-14 16:50:42 -0700 | [diff] [blame] | 245 | page. Returns None if there are no more items in the collection. |
| 246 | </pre> |
| 247 | </div> |
| 248 | |
| 249 | <div class="method"> |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 250 | <code class="details" id="queryGrantableRoles">queryGrantableRoles(body=None, x__xgafv=None)</code> |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 251 | <pre>Lists roles that can be granted on a Google Cloud resource. A role is |
| 252 | grantable if the IAM policy for the resource can contain bindings to the |
| 253 | role. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 254 | |
| 255 | Args: |
Dan O'Meara | dd49464 | 2020-05-01 07:42:23 -0700 | [diff] [blame] | 256 | body: object, The request body. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 257 | The object takes the form of: |
| 258 | |
| 259 | { # The grantable role query request. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 260 | "pageToken": "A String", # Optional pagination token returned in an earlier |
| 261 | # QueryGrantableRolesResponse. |
| 262 | "view": "A String", |
| 263 | "pageSize": 42, # Optional limit on the number of roles to include in the response. |
| 264 | # |
| 265 | # The default is 300, and the maximum is 1,000. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 266 | "fullResourceName": "A String", # Required. The full resource name to query from the list of grantable roles. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 267 | # |
| 268 | # The name follows the Google Cloud Platform resource format. |
| 269 | # For example, a Cloud Platform project with id `my-project` will be named |
| 270 | # `//cloudresourcemanager.googleapis.com/projects/my-project`. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 271 | } |
| 272 | |
| 273 | x__xgafv: string, V1 error format. |
Sai Cheemalapati | c30d2b5 | 2017-03-13 12:12:03 -0400 | [diff] [blame] | 274 | Allowed values |
| 275 | 1 - v1 error format |
| 276 | 2 - v2 error format |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 277 | |
| 278 | Returns: |
| 279 | An object of the form: |
| 280 | |
| 281 | { # The grantable role query response. |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 282 | "roles": [ # The list of matching roles. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 283 | { # A role in the Identity and Access Management API. |
Bu Sun Kim | d059ad8 | 2020-07-22 17:02:09 -0700 | [diff] [blame] | 284 | "name": "A String", # The name of the role. |
| 285 | # |
| 286 | # When Role is used in CreateRole, the role name must not be set. |
| 287 | # |
| 288 | # When Role is used in output and other input such as UpdateRole, the role |
| 289 | # name is the complete path, e.g., roles/logging.viewer for predefined roles |
| 290 | # and organizations/{ORGANIZATION_ID}/roles/logging.viewer for custom roles. |
| 291 | "deleted": True or False, # The current deleted state of the role. This field is read only. |
| 292 | # It will be ignored in calls to CreateRole and UpdateRole. |
| 293 | "title": "A String", # Optional. A human-readable title for the role. Typically this |
| 294 | # is limited to 100 UTF-8 bytes. |
| 295 | "description": "A String", # Optional. A human-readable description for the role. |
| 296 | "etag": "A String", # Used to perform a consistent read-modify-write. |
| 297 | "includedPermissions": [ # The names of the permissions this role grants when bound in an IAM policy. |
| 298 | "A String", |
| 299 | ], |
| 300 | "stage": "A String", # The current launch stage of the role. If the `ALPHA` launch stage has been |
| 301 | # selected for a role, the `stage` field will not be included in the |
| 302 | # returned definition for the role. |
| 303 | }, |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 304 | ], |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 305 | "nextPageToken": "A String", # To retrieve the next page of results, set |
| 306 | # `QueryGrantableRolesRequest.page_token` to this value. |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 307 | }</pre> |
| 308 | </div> |
| 309 | |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 310 | <div class="method"> |
| 311 | <code class="details" id="queryGrantableRoles_next">queryGrantableRoles_next(previous_request, previous_response)</code> |
| 312 | <pre>Retrieves the next page of results. |
| 313 | |
| 314 | Args: |
| 315 | previous_request: The request for the previous page. (required) |
| 316 | previous_response: The response from the request for the previous page. (required) |
| 317 | |
| 318 | Returns: |
Bu Sun Kim | 6502091 | 2020-05-20 12:08:20 -0700 | [diff] [blame] | 319 | A request object that you can call 'execute()' on to request the next |
Sai Cheemalapati | 4ba8c23 | 2017-06-06 18:46:08 -0400 | [diff] [blame] | 320 | page. Returns None if there are no more items in the collection. |
| 321 | </pre> |
| 322 | </div> |
| 323 | |
Sai Cheemalapati | ea3a5e1 | 2016-10-12 14:05:53 -0700 | [diff] [blame] | 324 | </body></html> |