Dela via


Protection Policies - Create Or Update

Creates or modifies a backup policy. This is an asynchronous operation. Status of the operation can be fetched using GetPolicyOperationResult API.

PUT https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.RecoveryServices/vaults/{vaultName}/backupPolicies/{policyName}?api-version=2024-04-01

URI Parameters

Name In Required Type Description
policyName
path True

string

Backup policy to be created.

resourceGroupName
path True

string

The name of the resource group where the recovery services vault is present.

subscriptionId
path True

string

The subscription Id.

vaultName
path True

string

The name of the recovery services vault.

api-version
query True

string

Client Api Version.

Request Header

Name Required Type Description
x-ms-authorization-auxiliary

string

Request Body

Name Type Description
eTag

string

Optional ETag.

location

string

Resource location.

properties ProtectionPolicy:

ProtectionPolicyResource properties

tags

object

Resource tags.

Responses

Name Type Description
200 OK

ProtectionPolicyResource

OK

202 Accepted

Accepted

Other Status Codes

CloudError

Error response describing why the operation failed.

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

Create or Update Azure Storage Vault Standard Protection Policy
Create or Update Daily Azure Storage Protection Policy
Create or Update Enhanced Azure Vm Protection Policy with daily backup
Create or Update Enhanced Azure Vm Protection Policy with Hourly backup
Create or Update Full Azure Vm Protection Policy
Create or Update Full Azure Workload Protection Policy
Create or Update Hourly Azure Storage Protection Policy
Create or Update Simple Azure Vm Protection Policy

Create or Update Azure Storage Vault Standard Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicyV2?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureStorage",
    "workLoadType": "AzureFileShare",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2023-07-18T09:30:00.000Z"
      ]
    },
    "timeZone": "UTC",
    "vaultRetentionPolicy": {
      "snapshotRetentionInDays": 5,
      "vaultRetention": {
        "retentionPolicyType": "LongTermRetentionPolicy",
        "dailySchedule": {
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 30,
            "durationType": "Days"
          }
        },
        "weeklySchedule": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 12,
            "durationType": "Weeks"
          }
        },
        "monthlySchedule": {
          "retentionScheduleFormatType": "Weekly",
          "retentionScheduleDaily": null,
          "retentionScheduleWeekly": {
            "daysOfTheWeek": [
              "Sunday"
            ],
            "weeksOfTheMonth": [
              "First"
            ]
          },
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 60,
            "durationType": "Months"
          }
        },
        "yearlySchedule": {
          "retentionScheduleFormatType": "Weekly",
          "monthsOfYear": [
            "January"
          ],
          "retentionScheduleDaily": null,
          "retentionScheduleWeekly": {
            "daysOfTheWeek": [
              "Sunday"
            ],
            "weeksOfTheMonth": [
              "First"
            ]
          },
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 10,
            "durationType": "Years"
          }
        }
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicyV2",
  "name": "newPolicyV2",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureStorage",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2023-07-18T09:30:00.000Z"
      ]
    },
    "vaultRetentionPolicy": {
      "snapshotRetentionInDays": 5,
      "vaultRetention": {
        "retentionPolicyType": "LongTermRetentionPolicy",
        "dailySchedule": {
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 30,
            "durationType": "Days"
          }
        },
        "weeklySchedule": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 12,
            "durationType": "Weeks"
          }
        },
        "monthlySchedule": {
          "retentionScheduleFormatType": "Weekly",
          "retentionScheduleDaily": null,
          "retentionScheduleWeekly": {
            "daysOfTheWeek": [
              "Sunday"
            ],
            "weeksOfTheMonth": [
              "First"
            ]
          },
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 60,
            "durationType": "Months"
          }
        },
        "yearlySchedule": {
          "retentionScheduleFormatType": "Weekly",
          "monthsOfYear": [
            "January"
          ],
          "retentionScheduleDaily": null,
          "retentionScheduleWeekly": {
            "daysOfTheWeek": [
              "Sunday"
            ],
            "weeksOfTheMonth": [
              "First"
            ]
          },
          "retentionTimes": [
            "2023-07-18T09:30:00.000Z"
          ],
          "retentionDuration": {
            "count": 10,
            "durationType": "Years"
          }
        }
      }
    },
    "timeZone": "UTC",
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicyV2/operationResults/00000000-0000-0000-0000-000000000000?api-version=2024-04-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicyV2/operations/00000000-0000-0000-0000-000000000000?api-version=2024-04-01
Retry-After: 60

Create or Update Daily Azure Storage Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureStorage",
    "workLoadType": "AzureFileShare",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2021-09-29T08:00:00.000Z"
      ]
    },
    "timeZone": "UTC",
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": [
          "2021-09-29T08:00:00.000Z"
        ],
        "retentionDuration": {
          "count": 5,
          "durationType": "Days"
        }
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionTimes": [
          "2021-09-29T08:00:00.000Z"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleDaily": null,
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T08:00:00.000Z"
        ],
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "January"
        ],
        "retentionScheduleDaily": null,
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T08:00:00.000Z"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        }
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2",
  "name": "dailyPolicy2",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureStorage",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2021-09-29T08:00:00Z"
      ],
      "scheduleWeeklyFrequency": 0
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": [
          "2021-09-29T08:00:00Z"
        ],
        "retentionDuration": {
          "count": 5,
          "durationType": "Days"
        }
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionTimes": [
          "2021-09-29T08:00:00Z"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T08:00:00Z"
        ],
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "January"
        ],
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T08:00:00Z"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        }
      }
    },
    "timeZone": "UTC",
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/dailyPolicy2/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Retry-After: 60

Create or Update Enhanced Azure Vm Protection Policy with daily backup

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "timeZone": "India Standard Time",
    "instantRpRetentionRangeInDays": 30,
    "policyType": "V2",
    "snapshotConsistencyType": "OnlyCrashConsistent",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicyV2",
      "scheduleRunFrequency": "Daily",
      "dailySchedule": {
        "scheduleRunTimes": [
          "2018-01-24T10:00:00Z"
        ]
      }
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionDuration": {
          "count": 180,
          "durationType": "Days"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "monthlySchedule": {
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "yearlySchedule": {
        "monthsOfYear": [
          "January"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample",
  "name": "v2-daily-sample",
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "instantRpRetentionRangeInDays": 30,
    "policyType": "V2",
    "snapshotConsistencyType": "OnlyCrashConsistent",
    "protectedItemsCount": 0,
    "resourceGuardOperationRequests": null,
    "retentionPolicy": {
      "dailySchedule": {
        "retentionDuration": {
          "count": 180,
          "durationType": "Days"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "monthlySchedule": {
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "retentionPolicyType": "LongTermRetentionPolicy",
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "yearlySchedule": {
        "monthsOfYear": [
          "January"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      }
    },
    "schedulePolicy": {
      "dailySchedule": {
        "scheduleRunTimes": [
          "2018-01-24T10:00:00Z"
        ]
      },
      "schedulePolicyType": "SimpleSchedulePolicyV2",
      "scheduleRunFrequency": "Daily"
    },
    "timeZone": "India Standard Time"
  },
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies"
}
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample/operationResults/00000000-0000-0000-0000-000000000000?api-version=2020-06-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample/operations/00000000-0000-0000-0000-000000000000?api-version=2020-06-01
Retry-After: 60

Create or Update Enhanced Azure Vm Protection Policy with Hourly backup

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "timeZone": "India Standard Time",
    "instantRpRetentionRangeInDays": 30,
    "policyType": "V2",
    "snapshotConsistencyType": "OnlyCrashConsistent",
    "schedulePolicy": {
      "hourlySchedule": {
        "interval": 4,
        "scheduleWindowDuration": 16,
        "scheduleWindowStartTime": "2021-12-17T08:00:00Z"
      },
      "schedulePolicyType": "SimpleSchedulePolicyV2",
      "scheduleRunFrequency": "Hourly"
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionDuration": {
          "count": 180,
          "durationType": "Days"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "monthlySchedule": {
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "yearlySchedule": {
        "monthsOfYear": [
          "January"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample",
  "name": "v2-daily-sample",
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "instantRpRetentionRangeInDays": 30,
    "policyType": "V2",
    "snapshotConsistencyType": "OnlyCrashConsistent",
    "protectedItemsCount": 0,
    "resourceGuardOperationRequests": null,
    "retentionPolicy": {
      "dailySchedule": {
        "retentionDuration": {
          "count": 180,
          "durationType": "Days"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "monthlySchedule": {
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "retentionPolicyType": "LongTermRetentionPolicy",
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      },
      "yearlySchedule": {
        "monthsOfYear": [
          "January"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        },
        "retentionScheduleDaily": null,
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-12-17T08:00:00+00:00"
        ]
      }
    },
    "schedulePolicy": {
      "hourlySchedule": {
        "interval": 4,
        "scheduleWindowDuration": 16,
        "scheduleWindowStartTime": "2021-12-17T08:00:00Z"
      },
      "schedulePolicyType": "SimpleSchedulePolicyV2",
      "scheduleRunFrequency": "Hourly"
    },
    "timeZone": "India Standard Time"
  },
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies"
}
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample/operationResults/00000000-0000-0000-0000-000000000000?api-version=2020-06-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/v2-daily-sample/operations/00000000-0000-0000-0000-000000000000?api-version=2020-06-01
Retry-After: 60

Create or Update Full Azure Vm Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "timeZone": "Pacific Standard Time",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Weekly",
      "scheduleRunTimes": [
        "2018-01-24T10:00:00Z"
      ],
      "scheduleRunDays": [
        "Monday",
        "Wednesday",
        "Thursday"
      ]
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Monday",
          "Wednesday",
          "Thursday"
        ],
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 1,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Wednesday",
            "Thursday"
          ],
          "weeksOfTheMonth": [
            "First",
            "Third"
          ]
        },
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 2,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "February",
          "November"
        ],
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Monday",
            "Thursday"
          ],
          "weeksOfTheMonth": [
            "Fourth"
          ]
        },
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 4,
          "durationType": "Years"
        }
      }
    }
  }
}

Sample response

{
  "id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1",
  "name": "testPolicy1",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Weekly",
      "scheduleRunDays": [
        "Monday",
        "Wednesday",
        "Thursday"
      ],
      "scheduleRunTimes": [
        "2018-01-24T10:00:00Z"
      ],
      "scheduleWeeklyFrequency": 0
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Monday",
          "Wednesday",
          "Thursday"
        ],
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 1,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Wednesday",
            "Thursday"
          ],
          "weeksOfTheMonth": [
            "First",
            "Third"
          ]
        },
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 2,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "February",
          "November"
        ],
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Monday",
            "Thursday"
          ],
          "weeksOfTheMonth": [
            "Fourth"
          ]
        },
        "retentionTimes": [
          "2018-01-24T10:00:00Z"
        ],
        "retentionDuration": {
          "count": 4,
          "durationType": "Years"
        }
      }
    },
    "timeZone": "Pacific Standard Time",
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Retry-After: 60

Create or Update Full Azure Workload Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureWorkload",
    "workLoadType": "SQLDataBase",
    "settings": {
      "timeZone": "Pacific Standard Time",
      "issqlcompression": false
    },
    "subProtectionPolicy": [
      {
        "policyType": "Full",
        "schedulePolicy": {
          "schedulePolicyType": "SimpleSchedulePolicy",
          "scheduleRunFrequency": "Weekly",
          "scheduleRunTimes": [
            "2018-01-24T10:00:00Z"
          ],
          "scheduleRunDays": [
            "Sunday",
            "Tuesday"
          ]
        },
        "retentionPolicy": {
          "retentionPolicyType": "LongTermRetentionPolicy",
          "weeklySchedule": {
            "daysOfTheWeek": [
              "Sunday",
              "Tuesday"
            ],
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 2,
              "durationType": "Weeks"
            }
          },
          "monthlySchedule": {
            "retentionScheduleFormatType": "Weekly",
            "retentionScheduleWeekly": {
              "daysOfTheWeek": [
                "Sunday"
              ],
              "weeksOfTheMonth": [
                "Second"
              ]
            },
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 1,
              "durationType": "Months"
            }
          },
          "yearlySchedule": {
            "retentionScheduleFormatType": "Weekly",
            "monthsOfYear": [
              "January",
              "June",
              "December"
            ],
            "retentionScheduleWeekly": {
              "daysOfTheWeek": [
                "Sunday"
              ],
              "weeksOfTheMonth": [
                "Last"
              ]
            },
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 1,
              "durationType": "Years"
            }
          }
        }
      },
      {
        "policyType": "Differential",
        "schedulePolicy": {
          "schedulePolicyType": "SimpleSchedulePolicy",
          "scheduleRunFrequency": "Weekly",
          "scheduleRunTimes": [
            "2018-01-24T10:00:00Z"
          ],
          "scheduleRunDays": [
            "Friday"
          ]
        },
        "retentionPolicy": {
          "retentionPolicyType": "SimpleRetentionPolicy",
          "retentionDuration": {
            "count": 8,
            "durationType": "Days"
          }
        }
      },
      {
        "policyType": "Log",
        "schedulePolicy": {
          "schedulePolicyType": "LogSchedulePolicy",
          "scheduleFrequencyInMins": 60
        },
        "retentionPolicy": {
          "retentionPolicyType": "SimpleRetentionPolicy",
          "retentionDuration": {
            "count": 7,
            "durationType": "Days"
          }
        }
      }
    ]
  }
}

Sample response

{
  "id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1",
  "name": "testPolicy1",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureWorkload",
    "workLoadType": "SQLDataBase",
    "settings": {
      "timeZone": "Pacific Standard Time",
      "issqlcompression": false
    },
    "subProtectionPolicy": [
      {
        "policyType": "Full",
        "schedulePolicy": {
          "schedulePolicyType": "SimpleSchedulePolicy",
          "scheduleRunFrequency": "Weekly",
          "scheduleRunDays": [
            "Sunday",
            "Tuesday"
          ],
          "scheduleRunTimes": [
            "2018-01-24T10:00:00Z"
          ],
          "scheduleWeeklyFrequency": 0
        },
        "retentionPolicy": {
          "retentionPolicyType": "LongTermRetentionPolicy",
          "weeklySchedule": {
            "daysOfTheWeek": [
              "Sunday",
              "Tuesday"
            ],
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 2,
              "durationType": "Weeks"
            }
          },
          "monthlySchedule": {
            "retentionScheduleFormatType": "Weekly",
            "retentionScheduleWeekly": {
              "daysOfTheWeek": [
                "Sunday"
              ],
              "weeksOfTheMonth": [
                "Second"
              ]
            },
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 1,
              "durationType": "Months"
            }
          },
          "yearlySchedule": {
            "retentionScheduleFormatType": "Weekly",
            "monthsOfYear": [
              "January",
              "June",
              "December"
            ],
            "retentionScheduleWeekly": {
              "daysOfTheWeek": [
                "Sunday"
              ],
              "weeksOfTheMonth": [
                "Last"
              ]
            },
            "retentionTimes": [
              "2018-01-24T10:00:00Z"
            ],
            "retentionDuration": {
              "count": 1,
              "durationType": "Years"
            }
          }
        }
      },
      {
        "policyType": "Differential",
        "schedulePolicy": {
          "schedulePolicyType": "SimpleSchedulePolicy",
          "scheduleRunFrequency": "Weekly",
          "scheduleRunDays": [
            "Friday"
          ],
          "scheduleRunTimes": [
            "2018-01-24T10:00:00Z"
          ],
          "scheduleWeeklyFrequency": 0
        },
        "retentionPolicy": {
          "retentionPolicyType": "SimpleRetentionPolicy",
          "retentionDuration": {
            "count": 8,
            "durationType": "Days"
          }
        }
      },
      {
        "policyType": "Log",
        "schedulePolicy": {
          "schedulePolicyType": "LogSchedulePolicy",
          "scheduleFrequencyInMins": 60
        },
        "retentionPolicy": {
          "retentionPolicyType": "SimpleRetentionPolicy",
          "retentionDuration": {
            "count": 7,
            "durationType": "Days"
          }
        }
      }
    ],
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Retry-After: 60

Create or Update Hourly Azure Storage Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicy2?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureStorage",
    "workLoadType": "AzureFileShare",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Hourly",
      "hourlySchedule": {
        "interval": 4,
        "scheduleWindowStartTime": "2021-09-29T08:00:00.000Z",
        "scheduleWindowDuration": 12
      }
    },
    "timeZone": "UTC",
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": null,
        "retentionDuration": {
          "count": 5,
          "durationType": "Days"
        }
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionTimes": null,
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleDaily": null,
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": null,
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "January"
        ],
        "retentionScheduleDaily": null,
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": null,
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        }
      }
    }
  }
}

Sample response

{
  "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicy2",
  "name": "newPolicy2",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureStorage",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Hourly",
      "hourlySchedule": {
        "interval": 4,
        "scheduleWindowStartTime": "2021-09-29T08:00:00Z",
        "scheduleWindowDuration": 12
      },
      "scheduleWeeklyFrequency": 0
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": [
          "2021-09-29T20:00:00Z"
        ],
        "retentionDuration": {
          "count": 5,
          "durationType": "Days"
        }
      },
      "weeklySchedule": {
        "daysOfTheWeek": [
          "Sunday"
        ],
        "retentionTimes": [
          "2021-09-29T20:00:00Z"
        ],
        "retentionDuration": {
          "count": 12,
          "durationType": "Weeks"
        }
      },
      "monthlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T20:00:00Z"
        ],
        "retentionDuration": {
          "count": 60,
          "durationType": "Months"
        }
      },
      "yearlySchedule": {
        "retentionScheduleFormatType": "Weekly",
        "monthsOfYear": [
          "January"
        ],
        "retentionScheduleWeekly": {
          "daysOfTheWeek": [
            "Sunday"
          ],
          "weeksOfTheMonth": [
            "First"
          ]
        },
        "retentionTimes": [
          "2021-09-29T20:00:00Z"
        ],
        "retentionDuration": {
          "count": 10,
          "durationType": "Years"
        }
      }
    },
    "timeZone": "UTC",
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicy2/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Azure-AsyncOperation: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/swaggertestvault/backupPolicies/newPolicy2/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Retry-After: 60

Create or Update Simple Azure Vm Protection Policy

Sample request

PUT https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1?api-version=2024-04-01

{
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "timeZone": "Pacific Standard Time",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2018-01-24T02:00:00Z"
      ]
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": [
          "2018-01-24T02:00:00Z"
        ],
        "retentionDuration": {
          "count": 1,
          "durationType": "Days"
        }
      }
    }
  }
}

Sample response

{
  "id": "/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1",
  "name": "testPolicy1",
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "properties": {
    "backupManagementType": "AzureIaasVM",
    "schedulePolicy": {
      "schedulePolicyType": "SimpleSchedulePolicy",
      "scheduleRunFrequency": "Daily",
      "scheduleRunTimes": [
        "2018-01-24T02:00:00Z"
      ],
      "scheduleWeeklyFrequency": 0
    },
    "retentionPolicy": {
      "retentionPolicyType": "LongTermRetentionPolicy",
      "dailySchedule": {
        "retentionTimes": [
          "2018-01-24T02:00:00Z"
        ],
        "retentionDuration": {
          "count": 1,
          "durationType": "Days"
        }
      }
    },
    "timeZone": "Pacific Standard Time",
    "protectedItemsCount": 0
  }
}
Location: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operationResults/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Azure-AsyncOperation: https://management.azure.com/Subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/SwaggerTestRg/providers/Microsoft.RecoveryServices/vaults/NetSDKTestRsVault/backupPolicies/testPolicy1/operations/00000000-0000-0000-0000-000000000000?api-version=2016-06-01
Retry-After: 60

Definitions

Name Description
AzureFileShareProtectionPolicy

AzureStorage backup policy.

AzureIaaSVMProtectionPolicy

IaaS VM workload-specific backup policy.

AzureSqlProtectionPolicy

Azure SQL workload-specific backup policy.

AzureVmWorkloadProtectionPolicy

Azure VM (Mercury) workload-specific backup policy.

CloudError

An error response from the Container Instance service.

CloudErrorBody

An error response from the Container Instance service.

DailyRetentionFormat

Daily retention format.

DailyRetentionSchedule

Daily retention schedule.

DailySchedule
Day

Day of the week.

DayOfWeek
ErrorAdditionalInfo

The resource management error additional info.

GenericProtectionPolicy

Azure VM (Mercury) workload-specific backup policy.

HourlySchedule
IAASVMPolicyType
IaasVMSnapshotConsistencyType
InstantRPAdditionalDetails
LogSchedulePolicy

Log policy schedule.

LongTermRetentionPolicy

Long term retention policy.

LongTermSchedulePolicy

Long term policy schedule.

MabProtectionPolicy

Mab container-specific backup policy.

MonthlyRetentionSchedule

Monthly retention schedule.

MonthOfYear

List of months of year of yearly retention policy.

PolicyType

Type of backup policy type

ProtectionPolicyResource

Base class for backup policy. Workload-specific backup policies are derived from this class.

RetentionDuration

Retention duration.

RetentionDurationType

Retention duration type: days/weeks/months/years Used only if TieringMode is set to TierAfter

RetentionScheduleFormat

Retention schedule format type for monthly retention policy.

ScheduleRunType

Frequency of the schedule operation of this policy.

Settings

Common settings field for backup management

SimpleRetentionPolicy

Simple policy retention.

SimpleSchedulePolicy

Simple policy schedule.

SimpleSchedulePolicyV2

The V2 policy schedule for IaaS that supports hourly backups.

SnapshotBackupAdditionalDetails

Snapshot Backup related fields for WorkloadType SaPHanaSystem

SubProtectionPolicy

Sub-protection policy which includes schedule and retention

TieringMode

Tiering Mode to control automatic tiering of recovery points. Supported values are:

  1. TierRecommended: Tier all recovery points recommended to be tiered
  2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below.
  3. DoNotTier: Do not tier any recovery points
TieringPolicy

Tiering Policy for a target tier. If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier

UserAssignedIdentityProperties

User assigned managed identity properties

UserAssignedManagedIdentityDetails

User assigned managed identity details

VaultRetentionPolicy

Vault retention policy for AzureFileShare

WeeklyRetentionFormat

Weekly retention format.

WeeklyRetentionSchedule

Weekly retention schedule.

WeeklySchedule
WeekOfMonth

List of weeks of month.

WorkloadType

Type of workload for the backup management

YearlyRetentionSchedule

Yearly retention schedule.

AzureFileShareProtectionPolicy

AzureStorage backup policy.

Name Type Description
backupManagementType string:

AzureStorage

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

retentionPolicy RetentionPolicy:

Retention policy with the details on backup copy retention ranges.

schedulePolicy SchedulePolicy:

Backup schedule specified as part of backup policy.

timeZone

string

TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".

vaultRetentionPolicy

VaultRetentionPolicy

Retention policy with the details on hardened backup copy retention ranges.

workLoadType

WorkloadType

Type of workload for the backup management

AzureIaaSVMProtectionPolicy

IaaS VM workload-specific backup policy.

Name Type Description
backupManagementType string:

AzureIaasVM

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

instantRPDetails

InstantRPAdditionalDetails

instantRpRetentionRangeInDays

integer

Instant RP retention policy range in days

policyType

IAASVMPolicyType

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

retentionPolicy RetentionPolicy:

Retention policy with the details on backup copy retention ranges.

schedulePolicy SchedulePolicy:

Backup schedule specified as part of backup policy.

snapshotConsistencyType

IaasVMSnapshotConsistencyType

tieringPolicy

<string,  TieringPolicy>

Tiering policy to automatically move RPs to another tier Key is Target Tier, defined in RecoveryPointTierType enum. Tiering policy specifies the criteria to move RP to the target tier.

timeZone

string

TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".

AzureSqlProtectionPolicy

Azure SQL workload-specific backup policy.

Name Type Description
backupManagementType string:

AzureSql

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

retentionPolicy RetentionPolicy:

Retention policy details.

AzureVmWorkloadProtectionPolicy

Azure VM (Mercury) workload-specific backup policy.

Name Type Description
backupManagementType string:

AzureWorkload

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

makePolicyConsistent

boolean

Fix the policy inconsistency

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

settings

Settings

Common settings for the backup management

subProtectionPolicy

SubProtectionPolicy[]

List of sub-protection policies which includes schedule and retention

workLoadType

WorkloadType

Type of workload for the backup management

CloudError

An error response from the Container Instance service.

Name Type Description
error

CloudErrorBody

The error object.

CloudErrorBody

An error response from the Container Instance service.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

An identifier for the error. Codes are invariant and are intended to be consumed programmatically.

details

CloudErrorBody[]

A list of additional details about the error.

message

string

A message describing the error, intended to be suitable for display in a user interface.

target

string

The target of the particular error. For example, the name of the property in error.

DailyRetentionFormat

Daily retention format.

Name Type Description
daysOfTheMonth

Day[]

List of days of the month.

DailyRetentionSchedule

Daily retention schedule.

Name Type Description
retentionDuration

RetentionDuration

Retention duration of retention Policy.

retentionTimes

string[]

Retention times of retention policy.

DailySchedule

Name Type Description
scheduleRunTimes

string[]

List of times of day this schedule has to be run.

Day

Day of the week.

Name Type Description
date

integer

Date of the month

isLast

boolean

Whether Date is last date of month

DayOfWeek

Name Type Description
Friday

string

Monday

string

Saturday

string

Sunday

string

Thursday

string

Tuesday

string

Wednesday

string

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

GenericProtectionPolicy

Azure VM (Mercury) workload-specific backup policy.

Name Type Description
backupManagementType string:

GenericProtectionPolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

fabricName

string

Name of this policy's fabric.

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

subProtectionPolicy

SubProtectionPolicy[]

List of sub-protection policies which includes schedule and retention

timeZone

string

TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".

HourlySchedule

Name Type Description
interval

integer

Interval at which backup needs to be triggered. For hourly the value can be 4/6/8/12

scheduleWindowDuration

integer

To specify duration of the backup window

scheduleWindowStartTime

string

To specify start time of the backup window

IAASVMPolicyType

Name Type Description
Invalid

string

V1

string

V2

string

IaasVMSnapshotConsistencyType

Name Type Description
OnlyCrashConsistent

string

InstantRPAdditionalDetails

Name Type Description
azureBackupRGNamePrefix

string

azureBackupRGNameSuffix

string

LogSchedulePolicy

Log policy schedule.

Name Type Description
scheduleFrequencyInMins

integer

Frequency of the log schedule operation of this policy in minutes.

schedulePolicyType string:

LogSchedulePolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

LongTermRetentionPolicy

Long term retention policy.

Name Type Description
dailySchedule

DailyRetentionSchedule

Daily retention schedule of the protection policy.

monthlySchedule

MonthlyRetentionSchedule

Monthly retention schedule of the protection policy.

retentionPolicyType string:

LongTermRetentionPolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

weeklySchedule

WeeklyRetentionSchedule

Weekly retention schedule of the protection policy.

yearlySchedule

YearlyRetentionSchedule

Yearly retention schedule of the protection policy.

LongTermSchedulePolicy

Long term policy schedule.

Name Type Description
schedulePolicyType string:

LongTermSchedulePolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

MabProtectionPolicy

Mab container-specific backup policy.

Name Type Description
backupManagementType string:

MAB

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

protectedItemsCount

integer

Number of items associated with this policy.

resourceGuardOperationRequests

string[]

ResourceGuard Operation Requests

retentionPolicy RetentionPolicy:

Retention policy details.

schedulePolicy SchedulePolicy:

Backup schedule of backup policy.

MonthlyRetentionSchedule

Monthly retention schedule.

Name Type Description
retentionDuration

RetentionDuration

Retention duration of retention Policy.

retentionScheduleDaily

DailyRetentionFormat

Daily retention format for monthly retention policy.

retentionScheduleFormatType

RetentionScheduleFormat

Retention schedule format type for monthly retention policy.

retentionScheduleWeekly

WeeklyRetentionFormat

Weekly retention format for monthly retention policy.

retentionTimes

string[]

Retention times of retention policy.

MonthOfYear

List of months of year of yearly retention policy.

Name Type Description
April

string

August

string

December

string

February

string

Invalid

string

January

string

July

string

June

string

March

string

May

string

November

string

October

string

September

string

PolicyType

Type of backup policy type

Name Type Description
CopyOnlyFull

string

Differential

string

Full

string

Incremental

string

Invalid

string

Log

string

SnapshotCopyOnlyFull

string

SnapshotFull

string

ProtectionPolicyResource

Base class for backup policy. Workload-specific backup policies are derived from this class.

Name Type Description
eTag

string

Optional ETag.

id

string

Resource Id represents the complete path to the resource.

location

string

Resource location.

name

string

Resource name associated with the resource.

properties ProtectionPolicy:

ProtectionPolicyResource properties

tags

object

Resource tags.

type

string

Resource type represents the complete path of the form Namespace/ResourceType/ResourceType/...

RetentionDuration

Retention duration.

Name Type Description
count

integer

Count of duration types. Retention duration is obtained by the counting the duration type Count times. For example, when Count = 3 and DurationType = Weeks, retention duration will be three weeks.

durationType

RetentionDurationType

Retention duration type of retention policy.

RetentionDurationType

Retention duration type: days/weeks/months/years Used only if TieringMode is set to TierAfter

Name Type Description
Days

string

Invalid

string

Months

string

Weeks

string

Years

string

RetentionScheduleFormat

Retention schedule format type for monthly retention policy.

Name Type Description
Daily

string

Invalid

string

Weekly

string

ScheduleRunType

Frequency of the schedule operation of this policy.

Name Type Description
Daily

string

Hourly

string

Invalid

string

Weekly

string

Settings

Common settings field for backup management

Name Type Description
isCompression

boolean

Workload compression flag. This has been added so that 'isSqlCompression' will be deprecated once clients upgrade to consider this flag.

issqlcompression

boolean

SQL compression flag

timeZone

string

TimeZone optional input as string. For example: TimeZone = "Pacific Standard Time".

SimpleRetentionPolicy

Simple policy retention.

Name Type Description
retentionDuration

RetentionDuration

Retention duration of the protection policy.

retentionPolicyType string:

SimpleRetentionPolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

SimpleSchedulePolicy

Simple policy schedule.

Name Type Description
hourlySchedule

HourlySchedule

Hourly Schedule of this Policy

schedulePolicyType string:

SimpleSchedulePolicy

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

scheduleRunDays

DayOfWeek[]

List of days of week this schedule has to be run.

scheduleRunFrequency

ScheduleRunType

Frequency of the schedule operation of this policy.

scheduleRunTimes

string[]

List of times of day this schedule has to be run.

scheduleWeeklyFrequency

integer

At every number weeks this schedule has to be run.

SimpleSchedulePolicyV2

The V2 policy schedule for IaaS that supports hourly backups.

Name Type Description
dailySchedule

DailySchedule

Daily schedule of this policy

hourlySchedule

HourlySchedule

hourly schedule of this policy

schedulePolicyType string:

SimpleSchedulePolicyV2

This property will be used as the discriminator for deciding the specific types in the polymorphic chain of types.

scheduleRunFrequency

ScheduleRunType

Frequency of the schedule operation of this policy.

weeklySchedule

WeeklySchedule

Weekly schedule of this policy

SnapshotBackupAdditionalDetails

Snapshot Backup related fields for WorkloadType SaPHanaSystem

Name Type Description
instantRPDetails

string

instantRpRetentionRangeInDays

integer

userAssignedManagedIdentityDetails

UserAssignedManagedIdentityDetails

User assigned managed identity details

SubProtectionPolicy

Sub-protection policy which includes schedule and retention

Name Type Description
policyType

PolicyType

Type of backup policy type

retentionPolicy RetentionPolicy:

Retention policy with the details on backup copy retention ranges.

schedulePolicy SchedulePolicy:

Backup schedule specified as part of backup policy.

snapshotBackupAdditionalDetails

SnapshotBackupAdditionalDetails

Snapshot Backup related fields for WorkloadType SaPHanaSystem

tieringPolicy

<string,  TieringPolicy>

Tiering policy to automatically move RPs to another tier. Key is Target Tier, defined in RecoveryPointTierType enum. Tiering policy specifies the criteria to move RP to the target tier.

TieringMode

Tiering Mode to control automatic tiering of recovery points. Supported values are:

  1. TierRecommended: Tier all recovery points recommended to be tiered
  2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below.
  3. DoNotTier: Do not tier any recovery points
Name Type Description
DoNotTier

string

Invalid

string

TierAfter

string

TierRecommended

string

TieringPolicy

Tiering Policy for a target tier. If the policy is not specified for a given target tier, service retains the existing configured tiering policy for that tier

Name Type Description
duration

integer

Number of days/weeks/months/years to retain backups in current tier before tiering. Used only if TieringMode is set to TierAfter

durationType

RetentionDurationType

Retention duration type: days/weeks/months/years Used only if TieringMode is set to TierAfter

tieringMode

TieringMode

Tiering Mode to control automatic tiering of recovery points. Supported values are:

  1. TierRecommended: Tier all recovery points recommended to be tiered
  2. TierAfter: Tier all recovery points after a fixed period, as specified in duration + durationType below.
  3. DoNotTier: Do not tier any recovery points

UserAssignedIdentityProperties

User assigned managed identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.

UserAssignedManagedIdentityDetails

User assigned managed identity details

Name Type Description
identityArmId

string

The ARM id of the assigned identity.

identityName

string

The name of the assigned identity.

userAssignedIdentityProperties

UserAssignedIdentityProperties

User assigned managed identity properties

VaultRetentionPolicy

Vault retention policy for AzureFileShare

Name Type Description
snapshotRetentionInDays

integer

vaultRetention RetentionPolicy:

Base class for retention policy.

WeeklyRetentionFormat

Weekly retention format.

Name Type Description
daysOfTheWeek

DayOfWeek[]

List of days of the week.

weeksOfTheMonth

WeekOfMonth[]

List of weeks of month.

WeeklyRetentionSchedule

Weekly retention schedule.

Name Type Description
daysOfTheWeek

DayOfWeek[]

List of days of week for weekly retention policy.

retentionDuration

RetentionDuration

Retention duration of retention Policy.

retentionTimes

string[]

Retention times of retention policy.

WeeklySchedule

Name Type Description
scheduleRunDays

DayOfWeek[]

scheduleRunTimes

string[]

List of times of day this schedule has to be run.

WeekOfMonth

List of weeks of month.

Name Type Description
First

string

Fourth

string

Invalid

string

Last

string

Second

string

Third

string

WorkloadType

Type of workload for the backup management

Name Type Description
AzureFileShare

string

AzureSqlDb

string

Client

string

Exchange

string

FileFolder

string

GenericDataSource

string

Invalid

string

SAPAseDatabase

string

SAPHanaDBInstance

string

SAPHanaDatabase

string

SQLDB

string

SQLDataBase

string

Sharepoint

string

SystemState

string

VM

string

VMwareVM

string

YearlyRetentionSchedule

Yearly retention schedule.

Name Type Description
monthsOfYear

MonthOfYear[]

List of months of year of yearly retention policy.

retentionDuration

RetentionDuration

Retention duration of retention Policy.

retentionScheduleDaily

DailyRetentionFormat

Daily retention format for yearly retention policy.

retentionScheduleFormatType

RetentionScheduleFormat

Retention schedule format for yearly retention policy.

retentionScheduleWeekly

WeeklyRetentionFormat

Weekly retention format for yearly retention policy.

retentionTimes

string[]

Retention times of retention policy.