# Method: projects.platforms.policies.replacePlatformPolicy

- [HTTP request](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy#body.request_body)
- [Response body](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies/replacePlatformPolicy#body.aspect)

Replaces a `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`. Returns `NOT_FOUND` if the policy doesn't exist.

### HTTP request

`PUT https://binaryauthorization.googleapis.com/v1/{policy.name=projects/*/platforms/*/policies/*}`

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

### Path parameters

| Parameters ||
|---|---|
| `policy.name` | `string` Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`. |

### Request body

The request body contains an instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`.

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/binary-authorization/docs/reference/rest/v1/projects.platforms.policies#PlatformPolicy`.

### Authorization scopes

Requires the following OAuth scope:

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

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