Class OrganizationsResource.RolesResource
The "roles" collection of methods.
Inheritance
OrganizationsResource.RolesResource
Assembly: Google.Apis.Iam.v1.dll
Syntax
public class OrganizationsResource.RolesResource
Constructors
RolesResource(IClientService)
Constructs a new resource.
Declaration
public RolesResource(IClientService service)
Parameters
Methods
Create(CreateRoleRequest, string)
Creates a new custom Role.
Declaration
public virtual OrganizationsResource.RolesResource.CreateRequest Create(CreateRoleRequest body, string parent)
Parameters
Type |
Name |
Description |
CreateRoleRequest |
body |
The body of the request.
|
string |
parent |
The parent parameter's value depends on the target resource for the request, namely
projects or
organizations. Each resource
type's parent value format is described below: *
projects.roles.create:
projects/{PROJECT_ID} . This method creates project-level custom
roles. Example request URL:
https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles *
organizations.roles.create:
organizations/{ORGANIZATION_ID} . This method creates organization-level 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.
|
Returns
Delete(string)
Deletes a custom Role. When you delete a custom role, the following changes occur immediately: * You
cannot bind a principal to the custom role in an IAM Policy. * Existing bindings to the custom role are
not changed, but they have no effect. * By default, the response from ListRoles does not include the
custom role. A deleted custom role still counts toward the custom role
limit until it is permanently deleted. You have 7 days to
undelete the custom role. After 7 days, the following changes occur: * The custom role is permanently
deleted and cannot be recovered. * If an IAM policy contains a binding to the custom role, the binding
is permanently removed. * The custom role no longer counts toward your custom role limit.
Declaration
public virtual OrganizationsResource.RolesResource.DeleteRequest Delete(string name)
Parameters
Type |
Name |
Description |
string |
name |
The name parameter's value depends on the target resource for the request, namely
projects or
organizations. Each resource
type's name value format is described below: *
projects.roles.delete:
projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} . This method deletes only 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:
organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} . This method deletes only 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.
|
Returns
Get(string)
Gets the definition of a Role.
Declaration
public virtual OrganizationsResource.RolesResource.GetRequest Get(string name)
Parameters
Type |
Name |
Description |
string |
name |
The name parameter's value depends on the target resource for the request, namely
roles,
projects, or
organizations. Each resource
type's name value format is described below: *
roles.get: roles/{ROLE_NAME} . This
method returns results from all predefined
roles in IAM. Example request
URL: https://iam.googleapis.com/v1/roles/{ROLE_NAME} *
projects.roles.get:
projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} . This method returns only 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:
organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} . This method returns only 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.
|
Returns
List(string)
Lists every predefined Role that IAM supports, or every custom role that is defined for an organization
or project.
Declaration
public virtual OrganizationsResource.RolesResource.ListRequest List(string parent)
Parameters
Type |
Name |
Description |
string |
parent |
The parent parameter's value depends on the target resource for the request, namely
roles,
projects, or
organizations. Each resource
type's parent value format is described below: *
roles.list: An empty string. This
method doesn't require a resource; it simply returns all predefined
roles in IAM. Example request
URL: https://iam.googleapis.com/v1/roles *
projects.roles.list:
projects/{PROJECT_ID} . This method lists all project-level custom
roles. Example request URL:
https://iam.googleapis.com/v1/projects/{PROJECT_ID}/roles *
organizations.roles.list:
organizations/{ORGANIZATION_ID} . This method lists all organization-level 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.
|
Returns
Patch(Role, string)
Updates the definition of a custom Role.
Declaration
public virtual OrganizationsResource.RolesResource.PatchRequest Patch(Role body, string name)
Parameters
Type |
Name |
Description |
Role |
body |
The body of the request.
|
string |
name |
The name parameter's value depends on the target resource for the request, namely
projects or
organizations. Each resource
type's name value format is described below: *
projects.roles.patch:
projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} . This method updates only 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:
organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} . This method updates only 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.
|
Returns
Undelete(UndeleteRoleRequest, string)
Declaration
public virtual OrganizationsResource.RolesResource.UndeleteRequest Undelete(UndeleteRoleRequest body, string name)
Parameters
Type |
Name |
Description |
UndeleteRoleRequest |
body |
The body of the request.
|
string |
name |
The name parameter's value depends on the target resource for the request, namely
projects or
organizations. Each resource
type's name value format is described below: *
projects.roles.undelete:
projects/{PROJECT_ID}/roles/{CUSTOM_ROLE_ID} . This method undeletes only 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:
organizations/{ORGANIZATION_ID}/roles/{CUSTOM_ROLE_ID} . This method undeletes only 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.
|
Returns