Set iam policy
SetIamPolicy
Set IAM policy for a resource. This method replaces all existing policy bindings for the resource. To prevent overwriting existing policy bindings that were written concurrently, use the etag field to perform a read-modify-write operation. For example: Making a new account to become a resource owner would require reading IAM Policy for the resource, add new binding or update existing binding with role_id: owner, and then set the new policy with etag returned by GetIamPolicy.
Authorizations
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Path Parameters
A resource key for which policy is being set.
For organizations, this key consists of two components: the organization ID and string "organization", joined by a forward slash. For all other resources, this key consists of three components: the resource ID, the project ID, and the resource type (e.g. "event" or project"), joined by forward slashes (for projects specifically, this contains the same resource ID twice).
Examples:
For organization "example", use example/organization
For project "demo", use demo/demo/project
For event "r8efdFD9sMSaa93" inside the project "demo", use r8efdFD9sMSaa93/demo/event
Body
New policy value to set for the resource
A resource key for which policy is being set.
For organizations, this key consists of two components: the organization ID and string "organization", joined by a forward slash. For all other resources, this key consists of three components: the resource ID, the project ID, and the resource type (e.g. "event" or project"), joined by forward slashes (for projects specifically, this contains the same resource ID twice).
Examples:
For organization "example", use example/organization
For project "demo", use demo/demo/project
For event "r8efdFD9sMSaa93" inside the project "demo", use r8efdFD9sMSaa93/demo/event
If not empty, the request succeeds only if value matches the currently stored IAM policy
Response
When there is no error result is empty