We recommend using Azure Native.
Azure v6.13.0 published on Monday, Dec 9, 2024 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)
// 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.
- Recovery
Vault stringName - The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- Resource
Group 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.
- Recovery
Vault stringName - The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- Resource
Group 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.
- recovery
Vault StringName - The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resource
Group 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.
- recovery
Vault stringName - The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resource
Group 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.
- recovery
Vault StringName - The name of the Recovery Services Vault that the Azure Site Recovery replication policy is associated witth.
- resource
Group 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:
- Application
Consistent 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
- Recovery
Point intRetention In Minutes - The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName - Resource
Group stringName
- Application
Consistent 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
- Recovery
Point intRetention In Minutes - The duration in minutes for which the recovery points need to be stored.
- Recovery
Vault stringName - Resource
Group stringName
- application
Consistent 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
- recovery
Point IntegerRetention In Minutes - The duration in minutes for which the recovery points need to be stored.
- recovery
Vault StringName - resource
Group StringName
- application
Consistent 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
- recovery
Point numberRetention In Minutes - The duration in minutes for which the recovery points need to be stored.
- recovery
Vault stringName - resource
Group 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
- application
Consistent 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
- recovery
Point NumberRetention In Minutes - The duration in minutes for which the recovery points need to be stored.
- recovery
Vault StringName - resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.