# Method: organizations.policies.patch

- [HTTP request](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.request_body)
- [Response body](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#body.aspect)
- [Try it!](https://docs.cloud.google.com/organization-policy/reference/rest/v2/organizations.policies/patch#try-it)

Updates a policy.

Returns a `google.rpc.Status` with `google.rpc.Code.NOT_FOUND` if the constraint or the policy doesn't exist. Returns a `google.rpc.Status` with `google.rpc.Code.ABORTED` if the ETag supplied in the request doesn't match the persisted ETag of the policy.

Note: the supplied policy will perform a full overwrite of all fields.

### HTTP request

`PATCH https://orgpolicy.googleapis.com/v2/{policy.name=organizations/*/policies/*}`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `policy.name` | `string` Immutable. The resource name of the policy. Must be one of the following forms, where `constraint_name` is the name of the constraint that this policy configures: - `projects/{project_number}/policies/{constraint_name}` - `folders/{folder_id}/policies/{constraint_name}` - `organizations/{organization_id}/policies/{constraint_name}` For example, `projects/123/policies/compute.disableSerialPortAccess`. Note: `projects/{projectId}/policies/{constraint_name}` is also an acceptable name for API requests, but responses will return the name using the equivalent project number. |

### Query parameters

| Parameters ||
|---|---|
| `updateMask` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#field-mask` format)`` Field mask used to specify the fields to be overwritten in the policy. The fields specified in the updateMask are relative to the policy, not the full request. This is a comma-separated list of fully qualified names of fields. Example: `"user.displayName,photo"`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/organization-policy/reference/rest/v2/folders.policies#Policy`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/organization-policy/reference/rest/v2/folders.policies#Policy`.

### Authorization scopes

Requires the following OAuth scope:

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

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).