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

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi
azure logo

We recommend using Azure Native.

Viewing docs for Azure v4.42.0 (Older version)
published on Monday, Mar 9, 2026 by Pulumi

    Use this data source to access information about an existing Azure Site Recovery replication policy.

    Example Usage

    using Pulumi;
    using Azure = Pulumi.Azure;
    
    class MyStack : Stack
    {
        public MyStack()
        {
            var policy = Output.Create(Azure.SiteRecovery.GetReplicationPolicy.InvokeAsync(new Azure.SiteRecovery.GetReplicationPolicyArgs
            {
                Name = "replication-policy",
                RecoveryVaultName = "tfex-recovery_vault",
                ResourceGroupName = "tfex-resource_group",
            }));
        }
    
    }
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/siterecovery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := siterecovery.LookupReplicationPolicy(ctx, &siterecovery.LookupReplicationPolicyArgs{
    			Name:              "replication-policy",
    			RecoveryVaultName: "tfex-recovery_vault",
    			ResourceGroupName: "tfex-resource_group",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Example coming soon!

    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const policy = pulumi.output(azure.siterecovery.getReplicationPolicy({
        name: "replication-policy",
        recoveryVaultName: "tfex-recovery_vault",
        resourceGroupName: "tfex-resource_group",
    }));
    
    import pulumi
    import pulumi_azure as azure
    
    policy = azure.siterecovery.get_replication_policy(name="replication-policy",
        recovery_vault_name="tfex-recovery_vault",
        resource_group_name="tfex-resource_group")
    

    Example coming soon!

    Using getReplicationPolicy

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getReplicationPolicy(args: GetReplicationPolicyArgs, opts?: InvokeOptions): Promise<GetReplicationPolicyResult>
    function getReplicationPolicyOutput(args: GetReplicationPolicyOutputArgs, opts?: InvokeOptions): Output<GetReplicationPolicyResult>
    def get_replication_policy(name: Optional[str] = None,
                               recovery_vault_name: Optional[str] = None,
                               resource_group_name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetReplicationPolicyResult
    def get_replication_policy_output(name: Optional[pulumi.Input[str]] = None,
                               recovery_vault_name: Optional[pulumi.Input[str]] = None,
                               resource_group_name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetReplicationPolicyResult]
    func LookupReplicationPolicy(ctx *Context, args *LookupReplicationPolicyArgs, opts ...InvokeOption) (*LookupReplicationPolicyResult, error)
    func LookupReplicationPolicyOutput(ctx *Context, args *LookupReplicationPolicyOutputArgs, opts ...InvokeOption) LookupReplicationPolicyResultOutput

    > Note: This function is named LookupReplicationPolicy in the Go SDK.

    public static class GetReplicationPolicy 
    {
        public static Task<GetReplicationPolicyResult> InvokeAsync(GetReplicationPolicyArgs args, InvokeOptions? opts = null)
        public static Output<GetReplicationPolicyResult> Invoke(GetReplicationPolicyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
    public static Output<GetReplicationPolicyResult> getReplicationPolicy(GetReplicationPolicyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: azure:siterecovery/getReplicationPolicy:getReplicationPolicy
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    Specifies the name of the Azure Site Recovery replication policy.
    RecoveryVaultName string
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    ResourceGroupName string
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.
    Name string
    Specifies the name of the Azure Site Recovery replication policy.
    RecoveryVaultName string
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    ResourceGroupName string
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.
    name String
    Specifies the name of the Azure Site Recovery replication policy.
    recoveryVaultName String
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    resourceGroupName String
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.
    name string
    Specifies the name of the Azure Site Recovery replication policy.
    recoveryVaultName string
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    resourceGroupName string
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.
    name str
    Specifies the name of the Azure Site Recovery replication policy.
    recovery_vault_name str
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    resource_group_name str
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.
    name String
    Specifies the name of the Azure Site Recovery replication policy.
    recoveryVaultName String
    The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
    resourceGroupName String
    The name of the resource group in which the associated Azure Site Recovery replication policy resides.

    getReplicationPolicy Result

    The following output properties are available:

    ApplicationConsistentSnapshotFrequencyInMinutes int
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    RecoveryPointRetentionInMinutes int
    The duration in minutes for which the recovery points need to be stored.
    RecoveryVaultName string
    ResourceGroupName string
    ApplicationConsistentSnapshotFrequencyInMinutes int
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    RecoveryPointRetentionInMinutes int
    The duration in minutes for which the recovery points need to be stored.
    RecoveryVaultName string
    ResourceGroupName string
    applicationConsistentSnapshotFrequencyInMinutes Integer
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    recoveryPointRetentionInMinutes Integer
    The duration in minutes for which the recovery points need to be stored.
    recoveryVaultName String
    resourceGroupName String
    applicationConsistentSnapshotFrequencyInMinutes number
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    recoveryPointRetentionInMinutes number
    The duration in minutes for which the recovery points need to be stored.
    recoveryVaultName string
    resourceGroupName string
    application_consistent_snapshot_frequency_in_minutes int
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    recovery_point_retention_in_minutes int
    The duration in minutes for which the recovery points need to be stored.
    recovery_vault_name str
    resource_group_name str
    applicationConsistentSnapshotFrequencyInMinutes Number
    Specifies the frequency (in minutes) at which to create application consistent recovery.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    recoveryPointRetentionInMinutes Number
    The duration in minutes for which the recovery points need to be stored.
    recoveryVaultName String
    resourceGroupName String

    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.

    Viewing docs for Azure v4.42.0 (Older version)
    published on Monday, Mar 9, 2026 by Pulumi
      Try Pulumi Cloud free. Your team will thank you.