Method: projects.updatePolicy

Creates or updates a project's policy, and returns a copy of the new policy. A policy is always updated as a whole, to avoid race conditions with concurrent policy enforcement (or management!) requests. Returns NOT_FOUND if the project does not exist, INVALID_ARGUMENT if the request is malformed.

HTTP request

PUT https://binaryauthorization.googleapis.com/v1alpha2/{policy.name=projects/*/policy}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
policy.name

string

Output only. The resource name, in the format projects/*/policy. There is at most one policy per project.

Request body

The request body contains an instance of Policy.

Response body

If successful, the response body contains an instance of Policy.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.