Interface IAMRoleAssignments

All Known Implementing Classes:
IAMRoleAssignmentsImpl

public interface IAMRoleAssignments
Client interface for IAM role assignments - associating a principal with a role within a scope.

Supports listing assignments for a scope (GET /v1/roleAssignments, operationId listRoleAssignments), creating an assignment (POST /v1/roleAssignments, operationId createRoleAssignment), retrieving one by id (GET /v1/roleAssignments/{roleAssignmentId}, operationId getRoleAssignment) and deleting one (DELETE /v1/roleAssignments/{roleAssignmentId}, operationId deleteRoleAssignment).

  • Method Details

    • list

      RoleAssignmentList list(String assignmentScopeId, String assignmentScopeType)
      Lists the role assignments for a given scope (first page).
      Parameters:
      assignmentScopeId - the id of the scope object (required)
      assignmentScopeType - the type of the scope object, e.g. PROJECT (required)
      Returns:
      the first page of role assignments
    • list

      RoleAssignmentList list(String assignmentScopeId, String assignmentScopeType, String pageToken, Integer pageSize)
      Lists the role assignments for a given scope, controlling pagination.
      Parameters:
      assignmentScopeId - the id of the scope object (required)
      assignmentScopeType - the type of the scope object, e.g. PROJECT (required)
      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
      Returns:
      the requested page of role assignments
    • create

      Creates a new role assignment.
      Parameters:
      request - the role assignment to create (principal, role and scope)
      Returns:
      the created role assignment
    • getByUuid

      RoleAssignment getByUuid(String roleAssignmentId)
      Retrieves a single role assignment by its identifier.
      Parameters:
      roleAssignmentId - the role assignment identifier
      Returns:
      the matching role assignment
    • delete

      Boolean delete(String roleAssignmentId)
      Deletes a role assignment by its identifier.
      Parameters:
      roleAssignmentId - the role assignment identifier
      Returns:
      true if the deletion request was accepted