- [HTTP request](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.PATH_PARAMETERS)
- [Query parameters](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.QUERY_PARAMETERS)
- [Request body](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.request_body)
- [Response body](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.response_body)
  - [JSON representation](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.PoliciesUpdateResponse.SCHEMA_REPRESENTATION)
- [Authorization scopes](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#body.aspect_1)
- [Examples](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#examples)
- [Try it!](https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies/update#try-it)

Updates an existing policy.

### HTTP request

`PUT https://dns.googleapis.com/dns/v1beta2/projects/{project}/policies/{policy}`

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

### Path parameters

| Parameters ||
|---|---|
| `project` | `string` Identifies the project addressed by this request. |
| `policy` | `string` User given friendly name of the policy addressed by this request. |

### Query parameters

| Parameters ||
|---|---|
| `clientOperationId` | `string` For mutating operation requests only. An optional identifier specified by the client. Must be unique for operation resources in the Operations collection. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Policy`.

### Response body

If successful, the response body contains data with the following structure:

| JSON representation |
|---|
| ``` { "policy": { object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Policy`) } } ``` |

| Fields ||
|---|---|
| `policy` | ``object (`https://docs.cloud.google.com/dns/docs/reference/rest/v1beta2/policies#Policy`)`` |

### Authorization scopes

Requires one of the following OAuth scopes:

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

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

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `project` resource:

- `dns.policies.update`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).