1. Packages
  2. Azure Classic
  3. API Docs
  4. siterecovery
  5. VMWareReplicationPolicy

We recommend using Azure Native.

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

azure.siterecovery.VMWareReplicationPolicy

Explore with Pulumi AI

Manages a VMWare Replication Policy.

Example Usage

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

const example = new azure.core.ResourceGroup("example", {
    name: "example-rg",
    location: "eastus",
});
const exampleVault = new azure.recoveryservices.Vault("example", {
    name: "example-vault",
    location: example.location,
    resourceGroupName: example.name,
    sku: "Standard",
    classicVmwareReplicationEnabled: true,
    softDeleteEnabled: false,
});
const exampleVMWareReplicationPolicy = new azure.siterecovery.VMWareReplicationPolicy("example", {
    name: "example-policy",
    recoveryVaultId: exampleVault.id,
    recoveryPointRetentionInMinutes: 1440,
    applicationConsistentSnapshotFrequencyInMinutes: 240,
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="example-rg",
    location="eastus")
example_vault = azure.recoveryservices.Vault("example",
    name="example-vault",
    location=example.location,
    resource_group_name=example.name,
    sku="Standard",
    classic_vmware_replication_enabled=True,
    soft_delete_enabled=False)
example_vm_ware_replication_policy = azure.siterecovery.VMWareReplicationPolicy("example",
    name="example-policy",
    recovery_vault_id=example_vault.id,
    recovery_point_retention_in_minutes=1440,
    application_consistent_snapshot_frequency_in_minutes=240)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/siterecovery"
	"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("example-rg"),
			Location: pulumi.String("eastus"),
		})
		if err != nil {
			return err
		}
		exampleVault, err := recoveryservices.NewVault(ctx, "example", &recoveryservices.VaultArgs{
			Name:                            pulumi.String("example-vault"),
			Location:                        example.Location,
			ResourceGroupName:               example.Name,
			Sku:                             pulumi.String("Standard"),
			ClassicVmwareReplicationEnabled: pulumi.Bool(true),
			SoftDeleteEnabled:               pulumi.Bool(false),
		})
		if err != nil {
			return err
		}
		_, err = siterecovery.NewVMWareReplicationPolicy(ctx, "example", &siterecovery.VMWareReplicationPolicyArgs{
			Name:                            pulumi.String("example-policy"),
			RecoveryVaultId:                 exampleVault.ID(),
			RecoveryPointRetentionInMinutes: pulumi.Int(1440),
			ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(240),
		})
		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 = "example-rg",
        Location = "eastus",
    });

    var exampleVault = new Azure.RecoveryServices.Vault("example", new()
    {
        Name = "example-vault",
        Location = example.Location,
        ResourceGroupName = example.Name,
        Sku = "Standard",
        ClassicVmwareReplicationEnabled = true,
        SoftDeleteEnabled = false,
    });

    var exampleVMWareReplicationPolicy = new Azure.SiteRecovery.VMWareReplicationPolicy("example", new()
    {
        Name = "example-policy",
        RecoveryVaultId = exampleVault.Id,
        RecoveryPointRetentionInMinutes = 1440,
        ApplicationConsistentSnapshotFrequencyInMinutes = 240,
    });

});
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.siterecovery.VMWareReplicationPolicy;
import com.pulumi.azure.siterecovery.VMWareReplicationPolicyArgs;
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("example-rg")
            .location("eastus")
            .build());

        var exampleVault = new Vault("exampleVault", VaultArgs.builder()
            .name("example-vault")
            .location(example.location())
            .resourceGroupName(example.name())
            .sku("Standard")
            .classicVmwareReplicationEnabled(true)
            .softDeleteEnabled(false)
            .build());

        var exampleVMWareReplicationPolicy = new VMWareReplicationPolicy("exampleVMWareReplicationPolicy", VMWareReplicationPolicyArgs.builder()
            .name("example-policy")
            .recoveryVaultId(exampleVault.id())
            .recoveryPointRetentionInMinutes(1440)
            .applicationConsistentSnapshotFrequencyInMinutes(240)
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: example-rg
      location: eastus
  exampleVault:
    type: azure:recoveryservices:Vault
    name: example
    properties:
      name: example-vault
      location: ${example.location}
      resourceGroupName: ${example.name}
      sku: Standard
      classicVmwareReplicationEnabled: true
      softDeleteEnabled: false
  exampleVMWareReplicationPolicy:
    type: azure:siterecovery:VMWareReplicationPolicy
    name: example
    properties:
      name: example-policy
      recoveryVaultId: ${exampleVault.id}
      recoveryPointRetentionInMinutes: 1440
      applicationConsistentSnapshotFrequencyInMinutes: 240
Copy

Create VMWareReplicationPolicy Resource

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

Constructor syntax

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

@overload
def VMWareReplicationPolicy(resource_name: str,
                            opts: Optional[ResourceOptions] = None,
                            application_consistent_snapshot_frequency_in_minutes: Optional[int] = None,
                            recovery_point_retention_in_minutes: Optional[int] = None,
                            recovery_vault_id: Optional[str] = None,
                            name: Optional[str] = None)
func NewVMWareReplicationPolicy(ctx *Context, name string, args VMWareReplicationPolicyArgs, opts ...ResourceOption) (*VMWareReplicationPolicy, error)
public VMWareReplicationPolicy(string name, VMWareReplicationPolicyArgs args, CustomResourceOptions? opts = null)
public VMWareReplicationPolicy(String name, VMWareReplicationPolicyArgs args)
public VMWareReplicationPolicy(String name, VMWareReplicationPolicyArgs args, CustomResourceOptions options)
type: azure:siterecovery:VMWareReplicationPolicy
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. VMWareReplicationPolicyArgs
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. VMWareReplicationPolicyArgs
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. VMWareReplicationPolicyArgs
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. VMWareReplicationPolicyArgs
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. VMWareReplicationPolicyArgs
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 vmwareReplicationPolicyResource = new Azure.SiteRecovery.VMWareReplicationPolicy("vmwareReplicationPolicyResource", new()
{
    ApplicationConsistentSnapshotFrequencyInMinutes = 0,
    RecoveryPointRetentionInMinutes = 0,
    RecoveryVaultId = "string",
    Name = "string",
});
Copy
example, err := siterecovery.NewVMWareReplicationPolicy(ctx, "vmwareReplicationPolicyResource", &siterecovery.VMWareReplicationPolicyArgs{
	ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(0),
	RecoveryPointRetentionInMinutes:                 pulumi.Int(0),
	RecoveryVaultId:                                 pulumi.String("string"),
	Name:                                            pulumi.String("string"),
})
Copy
var vmwareReplicationPolicyResource = new VMWareReplicationPolicy("vmwareReplicationPolicyResource", VMWareReplicationPolicyArgs.builder()
    .applicationConsistentSnapshotFrequencyInMinutes(0)
    .recoveryPointRetentionInMinutes(0)
    .recoveryVaultId("string")
    .name("string")
    .build());
Copy
vmware_replication_policy_resource = azure.siterecovery.VMWareReplicationPolicy("vmwareReplicationPolicyResource",
    application_consistent_snapshot_frequency_in_minutes=0,
    recovery_point_retention_in_minutes=0,
    recovery_vault_id="string",
    name="string")
Copy
const vmwareReplicationPolicyResource = new azure.siterecovery.VMWareReplicationPolicy("vmwareReplicationPolicyResource", {
    applicationConsistentSnapshotFrequencyInMinutes: 0,
    recoveryPointRetentionInMinutes: 0,
    recoveryVaultId: "string",
    name: "string",
});
Copy
type: azure:siterecovery:VMWareReplicationPolicy
properties:
    applicationConsistentSnapshotFrequencyInMinutes: 0
    name: string
    recoveryPointRetentionInMinutes: 0
    recoveryVaultId: string
Copy

VMWareReplicationPolicy 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 VMWareReplicationPolicy resource accepts the following input properties:

ApplicationConsistentSnapshotFrequencyInMinutes This property is required. int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
RecoveryPointRetentionInMinutes This property is required. int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
RecoveryVaultId
This property is required.
Changes to this property will trigger replacement.
string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
ApplicationConsistentSnapshotFrequencyInMinutes This property is required. int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
RecoveryPointRetentionInMinutes This property is required. int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
RecoveryVaultId
This property is required.
Changes to this property will trigger replacement.
string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
Name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes This property is required. Integer
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
recoveryPointRetentionInMinutes This property is required. Integer
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId
This property is required.
Changes to this property will trigger replacement.
String
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes This property is required. number
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
recoveryPointRetentionInMinutes This property is required. number
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId
This property is required.
Changes to this property will trigger replacement.
string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
application_consistent_snapshot_frequency_in_minutes This property is required. int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
recovery_point_retention_in_minutes This property is required. int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recovery_vault_id
This property is required.
Changes to this property will trigger replacement.
str
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
name Changes to this property will trigger replacement. str
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes This property is required. Number
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
recoveryPointRetentionInMinutes This property is required. Number
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId
This property is required.
Changes to this property will trigger replacement.
String
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
name Changes to this property will trigger replacement. String
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.

Outputs

All input properties are implicitly available as output properties. Additionally, the VMWareReplicationPolicy 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 VMWareReplicationPolicy Resource

Get an existing VMWareReplicationPolicy 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?: VMWareReplicationPolicyState, opts?: CustomResourceOptions): VMWareReplicationPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        application_consistent_snapshot_frequency_in_minutes: Optional[int] = None,
        name: Optional[str] = None,
        recovery_point_retention_in_minutes: Optional[int] = None,
        recovery_vault_id: Optional[str] = None) -> VMWareReplicationPolicy
func GetVMWareReplicationPolicy(ctx *Context, name string, id IDInput, state *VMWareReplicationPolicyState, opts ...ResourceOption) (*VMWareReplicationPolicy, error)
public static VMWareReplicationPolicy Get(string name, Input<string> id, VMWareReplicationPolicyState? state, CustomResourceOptions? opts = null)
public static VMWareReplicationPolicy get(String name, Output<String> id, VMWareReplicationPolicyState state, CustomResourceOptions options)
resources:  _:    type: azure:siterecovery:VMWareReplicationPolicy    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:
ApplicationConsistentSnapshotFrequencyInMinutes int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
Name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
RecoveryPointRetentionInMinutes int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
RecoveryVaultId Changes to this property will trigger replacement. string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
ApplicationConsistentSnapshotFrequencyInMinutes int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
Name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
RecoveryPointRetentionInMinutes int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
RecoveryVaultId Changes to this property will trigger replacement. string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes Integer
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
name Changes to this property will trigger replacement. String
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
recoveryPointRetentionInMinutes Integer
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId Changes to this property will trigger replacement. String
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes number
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
name Changes to this property will trigger replacement. string
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
recoveryPointRetentionInMinutes number
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId Changes to this property will trigger replacement. string
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
application_consistent_snapshot_frequency_in_minutes int
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
name Changes to this property will trigger replacement. str
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
recovery_point_retention_in_minutes int
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recovery_vault_id Changes to this property will trigger replacement. str
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
applicationConsistentSnapshotFrequencyInMinutes Number
Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
name Changes to this property will trigger replacement. String
The name which should be used for this Classic Replication Policy. Changing this forces a new Replication Policy to be created.
recoveryPointRetentionInMinutes Number
Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
recoveryVaultId Changes to this property will trigger replacement. String
ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.

Import

VMWare Replication Policy can be imported using the resource id, e.g.

$ pulumi import azure:siterecovery/vMWareReplicationPolicy:VMWareReplicationPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/vault1/providers/Microsoft.RecoveryServices/vaults/vault1/replicationPolicies/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.