You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/backup/backup-azure-dataprotection-use-rest-api-create-update-disk-policy.md
+14-11Lines changed: 14 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,27 +1,27 @@
1
1
---
2
2
title: Create backup policies for disks using data protection REST API
3
3
description: In this article, you'll learn how to create and manage backup policies for disks using REST API.
4
-
ms.topic: conceptual
5
-
ms.date: 10/06/2021
4
+
ms.topic: how-to
5
+
ms.date: 05/10/2023
6
6
ms.assetid: ecc107c0-311c-42d0-a094-654d7ee30443
7
7
ms.service: backup
8
8
author: jyothisuri
9
9
ms.author: jsuri
10
+
ms.custom: engagement-fy23
10
11
---
11
12
12
13
# Create Azure Data Protection backup policies for disks using REST API
13
14
14
-
A backup policy governs the retention and schedule of your backups. Azure Disk Backup offers multiple backups per day.
15
+
This article describes how to create a backup policy via REST API.
15
16
16
-
You can reuse the backup policy to configure backup for multiple Azure Disks to a vault or [create a backup policy for an Azure Recovery Services vault using REST API](/rest/api/dataprotection/backup-policies/create-or-update).
17
+
Azure Disk Backup offers a turnkey solution that provides snapshot lifecycle management for managed disks by automating periodic creation of snapshots and retaining it for configured duration using backup policy. You can manage the disk snapshots with zero infrastructure cost and without the need for custom scripting or any management overhead. This is a crash-consistent backup solution that takes point-in-time backup of a managed disk using incremental snapshots with support for multiple backups per day. It's also an agent-less solution and doesn't impact production application performance. It supports backup and restore of both OS and data disks (including shared disks), whether or not they're currently attached to a running Azure virtual machine.
18
+
19
+
The backup policy helps to govern the retention and schedule of your backups. The backup policy offers multiple backups per day. You can reuse the backup policy to configure backup for multiple Azure Disks to a vault or [create a backup policy for an Azure Recovery Services vault using REST API](/rest/api/dataprotection/backup-policies/create-or-update).
17
20
18
21
To create a policy for backing up disks, perform the following actions:
19
22
20
23
## Create a policy
21
24
22
-
>[!IMPORTANT]
23
-
>Currently, updating or modifying an existing policy isn't supported. Alternatively, you can create a new policy with the required details and assign it to the relevant backup instance.
24
-
25
25
To create an Azure Backup policy, use the following *PUT* operation:
26
26
27
27
```http
@@ -30,7 +30,10 @@ PUT https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{
30
30
31
31
The `{policyName}` and `{vaultName}` are provided in the URI. Additional information is provided in the request body.
32
32
33
-
## Create the request body
33
+
>[!IMPORTANT]
34
+
>Currently, updating or modifying an existing policy isn't supported. Alternatively, you can create a new policy with the required details and assign it to the relevant backup instance.
35
+
36
+
### Create the request body
34
37
35
38
For example, to create a policy for Disk backup, the request body needs the following components:
36
39
@@ -40,7 +43,7 @@ For example, to create a policy for Disk backup, the request body needs the foll
40
43
41
44
For the complete list of definitions in the request body, refer to the [backup policy REST API document](/rest/api/dataprotection/backup-policies/create-or-update).
42
45
43
-
### Example request body
46
+
**Example request body**
44
47
45
48
The policy says:
46
49
@@ -116,15 +119,15 @@ The time required for completing the backup operation depends on various factors
116
119
117
120
To know more details about policy creation, refer to the [Azure Disk Backup policy](backup-managed-disks.md#create-backup-policy) document.
118
121
119
-
## Responses
122
+
###Responses
120
123
121
124
The backup policy creation/update is a synchronous operation and returns OK once the operation is successful.
122
125
123
126
|Name |Type |Description |
124
127
|---------|---------|---------|
125
128
|200 OK |[BaseBackupPolicyResource](/rest/api/dataprotection/backup-policies/create-or-update#basebackuppolicyresource)| OK |
126
129
127
-
### Example responses
130
+
**Example responses**
128
131
129
132
Once the operation completes, it returns 200 (OK) with the policy content in the response body.
0 commit comments