# Method: policies.set

- [HTTP request](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/set#body.HTTP_TEMPLATE)
- [Request body](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/set#body.request_body)
  - [JSON representation](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/set#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/set#body.response_body)
- [Authorization Scopes](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/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://google.aip.dev/127) syntax.

### Request body

The request body contains data with the following structure:

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

| Fields ||
|---|---|
| `resource` | `string` Required. The resource for which the policy is being specified. This policy replaces any existing policy. |
| `policy` | ``object (`https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy`)`` Required. The policy to be applied to the `resource`. |
| `disableNotification` | `boolean` Optional. Set the field as `true` to disable the onboarding notification. |

### Response body

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

### Authorization Scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/sasportal`