Interface IAMRoles
- All Known Implementing Classes:
IAMRolesImpl
public interface IAMRoles
Client interface for the IAM roles catalog.
Lists the pre-defined roles available globally
(GET /v1/roles, operationId listRoles) or scoped to a project
(GET /v1/projects/{projectId}/roles, operationId listRolesByProjectId).
Results are opaque-token paginated: each RoleList carries a nextPageToken;
pass it back as the pageToken argument to fetch the next page.
-
Method Summary
Modifier and TypeMethodDescriptionlist()Lists all roles (first page).Lists all roles, controlling pagination and optional project ERN filtering.Lists all roles, controlling pagination and optional project scoping by id or ERN.listByProject(String projectId) Lists the roles available within a specific project (first page).listByProject(String projectId, String pageToken, Integer pageSize, String projectErn) Lists the roles available within a specific project, controlling pagination.
-
Method Details
-
list
-
list
Lists all roles, controlling pagination and optional project ERN filtering.- Parameters:
pageToken- the opaque page token from a prior response, ornullfor the first pagepageSize- the maximum number of results per page, ornullfor the server defaultprojectErn- the project ERN to scope the listing to, ornull- Returns:
- the requested page of roles
-
list
Lists all roles, controlling pagination and optional project scoping by id or ERN.projectIdandprojectErnare mutually exclusive - supply at most one.- Parameters:
pageToken- the opaque page token from a prior response, ornullfor the first pagepageSize- the maximum number of results per page, ornullfor the server defaultprojectId- the IAM project id to scope the listing to,project:<id>form (seeProjectIds; mutually exclusive withprojectErn), ornullprojectErn- the project ERN to scope the listing to (mutually exclusive withprojectId), ornull- Returns:
- the requested page of roles
-
listByProject
Lists the roles available within a specific project (first page).- Parameters:
projectId- the IAM project id,project:<id>(for exampleproject:abc-123); a bare Resource Manager UUID is rejected, convert it withProjectIds.of(String). Project-scoped endpoints need an STS access-policy token (new IAM(BearerTokenProvider))- Returns:
- the first page of project-scoped roles
-
listByProject
Lists the roles available within a specific project, controlling pagination.- Parameters:
projectId- the IAM project id,project:<id>(for exampleproject:abc-123); a bare Resource Manager UUID is rejected, convert it withProjectIds.of(String). Project-scoped endpoints need an STS access-policy token (new IAM(BearerTokenProvider))pageToken- the opaque page token from a prior response, ornullfor the first pagepageSize- the maximum number of results per page, ornullfor the server defaultprojectErn- the project ERN (mutually exclusive withprojectId), ornull- Returns:
- the requested page of project-scoped roles
-