Microsoft.RecoveryServices vaults/backupPolicies 2016-06-01

Bicep resource definition

The vaults/backupPolicies resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.RecoveryServices/vaults/backupPolicies resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.RecoveryServices/vaults/backupPolicies@2016-06-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  parent: resourceSymbolicName
  eTag: 'string'
  properties: {
    protectedItemsCount: int
    backupManagementType: 'string'
    // For remaining properties, see ProtectionPolicy objects
  }
}

ProtectionPolicy objects

Set the backupManagementType property to specify the type of object.

For AzureIaasVM, use:

  backupManagementType: 'AzureIaasVM'
  retentionPolicy: {
    retentionPolicyType: 'string'
    // For remaining properties, see RetentionPolicy objects
  }
  schedulePolicy: {
    schedulePolicyType: 'string'
    // For remaining properties, see SchedulePolicy objects
  }

For AzureSql, use:

  backupManagementType: 'AzureSql'
  retentionPolicy: {
    retentionPolicyType: 'string'
    // For remaining properties, see RetentionPolicy objects
  }

For MAB, use:

  backupManagementType: 'MAB'
  retentionPolicy: {
    retentionPolicyType: 'string'
    // For remaining properties, see RetentionPolicy objects
  }
  schedulePolicy: {
    schedulePolicyType: 'string'
    // For remaining properties, see SchedulePolicy objects
  }

RetentionPolicy objects

Set the retentionPolicyType property to specify the type of object.

For LongTermRetentionPolicy, use:

  retentionPolicyType: 'LongTermRetentionPolicy'
  dailySchedule: {
    retentionDuration: {
      count: int
      durationType: 'string'
    }
    retentionTimes: [
      'string'
    ]
  }
  monthlySchedule: {
    retentionDuration: {
      count: int
      durationType: 'string'
    }
    retentionScheduleDaily: {
      daysOfTheMonth: [
        {
          date: int
          isLast: bool
        }
      ]
    }
    retentionScheduleFormatType: 'string'
    retentionScheduleWeekly: {
      daysOfTheWeek: [
        'string'
      ]
      weeksOfTheMonth: [
        'string'
      ]
    }
    retentionTimes: [
      'string'
    ]
  }
  weeklySchedule: {
    daysOfTheWeek: [
      'string'
    ]
    retentionDuration: {
      count: int
      durationType: 'string'
    }
    retentionTimes: [
      'string'
    ]
  }
  yearlySchedule: {
    monthsOfYear: [
      'string'
    ]
    retentionDuration: {
      count: int
      durationType: 'string'
    }
    retentionScheduleDaily: {
      daysOfTheMonth: [
        {
          date: int
          isLast: bool
        }
      ]
    }
    retentionScheduleFormatType: 'string'
    retentionScheduleWeekly: {
      daysOfTheWeek: [
        'string'
      ]
      weeksOfTheMonth: [
        'string'
      ]
    }
    retentionTimes: [
      'string'
    ]
  }

For SimpleRetentionPolicy, use:

  retentionPolicyType: 'SimpleRetentionPolicy'
  retentionDuration: {
    count: int
    durationType: 'string'
  }

SchedulePolicy objects

Set the schedulePolicyType property to specify the type of object.

For LongTermSchedulePolicy, use:

  schedulePolicyType: 'LongTermSchedulePolicy'

For SimpleSchedulePolicy, use:

  schedulePolicyType: 'SimpleSchedulePolicy'
  scheduleRunDays: [
    'string'
  ]
  scheduleRunFrequency: 'string'
  scheduleRunTimes: [
    'string'
  ]
  scheduleWeeklyFrequency: int

Property values

vaults/backupPolicies

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)

Character limit: 3-150

Valid characters:
Alphanumerics and hyphens.

Start with letter. Can't end with hyphen.
location Resource location. string
tags Resource tags. Dictionary of tag names and values. See Tags in templates
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: vaults
eTag Optional ETag. string
properties The base class for a backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicy

ProtectionPolicy

Name Description Value
protectedItemsCount The number of items associated with this policy. int
backupManagementType Set the object type AzureIaasVM
AzureSql
MAB (required)

AzureIaaSVMProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'AzureIaasVM' (required)
retentionPolicy The retention policy with the details on backup copy retention ranges. RetentionPolicy
schedulePolicy The backup schedule specified as part of backup policy. SchedulePolicy

RetentionPolicy

Name Description Value
retentionPolicyType Set the object type LongTermRetentionPolicy
SimpleRetentionPolicy (required)

LongTermRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'LongTermRetentionPolicy' (required)
dailySchedule Daily retention schedule of the backup policy. DailyRetentionSchedule
monthlySchedule Monthly retention schedule of the backup policy. MonthlyRetentionSchedule
weeklySchedule Weekly retention schedule of the backup policy. WeeklyRetentionSchedule
yearlySchedule Yearly retention schedule of the backup policy. YearlyRetentionSchedule

DailyRetentionSchedule

Name Description Value
retentionDuration The retention duration of retention policy. RetentionDuration
retentionTimes The retention times of retention policy. string[]

RetentionDuration

Name Description Value
count Count of the duration types. Retention duration is determined by the combining the Count times and durationType.
For example, if Count = 3 and durationType = Weeks, then the retention duration is three weeks.
int
durationType The retention duration type of the retention policy. 'Days'
'Invalid'
'Months'
'Weeks'
'Years'

MonthlyRetentionSchedule

Name Description Value
retentionDuration Retention duration of the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the monthly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format type for monthly retention policy. 'Daily'
'Invalid'
'Weekly'
retentionScheduleWeekly Weekly retention format for the monthly retention policy. WeeklyRetentionFormat
retentionTimes Retention times of the retention policy. string[]

DailyRetentionFormat

Name Description Value
daysOfTheMonth List of days of the month. Day[]

Day

Name Description Value
date int
isLast bool

WeeklyRetentionFormat

Name Description Value
daysOfTheWeek List of days of the week. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
weeksOfTheMonth List of weeks of the month. String array containing any of:
'First'
'Fourth'
'Last'
'Second'
'Third'

WeeklyRetentionSchedule

Name Description Value
daysOfTheWeek List of the days of the week for the weekly retention policy. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
retentionDuration Retention duration of retention policy. RetentionDuration
retentionTimes Retention times of the retention policy. string[]

YearlyRetentionSchedule

Name Description Value
monthsOfYear List of the months of year for the yearly retention policy. String array containing any of:
'April'
'August'
'December'
'February'
'Invalid'
'January'
'July'
'June'
'March'
'May'
'November'
'October'
'September'
retentionDuration Retention duration for the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the yearly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format for the yearly retention policy. 'Daily'
'Invalid'
'Weekly'
retentionScheduleWeekly Weekly retention format for the yearly retention policy. WeeklyRetentionFormat
retentionTimes Retention times for the retention policy. string[]

SimpleRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'SimpleRetentionPolicy' (required)
retentionDuration Retention duration of the protection policy. RetentionDuration

SchedulePolicy

Name Description Value
schedulePolicyType Set the object type LongTermSchedulePolicy
SimpleSchedulePolicy (required)

LongTermSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'LongTermSchedulePolicy' (required)

SimpleSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'SimpleSchedulePolicy' (required)
scheduleRunDays This list is the days of the week when the schedule runs. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
scheduleRunFrequency Defines the frequency interval (daily or weekly) for the schedule policy. 'Daily'
'Invalid'
'Weekly'
scheduleRunTimes List of times, during a day, when the schedule runs. string[]
scheduleWeeklyFrequency The number of times per week the schedule runs. int

AzureSqlProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'AzureSql' (required)
retentionPolicy The retention policy details. RetentionPolicy

MabProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'MAB' (required)
retentionPolicy The details specified in the Retention policy. RetentionPolicy
schedulePolicy The schedule specified in the backup policy. SchedulePolicy

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Backup existing File Share using Recovery Services (Daily)

Deploy to Azure
This template configures protection for an existing File Share present in an existing Storage Account. It creates a new or uses an existing Recovery Services Vault and Backup Policy based on the set parameter values.
Backup existing File Share using Recovery Services (hourly)

Deploy to Azure
This template configures protection with hourly frequency for an existing File Share present in an existing Storage Account. It creates a new or uses an existing Recovery Services Vault and Backup Policy based on the set parameter values.
Backup Resource Manager VMs using Recovery Services vault

Deploy to Azure
This template will use existing recovery services vault and existing backup policy, and configures backup of multiple Resource Manager VMs that belong to same resource group
Create Recovery Services Vault with backup policies

Deploy to Azure
This template creates a Recovery Services Vault with backup policies and configure optional features such system identity, backup storage type, cross region restore and diagnostics logs and a delete lock.
Create Daily Backup Policy for RS Vault to protect IaaSVMs

Deploy to Azure
This template creates Recovery service vault and a Daily Backup Policy that can be used to protect classic and ARM based IaaS VMs.
Azure Backup for Workload in Azure Virtual Machines

Deploy to Azure
This template creates a Recovery Services Vault and a Workload specific Backup Policy. Registers VM with Backup service and Configures Protection
Create Weekly Backup Policy for RS Vault to protect IaaSVMs

Deploy to Azure
This template creates Recovery service vault and a Daily Backup Policy that can be used to protect classic and ARM based IaaS VMs.

ARM template resource definition

The vaults/backupPolicies resource type can be deployed to:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.RecoveryServices/vaults/backupPolicies resource, add the following JSON to your template.

{
  "type": "Microsoft.RecoveryServices/vaults/backupPolicies",
  "apiVersion": "2016-06-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "eTag": "string",
  "properties": {
    "protectedItemsCount": "int",
    "backupManagementType": "string"
    // For remaining properties, see ProtectionPolicy objects
  }
}

ProtectionPolicy objects

Set the backupManagementType property to specify the type of object.

For AzureIaasVM, use:

  "backupManagementType": "AzureIaasVM",
  "retentionPolicy": {
    "retentionPolicyType": "string"
    // For remaining properties, see RetentionPolicy objects
  },
  "schedulePolicy": {
    "schedulePolicyType": "string"
    // For remaining properties, see SchedulePolicy objects
  }

For AzureSql, use:

  "backupManagementType": "AzureSql",
  "retentionPolicy": {
    "retentionPolicyType": "string"
    // For remaining properties, see RetentionPolicy objects
  }

For MAB, use:

  "backupManagementType": "MAB",
  "retentionPolicy": {
    "retentionPolicyType": "string"
    // For remaining properties, see RetentionPolicy objects
  },
  "schedulePolicy": {
    "schedulePolicyType": "string"
    // For remaining properties, see SchedulePolicy objects
  }

RetentionPolicy objects

Set the retentionPolicyType property to specify the type of object.

For LongTermRetentionPolicy, use:

  "retentionPolicyType": "LongTermRetentionPolicy",
  "dailySchedule": {
    "retentionDuration": {
      "count": "int",
      "durationType": "string"
    },
    "retentionTimes": [ "string" ]
  },
  "monthlySchedule": {
    "retentionDuration": {
      "count": "int",
      "durationType": "string"
    },
    "retentionScheduleDaily": {
      "daysOfTheMonth": [
        {
          "date": "int",
          "isLast": "bool"
        }
      ]
    },
    "retentionScheduleFormatType": "string",
    "retentionScheduleWeekly": {
      "daysOfTheWeek": [ "string" ],
      "weeksOfTheMonth": [ "string" ]
    },
    "retentionTimes": [ "string" ]
  },
  "weeklySchedule": {
    "daysOfTheWeek": [ "string" ],
    "retentionDuration": {
      "count": "int",
      "durationType": "string"
    },
    "retentionTimes": [ "string" ]
  },
  "yearlySchedule": {
    "monthsOfYear": [ "string" ],
    "retentionDuration": {
      "count": "int",
      "durationType": "string"
    },
    "retentionScheduleDaily": {
      "daysOfTheMonth": [
        {
          "date": "int",
          "isLast": "bool"
        }
      ]
    },
    "retentionScheduleFormatType": "string",
    "retentionScheduleWeekly": {
      "daysOfTheWeek": [ "string" ],
      "weeksOfTheMonth": [ "string" ]
    },
    "retentionTimes": [ "string" ]
  }

For SimpleRetentionPolicy, use:

  "retentionPolicyType": "SimpleRetentionPolicy",
  "retentionDuration": {
    "count": "int",
    "durationType": "string"
  }

SchedulePolicy objects

Set the schedulePolicyType property to specify the type of object.

For LongTermSchedulePolicy, use:

  "schedulePolicyType": "LongTermSchedulePolicy"

For SimpleSchedulePolicy, use:

  "schedulePolicyType": "SimpleSchedulePolicy",
  "scheduleRunDays": [ "string" ],
  "scheduleRunFrequency": "string",
  "scheduleRunTimes": [ "string" ],
  "scheduleWeeklyFrequency": "int"

Property values

vaults/backupPolicies

Name Description Value
type The resource type 'Microsoft.RecoveryServices/vaults/backupPolicies'
apiVersion The resource api version '2016-06-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)

Character limit: 3-150

Valid characters:
Alphanumerics and hyphens.

Start with letter. Can't end with hyphen.
location Resource location. string
tags Resource tags. Dictionary of tag names and values. See Tags in templates
eTag Optional ETag. string
properties The base class for a backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicy

ProtectionPolicy

Name Description Value
protectedItemsCount The number of items associated with this policy. int
backupManagementType Set the object type AzureIaasVM
AzureSql
MAB (required)

AzureIaaSVMProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'AzureIaasVM' (required)
retentionPolicy The retention policy with the details on backup copy retention ranges. RetentionPolicy
schedulePolicy The backup schedule specified as part of backup policy. SchedulePolicy

RetentionPolicy

Name Description Value
retentionPolicyType Set the object type LongTermRetentionPolicy
SimpleRetentionPolicy (required)

LongTermRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'LongTermRetentionPolicy' (required)
dailySchedule Daily retention schedule of the backup policy. DailyRetentionSchedule
monthlySchedule Monthly retention schedule of the backup policy. MonthlyRetentionSchedule
weeklySchedule Weekly retention schedule of the backup policy. WeeklyRetentionSchedule
yearlySchedule Yearly retention schedule of the backup policy. YearlyRetentionSchedule

DailyRetentionSchedule

Name Description Value
retentionDuration The retention duration of retention policy. RetentionDuration
retentionTimes The retention times of retention policy. string[]

RetentionDuration

Name Description Value
count Count of the duration types. Retention duration is determined by the combining the Count times and durationType.
For example, if Count = 3 and durationType = Weeks, then the retention duration is three weeks.
int
durationType The retention duration type of the retention policy. 'Days'
'Invalid'
'Months'
'Weeks'
'Years'

MonthlyRetentionSchedule

Name Description Value
retentionDuration Retention duration of the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the monthly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format type for monthly retention policy. 'Daily'
'Invalid'
'Weekly'
retentionScheduleWeekly Weekly retention format for the monthly retention policy. WeeklyRetentionFormat
retentionTimes Retention times of the retention policy. string[]

DailyRetentionFormat

Name Description Value
daysOfTheMonth List of days of the month. Day[]

Day

Name Description Value
date int
isLast bool

WeeklyRetentionFormat

Name Description Value
daysOfTheWeek List of days of the week. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
weeksOfTheMonth List of weeks of the month. String array containing any of:
'First'
'Fourth'
'Last'
'Second'
'Third'

WeeklyRetentionSchedule

Name Description Value
daysOfTheWeek List of the days of the week for the weekly retention policy. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
retentionDuration Retention duration of retention policy. RetentionDuration
retentionTimes Retention times of the retention policy. string[]

YearlyRetentionSchedule

Name Description Value
monthsOfYear List of the months of year for the yearly retention policy. String array containing any of:
'April'
'August'
'December'
'February'
'Invalid'
'January'
'July'
'June'
'March'
'May'
'November'
'October'
'September'
retentionDuration Retention duration for the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the yearly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format for the yearly retention policy. 'Daily'
'Invalid'
'Weekly'
retentionScheduleWeekly Weekly retention format for the yearly retention policy. WeeklyRetentionFormat
retentionTimes Retention times for the retention policy. string[]

SimpleRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'SimpleRetentionPolicy' (required)
retentionDuration Retention duration of the protection policy. RetentionDuration

SchedulePolicy

Name Description Value
schedulePolicyType Set the object type LongTermSchedulePolicy
SimpleSchedulePolicy (required)

LongTermSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'LongTermSchedulePolicy' (required)

SimpleSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'SimpleSchedulePolicy' (required)
scheduleRunDays This list is the days of the week when the schedule runs. String array containing any of:
'Friday'
'Monday'
'Saturday'
'Sunday'
'Thursday'
'Tuesday'
'Wednesday'
scheduleRunFrequency Defines the frequency interval (daily or weekly) for the schedule policy. 'Daily'
'Invalid'
'Weekly'
scheduleRunTimes List of times, during a day, when the schedule runs. string[]
scheduleWeeklyFrequency The number of times per week the schedule runs. int

AzureSqlProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'AzureSql' (required)
retentionPolicy The retention policy details. RetentionPolicy

MabProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. 'MAB' (required)
retentionPolicy The details specified in the Retention policy. RetentionPolicy
schedulePolicy The schedule specified in the backup policy. SchedulePolicy

Quickstart templates

The following quickstart templates deploy this resource type.

Template Description
Backup existing File Share using Recovery Services (Daily)

Deploy to Azure
This template configures protection for an existing File Share present in an existing Storage Account. It creates a new or uses an existing Recovery Services Vault and Backup Policy based on the set parameter values.
Backup existing File Share using Recovery Services (hourly)

Deploy to Azure
This template configures protection with hourly frequency for an existing File Share present in an existing Storage Account. It creates a new or uses an existing Recovery Services Vault and Backup Policy based on the set parameter values.
Backup Resource Manager VMs using Recovery Services vault

Deploy to Azure
This template will use existing recovery services vault and existing backup policy, and configures backup of multiple Resource Manager VMs that belong to same resource group
Create Recovery Services Vault with backup policies

Deploy to Azure
This template creates a Recovery Services Vault with backup policies and configure optional features such system identity, backup storage type, cross region restore and diagnostics logs and a delete lock.
Create Daily Backup Policy for RS Vault to protect IaaSVMs

Deploy to Azure
This template creates Recovery service vault and a Daily Backup Policy that can be used to protect classic and ARM based IaaS VMs.
Azure Backup for Workload in Azure Virtual Machines

Deploy to Azure
This template creates a Recovery Services Vault and a Workload specific Backup Policy. Registers VM with Backup service and Configures Protection
Create Weekly Backup Policy for RS Vault to protect IaaSVMs

Deploy to Azure
This template creates Recovery service vault and a Daily Backup Policy that can be used to protect classic and ARM based IaaS VMs.

Terraform (AzAPI provider) resource definition

The vaults/backupPolicies resource type can be deployed to:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.RecoveryServices/vaults/backupPolicies resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.RecoveryServices/vaults/backupPolicies@2016-06-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {
      protectedItemsCount = int
      backupManagementType = "string"
      // For remaining properties, see ProtectionPolicy objects
    }
    eTag = "string"
  })
}

ProtectionPolicy objects

Set the backupManagementType property to specify the type of object.

For AzureIaasVM, use:

  backupManagementType = "AzureIaasVM"
  retentionPolicy = {
    retentionPolicyType = "string"
    // For remaining properties, see RetentionPolicy objects
  }
  schedulePolicy = {
    schedulePolicyType = "string"
    // For remaining properties, see SchedulePolicy objects
  }

For AzureSql, use:

  backupManagementType = "AzureSql"
  retentionPolicy = {
    retentionPolicyType = "string"
    // For remaining properties, see RetentionPolicy objects
  }

For MAB, use:

  backupManagementType = "MAB"
  retentionPolicy = {
    retentionPolicyType = "string"
    // For remaining properties, see RetentionPolicy objects
  }
  schedulePolicy = {
    schedulePolicyType = "string"
    // For remaining properties, see SchedulePolicy objects
  }

RetentionPolicy objects

Set the retentionPolicyType property to specify the type of object.

For LongTermRetentionPolicy, use:

  retentionPolicyType = "LongTermRetentionPolicy"
  dailySchedule = {
    retentionDuration = {
      count = int
      durationType = "string"
    }
    retentionTimes = [
      "string"
    ]
  }
  monthlySchedule = {
    retentionDuration = {
      count = int
      durationType = "string"
    }
    retentionScheduleDaily = {
      daysOfTheMonth = [
        {
          date = int
          isLast = bool
        }
      ]
    }
    retentionScheduleFormatType = "string"
    retentionScheduleWeekly = {
      daysOfTheWeek = [
        "string"
      ]
      weeksOfTheMonth = [
        "string"
      ]
    }
    retentionTimes = [
      "string"
    ]
  }
  weeklySchedule = {
    daysOfTheWeek = [
      "string"
    ]
    retentionDuration = {
      count = int
      durationType = "string"
    }
    retentionTimes = [
      "string"
    ]
  }
  yearlySchedule = {
    monthsOfYear = [
      "string"
    ]
    retentionDuration = {
      count = int
      durationType = "string"
    }
    retentionScheduleDaily = {
      daysOfTheMonth = [
        {
          date = int
          isLast = bool
        }
      ]
    }
    retentionScheduleFormatType = "string"
    retentionScheduleWeekly = {
      daysOfTheWeek = [
        "string"
      ]
      weeksOfTheMonth = [
        "string"
      ]
    }
    retentionTimes = [
      "string"
    ]
  }

For SimpleRetentionPolicy, use:

  retentionPolicyType = "SimpleRetentionPolicy"
  retentionDuration = {
    count = int
    durationType = "string"
  }

SchedulePolicy objects

Set the schedulePolicyType property to specify the type of object.

For LongTermSchedulePolicy, use:

  schedulePolicyType = "LongTermSchedulePolicy"

For SimpleSchedulePolicy, use:

  schedulePolicyType = "SimpleSchedulePolicy"
  scheduleRunDays = [
    "string"
  ]
  scheduleRunFrequency = "string"
  scheduleRunTimes = [
    "string"
  ]
  scheduleWeeklyFrequency = int

Property values

vaults/backupPolicies

Name Description Value
type The resource type "Microsoft.RecoveryServices/vaults/backupPolicies@2016-06-01"
name The resource name string (required)

Character limit: 3-150

Valid characters:
Alphanumerics and hyphens.

Start with letter. Can't end with hyphen.
location Resource location. string
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: vaults
tags Resource tags. Dictionary of tag names and values.
eTag Optional ETag. string
properties The base class for a backup policy. Workload-specific backup policies are derived from this class. ProtectionPolicy

ProtectionPolicy

Name Description Value
protectedItemsCount The number of items associated with this policy. int
backupManagementType Set the object type AzureIaasVM
AzureSql
MAB (required)

AzureIaaSVMProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "AzureIaasVM" (required)
retentionPolicy The retention policy with the details on backup copy retention ranges. RetentionPolicy
schedulePolicy The backup schedule specified as part of backup policy. SchedulePolicy

RetentionPolicy

Name Description Value
retentionPolicyType Set the object type LongTermRetentionPolicy
SimpleRetentionPolicy (required)

LongTermRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "LongTermRetentionPolicy" (required)
dailySchedule Daily retention schedule of the backup policy. DailyRetentionSchedule
monthlySchedule Monthly retention schedule of the backup policy. MonthlyRetentionSchedule
weeklySchedule Weekly retention schedule of the backup policy. WeeklyRetentionSchedule
yearlySchedule Yearly retention schedule of the backup policy. YearlyRetentionSchedule

DailyRetentionSchedule

Name Description Value
retentionDuration The retention duration of retention policy. RetentionDuration
retentionTimes The retention times of retention policy. string[]

RetentionDuration

Name Description Value
count Count of the duration types. Retention duration is determined by the combining the Count times and durationType.
For example, if Count = 3 and durationType = Weeks, then the retention duration is three weeks.
int
durationType The retention duration type of the retention policy. "Days"
"Invalid"
"Months"
"Weeks"
"Years"

MonthlyRetentionSchedule

Name Description Value
retentionDuration Retention duration of the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the monthly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format type for monthly retention policy. "Daily"
"Invalid"
"Weekly"
retentionScheduleWeekly Weekly retention format for the monthly retention policy. WeeklyRetentionFormat
retentionTimes Retention times of the retention policy. string[]

DailyRetentionFormat

Name Description Value
daysOfTheMonth List of days of the month. Day[]

Day

Name Description Value
date int
isLast bool

WeeklyRetentionFormat

Name Description Value
daysOfTheWeek List of days of the week. String array containing any of:
"Friday"
"Monday"
"Saturday"
"Sunday"
"Thursday"
"Tuesday"
"Wednesday"
weeksOfTheMonth List of weeks of the month. String array containing any of:
"First"
"Fourth"
"Last"
"Second"
"Third"

WeeklyRetentionSchedule

Name Description Value
daysOfTheWeek List of the days of the week for the weekly retention policy. String array containing any of:
"Friday"
"Monday"
"Saturday"
"Sunday"
"Thursday"
"Tuesday"
"Wednesday"
retentionDuration Retention duration of retention policy. RetentionDuration
retentionTimes Retention times of the retention policy. string[]

YearlyRetentionSchedule

Name Description Value
monthsOfYear List of the months of year for the yearly retention policy. String array containing any of:
"April"
"August"
"December"
"February"
"Invalid"
"January"
"July"
"June"
"March"
"May"
"November"
"October"
"September"
retentionDuration Retention duration for the retention policy. RetentionDuration
retentionScheduleDaily Daily retention format for the yearly retention policy. DailyRetentionFormat
retentionScheduleFormatType Retention schedule format for the yearly retention policy. "Daily"
"Invalid"
"Weekly"
retentionScheduleWeekly Weekly retention format for the yearly retention policy. WeeklyRetentionFormat
retentionTimes Retention times for the retention policy. string[]

SimpleRetentionPolicy

Name Description Value
retentionPolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "SimpleRetentionPolicy" (required)
retentionDuration Retention duration of the protection policy. RetentionDuration

SchedulePolicy

Name Description Value
schedulePolicyType Set the object type LongTermSchedulePolicy
SimpleSchedulePolicy (required)

LongTermSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "LongTermSchedulePolicy" (required)

SimpleSchedulePolicy

Name Description Value
schedulePolicyType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "SimpleSchedulePolicy" (required)
scheduleRunDays This list is the days of the week when the schedule runs. String array containing any of:
"Friday"
"Monday"
"Saturday"
"Sunday"
"Thursday"
"Tuesday"
"Wednesday"
scheduleRunFrequency Defines the frequency interval (daily or weekly) for the schedule policy. "Daily"
"Invalid"
"Weekly"
scheduleRunTimes List of times, during a day, when the schedule runs. string[]
scheduleWeeklyFrequency The number of times per week the schedule runs. int

AzureSqlProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "AzureSql" (required)
retentionPolicy The retention policy details. RetentionPolicy

MabProtectionPolicy

Name Description Value
backupManagementType This property is used as the discriminator for deciding the specific types in the polymorphic chain of types. "MAB" (required)
retentionPolicy The details specified in the Retention policy. RetentionPolicy
schedulePolicy The schedule specified in the backup policy. SchedulePolicy