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

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.siterecovery.VMWareReplicationPolicy

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    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,
    });
    
    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)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/recoveryservices"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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
    	})
    }
    
    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,
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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 string
    The unique name of the resource.
    args VMWareReplicationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args VMWareReplicationPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VMWareReplicationPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VMWareReplicationPolicyArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    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",
    });
    
    example, err := siterecovery.NewVMWareReplicationPolicy(ctx, "vmwareReplicationPolicyResource", &siterecovery.VMWareReplicationPolicyArgs{
    	ApplicationConsistentSnapshotFrequencyInMinutes: pulumi.Int(0),
    	RecoveryPointRetentionInMinutes:                 pulumi.Int(0),
    	RecoveryVaultId:                                 pulumi.String("string"),
    	Name:                                            pulumi.String("string"),
    })
    
    var vmwareReplicationPolicyResource = new VMWareReplicationPolicy("vmwareReplicationPolicyResource", VMWareReplicationPolicyArgs.builder()        
        .applicationConsistentSnapshotFrequencyInMinutes(0)
        .recoveryPointRetentionInMinutes(0)
        .recoveryVaultId("string")
        .name("string")
        .build());
    
    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")
    
    const vmwareReplicationPolicyResource = new azure.siterecovery.VMWareReplicationPolicy("vmwareReplicationPolicyResource", {
        applicationConsistentSnapshotFrequencyInMinutes: 0,
        recoveryPointRetentionInMinutes: 0,
        recoveryVaultId: "string",
        name: "string",
    });
    
    type: azure:siterecovery:VMWareReplicationPolicy
    properties:
        applicationConsistentSnapshotFrequencyInMinutes: 0
        name: string
        recoveryPointRetentionInMinutes: 0
        recoveryVaultId: string
    

    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

    The VMWareReplicationPolicy resource accepts the following input properties:

    ApplicationConsistentSnapshotFrequencyInMinutes int
    Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
    RecoveryPointRetentionInMinutes int
    Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
    RecoveryVaultId string
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    Name string
    The name which should be used for this Classic Replication Policy. 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.
    RecoveryPointRetentionInMinutes int
    Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
    RecoveryVaultId string
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    Name string
    The name which should be used for this Classic Replication Policy. 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.
    recoveryPointRetentionInMinutes Integer
    Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
    recoveryVaultId String
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    name String
    The name which should be used for this Classic Replication Policy. 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.
    recoveryPointRetentionInMinutes number
    Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
    recoveryVaultId string
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    name 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 int
    Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
    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 str
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    name str
    The name which should be used for this Classic Replication Policy. 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.
    recoveryPointRetentionInMinutes Number
    Specifies the period up to which the recovery points will be retained. Must between 0 to 21600.
    recoveryVaultId String
    ID of the Recovery Services Vault. Changing this forces a new Replication Policy to be created.
    name 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)
    Resource lookup is not supported in YAML
    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.
    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:
    ApplicationConsistentSnapshotFrequencyInMinutes int
    Specifies the frequency at which to create application consistent recovery points. Must between 0 to 720.
    Name 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 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 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 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 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 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 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 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 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 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 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 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
    

    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.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi