capabilities.work

Update Project IAM Policy

A 3-step recipe with Google Cloud Platform. We can help you get access.

Recipe · 3 steps

Update Project IAM Policy

Grant an IAM role to a member on a project using read-modify-write.

  1. Read the current IAM policy for the project to capture its etag and version for the subsequent set call.
  2. Write back a policy granting the role to the member. The captured etag is supplied for optimistic concurrency to avoid clobbering changes.
  3. Re-read the IAM policy to confirm the new binding was persisted.
What you'll need to have ready
  • resource: The project resource, e.g. projects/12345.
  • role: The IAM role to grant, e.g. roles/viewer.
  • member: The member to grant the role to, e.g. user:jane@example.com.
For your developer

Arazzo workflow google-cloud-platform:update-project-iam-policy, 3 operations: cloudresourcemanager.projects.getIamPolicy → cloudresourcemanager.projects.setIamPolicy → cloudresourcemanager.projects.getIamPolicy. Specs on APIs.io.