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

We recommend using Azure Native.

Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi

azure.siterecovery.getReplicationPolicy

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi

    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)
    // Output-based functions aren't available in Java yet
    
    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.

    Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi