public class Iam.Organizations.Roles extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Iam.Organizations.Roles.Create |
class |
Iam.Organizations.Roles.Delete |
class |
Iam.Organizations.Roles.Get |
class |
Iam.Organizations.Roles.List |
class |
Iam.Organizations.Roles.Patch |
class |
Iam.Organizations.Roles.Undelete |
| Constructor and Description |
|---|
Roles() |
| Modifier and Type | Method and Description |
|---|---|
Iam.Organizations.Roles.Create |
create(String parent,
CreateRoleRequest content)
Creates a new custom Role.
|
Iam.Organizations.Roles.Delete |
delete(String name)
Deletes a custom Role.
|
Iam.Organizations.Roles.Get |
get(String name)
Gets the definition of a Role.
|
Iam.Organizations.Roles.List |
list(String parent)
Lists every predefined Role that IAM supports, or every custom role that is defined for an
organization or project.
|
Iam.Organizations.Roles.Patch |
patch(String name,
Role content)
Updates the definition of a custom Role.
|
Iam.Organizations.Roles.Undelete |
undelete(String name,
UndeleteRoleRequest content)
Undeletes a custom Role.
|
public Iam.Organizations.Roles.Create create(String parent, CreateRoleRequest content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.parent - The `parent` parameter's value depends on the target resource for the request, namely
[`projects`](/iam/reference/rest/v1/projects.roles) or
[`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type's
`parent` value format is described below: *
[`projects.roles.create()`](/iam/reference/rest/v1/projects.roles/create):
`projects/{PROJECT_ID}`. This method creates project-level [custom roles](/iam/docs
/understanding-custom-roles). Example request URL:
`https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles` *
[`organizations.roles.create()`](/iam/reference/rest/v1/organizations.roles/create):
`organizations/{ORGANIZATION_ID}`. This method creates 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.content - the CreateRoleRequestIOExceptionpublic Iam.Organizations.Roles.Delete delete(String name) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The `name` parameter's value depends on the target resource for the request, namely
[`projects`](/iam/reference/rest/v1/projects.roles) or
[`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type's `name`
value format is described below: *
[`projects.roles.delete()`](/iam/reference/rest/v1/projects.roles/delete):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes 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.delete()`](/iam/reference/rest/v1/organizations.roles/delete):
`organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes 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.IOExceptionpublic Iam.Organizations.Roles.Get get(String name) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The `name` parameter'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'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.IOExceptionpublic Iam.Organizations.Roles.List list(String parent) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.parent - The `parent` parameter'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's
`parent` value format is described below: *
[`roles.list()`](/iam/reference/rest/v1/roles/list): An empty string. This method doesn'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.IOExceptionpublic Iam.Organizations.Roles.Patch patch(String name, Role content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The `name` parameter's value depends on the target resource for the request, namely
[`projects`](/iam/reference/rest/v1/projects.roles) or
[`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type's `name`
value format is described below: *
[`projects.roles.patch()`](/iam/reference/rest/v1/projects.roles/patch):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates 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.patch()`](/iam/reference/rest/v1/organizations.roles/patch):
`organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates 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.content - the RoleIOExceptionpublic Iam.Organizations.Roles.Undelete undelete(String name, UndeleteRoleRequest content) throws IOException
AbstractGoogleClientRequest.execute() method to invoke the remote operation.name - The `name` parameter's value depends on the target resource for the request, namely
[`projects`](/iam/reference/rest/v1/projects.roles) or
[`organizations`](/iam/reference/rest/v1/organizations.roles). Each resource type's `name`
value format is described below: *
[`projects.roles.undelete()`](/iam/reference/rest/v1/projects.roles/undelete):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes 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.undelete()`](/iam/reference/rest/v1/organizations.roles/undelete):
`organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes 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.content - the UndeleteRoleRequestIOExceptionCopyright © 2011–2021 Google. All rights reserved.