Skip to content

Commit ada77d1

Browse files
Merge pull request #266801 from AbhishekMallick-MS/Feb-20-2024-Freshness
Freshness - CCreate RS policy via REST API
2 parents 1b02cab + f2503d6 commit ada77d1

File tree

1 file changed

+23
-14
lines changed

1 file changed

+23
-14
lines changed

articles/backup/backup-azure-arm-userestapi-createorupdatepolicy.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
---
2-
title: Create backup policies using REST API
2+
title: Create backup policies via REST API in Azure Backup
33
description: In this article, you'll learn how to create and manage backup policies (schedule and retention) using REST API.
44
ms.topic: how-to
5-
ms.date: 02/14/2023
5+
ms.date: 02/21/2024
66
ms.assetid: 5ffc4115-0ae5-4b85-a18c-8a942f6d4870
77
ms.service: backup
8+
ms.custom: engagement-fy24
89
author: AbhishekMallick-MS
910
ms.author: v-abhmallick
1011
---
11-
# Create Azure Recovery Services backup policies using REST API
12+
# Create Azure Recovery Services backup policies by using REST API
1213

13-
The steps to create a backup policy for an Azure Recovery Services vault are outlined in the [policy REST API document](/rest/api/backup/protection-policies/create-or-update). Let's use this document as a reference to create a policy for Azure VM backup.
14+
This article describes how to create policies for the backup of Azure VM, SQL database in Azure VM, SAP HANA database in Azure VM, and Azure File share.
15+
16+
Learn more about [creating or modifying a backup policy for an Azure Recovery Services vault by using REST API](/rest/api/backup/protection-policies/create-or-update).
1417

1518
## Create or update a policy
1619

17-
To create or update an Azure Backup policy, use the following *PUT* operation
20+
To create or update an Azure Backup policy, use the following *PUT* operation.
1821

1922
```http
2023
PUT https://management.azure.com/Subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}?api-version=2019-05-13
@@ -24,18 +27,22 @@ The `{policyName}` and `{vaultName}` are provided in the URI. Additional informa
2427

2528
## Create the request body
2629

27-
For example, to create a policy for Azure VM backup, following are the components of the request body.
30+
If you want to create a policy for Azure VM backup, the request body needs to have the following components:
2831

2932
|Name |Required |Type |Description |
3033
|---------|---------|---------|---------|
3134
|properties | True | ProtectionPolicy:[AzureIaaSVMProtectionPolicy](/rest/api/backup/protection-policies/create-or-update#azureiaasvmprotectionpolicy) | ProtectionPolicyResource properties |
3235
|tags | | Object | Resource tags |
3336

34-
For the complete list of definitions in the request body, refer to the [backup policy REST API document](/rest/api/backup/protection-policies/create-or-update).
37+
For the complete list of definitions in the request body, see the [backup policy REST API article](/rest/api/backup/protection-policies/create-or-update).
3538

3639
### Example request body
3740

38-
#### For Azure VM backup
41+
This section provides the example request body to create policies for the backup of Azure VM, SQL database in Azure VM, SAP HANA database in Azure VM, and Azure File share.
42+
43+
**Choose a datasource**:
44+
45+
# [Azure VM](#tab/azure-vm)
3946

4047
The following request body defines a standard backup policy for Azure VM backups.
4148

@@ -214,9 +221,9 @@ This policy:
214221
215222

216223

217-
#### For SQL in Azure VM backup
224+
# [SQL in Azure VM](#tab/sql-in-azure-vm)
218225

219-
The following is an example request body for SQL in Azure VM backup.
226+
The following request body defines the backup policy for SQL in Azure VM backup.
220227

221228
This policy:
222229

@@ -400,9 +407,9 @@ The following is an example of a policy that takes a differential backup everyda
400407
}
401408
```
402409

403-
#### For SAP HANA in Azure VM backup
410+
# [SAP HANA in Azure VM](#tab/sap-hana-in-azure-vm)
404411

405-
The following is an example request body for SQL in Azure VM backup.
412+
The following request body defines the policy for SAP HANA database in Azure VM backup.
406413

407414
This policy:
408415

@@ -622,9 +629,9 @@ The following is an example of a policy that takes a full backup once a week and
622629
```
623630

624631

625-
#### For Azure File share backup
632+
# [Azure File share](#tab/azure-file-share)
626633

627-
The following is an example request body for Azure File share backup.
634+
The following request body defines the policy for Azure File share backup.
628635

629636
This policy:
630637

@@ -675,6 +682,8 @@ This policy:
675682

676683

677684

685+
---
686+
678687
## Responses
679688

680689
The backup policy creation/update is a [asynchronous operation](../azure-resource-manager/management/async-operations.md). It means this operation creates another operation that needs to be tracked separately.

0 commit comments

Comments
 (0)