[SDK reference](../../index.md) / [Models](../index.md) / [DeployPolicy](index.md)

# DeployPolicy

**Kind:** class  
**Namespace:** `Egulu.Sdk.Models.DeployPolicy`  

A project's deploy policy in a location (`projects/{p}/locations/{l}/deployPolicies/default`; `default` is the only ID): the rules every deployment to the project's containerapps, web apps and jobs there must satisfy. A project has one; each write makes a new version that is kept. Without one nothing is checked.

## Properties

| Name | Type | JSON name | Description |
|---|---|---|---|
| `EnforceOnRollback` | `bool?` | `enforceOnRollback` | Whether a rollback is checked like a new deployment. False by default: an enforced policy never blocks a rollback to an earlier revision unless the owner asks it to. |
| `Etag` | `string?` | `etag` | "{version}"; send it back in If-Match so two writers cannot overwrite each other. |
| `Name` | `string?` | `name` | The name property |
| `Reason` | `string?` | `reason` | Why this version was written (required on a write; 10 to 500 characters). It is kept with the version and in the audit log. |
| `Rules` | `List<Models.DeployPolicy.DeployRule>?` | `rules` | At most 6 rules, one of each kind. |
| `Targets` | `List<string>?` | `targets` | The resource kinds the policy governs: `container-app`, `web-app`, `job`. All three when omitted or empty. |
| `UpdateTime` | `DateTimeOffset?` | `updateTime` | The updateTime property |
| `UpdatedBy` | `string?` | `updatedBy` | The updatedBy property |
| `Version` | `int?` | `version` | The version, counted from 1 by the platform; 0 while the project has never set a policy. |
