# REST Resource: projects.locations.backupPolicies

- [Resource: BackupPolicy](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#BackupPolicy)
  - [JSON representation](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#BackupPolicy.SCHEMA_REPRESENTATION)
- [State](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#State)
- [Methods](https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#METHODS_SUMMARY)

## Resource: BackupPolicy

Backup Policy.

| JSON representation |
|---|
| ``` { "name": string, "createTime": string, "labels": { string: string, ... }, "state": enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#State`), "dailyBackupLimit": integer, "weeklyBackupLimit": integer, "monthlyBackupLimit": integer, "description": string, "enabled": boolean, "assignedVolumeCount": integer } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the backup policy. Format: `projects/{projectId}/locations/{location}/backupPolicies/{backupPolicyId}`. |
| `createTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Output only. The time when the backup policy was created. 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"`. |
| `labels` | `map (key: string, value: string)` Resource labels to represent user provided metadata. An object containing a list of `"key": value` pairs. Example: `{ "name": "wrench", "mass": "1.3kg", "count": "3" }`. |
| `state` | ``enum (`https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies#State`)`` Output only. The backup policy state. |
| `dailyBackupLimit` | `integer` Number of daily backups to keep. Note that the minimum daily backup limit is 2. |
| `weeklyBackupLimit` | `integer` Number of weekly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1. |
| `monthlyBackupLimit` | `integer` Number of monthly backups to keep. Note that the sum of daily, weekly and monthly backups should be greater than 1. |
| `description` | `string` Description of the backup policy. |
| `enabled` | `boolean` If enabled, make backups automatically according to the schedules. This will be applied to all volumes that have this policy attached and enforced on volume level. If not specified, default is true. |
| `assignedVolumeCount` | `integer` Output only. The total number of volumes assigned by this backup policy. |

## State

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | State not set. |
| `CREATING` | BackupPolicy is being created. |
| `READY` | BackupPolicy is available for use. |
| `DELETING` | BackupPolicy is being deleted. |
| `ERROR` | BackupPolicy is not valid and cannot be used. |
| `UPDATING` | BackupPolicy is being updated. |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies/create` | Creates new backup policy |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies/delete` | Warning! |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies/get` | Returns the description of the specified backup policy by backup_policy_id. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies/list` | Returns list of all available backup policies. |
| ### `https://docs.cloud.google.com/netapp/volumes/docs/reference/rest/v1/projects.locations.backupPolicies/patch` | Updates settings of a specific backup policy. |