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 Details

    • list

      RoleList list()
      Lists all roles (first page).
      Returns:
      the first page of roles
    • list

      RoleList list(String pageToken, Integer pageSize, String projectErn)
      Lists all roles, controlling pagination and optional project ERN filtering.
      Parameters:
      pageToken - the opaque page token from a prior response, or null for the first page
      pageSize - the maximum number of results per page, or null for the server default
      projectErn - the project ERN to scope the listing to, or null
      Returns:
      the requested page of roles
    • list

      RoleList list(String pageToken, Integer pageSize, String projectId, String projectErn)
      Lists all roles, controlling pagination and optional project scoping by id or ERN.

      projectId and projectErn are mutually exclusive - supply at most one.

      Parameters:
      pageToken - the opaque page token from a prior response, or null for the first page
      pageSize - the maximum number of results per page, or null for the server default
      projectId - the IAM project id to scope the listing to, project:<id> form (see ProjectIds; mutually exclusive with projectErn), or null
      projectErn - the project ERN to scope the listing to (mutually exclusive with projectId), or null
      Returns:
      the requested page of roles
    • listByProject

      RoleList listByProject(String projectId)
      Lists the roles available within a specific project (first page).
      Parameters:
      projectId - the IAM project id, project:<id> (for example project:abc-123); a bare Resource Manager UUID is rejected, convert it with ProjectIds.of(String). Project-scoped endpoints need an STS access-policy token (new IAM(BearerTokenProvider))
      Returns:
      the first page of project-scoped roles
    • listByProject

      RoleList listByProject(String projectId, String pageToken, Integer pageSize, String projectErn)
      Lists the roles available within a specific project, controlling pagination.
      Parameters:
      projectId - the IAM project id, project:<id> (for example project:abc-123); a bare Resource Manager UUID is rejected, convert it with ProjectIds.of(String). Project-scoped endpoints need an STS access-policy token (new IAM(BearerTokenProvider))
      pageToken - the opaque page token from a prior response, or null for the first page
      pageSize - the maximum number of results per page, or null for the server default
      projectErn - the project ERN (mutually exclusive with projectId), or null
      Returns:
      the requested page of project-scoped roles