# Policy

- [JSON representation](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#SCHEMA_REPRESENTATION)
- [Assignment](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#Assignment)
  - [JSON representation](https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#Assignment.SCHEMA_REPRESENTATION)

Defines an access control policy to the resources.

| JSON representation |
|---|
| ``` { "assignments": [ { object (`https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#Assignment`) } ], "etag": string } ``` |

| Fields ||
|---|---|
| `assignments[]` | ``object (`https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#Assignment`)`` List of `https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/Policy#Assignment` |
| `etag` | `string (https://developers.google.com/discovery/v1/type-format format)` The etag is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the etag in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An etag is returned in the response to `https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/get#spectrum.sas.portal.v1alpha1.PolicyService.GetPolicy`, and systems are expected to put that etag in the request to `https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/set#spectrum.sas.portal.v1alpha1.PolicyService.SetPolicy` to ensure that their change will be applied to the same version of the policy. If no etag is provided in the call to `https://developers.google.com/spectrum-access-system/reference/rest/v1alpha1/policies/get#spectrum.sas.portal.v1alpha1.PolicyService.GetPolicy`, then the existing policy is overwritten blindly. A base64-encoded string. |

## Assignment

Associates `members` with a `role`.

| JSON representation |
|---|
| ``` { "role": string, "members": [ string ] } ``` |

| Fields ||
|---|---|
| `role` | `string` Required. Role that is assigned to `members`. |
| `members[]` | `string` The identities the role is assigned to. It can have the following values: - `{user_email}`: An email address that represents a specific Google account. For example: `alice@gmail.com`. - `{group_email}`: An email address that represents a Google group. For example, `viewers@gmail.com`. |