public class Iam.Projects.Roles extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
Iam.Projects.Roles.Create |
class |
Iam.Projects.Roles.Delete |
class |
Iam.Projects.Roles.Get |
class |
Iam.Projects.Roles.List |
class |
Iam.Projects.Roles.Patch |
class |
Iam.Projects.Roles.Undelete |
| Constructor and Description |
|---|
Roles() |
| Modifier and Type | Method and Description |
|---|---|
Iam.Projects.Roles.Create |
create(String parent,
CreateRoleRequest content)
Creates a new custom Role.
|
Iam.Projects.Roles.Delete |
delete(String name)
Deletes a custom Role.
|
Iam.Projects.Roles.Get |
get(String name)
Gets the definition of a Role.
|
Iam.Projects.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.Projects.Roles.Patch |
patch(String name,
Role content)
Updates the definition of a custom Role.
|
Iam.Projects.Roles.Undelete |
undelete(String name,
UndeleteRoleRequest content)
Undeletes a custom Role.
|
public Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [`orga
nizations`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each
resource type's `parent` value format is described below: * [`projects.roles.create()`](ht
tps://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/create):
`projects/{PROJECT_ID}`. This method creates 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.create
()`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles/create):
`organizations/{ORGANIZATION_ID}`. This method creates 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.content - the CreateRoleRequestIOExceptionpublic Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [`orga
nizations`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each
resource type's `name` value format is described below: * [`projects.roles.delete()`](http
s://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/delete):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes 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}` * [`organizat
ions.roles.delete()`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.ro
les/delete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method deletes
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.IOExceptionpublic Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/roles),
[`projects`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [`org
anizations`](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}` * [`organizat
ions.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.IOExceptionpublic Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/roles),
[`projects`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles), or [`org
anizations`](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()`](htt
ps://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.IOExceptionpublic Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [`orga
nizations`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each
resource type's `name` value format is described below: * [`projects.roles.patch()`](https
://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/patch):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates 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}` * [`organizat
ions.roles.patch()`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.rol
es/patch): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method updates
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.content - the RoleIOExceptionpublic Iam.Projects.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`](https://cloud.google.com/iam/docs/reference/rest/v1/projects.roles) or [`orga
nizations`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.roles). Each
resource type's `name` value format is described below: * [`projects.roles.undelete()`](ht
tps://cloud.google.com/iam/docs/reference/rest/v1/projects.roles/undelete):
`projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID}`. This method undeletes 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}` * [`organizat
ions.roles.undelete()`](https://cloud.google.com/iam/docs/reference/rest/v1/organizations.
roles/undelete): `organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID}`. This method
undeletes 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.content - the UndeleteRoleRequestIOExceptionCopyright © 2011–2024 Google. All rights reserved.