We recommend using Azure Native.
Azure v6.10.0 published on Tuesday, Nov 19, 2024 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,
}));
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)
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
	})
}
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),
    });
});
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());
    }
}
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}
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>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]func LookupReplicationRecoveryPlan(ctx *Context, args *LookupReplicationRecoveryPlanArgs, opts ...InvokeOption) (*LookupReplicationRecoveryPlanResult, error)
func LookupReplicationRecoveryPlanOutput(ctx *Context, args *LookupReplicationRecoveryPlanOutputArgs, opts ...InvokeOption) LookupReplicationRecoveryPlanResultOutput> 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)
}public static CompletableFuture<GetReplicationRecoveryPlanResult> getReplicationRecoveryPlan(GetReplicationRecoveryPlanArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: azure:siterecovery/getReplicationRecoveryPlan:getReplicationRecoveryPlan
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
- The name of the Replication Plan.
- RecoveryVault stringId 
- The ID of the vault that should be updated.
- Name string
- The name of the Replication Plan.
- RecoveryVault stringId 
- The ID of the vault that should be updated.
- name String
- The name of the Replication Plan.
- recoveryVault StringId 
- The ID of the vault that should be updated.
- name string
- The name of the Replication Plan.
- recoveryVault stringId 
- The ID of the vault that should be updated.
- name str
- The name of the Replication Plan.
- recovery_vault_ strid 
- The ID of the vault that should be updated.
- name String
- The name of the Replication Plan.
- recoveryVault StringId 
- The ID of the vault that should be updated.
getReplicationRecoveryPlan Result
The following output properties are available:
- AzureTo List<GetAzure Settings Replication Recovery Plan Azure To Azure Setting> 
- FailoverDeployment stringModel 
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Action.
- RecoveryGroups List<GetReplication Recovery Plan Recovery Group> 
- recovery_groupblock defined as below.
- RecoveryVault stringId 
- SourceRecovery stringFabric Id 
- The ID of source fabric to be recovered from.
- TargetRecovery stringFabric Id 
- The ID of target fabric to recover.
- AzureTo []GetAzure Settings Replication Recovery Plan Azure To Azure Setting 
- FailoverDeployment stringModel 
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Action.
- RecoveryGroups []GetReplication Recovery Plan Recovery Group 
- recovery_groupblock defined as below.
- RecoveryVault stringId 
- SourceRecovery stringFabric Id 
- The ID of source fabric to be recovered from.
- TargetRecovery stringFabric Id 
- The ID of target fabric to recover.
- azureTo List<GetAzure Settings Replication Recovery Plan Azure To Azure Setting> 
- failoverDeployment StringModel 
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Action.
- recoveryGroups List<GetReplication Recovery Plan Recovery Group> 
- recovery_groupblock defined as below.
- recoveryVault StringId 
- sourceRecovery StringFabric Id 
- The ID of source fabric to be recovered from.
- targetRecovery StringFabric Id 
- The ID of target fabric to recover.
- azureTo GetAzure Settings Replication Recovery Plan Azure To Azure Setting[] 
- failoverDeployment stringModel 
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the Action.
- recoveryGroups GetReplication Recovery Plan Recovery Group[] 
- recovery_groupblock defined as below.
- recoveryVault stringId 
- sourceRecovery stringFabric Id 
- The ID of source fabric to be recovered from.
- targetRecovery stringFabric Id 
- The ID of target fabric to recover.
- azure_to_ Sequence[Getazure_ settings Replication Recovery Plan Azure To Azure Setting] 
- failover_deployment_ strmodel 
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of the Action.
- recovery_groups Sequence[GetReplication Recovery Plan Recovery Group] 
- recovery_groupblock defined as below.
- recovery_vault_ strid 
- source_recovery_ strfabric_ id 
- The ID of source fabric to be recovered from.
- target_recovery_ strfabric_ id 
- The ID of target fabric to recover.
- azureTo List<Property Map>Azure Settings 
- failoverDeployment StringModel 
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Action.
- recoveryGroups List<Property Map>
- recovery_groupblock defined as below.
- recoveryVault StringId 
- sourceRecovery StringFabric Id 
- The ID of source fabric to be recovered from.
- targetRecovery StringFabric Id 
- The ID of target fabric to recover.
Supporting Types
GetReplicationRecoveryPlanAzureToAzureSetting       
- PrimaryEdge stringZone 
- PrimaryZone string
- RecoveryEdge stringZone 
- RecoveryZone string
- PrimaryEdge stringZone 
- PrimaryZone string
- RecoveryEdge stringZone 
- RecoveryZone string
- primaryEdge StringZone 
- primaryZone String
- recoveryEdge StringZone 
- recoveryZone String
- primaryEdge stringZone 
- primaryZone string
- recoveryEdge stringZone 
- recoveryZone string
- primary_edge_ strzone 
- primary_zone str
- recovery_edge_ strzone 
- recovery_zone str
- primaryEdge StringZone 
- primaryZone String
- recoveryEdge StringZone 
- recoveryZone String
GetReplicationRecoveryPlanRecoveryGroup     
- PostActions List<ImmutableArray<Get Replication Recovery Plan Recovery Group Post Action>> 
- one or more actionblock. which will be executed after the group recovery.
- PreActions List<ImmutableArray<Get Replication Recovery Plan Recovery Group Pre Action>> 
- one or more actionblock. which will be executed before the group recovery.
- ReplicatedProtected List<string>Items 
- one or more id of protected VM.
- Type string
- Type of the action detail.
- PostActions [][]GetReplication Recovery Plan Recovery Group Post Action 
- one or more actionblock. which will be executed after the group recovery.
- PreActions [][]GetReplication Recovery Plan Recovery Group Pre Action 
- one or more actionblock. which will be executed before the group recovery.
- ReplicatedProtected []stringItems 
- one or more id of protected VM.
- Type string
- Type of the action detail.
- postActions List<List<GetReplication Recovery Plan Recovery Group Post Action>> 
- one or more actionblock. which will be executed after the group recovery.
- preActions List<List<GetReplication Recovery Plan Recovery Group Pre Action>> 
- one or more actionblock. which will be executed before the group recovery.
- replicatedProtected List<String>Items 
- one or more id of protected VM.
- type String
- Type of the action detail.
- postActions GetReplication Recovery Plan Recovery Group Post Action[][] 
- one or more actionblock. which will be executed after the group recovery.
- preActions GetReplication Recovery Plan Recovery Group Pre Action[][] 
- one or more actionblock. which will be executed before the group recovery.
- replicatedProtected string[]Items 
- one or more id of protected VM.
- type string
- Type of the action detail.
- post_actions Sequence[Sequence[GetReplication Recovery Plan Recovery Group Post Action]] 
- one or more actionblock. which will be executed after the group recovery.
- pre_actions Sequence[Sequence[GetReplication Recovery Plan Recovery Group Pre Action]] 
- one or more actionblock. which will be executed before the group recovery.
- replicated_protected_ Sequence[str]items 
- one or more id of protected VM.
- type str
- Type of the action detail.
- postActions List<List<Property Map>>
- one or more actionblock. which will be executed after the group recovery.
- preActions List<List<Property Map>>
- one or more actionblock. which will be executed before the group recovery.
- replicatedProtected List<String>Items 
- one or more id of protected VM.
- type String
- Type of the action detail.
GetReplicationRecoveryPlanRecoveryGroupPostAction       
- FabricLocation string
- The fabric location of runbook or script.
- FailOver List<string>Directions 
- Directions of fail over.
- FailOver List<string>Types 
- Types of fail over.
- ManualAction stringInstruction 
- Instructions of manual action.
- Name string
- The name of the Replication Plan.
- RunbookId string
- Id of runbook.
- ScriptPath string
- Path of action script.
- Type string
- Type of the action detail.
- FabricLocation string
- The fabric location of runbook or script.
- FailOver []stringDirections 
- Directions of fail over.
- FailOver []stringTypes 
- Types of fail over.
- ManualAction stringInstruction 
- Instructions of manual action.
- Name string
- The name of the Replication Plan.
- RunbookId string
- Id of runbook.
- ScriptPath string
- Path of action script.
- Type string
- Type of the action detail.
- fabricLocation String
- The fabric location of runbook or script.
- failOver List<String>Directions 
- Directions of fail over.
- failOver List<String>Types 
- Types of fail over.
- manualAction StringInstruction 
- Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbookId String
- Id of runbook.
- scriptPath String
- Path of action script.
- type String
- Type of the action detail.
- fabricLocation string
- The fabric location of runbook or script.
- failOver string[]Directions 
- Directions of fail over.
- failOver string[]Types 
- Types of fail over.
- manualAction stringInstruction 
- Instructions of manual action.
- name string
- The name of the Replication Plan.
- runbookId string
- Id of runbook.
- scriptPath string
- Path of action script.
- type string
- Type of the action detail.
- fabric_location str
- The fabric location of runbook or script.
- fail_over_ Sequence[str]directions 
- Directions of fail over.
- fail_over_ Sequence[str]types 
- Types of fail over.
- manual_action_ strinstruction 
- Instructions of manual action.
- name str
- The name of the Replication Plan.
- runbook_id str
- Id of runbook.
- script_path str
- Path of action script.
- type str
- Type of the action detail.
- fabricLocation String
- The fabric location of runbook or script.
- failOver List<String>Directions 
- Directions of fail over.
- failOver List<String>Types 
- Types of fail over.
- manualAction StringInstruction 
- Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbookId String
- Id of runbook.
- scriptPath String
- Path of action script.
- type String
- Type of the action detail.
GetReplicationRecoveryPlanRecoveryGroupPreAction       
- FabricLocation string
- The fabric location of runbook or script.
- FailOver List<string>Directions 
- Directions of fail over.
- FailOver List<string>Types 
- Types of fail over.
- ManualAction stringInstruction 
- Instructions of manual action.
- Name string
- The name of the Replication Plan.
- RunbookId string
- Id of runbook.
- ScriptPath string
- Path of action script.
- Type string
- Type of the action detail.
- FabricLocation string
- The fabric location of runbook or script.
- FailOver []stringDirections 
- Directions of fail over.
- FailOver []stringTypes 
- Types of fail over.
- ManualAction stringInstruction 
- Instructions of manual action.
- Name string
- The name of the Replication Plan.
- RunbookId string
- Id of runbook.
- ScriptPath string
- Path of action script.
- Type string
- Type of the action detail.
- fabricLocation String
- The fabric location of runbook or script.
- failOver List<String>Directions 
- Directions of fail over.
- failOver List<String>Types 
- Types of fail over.
- manualAction StringInstruction 
- Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbookId String
- Id of runbook.
- scriptPath String
- Path of action script.
- type String
- Type of the action detail.
- fabricLocation string
- The fabric location of runbook or script.
- failOver string[]Directions 
- Directions of fail over.
- failOver string[]Types 
- Types of fail over.
- manualAction stringInstruction 
- Instructions of manual action.
- name string
- The name of the Replication Plan.
- runbookId string
- Id of runbook.
- scriptPath string
- Path of action script.
- type string
- Type of the action detail.
- fabric_location str
- The fabric location of runbook or script.
- fail_over_ Sequence[str]directions 
- Directions of fail over.
- fail_over_ Sequence[str]types 
- Types of fail over.
- manual_action_ strinstruction 
- Instructions of manual action.
- name str
- The name of the Replication Plan.
- runbook_id str
- Id of runbook.
- script_path str
- Path of action script.
- type str
- Type of the action detail.
- fabricLocation String
- The fabric location of runbook or script.
- failOver List<String>Directions 
- Directions of fail over.
- failOver List<String>Types 
- Types of fail over.
- manualAction StringInstruction 
- Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbookId String
- Id of runbook.
- scriptPath String
- Path of action script.
- type 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 azurermTerraform Provider.