PolicyVM

Manages an Azure Backup VM Backup Policy.

Create a PolicyVM Resource

def PolicyVM(resource_name, opts=None, backup=None, name=None, recovery_vault_name=None, resource_group_name=None, retention_daily=None, retention_monthly=None, retention_weekly=None, retention_yearly=None, tags=None, timezone=None, __props__=None);
func NewPolicyVM(ctx *Context, name string, args PolicyVMArgs, opts ...ResourceOption) (*PolicyVM, error)
public PolicyVM(string name, PolicyVMArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args PolicyVMArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args PolicyVMArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args PolicyVMArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

PolicyVM Resource Properties

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

Inputs

The PolicyVM resource accepts the following input properties:

Backup PolicyVMBackupArgs

Configures the Policy backup frequency, times & days as documented in the backup block below.

RecoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the policy. Changing this forces a new resource to be created.

Name string

Specifies the name of the Backup 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.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

Timezone string

Specifies the timezone. Defaults to UTC

Backup PolicyVMBackup

Configures the Policy backup frequency, times & days as documented in the backup block below.

RecoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

ResourceGroupName string

The name of the resource group in which to create the policy. Changing this forces a new resource to be created.

Name string

Specifies the name of the Backup 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.

Tags map[string]string

A mapping of tags to assign to the resource.

Timezone string

Specifies the timezone. Defaults to UTC

backup PolicyVMBackup

Configures the Policy backup frequency, times & days as documented in the backup block below.

recoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

resourceGroupName string

The name of the resource group in which to create the policy. Changing this forces a new resource to be created.

name string

Specifies the name of the Backup 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.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

timezone string

Specifies the timezone. Defaults to UTC

backup Dict[PolicyVMBackup]

Configures the Policy backup frequency, times & days as documented in the backup block below.

recovery_vault_name str

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the policy. Changing this forces a new resource to be created.

name str

Specifies the name of the Backup Policy. Changing this forces a new resource to be created.

retention_daily Dict[PolicyVMRetentionDaily]

Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.

retention_monthly Dict[PolicyVMRetentionMonthly]

Configures the policy monthly retention as documented in the retention_monthly block below.

retention_weekly Dict[PolicyVMRetentionWeekly]

Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.

retention_yearly Dict[PolicyVMRetentionYearly]

Configures the policy yearly retention as documented in the retention_yearly block below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

timezone str

Specifies the timezone. 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 str
The provider-assigned unique ID for this managed resource.

Look up an 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
static get(resource_name, id, opts=None, backup=None, name=None, recovery_vault_name=None, resource_group_name=None, retention_daily=None, retention_monthly=None, retention_weekly=None, retention_yearly=None, tags=None, timezone=None, __props__=None);
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)
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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 PolicyVMBackupArgs

Configures the Policy backup frequency, times & days as documented in the backup block below.

Name string

Specifies the name of the Backup Policy. Changing this forces a new resource to be created.

RecoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

ResourceGroupName 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.

Tags Dictionary<string, string>

A mapping of tags to assign to the resource.

Timezone string

Specifies the timezone. Defaults to UTC

Backup PolicyVMBackup

Configures the Policy backup frequency, times & days as documented in the backup block below.

Name string

Specifies the name of the Backup Policy. Changing this forces a new resource to be created.

RecoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

ResourceGroupName 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.

Tags map[string]string

A mapping of tags to assign to the resource.

Timezone string

Specifies the timezone. Defaults to UTC

backup PolicyVMBackup

Configures the Policy backup frequency, times & days as documented in the backup block below.

name string

Specifies the name of the Backup Policy. Changing this forces a new resource to be created.

recoveryVaultName string

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

resourceGroupName 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.

tags {[key: string]: string}

A mapping of tags to assign to the resource.

timezone string

Specifies the timezone. Defaults to UTC

backup Dict[PolicyVMBackup]

Configures the Policy backup frequency, times & days as documented in the backup block below.

name str

Specifies the name of the Backup Policy. Changing this forces a new resource to be created.

recovery_vault_name str

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

resource_group_name str

The name of the resource group in which to create the policy. Changing this forces a new resource to be created.

retention_daily Dict[PolicyVMRetentionDaily]

Configures the policy daily retention as documented in the retention_daily block below. Required when backup frequency is Daily.

retention_monthly Dict[PolicyVMRetentionMonthly]

Configures the policy monthly retention as documented in the retention_monthly block below.

retention_weekly Dict[PolicyVMRetentionWeekly]

Configures the policy weekly retention as documented in the retention_weekly block below. Required when backup frequency is Weekly.

retention_yearly Dict[PolicyVMRetentionYearly]

Configures the policy yearly retention as documented in the retention_yearly block below.

tags Dict[str, str]

A mapping of tags to assign to the resource.

timezone str

Specifies the timezone. Defaults to UTC

Supporting Types

PolicyVMBackup

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Frequency string

Sets the backup frequency. Must be either Daily orWeekly.

Time string

The time of day to perform the backup in 24hour format.

Weekdays List<string>

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

Frequency string

Sets the backup frequency. Must be either Daily orWeekly.

Time string

The time of day to perform the backup in 24hour format.

Weekdays []string

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

frequency string

Sets the backup frequency. Must be either Daily orWeekly.

time string

The time of day to perform the backup in 24hour format.

weekdays string[]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

frequency str

Sets the backup frequency. Must be either Daily orWeekly.

time str

The time of day to perform the backup in 24hour format.

weekdays List[str]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

PolicyVMRetentionDaily

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Count int

The number of yearly backups to keep. Must be between 1 and 9999

Count int

The number of yearly backups to keep. Must be between 1 and 9999

count number

The number of yearly backups to keep. Must be between 1 and 9999

count float

The number of yearly backups to keep. Must be between 1 and 9999

PolicyVMRetentionMonthly

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Count int

The number of yearly backups to keep. Must be between 1 and 9999

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 int

The number of yearly backups to keep. Must be between 1 and 9999

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 number

The number of yearly backups to keep. Must be between 1 and 9999

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 float

The number of yearly backups to keep. Must be between 1 and 9999

weekdays List[str]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

weeks List[str]

The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.

PolicyVMRetentionWeekly

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Count int

The number of yearly backups to keep. Must be between 1 and 9999

Weekdays List<string>

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

Count int

The number of yearly backups to keep. Must be between 1 and 9999

Weekdays []string

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

count number

The number of yearly backups to keep. Must be between 1 and 9999

weekdays string[]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

count float

The number of yearly backups to keep. Must be between 1 and 9999

weekdays List[str]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

PolicyVMRetentionYearly

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Count int

The number of yearly backups to keep. Must be between 1 and 9999

Months List<string>

The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, Augest, September, October, November and December.

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 int

The number of yearly backups to keep. Must be between 1 and 9999

Months []string

The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, Augest, September, October, November and December.

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 number

The number of yearly backups to keep. Must be between 1 and 9999

months string[]

The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, Augest, September, October, November and December.

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 float

The number of yearly backups to keep. Must be between 1 and 9999

months List[str]

The months of the year to retain backups of. Must be one of January, February, March, April, May, June, July, Augest, September, October, November and December.

weekdays List[str]

The weekday backups to retain . Must be one of Sunday, Monday, Tuesday, Wednesday, Thursday, Friday or Saturday.

weeks List[str]

The weeks of the month to retain backups of. Must be one of First, Second, Third, Fourth, Last.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.