Interface IAMPolicyMasks
- All Known Implementing Classes:
IAMPolicyMasksImpl
public interface IAMPolicyMasks
Client interface for project-scoped IAM policy masks
(
/v1/projects/{projectId}/policyMasks).
A policy mask constrains the permissions an underlying policy would otherwise grant. This
interface provides the policy mask lifecycle - list / create / get / update / delete plus the
enable/disable lifecycle toggles. All operations are scoped to a projectId.
-
Method Summary
Modifier and TypeMethodDescriptioncreate(String projectId, CreatePolicyMaskRequest request) Creates a new policy mask in a project.Deletes a policy mask.Disables a policy mask.Enables a previously disabled policy mask.Retrieves a single policy mask by id.Lists the policy masks of a project (first page).Lists the policy masks of a project, controlling pagination.update(String projectId, String policyMaskId, UpdatePolicyMaskRequest request) Updates a policy mask.
-
Method Details
-
list
Lists the policy masks of a 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 policy masks
-
list
Lists the policy masks of a 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 default- Returns:
- the requested page of policy masks
-
create
Creates a new policy mask in a project.- 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))request- the policy mask to create- Returns:
- the created policy mask
-
getByUuid
Retrieves a single policy mask by id.- 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))policyMaskId- the policy mask identifier- Returns:
- the matching policy mask
-
update
Updates a policy mask.- 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))policyMaskId- the policy mask identifierrequest- the update (the request'slastRevguards against concurrent updates)- Returns:
- the updated policy mask
-
delete
Deletes a policy mask.The spec requires the policy mask's last-known revision in the request body for optimistic-concurrency-controlled deletion.
- 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))policyMaskId- the policy mask identifierlastRev- the last-known revision of the mask (required; fromPolicyMask.getRev())- Returns:
trueif the deletion request was accepted
-
enable
Enables a previously disabled policy mask.- 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))policyMaskId- the policy mask identifierlastRev- the last-known revision of the mask (for concurrency control), ornull- Returns:
- the updated policy mask
-
disable
Disables a policy mask.- 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))policyMaskId- the policy mask identifierlastRev- the last-known revision of the mask (for concurrency control), ornull- Returns:
- the updated policy mask
-