We recommend using Azure Native.
Azure v6.21.0 published on Friday, Mar 7, 2025 by Pulumi
azure.siterecovery.getReplicationPolicy
Explore with Pulumi AI
Use this data source to access information about an existing Azure Site Recovery replication policy.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const policy = 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")
package main
import (
	"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 {
		_, 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
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() => 
{
    var policy = Azure.SiteRecovery.GetReplicationPolicy.Invoke(new()
    {
        Name = "replication-policy",
        RecoveryVaultName = "tfex-recovery_vault",
        ResourceGroupName = "tfex-resource_group",
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.siterecovery.SiterecoveryFunctions;
import com.pulumi.azure.siterecovery.inputs.GetReplicationPolicyArgs;
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) {
        final var policy = SiterecoveryFunctions.getReplicationPolicy(GetReplicationPolicyArgs.builder()
            .name("replication-policy")
            .recoveryVaultName("tfex-recovery_vault")
            .resourceGroupName("tfex-resource_group")
            .build());
    }
}
variables:
  policy:
    fn::invoke:
      function: azure:siterecovery:getReplicationPolicy
      arguments:
        name: replication-policy
        recoveryVaultName: tfex-recovery_vault
        resourceGroupName: tfex-resource_group
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 dictionaryThe following arguments are supported:
- Name string
- Specifies the name of the Azure Site Recovery replication policy.
- RecoveryVault stringName 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- ResourceGroup stringName 
- 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.
- RecoveryVault stringName 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- ResourceGroup stringName 
- 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.
- recoveryVault StringName 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resourceGroup StringName 
- 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.
- recoveryVault stringName 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resourceGroup stringName 
- 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_ strname 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resource_group_ strname 
- 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.
- recoveryVault StringName 
- The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resourceGroup StringName 
- The name of the resource group in which the associated Azure Site Recovery replication policy resides.
getReplicationPolicy Result
The following output properties are available:
- ApplicationConsistent intSnapshot Frequency In Minutes 
- 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
- RecoveryPoint intRetention In Minutes 
- The duration in minutes for which the recovery points need to be stored.
- RecoveryVault stringName 
- ResourceGroup stringName 
- ApplicationConsistent intSnapshot Frequency In Minutes 
- 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
- RecoveryPoint intRetention In Minutes 
- The duration in minutes for which the recovery points need to be stored.
- RecoveryVault stringName 
- ResourceGroup stringName 
- applicationConsistent IntegerSnapshot Frequency In Minutes 
- 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
- recoveryPoint IntegerRetention In Minutes 
- The duration in minutes for which the recovery points need to be stored.
- recoveryVault StringName 
- resourceGroup StringName 
- applicationConsistent numberSnapshot Frequency In Minutes 
- 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
- recoveryPoint numberRetention In Minutes 
- The duration in minutes for which the recovery points need to be stored.
- recoveryVault stringName 
- resourceGroup stringName 
- application_consistent_ intsnapshot_ frequency_ in_ minutes 
- 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_ intretention_ in_ minutes 
- The duration in minutes for which the recovery points need to be stored.
- recovery_vault_ strname 
- resource_group_ strname 
- applicationConsistent NumberSnapshot Frequency In Minutes 
- 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
- recoveryPoint NumberRetention In Minutes 
- The duration in minutes for which the recovery points need to be stored.
- recoveryVault StringName 
- resourceGroup StringName 
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azurermTerraform Provider.