# REST Resource: projects.locations.spaces.applicationTemplates.policies

- [Resource: Policy](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#Policy)
  - [JSON representation](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#Policy.SCHEMA_REPRESENTATION)
- [PolicyType](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#PolicyType)
- [Methods](https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#METHODS_SUMMARY)

## Resource: Policy

A Policy is a resource within an Application Template that refers to a Policy that you author outside of Application Design Center and attach to an application template.

| JSON representation |
|---|
| ``` { "name": string, "displayName": string, "description": string, "policyType": enum (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#PolicyType`), "applyConditions": [ { object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/SerializedApplicationTemplate#ApplyCondition`) } ], "createTime": string, "updateTime": string, // Union field `uri` can be only one of the following: "policyUri": string, "policyRevisionUri": string // End of list of possible types for union field `uri`. } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The policy name in the following format: `projects/$project/locations/$location/spaces/$space/applicationTemplates/$applicationTemplate/policies/$policy` |
| `displayName` | `string` Optional. The policy display name. |
| `description` | `string` Optional. The policy description. |
| `policyType` | ``enum (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies#PolicyType`)`` Required. The policy type. Policy type is used to determine the domain of the policy. |
| `applyConditions[]` | ``object (`https://docs.cloud.google.com/application-design-center/docs/reference/rest/Shared.Types/SerializedApplicationTemplate#ApplyCondition`)`` Optional. Conditions for applying the policy. Condition accepts the `criticality` and `environment` parameters from the application template. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The policy creation timestamp. 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 policy update timestamp. 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"`. |
| Union field `uri`. URI of the policy or the policy revision. `uri` can be only one of the following: ||
| `policyUri` | `string` Optional. URI of the policy. |
| `policyRevisionUri` | `string` Optional. URI of the policy revision. |

## PolicyType

The policy type.

| Enums ||
|---|---|
| `POLICY_TYPE_UNSPECIFIED` | Default. |
| `COMPLIANCE_FRAMEWORK` | Compliance framework policy. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies/create` | Creates a policy for an application template. |
| ### `https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies/delete` | Deletes a policy. |
| ### `https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies/get` | Policy related APIs. |
| ### `https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies/list` | Lists policies for an application template. |
| ### `https://docs.cloud.google.com/application-design-center/docs/reference/rest/v1/projects.locations.spaces.applicationTemplates.policies/patch` | Updates a policy. |