# Method: policies.set

- [HTTP request](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/policies/set#body.HTTP_TEMPLATE)
- [Request body](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/policies/set#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/policies/set#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/policies/set#body.response_body)
- [Authorization Scopes](https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/policies/set#body.aspect)

Sets the access control policy on the specified resource. Replaces any existing policy.

### HTTP request

`POST https://sasportal.googleapis.com/v1alpha1/policies:set`

The URL uses [gRPC Transcoding](https://github.com/googleapis/googleapis/blob/master/google/api/http.proto) syntax.

### Request body

The request body contains data with the following structure:

| JSON representation ||
|---|---|
| ``` { "resource": string, "policy": { object (`https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/Policy`) } } ``` |

| Fields ||
|---|---|
| `resource` | `string` Required. The resource for which the policy is being specified. This policy replaces any existing policy. |
| `policy` | ``object (`https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/Policy`)`` Required. The policy to be applied to the `resource`. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/spectrum-access-system/docs/reference/rest/Policy`.

### Authorization Scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/userinfo.email`