ReplicationPolicy
Manages a Azure Site Recovery replication policy within a recovery vault. Replication policies define the frequency at which recovery points are created and how long they are stored.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var secondary = new Azure.Core.ResourceGroup("secondary", new Azure.Core.ResourceGroupArgs
{
Location = "East US",
});
var vault = new Azure.RecoveryServices.Vault("vault", new Azure.RecoveryServices.VaultArgs
{
Location = secondary.Location,
ResourceGroupName = secondary.Name,
Sku = "Standard",
});
var policy = new Azure.SiteRecovery.ReplicationPolicy("policy", new Azure.SiteRecovery.ReplicationPolicyArgs
{
ResourceGroupName = secondary.Name,
RecoveryVaultName = vault.Name,
RecoveryPointRetentionInMinutes = 24 * 60,
ApplicationConsistentSnapshotFrequencyInMinutes = 4 * 60,
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/recoveryservices"
"github.com/pulumi/pulumi-azure/sdk/v3/go/azure/siterecovery"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
secondary, err := core.NewResourceGroup(ctx, "secondary", &core.ResourceGroupArgs{
Location: pulumi.String("East US"),
})
if err != nil {
return err
}
vault, err := recoveryservices.NewVault(ctx, "vault", &recoveryservices.VaultArgs{
Location: secondary.Location,
ResourceGroupName: secondary.Name,
Sku: pulumi.String("Standard"),
})
if err != nil {
return err
}
_, err = siterecovery.NewReplicationPolicy(ctx, "policy", &siterecovery.ReplicationPolicyArgs{
ResourceGroupName: secondary.Name,
RecoveryVaultName: vault.Name,
RecoveryPointRetentionInMinutes: pulumi.Int(24 * 60),
ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(4 * 60),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_azure as azure
secondary = azure.core.ResourceGroup("secondary", location="East US")
vault = azure.recoveryservices.Vault("vault",
location=secondary.location,
resource_group_name=secondary.name,
sku="Standard")
policy = azure.siterecovery.ReplicationPolicy("policy",
resource_group_name=secondary.name,
recovery_vault_name=vault.name,
recovery_point_retention_in_minutes=24 * 60,
application_consistent_snapshot_frequency_in_minutes=4 * 60)import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const secondary = new azure.core.ResourceGroup("secondary", {location: "East US"});
const vault = new azure.recoveryservices.Vault("vault", {
location: secondary.location,
resourceGroupName: secondary.name,
sku: "Standard",
});
const policy = new azure.siterecovery.ReplicationPolicy("policy", {
resourceGroupName: secondary.name,
recoveryVaultName: vault.name,
recoveryPointRetentionInMinutes: 24 * 60,
applicationConsistentSnapshotFrequencyInMinutes: 4 * 60,
});Create a ReplicationPolicy Resource
new ReplicationPolicy(name: string, args: ReplicationPolicyArgs, opts?: CustomResourceOptions);def ReplicationPolicy(resource_name, opts=None, application_consistent_snapshot_frequency_in_minutes=None, name=None, recovery_point_retention_in_minutes=None, recovery_vault_name=None, resource_group_name=None, __props__=None);func NewReplicationPolicy(ctx *Context, name string, args ReplicationPolicyArgs, opts ...ResourceOption) (*ReplicationPolicy, error)public ReplicationPolicy(string name, ReplicationPolicyArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ReplicationPolicyArgs
- 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 ReplicationPolicyArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ReplicationPolicyArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ReplicationPolicy Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ReplicationPolicy resource accepts the following input properties:
- Application
Consistent intSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- Recovery
Point intRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName The name of the vault that should be updated.
- Resource
Group stringName Name of the resource group where the vault that should be updated is located.
- Name string
The name of the network mapping.
- Application
Consistent intSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- Recovery
Point intRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName The name of the vault that should be updated.
- Resource
Group stringName Name of the resource group where the vault that should be updated is located.
- Name string
The name of the network mapping.
- application
Consistent numberSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- recovery
Point numberRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- recovery
Vault stringName The name of the vault that should be updated.
- resource
Group stringName Name of the resource group where the vault that should be updated is located.
- name string
The name of the network mapping.
- application_
consistent_ floatsnapshot_ frequency_ in_ minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- recovery_
point_ floatretention_ in_ minutes The duration in minutes for which the recovery points need to be stored.
- recovery_
vault_ strname The name of the vault that should be updated.
- resource_
group_ strname Name of the resource group where the vault that should be updated is located.
- name str
The name of the network mapping.
Outputs
All input properties are implicitly available as output properties. Additionally, the ReplicationPolicy resource produces the following output properties:
Look up an Existing ReplicationPolicy Resource
Get an existing ReplicationPolicy 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?: ReplicationPolicyState, opts?: CustomResourceOptions): ReplicationPolicystatic get(resource_name, id, opts=None, application_consistent_snapshot_frequency_in_minutes=None, name=None, recovery_point_retention_in_minutes=None, recovery_vault_name=None, resource_group_name=None, __props__=None);func GetReplicationPolicy(ctx *Context, name string, id IDInput, state *ReplicationPolicyState, opts ...ResourceOption) (*ReplicationPolicy, error)public static ReplicationPolicy Get(string name, Input<string> id, ReplicationPolicyState? 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:
- Application
Consistent intSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- Name string
The name of the network mapping.
- Recovery
Point intRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName The name of the vault that should be updated.
- Resource
Group stringName Name of the resource group where the vault that should be updated is located.
- Application
Consistent intSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- Name string
The name of the network mapping.
- Recovery
Point intRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName The name of the vault that should be updated.
- Resource
Group stringName Name of the resource group where the vault that should be updated is located.
- application
Consistent numberSnapshot Frequency In Minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- name string
The name of the network mapping.
- recovery
Point numberRetention In Minutes The duration in minutes for which the recovery points need to be stored.
- recovery
Vault stringName The name of the vault that should be updated.
- resource
Group stringName Name of the resource group where the vault that should be updated is located.
- application_
consistent_ floatsnapshot_ frequency_ in_ minutes Specifies the frequency(in minutes) at which to create application consistent recovery points.
- name str
The name of the network mapping.
- recovery_
point_ floatretention_ in_ minutes The duration in minutes for which the recovery points need to be stored.
- recovery_
vault_ strname The name of the vault that should be updated.
- resource_
group_ strname Name of the resource group where the vault that should be updated is located.
Package Details
- Repository
- https://github.com/pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurermTerraform Provider.