Class IAMAccessPoliciesImpl

java.lang.Object
com.eqixiac.equinix.iam.client.implementation.IAMAccessPoliciesImpl
All Implemented Interfaces:
IAMAccessPolicies

public class IAMAccessPoliciesImpl extends Object implements IAMAccessPolicies
  • Constructor Details

    • IAMAccessPoliciesImpl

      public IAMAccessPoliciesImpl()
  • Method Details

    • list

      public AccessPolicyList list(String projectId)
      Description copied from interface: IAMAccessPolicies
      Lists the access policies of a project (first page).
      Specified by:
      list in interface IAMAccessPolicies
      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 access policies
    • list

      public AccessPolicyList list(String projectId, String pageToken, Integer pageSize)
      Description copied from interface: IAMAccessPolicies
      Lists the access policies of a project, controlling pagination.
      Specified by:
      list in interface IAMAccessPolicies
      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 access policies
    • create

      public AccessPolicy create(String projectId, CreateAccessPolicyRequest request)
      Description copied from interface: IAMAccessPolicies
      Creates a new access policy in a project.
      Specified by:
      create in interface IAMAccessPolicies
      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 access policy to create
      Returns:
      the created access policy
    • getByUuid

      public AccessPolicy getByUuid(String projectId, String accessPolicyId)
      Description copied from interface: IAMAccessPolicies
      Retrieves a single access policy by id.
      Specified by:
      getByUuid in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      Returns:
      the matching access policy
    • update

      public AccessPolicy update(String projectId, String accessPolicyId, UpdateAccessPolicyRequest request)
      Description copied from interface: IAMAccessPolicies
      Updates an access policy.
      Specified by:
      update in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      request - the update (the request's lastRev guards against concurrent updates)
      Returns:
      the updated access policy
    • delete

      public Boolean delete(String projectId, String accessPolicyId, String lastRev)
      Description copied from interface: IAMAccessPolicies
      Deletes an access policy.

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

      Specified by:
      delete in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      lastRev - the last-known revision of the policy (required; from AccessPolicy.getRev())
      Returns:
      true if the deletion request was accepted
    • enable

      public AccessPolicy enable(String projectId, String accessPolicyId, String lastRev)
      Description copied from interface: IAMAccessPolicies
      Enables a previously disabled access policy.
      Specified by:
      enable in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      lastRev - the last-known revision of the policy (for concurrency control), or null
      Returns:
      the updated access policy
    • disable

      public AccessPolicy disable(String projectId, String accessPolicyId, String lastRev)
      Description copied from interface: IAMAccessPolicies
      Disables an access policy.
      Specified by:
      disable in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      lastRev - the last-known revision of the policy (for concurrency control), or null
      Returns:
      the updated access policy
    • listGrants

      public AccessPolicyGrantList listGrants(String projectId, String accessPolicyId)
      Description copied from interface: IAMAccessPolicies
      Lists the grants of an access policy (first page).
      Specified by:
      listGrants in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      Returns:
      the first page of grants
    • listGrants

      public AccessPolicyGrantList listGrants(String projectId, String accessPolicyId, String pageToken, Integer pageSize)
      Description copied from interface: IAMAccessPolicies
      Lists the grants of an access policy, controlling pagination.
      Specified by:
      listGrants in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      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 grants
    • addGrant

      public AccessPolicyGrant addGrant(String projectId, String accessPolicyId, AddGrantRequest request)
      Description copied from interface: IAMAccessPolicies
      Adds a grant to an access policy.
      Specified by:
      addGrant in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      request - the grant to add (the grantee and optional lastRev)
      Returns:
      the created grant
    • removeGrant

      public Boolean removeGrant(String projectId, String accessPolicyId, String grantId)
      Description copied from interface: IAMAccessPolicies
      Removes a grant from an access policy.
      Specified by:
      removeGrant in interface IAMAccessPolicies
      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))
      accessPolicyId - the access policy identifier
      grantId - the grant identifier
      Returns:
      true if the removal request was accepted