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

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.siterecovery.getReplicationRecoveryPlan

Explore with Pulumi AI

Get information about an Azure Site Recovery Plan within a Recovery Services vault. A recovery plan gathers machines into recovery groups for the purpose of failover.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const vault = azure.recoveryservices.getVault({
    name: "tfex-recovery_vault",
    resourceGroupName: "tfex-resource_group",
});
const example = vault.then(vault => azure.siterecovery.getReplicationRecoveryPlan({
    name: "example-recovery-plan",
    recoveryVaultId: vault.id,
}));
Copy
import pulumi
import pulumi_azure as azure

vault = azure.recoveryservices.get_vault(name="tfex-recovery_vault",
    resource_group_name="tfex-resource_group")
example = azure.siterecovery.get_replication_recovery_plan(name="example-recovery-plan",
    recovery_vault_id=vault.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/recoveryservices"
	"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 {
		vault, err := recoveryservices.LookupVault(ctx, &recoveryservices.LookupVaultArgs{
			Name:              "tfex-recovery_vault",
			ResourceGroupName: "tfex-resource_group",
		}, nil)
		if err != nil {
			return err
		}
		_, err = siterecovery.LookupReplicationRecoveryPlan(ctx, &siterecovery.LookupReplicationRecoveryPlanArgs{
			Name:            "example-recovery-plan",
			RecoveryVaultId: vault.Id,
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var vault = Azure.RecoveryServices.GetVault.Invoke(new()
    {
        Name = "tfex-recovery_vault",
        ResourceGroupName = "tfex-resource_group",
    });

    var example = Azure.SiteRecovery.GetReplicationRecoveryPlan.Invoke(new()
    {
        Name = "example-recovery-plan",
        RecoveryVaultId = vault.Apply(getVaultResult => getVaultResult.Id),
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.recoveryservices.RecoveryservicesFunctions;
import com.pulumi.azure.recoveryservices.inputs.GetVaultArgs;
import com.pulumi.azure.siterecovery.SiterecoveryFunctions;
import com.pulumi.azure.siterecovery.inputs.GetReplicationRecoveryPlanArgs;
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 vault = RecoveryservicesFunctions.getVault(GetVaultArgs.builder()
            .name("tfex-recovery_vault")
            .resourceGroupName("tfex-resource_group")
            .build());

        final var example = SiterecoveryFunctions.getReplicationRecoveryPlan(GetReplicationRecoveryPlanArgs.builder()
            .name("example-recovery-plan")
            .recoveryVaultId(vault.applyValue(getVaultResult -> getVaultResult.id()))
            .build());

    }
}
Copy
variables:
  vault:
    fn::invoke:
      function: azure:recoveryservices:getVault
      arguments:
        name: tfex-recovery_vault
        resourceGroupName: tfex-resource_group
  example:
    fn::invoke:
      function: azure:siterecovery:getReplicationRecoveryPlan
      arguments:
        name: example-recovery-plan
        recoveryVaultId: ${vault.id}
Copy

Using getReplicationRecoveryPlan

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 getReplicationRecoveryPlan(args: GetReplicationRecoveryPlanArgs, opts?: InvokeOptions): Promise<GetReplicationRecoveryPlanResult>
function getReplicationRecoveryPlanOutput(args: GetReplicationRecoveryPlanOutputArgs, opts?: InvokeOptions): Output<GetReplicationRecoveryPlanResult>
Copy
def get_replication_recovery_plan(name: Optional[str] = None,
                                  recovery_vault_id: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetReplicationRecoveryPlanResult
def get_replication_recovery_plan_output(name: Optional[pulumi.Input[str]] = None,
                                  recovery_vault_id: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetReplicationRecoveryPlanResult]
Copy
func LookupReplicationRecoveryPlan(ctx *Context, args *LookupReplicationRecoveryPlanArgs, opts ...InvokeOption) (*LookupReplicationRecoveryPlanResult, error)
func LookupReplicationRecoveryPlanOutput(ctx *Context, args *LookupReplicationRecoveryPlanOutputArgs, opts ...InvokeOption) LookupReplicationRecoveryPlanResultOutput
Copy

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

public static class GetReplicationRecoveryPlan 
{
    public static Task<GetReplicationRecoveryPlanResult> InvokeAsync(GetReplicationRecoveryPlanArgs args, InvokeOptions? opts = null)
    public static Output<GetReplicationRecoveryPlanResult> Invoke(GetReplicationRecoveryPlanInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetReplicationRecoveryPlanResult> getReplicationRecoveryPlan(GetReplicationRecoveryPlanArgs args, InvokeOptions options)
public static Output<GetReplicationRecoveryPlanResult> getReplicationRecoveryPlan(GetReplicationRecoveryPlanArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:siterecovery/getReplicationRecoveryPlan:getReplicationRecoveryPlan
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the Replication Plan.
RecoveryVaultId This property is required. string
The ID of the vault that should be updated.
Name This property is required. string
The name of the Replication Plan.
RecoveryVaultId This property is required. string
The ID of the vault that should be updated.
name This property is required. String
The name of the Replication Plan.
recoveryVaultId This property is required. String
The ID of the vault that should be updated.
name This property is required. string
The name of the Replication Plan.
recoveryVaultId This property is required. string
The ID of the vault that should be updated.
name This property is required. str
The name of the Replication Plan.
recovery_vault_id This property is required. str
The ID of the vault that should be updated.
name This property is required. String
The name of the Replication Plan.
recoveryVaultId This property is required. String
The ID of the vault that should be updated.

getReplicationRecoveryPlan Result

The following output properties are available:

AzureToAzureSettings List<GetReplicationRecoveryPlanAzureToAzureSetting>
FailoverDeploymentModel string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the Action.
RecoveryGroups List<GetReplicationRecoveryPlanRecoveryGroup>
recovery_group block defined as below.
RecoveryVaultId string
SourceRecoveryFabricId string
The ID of source fabric to be recovered from.
TargetRecoveryFabricId string
The ID of target fabric to recover.
AzureToAzureSettings []GetReplicationRecoveryPlanAzureToAzureSetting
FailoverDeploymentModel string
Id string
The provider-assigned unique ID for this managed resource.
Name string
Name of the Action.
RecoveryGroups []GetReplicationRecoveryPlanRecoveryGroup
recovery_group block defined as below.
RecoveryVaultId string
SourceRecoveryFabricId string
The ID of source fabric to be recovered from.
TargetRecoveryFabricId string
The ID of target fabric to recover.
azureToAzureSettings List<GetReplicationRecoveryPlanAzureToAzureSetting>
failoverDeploymentModel String
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the Action.
recoveryGroups List<GetReplicationRecoveryPlanRecoveryGroup>
recovery_group block defined as below.
recoveryVaultId String
sourceRecoveryFabricId String
The ID of source fabric to be recovered from.
targetRecoveryFabricId String
The ID of target fabric to recover.
azureToAzureSettings GetReplicationRecoveryPlanAzureToAzureSetting[]
failoverDeploymentModel string
id string
The provider-assigned unique ID for this managed resource.
name string
Name of the Action.
recoveryGroups GetReplicationRecoveryPlanRecoveryGroup[]
recovery_group block defined as below.
recoveryVaultId string
sourceRecoveryFabricId string
The ID of source fabric to be recovered from.
targetRecoveryFabricId string
The ID of target fabric to recover.
azure_to_azure_settings Sequence[GetReplicationRecoveryPlanAzureToAzureSetting]
failover_deployment_model str
id str
The provider-assigned unique ID for this managed resource.
name str
Name of the Action.
recovery_groups Sequence[GetReplicationRecoveryPlanRecoveryGroup]
recovery_group block defined as below.
recovery_vault_id str
source_recovery_fabric_id str
The ID of source fabric to be recovered from.
target_recovery_fabric_id str
The ID of target fabric to recover.
azureToAzureSettings List<Property Map>
failoverDeploymentModel String
id String
The provider-assigned unique ID for this managed resource.
name String
Name of the Action.
recoveryGroups List<Property Map>
recovery_group block defined as below.
recoveryVaultId String
sourceRecoveryFabricId String
The ID of source fabric to be recovered from.
targetRecoveryFabricId String
The ID of target fabric to recover.

Supporting Types

GetReplicationRecoveryPlanAzureToAzureSetting

PrimaryEdgeZone This property is required. string
PrimaryZone This property is required. string
RecoveryEdgeZone This property is required. string
RecoveryZone This property is required. string
PrimaryEdgeZone This property is required. string
PrimaryZone This property is required. string
RecoveryEdgeZone This property is required. string
RecoveryZone This property is required. string
primaryEdgeZone This property is required. String
primaryZone This property is required. String
recoveryEdgeZone This property is required. String
recoveryZone This property is required. String
primaryEdgeZone This property is required. string
primaryZone This property is required. string
recoveryEdgeZone This property is required. string
recoveryZone This property is required. string
primary_edge_zone This property is required. str
primary_zone This property is required. str
recovery_edge_zone This property is required. str
recovery_zone This property is required. str
primaryEdgeZone This property is required. String
primaryZone This property is required. String
recoveryEdgeZone This property is required. String
recoveryZone This property is required. String

GetReplicationRecoveryPlanRecoveryGroup

PostActions This property is required. List<ImmutableArray<GetReplicationRecoveryPlanRecoveryGroupPostAction>>
one or more action block. which will be executed after the group recovery.
PreActions This property is required. List<ImmutableArray<GetReplicationRecoveryPlanRecoveryGroupPreAction>>
one or more action block. which will be executed before the group recovery.
ReplicatedProtectedItems This property is required. List<string>
one or more id of protected VM.
Type This property is required. string
Type of the action detail.
PostActions This property is required. [][]GetReplicationRecoveryPlanRecoveryGroupPostAction
one or more action block. which will be executed after the group recovery.
PreActions This property is required. [][]GetReplicationRecoveryPlanRecoveryGroupPreAction
one or more action block. which will be executed before the group recovery.
ReplicatedProtectedItems This property is required. []string
one or more id of protected VM.
Type This property is required. string
Type of the action detail.
postActions This property is required. List<List<GetReplicationRecoveryPlanRecoveryGroupPostAction>>
one or more action block. which will be executed after the group recovery.
preActions This property is required. List<List<GetReplicationRecoveryPlanRecoveryGroupPreAction>>
one or more action block. which will be executed before the group recovery.
replicatedProtectedItems This property is required. List<String>
one or more id of protected VM.
type This property is required. String
Type of the action detail.
postActions This property is required. GetReplicationRecoveryPlanRecoveryGroupPostAction[][]
one or more action block. which will be executed after the group recovery.
preActions This property is required. GetReplicationRecoveryPlanRecoveryGroupPreAction[][]
one or more action block. which will be executed before the group recovery.
replicatedProtectedItems This property is required. string[]
one or more id of protected VM.
type This property is required. string
Type of the action detail.
post_actions This property is required. Sequence[Sequence[GetReplicationRecoveryPlanRecoveryGroupPostAction]]
one or more action block. which will be executed after the group recovery.
pre_actions This property is required. Sequence[Sequence[GetReplicationRecoveryPlanRecoveryGroupPreAction]]
one or more action block. which will be executed before the group recovery.
replicated_protected_items This property is required. Sequence[str]
one or more id of protected VM.
type This property is required. str
Type of the action detail.
postActions This property is required. List<List<Property Map>>
one or more action block. which will be executed after the group recovery.
preActions This property is required. List<List<Property Map>>
one or more action block. which will be executed before the group recovery.
replicatedProtectedItems This property is required. List<String>
one or more id of protected VM.
type This property is required. String
Type of the action detail.

GetReplicationRecoveryPlanRecoveryGroupPostAction

FabricLocation This property is required. string
The fabric location of runbook or script.
FailOverDirections This property is required. List<string>
Directions of fail over.
FailOverTypes This property is required. List<string>
Types of fail over.
ManualActionInstruction This property is required. string
Instructions of manual action.
Name This property is required. string
The name of the Replication Plan.
RunbookId This property is required. string
Id of runbook.
ScriptPath This property is required. string
Path of action script.
Type This property is required. string
Type of the action detail.
FabricLocation This property is required. string
The fabric location of runbook or script.
FailOverDirections This property is required. []string
Directions of fail over.
FailOverTypes This property is required. []string
Types of fail over.
ManualActionInstruction This property is required. string
Instructions of manual action.
Name This property is required. string
The name of the Replication Plan.
RunbookId This property is required. string
Id of runbook.
ScriptPath This property is required. string
Path of action script.
Type This property is required. string
Type of the action detail.
fabricLocation This property is required. String
The fabric location of runbook or script.
failOverDirections This property is required. List<String>
Directions of fail over.
failOverTypes This property is required. List<String>
Types of fail over.
manualActionInstruction This property is required. String
Instructions of manual action.
name This property is required. String
The name of the Replication Plan.
runbookId This property is required. String
Id of runbook.
scriptPath This property is required. String
Path of action script.
type This property is required. String
Type of the action detail.
fabricLocation This property is required. string
The fabric location of runbook or script.
failOverDirections This property is required. string[]
Directions of fail over.
failOverTypes This property is required. string[]
Types of fail over.
manualActionInstruction This property is required. string
Instructions of manual action.
name This property is required. string
The name of the Replication Plan.
runbookId This property is required. string
Id of runbook.
scriptPath This property is required. string
Path of action script.
type This property is required. string
Type of the action detail.
fabric_location This property is required. str
The fabric location of runbook or script.
fail_over_directions This property is required. Sequence[str]
Directions of fail over.
fail_over_types This property is required. Sequence[str]
Types of fail over.
manual_action_instruction This property is required. str
Instructions of manual action.
name This property is required. str
The name of the Replication Plan.
runbook_id This property is required. str
Id of runbook.
script_path This property is required. str
Path of action script.
type This property is required. str
Type of the action detail.
fabricLocation This property is required. String
The fabric location of runbook or script.
failOverDirections This property is required. List<String>
Directions of fail over.
failOverTypes This property is required. List<String>
Types of fail over.
manualActionInstruction This property is required. String
Instructions of manual action.
name This property is required. String
The name of the Replication Plan.
runbookId This property is required. String
Id of runbook.
scriptPath This property is required. String
Path of action script.
type This property is required. String
Type of the action detail.

GetReplicationRecoveryPlanRecoveryGroupPreAction

FabricLocation This property is required. string
The fabric location of runbook or script.
FailOverDirections This property is required. List<string>
Directions of fail over.
FailOverTypes This property is required. List<string>
Types of fail over.
ManualActionInstruction This property is required. string
Instructions of manual action.
Name This property is required. string
The name of the Replication Plan.
RunbookId This property is required. string
Id of runbook.
ScriptPath This property is required. string
Path of action script.
Type This property is required. string
Type of the action detail.
FabricLocation This property is required. string
The fabric location of runbook or script.
FailOverDirections This property is required. []string
Directions of fail over.
FailOverTypes This property is required. []string
Types of fail over.
ManualActionInstruction This property is required. string
Instructions of manual action.
Name This property is required. string
The name of the Replication Plan.
RunbookId This property is required. string
Id of runbook.
ScriptPath This property is required. string
Path of action script.
Type This property is required. string
Type of the action detail.
fabricLocation This property is required. String
The fabric location of runbook or script.
failOverDirections This property is required. List<String>
Directions of fail over.
failOverTypes This property is required. List<String>
Types of fail over.
manualActionInstruction This property is required. String
Instructions of manual action.
name This property is required. String
The name of the Replication Plan.
runbookId This property is required. String
Id of runbook.
scriptPath This property is required. String
Path of action script.
type This property is required. String
Type of the action detail.
fabricLocation This property is required. string
The fabric location of runbook or script.
failOverDirections This property is required. string[]
Directions of fail over.
failOverTypes This property is required. string[]
Types of fail over.
manualActionInstruction This property is required. string
Instructions of manual action.
name This property is required. string
The name of the Replication Plan.
runbookId This property is required. string
Id of runbook.
scriptPath This property is required. string
Path of action script.
type This property is required. string
Type of the action detail.
fabric_location This property is required. str
The fabric location of runbook or script.
fail_over_directions This property is required. Sequence[str]
Directions of fail over.
fail_over_types This property is required. Sequence[str]
Types of fail over.
manual_action_instruction This property is required. str
Instructions of manual action.
name This property is required. str
The name of the Replication Plan.
runbook_id This property is required. str
Id of runbook.
script_path This property is required. str
Path of action script.
type This property is required. str
Type of the action detail.
fabricLocation This property is required. String
The fabric location of runbook or script.
failOverDirections This property is required. List<String>
Directions of fail over.
failOverTypes This property is required. List<String>
Types of fail over.
manualActionInstruction This property is required. String
Instructions of manual action.
name This property is required. String
The name of the Replication Plan.
runbookId This property is required. String
Id of runbook.
scriptPath This property is required. String
Path of action script.
type This property is required. String
Type of the action detail.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.