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,
}));
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)
public static Output<GetReplicationRecoveryPlanResult> getReplicationRecoveryPlan(GetReplicationRecoveryPlanArgs args, InvokeOptions options)
fn::invoke:
function: azure:siterecovery/getReplicationRecoveryPlan:getReplicationRecoveryPlan
arguments:
# arguments dictionary
The following arguments are supported:
- Name
This property is required. string - The name of the Replication Plan.
- Recovery
Vault Id 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.
- Recovery
Vault Id 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.
- recovery
Vault Id 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.
- recovery
Vault Id 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.
- recovery
Vault Id This property is required. String - The ID of the vault that should be updated.
getReplicationRecoveryPlan Result
The following output properties are available:
- Azure
To List<GetAzure Settings Replication Recovery Plan Azure To Azure Setting> - Failover
Deployment stringModel - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Action.
- Recovery
Groups List<GetReplication Recovery Plan Recovery Group> recovery_group
block defined as below.- Recovery
Vault stringId - Source
Recovery stringFabric Id - The ID of source fabric to be recovered from.
- Target
Recovery stringFabric Id - The ID of target fabric to recover.
- Azure
To []GetAzure Settings Replication Recovery Plan Azure To Azure Setting - Failover
Deployment stringModel - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Action.
- Recovery
Groups []GetReplication Recovery Plan Recovery Group recovery_group
block defined as below.- Recovery
Vault stringId - Source
Recovery stringFabric Id - The ID of source fabric to be recovered from.
- Target
Recovery stringFabric Id - The ID of target fabric to recover.
- azure
To List<GetAzure Settings Replication Recovery Plan Azure To Azure Setting> - failover
Deployment StringModel - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Action.
- recovery
Groups List<GetReplication Recovery Plan Recovery Group> recovery_group
block defined as below.- recovery
Vault StringId - source
Recovery StringFabric Id - The ID of source fabric to be recovered from.
- target
Recovery StringFabric Id - The ID of target fabric to recover.
- azure
To GetAzure Settings Replication Recovery Plan Azure To Azure Setting[] - failover
Deployment stringModel - id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the Action.
- recovery
Groups GetReplication Recovery Plan Recovery Group[] recovery_group
block defined as below.- recovery
Vault stringId - source
Recovery stringFabric Id - The ID of source fabric to be recovered from.
- target
Recovery 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_group
block 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.
- azure
To List<Property Map>Azure Settings - failover
Deployment StringModel - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Action.
- recovery
Groups List<Property Map> recovery_group
block defined as below.- recovery
Vault StringId - source
Recovery StringFabric Id - The ID of source fabric to be recovered from.
- target
Recovery StringFabric Id - The ID of target fabric to recover.
Supporting Types
GetReplicationRecoveryPlanAzureToAzureSetting
- Primary
Edge Zone This property is required. string - Primary
Zone This property is required. string - Recovery
Edge Zone This property is required. string - Recovery
Zone This property is required. string
- Primary
Edge Zone This property is required. string - Primary
Zone This property is required. string - Recovery
Edge Zone This property is required. string - Recovery
Zone This property is required. string
- primary
Edge Zone This property is required. String - primary
Zone This property is required. String - recovery
Edge Zone This property is required. String - recovery
Zone This property is required. String
- primary
Edge Zone This property is required. string - primary
Zone This property is required. string - recovery
Edge Zone This property is required. string - recovery
Zone 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
- primary
Edge Zone This property is required. String - primary
Zone This property is required. String - recovery
Edge Zone This property is required. String - recovery
Zone This property is required. String
GetReplicationRecoveryPlanRecoveryGroup
- Post
Actions This property is required. List<ImmutableArray<Get Replication Recovery Plan Recovery Group Post Action>> - one or more
action
block. which will be executed after the group recovery. - Pre
Actions This property is required. List<ImmutableArray<Get Replication Recovery Plan Recovery Group Pre Action>> - one or more
action
block. which will be executed before the group recovery. - Replicated
Protected Items This property is required. List<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. [][]GetReplication Recovery Plan Recovery Group Post Action - one or more
action
block. which will be executed after the group recovery. - Pre
Actions This property is required. [][]GetReplication Recovery Plan Recovery Group Pre Action - one or more
action
block. which will be executed before the group recovery. - Replicated
Protected Items 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. List<List<GetReplication Recovery Plan Recovery Group Post Action>> - one or more
action
block. which will be executed after the group recovery. - pre
Actions This property is required. List<List<GetReplication Recovery Plan Recovery Group Pre Action>> - one or more
action
block. which will be executed before the group recovery. - replicated
Protected Items This property is required. List<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. GetReplication Recovery Plan Recovery Group Post Action[][] - one or more
action
block. which will be executed after the group recovery. - pre
Actions This property is required. GetReplication Recovery Plan Recovery Group Pre Action[][] - one or more
action
block. which will be executed before the group recovery. - replicated
Protected Items 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[GetReplication Recovery Plan Recovery Group Post Action]] - one or more
action
block. which will be executed after the group recovery. - pre_
actions This property is required. Sequence[Sequence[GetReplication Recovery Plan Recovery Group Pre Action]] - 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.
- post
Actions This property is required. List<List<Property Map>> - one or more
action
block. which will be executed after the group recovery. - pre
Actions This property is required. List<List<Property Map>> - one or more
action
block. which will be executed before the group recovery. - replicated
Protected Items 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
- Fabric
Location This property is required. string - The fabric location of runbook or script.
- Fail
Over Directions This property is required. List<string> - Directions of fail over.
- Fail
Over Types This property is required. List<string> - Types of fail over.
- Manual
Action Instruction This property is required. string - Instructions of manual action.
- Name
This property is required. string - The name of the Replication Plan.
- Runbook
Id This property is required. string - Id of runbook.
- Script
Path 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. string - The fabric location of runbook or script.
- Fail
Over Directions This property is required. []string - Directions of fail over.
- Fail
Over Types This property is required. []string - Types of fail over.
- Manual
Action Instruction This property is required. string - Instructions of manual action.
- Name
This property is required. string - The name of the Replication Plan.
- Runbook
Id This property is required. string - Id of runbook.
- Script
Path 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. String - The fabric location of runbook or script.
- fail
Over Directions This property is required. List<String> - Directions of fail over.
- fail
Over Types This property is required. List<String> - Types of fail over.
- manual
Action Instruction This property is required. String - Instructions of manual action.
- name
This property is required. String - The name of the Replication Plan.
- runbook
Id This property is required. String - Id of runbook.
- script
Path 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. string - The fabric location of runbook or script.
- fail
Over Directions This property is required. string[] - Directions of fail over.
- fail
Over Types This property is required. string[] - Types of fail over.
- manual
Action Instruction This property is required. string - Instructions of manual action.
- name
This property is required. string - The name of the Replication Plan.
- runbook
Id This property is required. string - Id of runbook.
- script
Path 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.
- fabric
Location This property is required. String - The fabric location of runbook or script.
- fail
Over Directions This property is required. List<String> - Directions of fail over.
- fail
Over Types This property is required. List<String> - Types of fail over.
- manual
Action Instruction This property is required. String - Instructions of manual action.
- name
This property is required. String - The name of the Replication Plan.
- runbook
Id This property is required. String - Id of runbook.
- script
Path This property is required. String - Path of action script.
- type
This property is required. String - Type of the action detail.
GetReplicationRecoveryPlanRecoveryGroupPreAction
- Fabric
Location This property is required. string - The fabric location of runbook or script.
- Fail
Over Directions This property is required. List<string> - Directions of fail over.
- Fail
Over Types This property is required. List<string> - Types of fail over.
- Manual
Action Instruction This property is required. string - Instructions of manual action.
- Name
This property is required. string - The name of the Replication Plan.
- Runbook
Id This property is required. string - Id of runbook.
- Script
Path 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. string - The fabric location of runbook or script.
- Fail
Over Directions This property is required. []string - Directions of fail over.
- Fail
Over Types This property is required. []string - Types of fail over.
- Manual
Action Instruction This property is required. string - Instructions of manual action.
- Name
This property is required. string - The name of the Replication Plan.
- Runbook
Id This property is required. string - Id of runbook.
- Script
Path 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. String - The fabric location of runbook or script.
- fail
Over Directions This property is required. List<String> - Directions of fail over.
- fail
Over Types This property is required. List<String> - Types of fail over.
- manual
Action Instruction This property is required. String - Instructions of manual action.
- name
This property is required. String - The name of the Replication Plan.
- runbook
Id This property is required. String - Id of runbook.
- script
Path 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. string - The fabric location of runbook or script.
- fail
Over Directions This property is required. string[] - Directions of fail over.
- fail
Over Types This property is required. string[] - Types of fail over.
- manual
Action Instruction This property is required. string - Instructions of manual action.
- name
This property is required. string - The name of the Replication Plan.
- runbook
Id This property is required. string - Id of runbook.
- script
Path 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.
- fabric
Location This property is required. String - The fabric location of runbook or script.
- fail
Over Directions This property is required. List<String> - Directions of fail over.
- fail
Over Types This property is required. List<String> - Types of fail over.
- manual
Action Instruction This property is required. String - Instructions of manual action.
- name
This property is required. String - The name of the Replication Plan.
- runbook
Id This property is required. String - Id of runbook.
- script
Path 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.