1. Packages
  2. Azure Classic
  3. API Docs
  4. backup
  5. PolicyVM

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.backup.PolicyVM

Explore with Pulumi AI

Manages an Azure Backup VM Backup Policy.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "tfex-recovery_vault",
    location: "West Europe",
});
const exampleVault = new azure.recoveryservices.Vault("example", {
    name: "tfex-recovery-vault",
    location: example.location,
    resourceGroupName: example.name,
    sku: "Standard",
});
const examplePolicyVM = new azure.backup.PolicyVM("example", {
    name: "tfex-recovery-vault-policy",
    resourceGroupName: example.name,
    recoveryVaultName: exampleVault.name,
    timezone: "UTC",
    backup: {
        frequency: "Daily",
        time: "23:00",
    },
    retentionDaily: {
        count: 10,
    },
    retentionWeekly: {
        count: 42,
        weekdays: [
            "Sunday",
            "Wednesday",
            "Friday",
            "Saturday",
        ],
    },
    retentionMonthly: {
        count: 7,
        weekdays: [
            "Sunday",
            "Wednesday",
        ],
        weeks: [
            "First",
            "Last",
        ],
    },
    retentionYearly: {
        count: 77,
        weekdays: ["Sunday"],
        weeks: ["Last"],
        months: ["January"],
    },
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="tfex-recovery_vault",
    location="West Europe")
example_vault = azure.recoveryservices.Vault("example",
    name="tfex-recovery-vault",
    location=example.location,
    resource_group_name=example.name,
    sku="Standard")
example_policy_vm = azure.backup.PolicyVM("example",
    name="tfex-recovery-vault-policy",
    resource_group_name=example.name,
    recovery_vault_name=example_vault.name,
    timezone="UTC",
    backup={
        "frequency": "Daily",
        "time": "23:00",
    },
    retention_daily={
        "count": 10,
    },
    retention_weekly={
        "count": 42,
        "weekdays": [
            "Sunday",
            "Wednesday",
            "Friday",
            "Saturday",
        ],
    },
    retention_monthly={
        "count": 7,
        "weekdays": [
            "Sunday",
            "Wednesday",
        ],
        "weeks": [
            "First",
            "Last",
        ],
    },
    retention_yearly={
        "count": 77,
        "weekdays": ["Sunday"],
        "weeks": ["Last"],
        "months": ["January"],
    })
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/backup"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
			Name:     pulumi.String("tfex-recovery_vault"),
			Location: pulumi.String("West Europe"),
		})
		if err != nil {
			return err
		}
		exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{
			Name:              pulumi.String("tfex-recovery-vault"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			Sku:               pulumi.String("Standard"),
		})
		if err != nil {
			return err
		}
		_, err = backup.NewPolicyVM(ctx, "example", &backup.PolicyVMArgs{
			Name:              pulumi.String("tfex-recovery-vault-policy"),
			ResourceGroupName: example.Name,
			RecoveryVaultName: exampleVault.Name,
			Timezone:          pulumi.String("UTC"),
			Backup: &backup.PolicyVMBackupArgs{
				Frequency: pulumi.String("Daily"),
				Time:      pulumi.String("23:00"),
			},
			RetentionDaily: &backup.PolicyVMRetentionDailyArgs{
				Count: pulumi.Int(10),
			},
			RetentionWeekly: &backup.PolicyVMRetentionWeeklyArgs{
				Count: pulumi.Int(42),
				Weekdays: pulumi.StringArray{
					pulumi.String("Sunday"),
					pulumi.String("Wednesday"),
					pulumi.String("Friday"),
					pulumi.String("Saturday"),
				},
			},
			RetentionMonthly: &backup.PolicyVMRetentionMonthlyArgs{
				Count: pulumi.Int(7),
				Weekdays: pulumi.StringArray{
					pulumi.String("Sunday"),
					pulumi.String("Wednesday"),
				},
				Weeks: pulumi.StringArray{
					pulumi.String("First"),
					pulumi.String("Last"),
				},
			},
			RetentionYearly: &backup.PolicyVMRetentionYearlyArgs{
				Count: pulumi.Int(77),
				Weekdays: pulumi.StringArray{
					pulumi.String("Sunday"),
				},
				Weeks: pulumi.StringArray{
					pulumi.String("Last"),
				},
				Months: pulumi.StringArray{
					pulumi.String("January"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = new Azure.Core.ResourceGroup("example", new()
    {
        Name = "tfex-recovery_vault",
        Location = "West Europe",
    });

    var exampleVault = new Azure.RecoveryServices.Vault("example", new()
    {
        Name = "tfex-recovery-vault",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Sku = "Standard",
    });

    var examplePolicyVM = new Azure.Backup.PolicyVM("example", new()
    {
        Name = "tfex-recovery-vault-policy",
        ResourceGroupName = example.Name,
        RecoveryVaultName = exampleVault.Name,
        Timezone = "UTC",
        Backup = new Azure.Backup.Inputs.PolicyVMBackupArgs
        {
            Frequency = "Daily",
            Time = "23:00",
        },
        RetentionDaily = new Azure.Backup.Inputs.PolicyVMRetentionDailyArgs
        {
            Count = 10,
        },
        RetentionWeekly = new Azure.Backup.Inputs.PolicyVMRetentionWeeklyArgs
        {
            Count = 42,
            Weekdays = new[]
            {
                "Sunday",
                "Wednesday",
                "Friday",
                "Saturday",
            },
        },
        RetentionMonthly = new Azure.Backup.Inputs.PolicyVMRetentionMonthlyArgs
        {
            Count = 7,
            Weekdays = new[]
            {
                "Sunday",
                "Wednesday",
            },
            Weeks = new[]
            {
                "First",
                "Last",
            },
        },
        RetentionYearly = new Azure.Backup.Inputs.PolicyVMRetentionYearlyArgs
        {
            Count = 77,
            Weekdays = new[]
            {
                "Sunday",
            },
            Weeks = new[]
            {
                "Last",
            },
            Months = new[]
            {
                "January",
            },
        },
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.recoveryservices.Vault;
import com.pulumi.azure.recoveryservices.VaultArgs;
import com.pulumi.azure.backup.PolicyVM;
import com.pulumi.azure.backup.PolicyVMArgs;
import com.pulumi.azure.backup.inputs.PolicyVMBackupArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionDailyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionWeeklyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionMonthlyArgs;
import com.pulumi.azure.backup.inputs.PolicyVMRetentionYearlyArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var example = new ResourceGroup("example", ResourceGroupArgs.builder()
            .name("tfex-recovery_vault")
            .location("West Europe")
            .build());

        var exampleVault = new Vault("exampleVault", VaultArgs.builder()
            .name("tfex-recovery-vault")
            .location(example.location())
            .resourceGroupName(example.name())
            .sku("Standard")
            .build());

        var examplePolicyVM = new PolicyVM("examplePolicyVM", PolicyVMArgs.builder()
            .name("tfex-recovery-vault-policy")
            .resourceGroupName(example.name())
            .recoveryVaultName(exampleVault.name())
            .timezone("UTC")
            .backup(PolicyVMBackupArgs.builder()
                .frequency("Daily")
                .time("23:00")
                .build())
            .retentionDaily(PolicyVMRetentionDailyArgs.builder()
                .count(10)
                .build())
            .retentionWeekly(PolicyVMRetentionWeeklyArgs.builder()
                .count(42)
                .weekdays(                
                    "Sunday",
                    "Wednesday",
                    "Friday",
                    "Saturday")
                .build())
            .retentionMonthly(PolicyVMRetentionMonthlyArgs.builder()
                .count(7)
                .weekdays(                
                    "Sunday",
                    "Wednesday")
                .weeks(                
                    "First",
                    "Last")
                .build())
            .retentionYearly(PolicyVMRetentionYearlyArgs.builder()
                .count(77)
                .weekdays("Sunday")
                .weeks("Last")
                .months("January")
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: tfex-recovery_vault
      location: West Europe
  exampleVault:
    type: azure:recoveryservices:Vault
    name: example
    properties:
      name: tfex-recovery-vault
      location: ${example.location}
      resourceGroupName: ${example.name}
      sku: Standard
  examplePolicyVM:
    type: azure:backup:PolicyVM
    name: example
    properties:
      name: tfex-recovery-vault-policy
      resourceGroupName: ${example.name}
      recoveryVaultName: ${exampleVault.name}
      timezone: UTC
      backup:
        frequency: Daily
        time: 23:00
      retentionDaily:
        count: 10
      retentionWeekly:
        count: 42
        weekdays:
          - Sunday
          - Wednesday
          - Friday
          - Saturday
      retentionMonthly:
        count: 7
        weekdays:
          - Sunday
          - Wednesday
        weeks:
          - First
          - Last
      retentionYearly:
        count: 77
        weekdays:
          - Sunday
        weeks:
          - Last
        months:
          - January
Copy

Create PolicyVM Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new PolicyVM(name: string, args: PolicyVMArgs, opts?: CustomResourceOptions);
@overload
def PolicyVM(resource_name: str,
             args: PolicyVMArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def PolicyVM(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             backup: Optional[PolicyVMBackupArgs] = None,
             resource_group_name: Optional[str] = None,
             recovery_vault_name: Optional[str] = None,
             name: Optional[str] = None,
             policy_type: Optional[str] = None,
             instant_restore_retention_days: Optional[int] = None,
             instant_restore_resource_group: Optional[PolicyVMInstantRestoreResourceGroupArgs] = None,
             retention_daily: Optional[PolicyVMRetentionDailyArgs] = None,
             retention_monthly: Optional[PolicyVMRetentionMonthlyArgs] = None,
             retention_weekly: Optional[PolicyVMRetentionWeeklyArgs] = None,
             retention_yearly: Optional[PolicyVMRetentionYearlyArgs] = None,
             tiering_policy: Optional[PolicyVMTieringPolicyArgs] = None,
             timezone: Optional[str] = None)
func NewPolicyVM(ctx *Context, name string, args PolicyVMArgs, opts ...ResourceOption) (*PolicyVM, error)
public PolicyVM(string name, PolicyVMArgs args, CustomResourceOptions? opts = null)
public PolicyVM(String name, PolicyVMArgs args)
public PolicyVM(String name, PolicyVMArgs args, CustomResourceOptions options)
type: azure:backup:PolicyVM
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. PolicyVMArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. PolicyVMArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyVMArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. PolicyVMArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. PolicyVMArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var policyVMResource = new Azure.Backup.PolicyVM("policyVMResource", new()
{
    Backup = new Azure.Backup.Inputs.PolicyVMBackupArgs
    {
        Frequency = "string",
        Time = "string",
        HourDuration = 0,
        HourInterval = 0,
        Weekdays = new[]
        {
            "string",
        },
    },
    ResourceGroupName = "string",
    RecoveryVaultName = "string",
    Name = "string",
    PolicyType = "string",
    InstantRestoreRetentionDays = 0,
    InstantRestoreResourceGroup = new Azure.Backup.Inputs.PolicyVMInstantRestoreResourceGroupArgs
    {
        Prefix = "string",
        Suffix = "string",
    },
    RetentionDaily = new Azure.Backup.Inputs.PolicyVMRetentionDailyArgs
    {
        Count = 0,
    },
    RetentionMonthly = new Azure.Backup.Inputs.PolicyVMRetentionMonthlyArgs
    {
        Count = 0,
        Days = new[]
        {
            0,
        },
        IncludeLastDays = false,
        Weekdays = new[]
        {
            "string",
        },
        Weeks = new[]
        {
            "string",
        },
    },
    RetentionWeekly = new Azure.Backup.Inputs.PolicyVMRetentionWeeklyArgs
    {
        Count = 0,
        Weekdays = new[]
        {
            "string",
        },
    },
    RetentionYearly = new Azure.Backup.Inputs.PolicyVMRetentionYearlyArgs
    {
        Count = 0,
        Months = new[]
        {
            "string",
        },
        Days = new[]
        {
            0,
        },
        IncludeLastDays = false,
        Weekdays = new[]
        {
            "string",
        },
        Weeks = new[]
        {
            "string",
        },
    },
    TieringPolicy = new Azure.Backup.Inputs.PolicyVMTieringPolicyArgs
    {
        ArchivedRestorePoint = new Azure.Backup.Inputs.PolicyVMTieringPolicyArchivedRestorePointArgs
        {
            Mode = "string",
            Duration = 0,
            DurationType = "string",
        },
    },
    Timezone = "string",
});
Copy
example, err := backup.NewPolicyVM(ctx, "policyVMResource", &backup.PolicyVMArgs{
	Backup: &backup.PolicyVMBackupArgs{
		Frequency:    pulumi.String("string"),
		Time:         pulumi.String("string"),
		HourDuration: pulumi.Int(0),
		HourInterval: pulumi.Int(0),
		Weekdays: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	ResourceGroupName:           pulumi.String("string"),
	RecoveryVaultName:           pulumi.String("string"),
	Name:                        pulumi.String("string"),
	PolicyType:                  pulumi.String("string"),
	InstantRestoreRetentionDays: pulumi.Int(0),
	InstantRestoreResourceGroup: &backup.PolicyVMInstantRestoreResourceGroupArgs{
		Prefix: pulumi.String("string"),
		Suffix: pulumi.String("string"),
	},
	RetentionDaily: &backup.PolicyVMRetentionDailyArgs{
		Count: pulumi.Int(0),
	},
	RetentionMonthly: &backup.PolicyVMRetentionMonthlyArgs{
		Count: pulumi.Int(0),
		Days: pulumi.IntArray{
			pulumi.Int(0),
		},
		IncludeLastDays: pulumi.Bool(false),
		Weekdays: pulumi.StringArray{
			pulumi.String("string"),
		},
		Weeks: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	RetentionWeekly: &backup.PolicyVMRetentionWeeklyArgs{
		Count: pulumi.Int(0),
		Weekdays: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	RetentionYearly: &backup.PolicyVMRetentionYearlyArgs{
		Count: pulumi.Int(0),
		Months: pulumi.StringArray{
			pulumi.String("string"),
		},
		Days: pulumi.IntArray{
			pulumi.Int(0),
		},
		IncludeLastDays: pulumi.Bool(false),
		Weekdays: pulumi.StringArray{
			pulumi.String("string"),
		},
		Weeks: pulumi.StringArray{
			pulumi.String("string"),
		},
	},
	TieringPolicy: &backup.PolicyVMTieringPolicyArgs{
		ArchivedRestorePoint: &backup.PolicyVMTieringPolicyArchivedRestorePointArgs{
			Mode:         pulumi.String("string"),
			Duration:     pulumi.Int(0),
			DurationType: pulumi.String("string"),
		},
	},
	Timezone: pulumi.String("string"),
})
Copy
var policyVMResource = new PolicyVM("policyVMResource", PolicyVMArgs.builder()
    .backup(PolicyVMBackupArgs.builder()
        .frequency("string")
        .time("string")
        .hourDuration(0)
        .hourInterval(0)
        .weekdays("string")
        .build())
    .resourceGroupName("string")
    .recoveryVaultName("string")
    .name("string")
    .policyType("string")
    .instantRestoreRetentionDays(0)
    .instantRestoreResourceGroup(PolicyVMInstantRestoreResourceGroupArgs.builder()
        .prefix("string")
        .suffix("string")
        .build())
    .retentionDaily(PolicyVMRetentionDailyArgs.builder()
        .count(0)
        .build())
    .retentionMonthly(PolicyVMRetentionMonthlyArgs.builder()
        .count(0)
        .days(0)
        .includeLastDays(false)
        .weekdays("string")
        .weeks("string")
        .build())
    .retentionWeekly(PolicyVMRetentionWeeklyArgs.builder()
        .count(0)
        .weekdays("string")
        .build())
    .retentionYearly(PolicyVMRetentionYearlyArgs.builder()
        .count(0)
        .months("string")
        .days(0)
        .includeLastDays(false)
        .weekdays("string")
        .weeks("string")
        .build())
    .tieringPolicy(PolicyVMTieringPolicyArgs.builder()
        .archivedRestorePoint(PolicyVMTieringPolicyArchivedRestorePointArgs.builder()
            .mode("string")
            .duration(0)
            .durationType("string")
            .build())
        .build())
    .timezone("string")
    .build());
Copy
policy_vm_resource = azure.backup.PolicyVM("policyVMResource",
    backup={
        "frequency": "string",
        "time": "string",
        "hour_duration": 0,
        "hour_interval": 0,
        "weekdays": ["string"],
    },
    resource_group_name="string",
    recovery_vault_name="string",
    name="string",
    policy_type="string",
    instant_restore_retention_days=0,
    instant_restore_resource_group={
        "prefix": "string",
        "suffix": "string",
    },
    retention_daily={
        "count": 0,
    },
    retention_monthly={
        "count": 0,
        "days": [0],
        "include_last_days": False,
        "weekdays": ["string"],
        "weeks": ["string"],
    },
    retention_weekly={
        "count": 0,
        "weekdays": ["string"],
    },
    retention_yearly={
        "count": 0,
        "months": ["string"],
        "days": [0],
        "include_last_days": False,
        "weekdays": ["string"],
        "weeks": ["string"],
    },
    tiering_policy={
        "archived_restore_point": {
            "mode": "string",
            "duration": 0,
            "duration_type": "string",
        },
    },
    timezone="string")
Copy
const policyVMResource = new azure.backup.PolicyVM("policyVMResource", {
    backup: {
        frequency: "string",
        time: "string",
        hourDuration: 0,
        hourInterval: 0,
        weekdays: ["string"],
    },
    resourceGroupName: "string",
    recoveryVaultName: "string",
    name: "string",
    policyType: "string",
    instantRestoreRetentionDays: 0,
    instantRestoreResourceGroup: {
        prefix: "string",
        suffix: "string",
    },
    retentionDaily: {
        count: 0,
    },
    retentionMonthly: {
        count: 0,
        days: [0],
        includeLastDays: false,
        weekdays: ["string"],
        weeks: ["string"],
    },
    retentionWeekly: {
        count: 0,
        weekdays: ["string"],
    },
    retentionYearly: {
        count: 0,
        months: ["string"],
        days: [0],
        includeLastDays: false,
        weekdays: ["string"],
        weeks: ["string"],
    },
    tieringPolicy: {
        archivedRestorePoint: {
            mode: "string",
            duration: 0,
            durationType: "string",
        },
    },
    timezone: "string",
});
Copy
type: azure:backup:PolicyVM
properties:
    backup:
        frequency: string
        hourDuration: 0
        hourInterval: 0
        time: string
        weekdays:
            - string
    instantRestoreResourceGroup:
        prefix: string
        suffix: string
    instantRestoreRetentionDays: 0
    name: string
    policyType: string
    recoveryVaultName: string
    resourceGroupName: string
    retentionDaily:
        count: 0
    retentionMonthly:
        count: 0
        days:
            - 0
        includeLastDays: false
        weekdays:
            - string
        weeks:
            - string
    retentionWeekly:
        count: 0
        weekdays:
            - string
    retentionYearly:
        count: 0
        days:
            - 0
        includeLastDays: false
        months:
            - string
        weekdays:
            - string
        weeks:
            - string
    tieringPolicy:
        archivedRestorePoint:
            duration: 0
            durationType: string
            mode: string
    timezone: string
Copy

PolicyVM Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The PolicyVM resource accepts the following input properties:

Backup This property is required. PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
RecoveryVaultName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
InstantRestoreRetentionDays int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

Name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
PolicyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
RetentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
RetentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
RetentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
RetentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
TieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
Timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
Backup This property is required. PolicyVMBackupArgs
Configures the Policy backup frequency, times & days as documented in the backup block below.
RecoveryVaultName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroupArgs
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
InstantRestoreRetentionDays int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

Name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
PolicyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
RetentionDaily PolicyVMRetentionDailyArgs
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
RetentionMonthly PolicyVMRetentionMonthlyArgs
Configures the policy monthly retention as documented in the retention_monthly block below.
RetentionWeekly PolicyVMRetentionWeeklyArgs
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
RetentionYearly PolicyVMRetentionYearlyArgs
Configures the policy yearly retention as documented in the retention_yearly block below.
TieringPolicy PolicyVMTieringPolicyArgs
A tiering_policy block as defined below.
Timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup This property is required. PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
recoveryVaultName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
instantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays Integer

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. String
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. String
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
retentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
timezone String
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup This property is required. PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
recoveryVaultName
This property is required.
Changes to this property will trigger replacement.
string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
instantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays number

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
retentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup This property is required. PolicyVMBackupArgs
Configures the Policy backup frequency, times & days as documented in the backup block below.
recovery_vault_name
This property is required.
Changes to this property will trigger replacement.
str
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
instant_restore_resource_group PolicyVMInstantRestoreResourceGroupArgs
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instant_restore_retention_days int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. str
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policy_type Changes to this property will trigger replacement. str
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
retention_daily PolicyVMRetentionDailyArgs
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retention_monthly PolicyVMRetentionMonthlyArgs
Configures the policy monthly retention as documented in the retention_monthly block below.
retention_weekly PolicyVMRetentionWeeklyArgs
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retention_yearly PolicyVMRetentionYearlyArgs
Configures the policy yearly retention as documented in the retention_yearly block below.
tiering_policy PolicyVMTieringPolicyArgs
A tiering_policy block as defined below.
timezone str
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup This property is required. Property Map
Configures the Policy backup frequency, times & days as documented in the backup block below.
recoveryVaultName
This property is required.
Changes to this property will trigger replacement.
String
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
instantRestoreResourceGroup Property Map
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays Number

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. String
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. String
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
retentionDaily Property Map
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly Property Map
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly Property Map
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly Property Map
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy Property Map
A tiering_policy block as defined below.
timezone String
Specifies the timezone. the possible values are defined here. Defaults to UTC

Outputs

All input properties are implicitly available as output properties. Additionally, the PolicyVM resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing PolicyVM Resource

Get an existing PolicyVM resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: PolicyVMState, opts?: CustomResourceOptions): PolicyVM
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup: Optional[PolicyVMBackupArgs] = None,
        instant_restore_resource_group: Optional[PolicyVMInstantRestoreResourceGroupArgs] = None,
        instant_restore_retention_days: Optional[int] = None,
        name: Optional[str] = None,
        policy_type: Optional[str] = None,
        recovery_vault_name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        retention_daily: Optional[PolicyVMRetentionDailyArgs] = None,
        retention_monthly: Optional[PolicyVMRetentionMonthlyArgs] = None,
        retention_weekly: Optional[PolicyVMRetentionWeeklyArgs] = None,
        retention_yearly: Optional[PolicyVMRetentionYearlyArgs] = None,
        tiering_policy: Optional[PolicyVMTieringPolicyArgs] = None,
        timezone: Optional[str] = None) -> PolicyVM
func GetPolicyVM(ctx *Context, name string, id IDInput, state *PolicyVMState, opts ...ResourceOption) (*PolicyVM, error)
public static PolicyVM Get(string name, Input<string> id, PolicyVMState? state, CustomResourceOptions? opts = null)
public static PolicyVM get(String name, Output<String> id, PolicyVMState state, CustomResourceOptions options)
resources:  _:    type: azure:backup:PolicyVM    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Backup PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
InstantRestoreRetentionDays int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

Name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
PolicyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
RecoveryVaultName Changes to this property will trigger replacement. string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
RetentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
RetentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
RetentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
RetentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
TieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
Timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
Backup PolicyVMBackupArgs
Configures the Policy backup frequency, times & days as documented in the backup block below.
InstantRestoreResourceGroup PolicyVMInstantRestoreResourceGroupArgs
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
InstantRestoreRetentionDays int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

Name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
PolicyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
RecoveryVaultName Changes to this property will trigger replacement. string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
RetentionDaily PolicyVMRetentionDailyArgs
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
RetentionMonthly PolicyVMRetentionMonthlyArgs
Configures the policy monthly retention as documented in the retention_monthly block below.
RetentionWeekly PolicyVMRetentionWeeklyArgs
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
RetentionYearly PolicyVMRetentionYearlyArgs
Configures the policy yearly retention as documented in the retention_yearly block below.
TieringPolicy PolicyVMTieringPolicyArgs
A tiering_policy block as defined below.
Timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
instantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays Integer

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. String
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. String
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
recoveryVaultName Changes to this property will trigger replacement. String
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
retentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
timezone String
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup PolicyVMBackup
Configures the Policy backup frequency, times & days as documented in the backup block below.
instantRestoreResourceGroup PolicyVMInstantRestoreResourceGroup
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays number

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. string
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
recoveryVaultName Changes to this property will trigger replacement. string
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
retentionDaily PolicyVMRetentionDaily
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly PolicyVMRetentionMonthly
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly PolicyVMRetentionWeekly
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly PolicyVMRetentionYearly
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy PolicyVMTieringPolicy
A tiering_policy block as defined below.
timezone string
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup PolicyVMBackupArgs
Configures the Policy backup frequency, times & days as documented in the backup block below.
instant_restore_resource_group PolicyVMInstantRestoreResourceGroupArgs
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instant_restore_retention_days int

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. str
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policy_type Changes to this property will trigger replacement. str
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
recovery_vault_name Changes to this property will trigger replacement. str
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
retention_daily PolicyVMRetentionDailyArgs
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retention_monthly PolicyVMRetentionMonthlyArgs
Configures the policy monthly retention as documented in the retention_monthly block below.
retention_weekly PolicyVMRetentionWeeklyArgs
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retention_yearly PolicyVMRetentionYearlyArgs
Configures the policy yearly retention as documented in the retention_yearly block below.
tiering_policy PolicyVMTieringPolicyArgs
A tiering_policy block as defined below.
timezone str
Specifies the timezone. the possible values are defined here. Defaults to UTC
backup Property Map
Configures the Policy backup frequency, times & days as documented in the backup block below.
instantRestoreResourceGroup Property Map
Specifies the instant restore resource group name as documented in the instant_restore_resource_group block below.
instantRestoreRetentionDays Number

Specifies the instant restore retention range in days. Possible values are between 1 and 5 when policy_type is V1, and 1 to 30 when policy_type is V2.

NOTE: instant_restore_retention_days must be set to 5 if the backup frequency is set to Weekly.

name Changes to this property will trigger replacement. String
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
policyType Changes to this property will trigger replacement. String
Type of the Backup Policy. Possible values are V1 and V2 where V2 stands for the Enhanced Policy. Defaults to V1. Changing this forces a new resource to be created.
recoveryVaultName Changes to this property will trigger replacement. String
Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
retentionDaily Property Map
Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.
retentionMonthly Property Map
Configures the policy monthly retention as documented in the retention_monthly block below.
retentionWeekly Property Map
Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.
retentionYearly Property Map
Configures the policy yearly retention as documented in the retention_yearly block below.
tieringPolicy Property Map
A tiering_policy block as defined below.
timezone String
Specifies the timezone. the possible values are defined here. Defaults to UTC

Supporting Types

PolicyVMBackup
, PolicyVMBackupArgs

Frequency This property is required. string
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
Time This property is required. string
The time of day to perform the backup in 24hour format.
HourDuration int

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

HourInterval int
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
Weekdays List<string>
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.
Frequency This property is required. string
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
Time This property is required. string
The time of day to perform the backup in 24hour format.
HourDuration int

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

HourInterval int
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
Weekdays []string
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.
frequency This property is required. String
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
time This property is required. String
The time of day to perform the backup in 24hour format.
hourDuration Integer

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

hourInterval Integer
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
weekdays List<String>
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.
frequency This property is required. string
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
time This property is required. string
The time of day to perform the backup in 24hour format.
hourDuration number

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

hourInterval number
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
weekdays string[]
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.
frequency This property is required. str
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
time This property is required. str
The time of day to perform the backup in 24hour format.
hour_duration int

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

hour_interval int
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
weekdays Sequence[str]
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.
frequency This property is required. String
Sets the backup frequency. Possible values are Hourly, Daily and Weekly.
time This property is required. String
The time of day to perform the backup in 24hour format.
hourDuration Number

Duration of the backup window in hours. Possible values are between 4 and 24 This is used when frequency is Hourly.

NOTE: hour_duration must be multiplier of hour_interval

hourInterval Number
Interval in hour at which backup is triggered. Possible values are 4, 6, 8 and 12. This is used when frequency is Hourly.
weekdays List<String>
The days of the week to perform backups on. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday. This is used when frequency is Weekly.

PolicyVMInstantRestoreResourceGroup
, PolicyVMInstantRestoreResourceGroupArgs

Prefix This property is required. string
The prefix for the instant_restore_resource_group name.
Suffix string
The suffix for the instant_restore_resource_group name.
Prefix This property is required. string
The prefix for the instant_restore_resource_group name.
Suffix string
The suffix for the instant_restore_resource_group name.
prefix This property is required. String
The prefix for the instant_restore_resource_group name.
suffix String
The suffix for the instant_restore_resource_group name.
prefix This property is required. string
The prefix for the instant_restore_resource_group name.
suffix string
The suffix for the instant_restore_resource_group name.
prefix This property is required. str
The prefix for the instant_restore_resource_group name.
suffix str
The suffix for the instant_restore_resource_group name.
prefix This property is required. String
The prefix for the instant_restore_resource_group name.
suffix String
The suffix for the instant_restore_resource_group name.

PolicyVMRetentionDaily
, PolicyVMRetentionDailyArgs

Count This property is required. int

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

Count This property is required. int

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

count This property is required. Integer

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

count This property is required. number

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

count This property is required. int

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

count This property is required. Number

The number of daily backups to keep. Must be between 7 and 9999.

Note: Azure previously allows this field to be set to a minimum of 1 (day) - but for new resources/to update this value on existing Backup Policies - this value must now be at least 7 (days).

PolicyVMRetentionMonthly
, PolicyVMRetentionMonthlyArgs

Count This property is required. int
The number of monthly backups to keep. Must be between 1 and 9999
Days List<int>
The days of the month to retain backups of. Must be between 1 and 31.
IncludeLastDays bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

Weekdays List<string>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
Weeks List<string>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
Count This property is required. int
The number of monthly backups to keep. Must be between 1 and 9999
Days []int
The days of the month to retain backups of. Must be between 1 and 31.
IncludeLastDays bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

Weekdays []string
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
Weeks []string
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. Integer
The number of monthly backups to keep. Must be between 1 and 9999
days List<Integer>
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays Boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays List<String>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks List<String>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. number
The number of monthly backups to keep. Must be between 1 and 9999
days number[]
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays string[]
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks string[]
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. int
The number of monthly backups to keep. Must be between 1 and 9999
days Sequence[int]
The days of the month to retain backups of. Must be between 1 and 31.
include_last_days bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays Sequence[str]
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks Sequence[str]
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. Number
The number of monthly backups to keep. Must be between 1 and 9999
days List<Number>
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays Boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays List<String>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks List<String>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.

PolicyVMRetentionWeekly
, PolicyVMRetentionWeeklyArgs

Count This property is required. int
The number of weekly backups to keep. Must be between 1 and 9999
Weekdays This property is required. List<string>
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
Count This property is required. int
The number of weekly backups to keep. Must be between 1 and 9999
Weekdays This property is required. []string
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
count This property is required. Integer
The number of weekly backups to keep. Must be between 1 and 9999
weekdays This property is required. List<String>
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
count This property is required. number
The number of weekly backups to keep. Must be between 1 and 9999
weekdays This property is required. string[]
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
count This property is required. int
The number of weekly backups to keep. Must be between 1 and 9999
weekdays This property is required. Sequence[str]
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
count This property is required. Number
The number of weekly backups to keep. Must be between 1 and 9999
weekdays This property is required. List<String>
The weekday backups to retain. Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

PolicyVMRetentionYearly
, PolicyVMRetentionYearlyArgs

Count This property is required. int
The number of yearly backups to keep. Must be between 1 and 9999
Months This property is required. List<string>
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
Days List<int>
The days of the month to retain backups of. Must be between 1 and 31.
IncludeLastDays bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

Weekdays List<string>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
Weeks List<string>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
Count This property is required. int
The number of yearly backups to keep. Must be between 1 and 9999
Months This property is required. []string
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
Days []int
The days of the month to retain backups of. Must be between 1 and 31.
IncludeLastDays bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

Weekdays []string
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
Weeks []string
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. Integer
The number of yearly backups to keep. Must be between 1 and 9999
months This property is required. List<String>
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
days List<Integer>
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays Boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays List<String>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks List<String>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. number
The number of yearly backups to keep. Must be between 1 and 9999
months This property is required. string[]
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
days number[]
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays string[]
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks string[]
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. int
The number of yearly backups to keep. Must be between 1 and 9999
months This property is required. Sequence[str]
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
days Sequence[int]
The days of the month to retain backups of. Must be between 1 and 31.
include_last_days bool

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays Sequence[str]
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks Sequence[str]
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.
count This property is required. Number
The number of yearly backups to keep. Must be between 1 and 9999
months This property is required. List<String>
The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, August, September, October, November and December.
days List<Number>
The days of the month to retain backups of. Must be between 1 and 31.
includeLastDays Boolean

Including the last day of the month, default to false.

NOTE:: Either weekdays and weeks or days and include_last_days must be specified.

weekdays List<String>
The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.
weeks List<String>
The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.

PolicyVMTieringPolicy
, PolicyVMTieringPolicyArgs

ArchivedRestorePoint This property is required. PolicyVMTieringPolicyArchivedRestorePoint
An archived_restore_point block as defined below.
ArchivedRestorePoint This property is required. PolicyVMTieringPolicyArchivedRestorePoint
An archived_restore_point block as defined below.
archivedRestorePoint This property is required. PolicyVMTieringPolicyArchivedRestorePoint
An archived_restore_point block as defined below.
archivedRestorePoint This property is required. PolicyVMTieringPolicyArchivedRestorePoint
An archived_restore_point block as defined below.
archived_restore_point This property is required. PolicyVMTieringPolicyArchivedRestorePoint
An archived_restore_point block as defined below.
archivedRestorePoint This property is required. Property Map
An archived_restore_point block as defined below.

PolicyVMTieringPolicyArchivedRestorePoint
, PolicyVMTieringPolicyArchivedRestorePointArgs

Mode This property is required. string
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
Duration int
The number of days/weeks/months/years to retain backups in current tier before tiering.
DurationType string
The retention duration type. Possible values are Days, Weeks, Months and Years.
Mode This property is required. string
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
Duration int
The number of days/weeks/months/years to retain backups in current tier before tiering.
DurationType string
The retention duration type. Possible values are Days, Weeks, Months and Years.
mode This property is required. String
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
duration Integer
The number of days/weeks/months/years to retain backups in current tier before tiering.
durationType String
The retention duration type. Possible values are Days, Weeks, Months and Years.
mode This property is required. string
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
duration number
The number of days/weeks/months/years to retain backups in current tier before tiering.
durationType string
The retention duration type. Possible values are Days, Weeks, Months and Years.
mode This property is required. str
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
duration int
The number of days/weeks/months/years to retain backups in current tier before tiering.
duration_type str
The retention duration type. Possible values are Days, Weeks, Months and Years.
mode This property is required. String
The tiering mode to control automatic tiering of recovery points. Possible values are TierAfter and TierRecommended.
duration Number
The number of days/weeks/months/years to retain backups in current tier before tiering.
durationType String
The retention duration type. Possible values are Days, Weeks, Months and Years.

Import

VM Backup Policies can be imported using the resource id, e.g.

$ pulumi import azure:backup/policyVM:PolicyVM policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupPolicies/policy1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.