Interface IAMPrincipalPolicies
- All Known Implementing Classes:
IAMPrincipalPoliciesImpl
public interface IAMPrincipalPolicies
Client interface for project-scoped IAM principal policies
(
/v1/projects/{projectId}/principalPolicies).
A principal policy binds a user principal to the policy that governs their access within a
project. Principal policies are not created or deleted directly - instead they are listed,
retrieved, updated, and toggled via the enable/disable lifecycle. All operations are scoped to a
projectId.
-
Method Summary
Modifier and TypeMethodDescriptionDisables a principal policy.Enables a previously disabled principal policy.Retrieves the principal policy for a single user principal.Lists the principal policies of a project (first page).Lists the principal policies of a project, controlling pagination.update(String projectId, String userPrincipal, UpdatePrincipalPolicyRequest request) Updates a principal policy.
-
Method Details
-
list
Lists the principal policies 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 principal policies
-
list
Lists the principal policies 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 principal policies
-
getByUuid
Retrieves the principal policy for a single user principal.- 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))userPrincipal- the user principal identifier- Returns:
- the matching principal policy
-
update
PrincipalPolicy update(String projectId, String userPrincipal, UpdatePrincipalPolicyRequest request) Updates a principal policy.- 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))userPrincipal- the user principal identifierrequest- the update (the request'slastRevguards against concurrent updates)- Returns:
- the updated principal policy
-
enable
Enables a previously disabled principal policy.- 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))userPrincipal- the user principal identifierlastRev- the last-known revision of the policy (for concurrency control), ornull- Returns:
- the updated principal policy
-
disable
Disables a principal policy.- 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))userPrincipal- the user principal identifierlastRev- the last-known revision of the policy (for concurrency control), ornull- Returns:
- the updated principal policy
-