PolicyVM
Manages an Azure Backup VM Backup Policy.
Create a PolicyVM Resource
new PolicyVM(name: string, args: PolicyVMArgs, opts?: CustomResourceOptions);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
Policy
VMBackup Args Configures the Policy backup frequency, times & days as documented in the
backupblock below.- Recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName 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.
- Retention
Daily PolicyVMRetention Daily Args Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- Retention
Monthly PolicyVMRetention Monthly Args Configures the policy monthly retention as documented in the
retention_monthlyblock below.- Retention
Weekly PolicyVMRetention Weekly Args Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- Retention
Yearly PolicyVMRetention Yearly Args Configures the policy yearly retention as documented in the
retention_yearlyblock below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Timezone string
Specifies the timezone. Defaults to
UTC
- Backup
Policy
VMBackup Configures the Policy backup frequency, times & days as documented in the
backupblock below.- Recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName 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.
- Retention
Daily PolicyVMRetention Daily Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- Retention
Monthly PolicyVMRetention Monthly Configures the policy monthly retention as documented in the
retention_monthlyblock below.- Retention
Weekly PolicyVMRetention Weekly Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- Retention
Yearly PolicyVMRetention Yearly Configures the policy yearly retention as documented in the
retention_yearlyblock below.- map[string]string
A mapping of tags to assign to the resource.
- Timezone string
Specifies the timezone. Defaults to
UTC
- backup
Policy
VMBackup Configures the Policy backup frequency, times & days as documented in the
backupblock below.- recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group stringName 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.
- retention
Daily PolicyVMRetention Daily Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- retention
Monthly PolicyVMRetention Monthly Configures the policy monthly retention as documented in the
retention_monthlyblock below.- retention
Weekly PolicyVMRetention Weekly Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- retention
Yearly PolicyVMRetention Yearly Configures the policy yearly retention as documented in the
retention_yearlyblock below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- timezone string
Specifies the timezone. Defaults to
UTC
- backup
Dict[Policy
VMBackup] Configures the Policy backup frequency, times & days as documented in the
backupblock below.- recovery_
vault_ strname Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource_
group_ strname 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[PolicyVMRetention Daily] Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- retention_
monthly Dict[PolicyVMRetention Monthly] Configures the policy monthly retention as documented in the
retention_monthlyblock below.- retention_
weekly Dict[PolicyVMRetention Weekly] Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- retention_
yearly Dict[PolicyVMRetention Yearly] Configures the policy yearly retention as documented in the
retention_yearlyblock below.- 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:
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): PolicyVMstatic 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
Policy
VMBackup Args Configures the Policy backup frequency, times & days as documented in the
backupblock below.- Name string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
- Recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
- Retention
Daily PolicyVMRetention Daily Args Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- Retention
Monthly PolicyVMRetention Monthly Args Configures the policy monthly retention as documented in the
retention_monthlyblock below.- Retention
Weekly PolicyVMRetention Weekly Args Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- Retention
Yearly PolicyVMRetention Yearly Args Configures the policy yearly retention as documented in the
retention_yearlyblock below.- Dictionary<string, string>
A mapping of tags to assign to the resource.
- Timezone string
Specifies the timezone. Defaults to
UTC
- Backup
Policy
VMBackup Configures the Policy backup frequency, times & days as documented in the
backupblock below.- Name string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
- Recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- Resource
Group stringName The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
- Retention
Daily PolicyVMRetention Daily Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- Retention
Monthly PolicyVMRetention Monthly Configures the policy monthly retention as documented in the
retention_monthlyblock below.- Retention
Weekly PolicyVMRetention Weekly Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- Retention
Yearly PolicyVMRetention Yearly Configures the policy yearly retention as documented in the
retention_yearlyblock below.- map[string]string
A mapping of tags to assign to the resource.
- Timezone string
Specifies the timezone. Defaults to
UTC
- backup
Policy
VMBackup Configures the Policy backup frequency, times & days as documented in the
backupblock below.- name string
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
- recovery
Vault stringName Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource
Group stringName The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
- retention
Daily PolicyVMRetention Daily Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- retention
Monthly PolicyVMRetention Monthly Configures the policy monthly retention as documented in the
retention_monthlyblock below.- retention
Weekly PolicyVMRetention Weekly Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- retention
Yearly PolicyVMRetention Yearly Configures the policy yearly retention as documented in the
retention_yearlyblock below.- {[key: string]: string}
A mapping of tags to assign to the resource.
- timezone string
Specifies the timezone. Defaults to
UTC
- backup
Dict[Policy
VMBackup] Configures the Policy backup frequency, times & days as documented in the
backupblock below.- name str
Specifies the name of the Backup Policy. Changing this forces a new resource to be created.
- recovery_
vault_ strname Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.
- resource_
group_ strname The name of the resource group in which to create the policy. Changing this forces a new resource to be created.
- retention_
daily Dict[PolicyVMRetention Daily] Configures the policy daily retention as documented in the
retention_dailyblock below. Required when backup frequency isDaily.- retention_
monthly Dict[PolicyVMRetention Monthly] Configures the policy monthly retention as documented in the
retention_monthlyblock below.- retention_
weekly Dict[PolicyVMRetention Weekly] Configures the policy weekly retention as documented in the
retention_weeklyblock below. Required when backup frequency isWeekly.- retention_
yearly Dict[PolicyVMRetention Yearly] Configures the policy yearly retention as documented in the
retention_yearlyblock below.- Dict[str, str]
A mapping of tags to assign to the resource.
- timezone str
Specifies the timezone. Defaults to
UTC
Supporting Types
PolicyVMBackup
PolicyVMRetentionDaily
PolicyVMRetentionMonthly
- Count int
The number of yearly backups to keep. Must be between
1and9999- Weekdays List<string>
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- Weekdays []string
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- weekdays string[]
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- weekdays List[str]
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- weeks List[str]
The weeks of the month to retain backups of. Must be one of
First,Second,Third,Fourth,Last.
PolicyVMRetentionWeekly
- Count int
The number of yearly backups to keep. Must be between
1and9999- Weekdays List<string>
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.
PolicyVMRetentionYearly
- Count int
The number of yearly backups to keep. Must be between
1and9999- 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,NovemberandDecember.- Weekdays List<string>
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- 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,NovemberandDecember.- Weekdays []string
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- 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,NovemberandDecember.- weekdays string[]
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
1and9999- 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,NovemberandDecember.- weekdays List[str]
The weekday backups to retain . Must be one of
Sunday,Monday,Tuesday,Wednesday,Thursday,FridayorSaturday.- 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
azurermTerraform Provider.