Backup Policies - Create Or Update
Creates or Updates a backup policy belonging to a backup vault
PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataProtection/backupVaults/{vaultName}/backupPolicies/{backupPolicyName}?api-version=2025-09-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
backup
|
path | True |
string |
|
|
resource
|
path | True |
string minLength: 1maxLength: 90 |
The name of the resource group. The name is case insensitive. |
|
subscription
|
path | True |
string (uuid) |
The ID of the target subscription. The value must be an UUID. |
|
vault
|
path | True |
string |
The name of the backup vault. |
|
api-version
|
query | True |
string minLength: 1 |
The API version to use for this operation. |
Request Body
| Name | Type | Description |
|---|---|---|
| properties | BaseBackupPolicy: |
BaseBackupPolicyResource properties |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Resource 'BaseBackupPolicyResource' update operation succeeded |
|
| Other Status Codes |
An unexpected error response. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
| Name | Description |
|---|---|
| user_impersonation | impersonate your user account |
Examples
CreateOrUpdate BackupPolicy
Sample request
PUT https://management.azure.com/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PrivatePreviewVault/backupPolicies/OSSDBPolicy?api-version=2025-09-01
{
"properties": {
"datasourceTypes": [
"OssDB"
],
"objectType": "BackupPolicy",
"policyRules": [
{
"name": "BackupWeekly",
"backupParameters": {
"backupType": "Full",
"objectType": "AzureBackupParams"
},
"dataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"objectType": "AzureBackupRule",
"trigger": {
"objectType": "ScheduleBasedTriggerContext",
"schedule": {
"repeatingTimeIntervals": [
"R/2019-11-20T08:00:00-08:00/P1W"
]
},
"taggingCriteria": [
{
"isDefault": true,
"tagInfo": {
"tagName": "Default"
},
"taggingPriority": 99
},
{
"criteria": [
{
"daysOfTheWeek": [
"Sunday"
],
"objectType": "ScheduleBasedBackupCriteria",
"scheduleTimes": [
"2019-03-01T13:00:00Z"
]
}
],
"isDefault": false,
"tagInfo": {
"tagName": "Weekly"
},
"taggingPriority": 20
}
]
}
},
{
"name": "Default",
"isDefault": true,
"lifecycles": [
{
"deleteAfter": {
"duration": "P1W",
"objectType": "AbsoluteDeleteOption"
},
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
}
}
],
"objectType": "AzureRetentionRule"
},
{
"name": "Weekly",
"isDefault": false,
"lifecycles": [
{
"deleteAfter": {
"duration": "P12W",
"objectType": "AbsoluteDeleteOption"
},
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
}
}
],
"objectType": "AzureRetentionRule"
}
]
}
}
Sample response
{
"name": "OSSDBPolicy",
"type": "Microsoft.DataProtection/backupVaults/backupPolicies",
"id": "/subscriptions/04cf684a-d41f-4550-9f70-7708a3a2283b/resourceGroups/000pikumar/providers/Microsoft.DataProtection/backupVaults/PrivatePreviewVault/backupPolicies/OSSDBPolicy",
"properties": {
"datasourceTypes": [
"OssDB"
],
"objectType": "BackupPolicy",
"policyRules": [
{
"name": "BackupWeekly",
"backupParameters": {
"backupType": "Full",
"objectType": "AzureBackupParams"
},
"dataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
},
"objectType": "AzureBackupRule",
"trigger": {
"objectType": "ScheduleBasedTriggerContext",
"schedule": {
"repeatingTimeIntervals": [
"R/2019-11-20T08:00:00-08:00/P1W"
]
},
"taggingCriteria": [
{
"isDefault": true,
"tagInfo": {
"id": "Default_",
"tagName": "Default"
},
"taggingPriority": 99
},
{
"criteria": [
{
"daysOfTheWeek": [
"Sunday"
],
"objectType": "ScheduleBasedBackupCriteria",
"scheduleTimes": [
"2019-03-01T13:00:00Z"
]
}
],
"isDefault": false,
"tagInfo": {
"id": "Weekly_",
"tagName": "Weekly"
},
"taggingPriority": 20
}
]
}
},
{
"name": "Default",
"isDefault": true,
"lifecycles": [
{
"deleteAfter": {
"duration": "P1W",
"objectType": "AbsoluteDeleteOption"
},
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
}
}
],
"objectType": "AzureRetentionRule"
},
{
"name": "Weekly",
"isDefault": false,
"lifecycles": [
{
"deleteAfter": {
"duration": "P12W",
"objectType": "AbsoluteDeleteOption"
},
"sourceDataStore": {
"dataStoreType": "VaultStore",
"objectType": "DataStoreInfoBase"
}
}
],
"objectType": "AzureRetentionRule"
}
]
}
}
Definitions
| Name | Description |
|---|---|
|
Absolute |
Delete option with duration |
|
Absolute |
|
|
Adhoc |
Adhoc backup tagging criteria |
|
Adhoc |
Adhoc trigger context |
|
Azure |
Azure backup parameters |
|
Azure |
Azure backup rule |
|
Azure |
Azure retention rule |
|
Backup |
Rule based backup policy |
|
Backup |
Schedule for backup |
|
Base |
BaseBackupPolicy resource |
|
Cloud |
An error response from Azure Backup. |
|
Copy |
Copy on Expiry Option |
|
created |
The type of identity that created the resource. |
|
Custom |
Duration based custom options to copy |
|
Data |
DataStoreInfo base |
|
Data |
type of datastore; Operational/Vault/Archive |
| Day |
Day of the week |
|
Day |
|
| Error |
The resource management error response. |
|
Error |
The resource management error additional info. |
|
Immediate |
Immediate copy Option |
| Month | |
|
Retention |
Retention tag |
|
Schedule |
Schedule based backup criteria |
|
Schedule |
Schedule based trigger context |
|
Source |
Source LifeCycle |
|
system |
Metadata pertaining to creation and last modification of the resource. |
|
Tagging |
Tagging criteria |
|
Target |
Target copy settings |
|
Week |
AbsoluteDeleteOption
Delete option with duration
| Name | Type | Description |
|---|---|---|
| duration |
string |
Duration of deletion after given timespan |
| objectType | string: |
Type of the specific object - used for deserializing |
AbsoluteMarker
| Value | Description |
|---|---|
| AllBackup | |
| FirstOfDay | |
| FirstOfMonth | |
| FirstOfWeek | |
| FirstOfYear |
AdhocBasedTaggingCriteria
Adhoc backup tagging criteria
| Name | Type | Description |
|---|---|---|
| tagInfo |
Retention tag information |
AdhocBasedTriggerContext
Adhoc trigger context
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Type of the specific object - used for deserializing |
| taggingCriteria |
Tagging Criteria containing retention tag for adhoc backup. |
AzureBackupParams
Azure backup parameters
| Name | Type | Description |
|---|---|---|
| backupType |
string |
BackupType ; Full/Incremental etc |
| objectType | string: |
Type of the specific object - used for deserializing |
AzureBackupRule
Azure backup rule
| Name | Type | Description |
|---|---|---|
| backupParameters | BackupParameters: |
BackupParameters base |
| dataStore |
DataStoreInfo base |
|
| name |
string |
|
| objectType | string: | |
| trigger | TriggerContext: |
Trigger context |
AzureRetentionRule
Azure retention rule
| Name | Type | Description |
|---|---|---|
| isDefault |
boolean |
|
| lifecycles |
Source LifeCycle |
|
| name |
string |
|
| objectType | string: |
BackupPolicy
Rule based backup policy
| Name | Type | Description |
|---|---|---|
| datasourceTypes |
string[] |
Type of datasource for the backup management |
| objectType | string: | |
| policyRules | BasePolicyRule[]: |
Policy rule dictionary that contains rules for each backuptype i.e Full/Incremental/Logs etc |
BackupSchedule
Schedule for backup
| Name | Type | Description |
|---|---|---|
| repeatingTimeIntervals |
string[] |
Repeating time interval which only support the following ISO 8601 format [R/startDateTime/Duration]. Example: R/2007-03-01T13:00:00Z/P1Y2M10DT2H30M |
| timeZone |
string |
Time zone for a schedule. Example: Pacific Standard Time |
BaseBackupPolicyResource
BaseBackupPolicy resource
| Name | Type | Description |
|---|---|---|
| id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
| name |
string |
The name of the resource |
| properties | BaseBackupPolicy: |
BaseBackupPolicyResource properties |
| systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
| type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
CloudError
An error response from Azure Backup.
| Name | Type | Description |
|---|---|---|
| error |
The resource management error response. |
CopyOnExpiryOption
Copy on Expiry Option
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Type of the specific object - used for deserializing |
createdByType
The type of identity that created the resource.
| Value | Description |
|---|---|
| User | |
| Application | |
| ManagedIdentity | |
| Key |
CustomCopyOption
Duration based custom options to copy
| Name | Type | Description |
|---|---|---|
| duration |
string |
Data copied after given timespan |
| objectType | string: |
Type of the specific object - used for deserializing |
DataStoreInfoBase
DataStoreInfo base
| Name | Type | Description |
|---|---|---|
| dataStoreType |
type of datastore; Operational/Vault/Archive |
|
| objectType |
string |
Type of Datasource object, used to initialize the right inherited type |
DataStoreTypes
type of datastore; Operational/Vault/Archive
| Value | Description |
|---|---|
| OperationalStore | |
| VaultStore | |
| ArchiveStore |
Day
Day of the week
| Name | Type | Description |
|---|---|---|
| date |
integer (int32) |
Date of the month |
| isLast |
boolean |
Whether Date is last date of month |
DayOfWeek
| Value | Description |
|---|---|
| Friday | |
| Monday | |
| Saturday | |
| Sunday | |
| Thursday | |
| Tuesday | |
| Wednesday |
Error
The resource management error response.
| Name | Type | Description |
|---|---|---|
| additionalInfo |
The error additional info. |
|
| code |
string |
The error code. |
| details |
Error[] |
The error details. |
| message |
string |
The error message. |
| target |
string |
The error target. |
ErrorAdditionalInfo
The resource management error additional info.
| Name | Type | Description |
|---|---|---|
| info |
object |
The additional info. |
| type |
string |
The additional info type. |
ImmediateCopyOption
Immediate copy Option
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Type of the specific object - used for deserializing |
Month
| Value | Description |
|---|---|
| April | |
| August | |
| December | |
| February | |
| January | |
| July | |
| June | |
| March | |
| May | |
| November | |
| October | |
| September |
RetentionTag
Retention tag
| Name | Type | Description |
|---|---|---|
| eTag |
string |
Retention Tag version. |
| id |
string |
Retention Tag version. |
| tagName |
string |
Retention Tag Name to relate it to retention rule. |
ScheduleBasedBackupCriteria
Schedule based backup criteria
| Name | Type | Description |
|---|---|---|
| absoluteCriteria |
it contains absolute values like "AllBackup" / "FirstOfDay" / "FirstOfWeek" / "FirstOfMonth" and should be part of AbsoluteMarker enum |
|
| daysOfMonth |
Day[] |
This is day of the month from 1 to 28 other wise last of month |
| daysOfTheWeek |
It should be Sunday/Monday/T..../Saturday |
|
| monthsOfYear |
Month[] |
It should be January/February/....../December |
| objectType | string: |
Type of the specific object - used for deserializing |
| scheduleTimes |
string[] (date-time) |
List of schedule times for backup |
| weeksOfTheMonth |
It should be First/Second/Third/Fourth/Last |
ScheduleBasedTriggerContext
Schedule based trigger context
| Name | Type | Description |
|---|---|---|
| objectType | string: |
Type of the specific object - used for deserializing |
| schedule |
Schedule for this backup |
|
| taggingCriteria |
List of tags that can be applicable for given schedule. |
SourceLifeCycle
Source LifeCycle
| Name | Type | Description |
|---|---|---|
| deleteAfter | DeleteOption: |
Delete Option |
| sourceDataStore |
DataStoreInfo base |
|
| targetDataStoreCopySettings |
Target copy settings |
systemData
Metadata pertaining to creation and last modification of the resource.
| Name | Type | Description |
|---|---|---|
| createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
| createdBy |
string |
The identity that created the resource. |
| createdByType |
The type of identity that created the resource. |
|
| lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
| lastModifiedBy |
string |
The identity that last modified the resource. |
| lastModifiedByType |
The type of identity that last modified the resource. |
TaggingCriteria
Tagging criteria
| Name | Type | Description |
|---|---|---|
| criteria | BackupCriteria[]: |
Criteria which decides whether the tag can be applied to a triggered backup. |
| isDefault |
boolean |
Specifies if tag is default. |
| tagInfo |
Retention tag information |
|
| taggingPriority |
integer (int64) |
Retention Tag priority. |
TargetCopySetting
Target copy settings
| Name | Type | Description |
|---|---|---|
| copyAfter | CopyOption: |
It can be CustomCopyOption or ImmediateCopyOption. |
| dataStore |
Info of target datastore |
WeekNumber
| Value | Description |
|---|---|
| First | |
| Fourth | |
| Last | |
| Second | |
| Third |