Interface IAMPermissionSets

All Known Implementing Classes:
IAMPermissionSetsImpl

public interface IAMPermissionSets
Client interface for project-scoped IAM permission sets (/v1/projects/{projectId}/permissionSets).

Provides the permission set lifecycle - list / create / get / update / delete. A permission set groups the granular permissions that a role or access policy confers. All operations are scoped to a projectId.

ERN addressing. getPermissionSet additionally accepts the spec's ERN-addressing form, where projectId is the literal "*" and permissionSetId is an Equinix Resource Name (ERN) - or a managed-permission-set id - rather than a local permissionset: id. Because an ERN contains reserved characters (: and /), the API requires it to be URL-encoded when used as a path segment. This SDK does not provide a dedicated byErn overload: the shared core path-substitution layer does not percent-encode individual path segments, and adding that encoding would require a core change. Callers needing ERN addressing must therefore pass a pre-URL-encoded ERN as the permissionSetId argument together with projectId == "*".

  • Method Details

    • list

      PermissionSetList list(String projectId)
      Lists the permission sets of a 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 permission sets
    • list

      PermissionSetList list(String projectId, String pageToken, Integer pageSize)
      Lists the permission sets of a 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
      Returns:
      the requested page of permission sets
    • create

      PermissionSet create(String projectId, CreatePermissionSetRequest request)
      Creates a new permission set in a project.
      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))
      request - the permission set to create
      Returns:
      the created permission set
    • getByUuid

      PermissionSet getByUuid(String projectId, String permissionSetId)
      Retrieves a single permission set by id.
      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))
      permissionSetId - the permission set identifier
      Returns:
      the matching permission set
    • update

      PermissionSet update(String projectId, String permissionSetId, UpdatePermissionSetRequest request)
      Updates a permission set.
      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))
      permissionSetId - the permission set identifier
      request - the update (the request's lastRev guards against concurrent updates)
      Returns:
      the updated permission set
    • delete

      Boolean delete(String projectId, String permissionSetId, String lastRev)
      Deletes a permission set.

      The spec requires the permission set's last-known revision in the request body for optimistic-concurrency-controlled deletion.

      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))
      permissionSetId - the permission set identifier
      lastRev - the last-known revision of the permission set (required; from PermissionSet.getRev())
      Returns:
      true if the deletion request was accepted