# REST Resource: consumerPolicies

- [Resource: ConsumerPolicy](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies#ConsumerPolicy)
  - [JSON representation](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies#ConsumerPolicy.SCHEMA_REPRESENTATION)
- [Methods](https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies#METHODS_SUMMARY)

## Resource: ConsumerPolicy

Consumer Policy is a set of rules that define what services or service groups can be used for a cloud resource hierarchy.

| JSON representation |
|---|
| ``` { "name": string, "etag": string, "createTime": string, "updateTime": string, "enableRules": [ { object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/EnableRule`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` Output only. The resource name of the policy. Only the `default` policy is supported: `projects/12345/consumerPolicies/default`, `folders/12345/consumerPolicies/default`, `organizations/12345/consumerPolicies/default`. |
| `etag` | `string` An opaque tag indicating the current version of the policy, used for concurrency control. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the policy was created. For singleton policies, this is the first touch of the policy. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `updateTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time the policy was last updated. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `enableRules[]` | ``object (`https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/EnableRule`)`` Enable rules define usable services, groups, and categories. There can currently be at most one `EnableRule`. This restriction will be lifted in later releases. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies/analyze` | Analyze a consumer policy change without kicking off the actual update. |
| ### `https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies/get` | Get the consumer policy of a resource. |
| ### `https://docs.cloud.google.com/service-usage/docs/reference/rest/v2beta/consumerPolicies/patch` | Update the consumer policy of a resource. |