We recommend using Azure Native.
Azure v6.13.0 published on Monday, Dec 9, 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 dictionary
The following arguments are supported:
- Name string
- The name of the Replication Plan.
- Recovery
Vault stringId - The ID of the vault that should be updated.
- Name string
- The name of the Replication Plan.
- Recovery
Vault stringId - The ID of the vault that should be updated.
- name String
- The name of the Replication Plan.
- recovery
Vault StringId - The ID of the vault that should be updated.
- name string
- The name of the Replication Plan.
- recovery
Vault 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.
- recovery
Vault StringId - 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 stringZone - Primary
Zone string - Recovery
Edge stringZone - Recovery
Zone string
- Primary
Edge stringZone - Primary
Zone string - Recovery
Edge stringZone - Recovery
Zone string
- primary
Edge StringZone - primary
Zone String - recovery
Edge StringZone - recovery
Zone String
- primary
Edge stringZone - primary
Zone string - recovery
Edge stringZone - recovery
Zone string
- primary_
edge_ strzone - primary_
zone str - recovery_
edge_ strzone - recovery_
zone str
- primary
Edge StringZone - primary
Zone String - recovery
Edge StringZone - recovery
Zone String
GetReplicationRecoveryPlanRecoveryGroup
- Post
Actions 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 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 List<string>Items - one or more id of protected VM.
- Type string
- Type of the action detail.
- Post
Actions [][]GetReplication Recovery Plan Recovery Group Post Action - one or more
action
block. which will be executed after the group recovery. - Pre
Actions [][]GetReplication Recovery Plan Recovery Group Pre Action - one or more
action
block. which will be executed before the group recovery. - Replicated
Protected []stringItems - one or more id of protected VM.
- Type string
- Type of the action detail.
- post
Actions List<List<GetReplication Recovery Plan Recovery Group Post Action>> - one or more
action
block. which will be executed after the group recovery. - pre
Actions List<List<GetReplication Recovery Plan Recovery Group Pre Action>> - one or more
action
block. which will be executed before the group recovery. - replicated
Protected List<String>Items - one or more id of protected VM.
- type String
- Type of the action detail.
- post
Actions GetReplication Recovery Plan Recovery Group Post Action[][] - one or more
action
block. which will be executed after the group recovery. - pre
Actions GetReplication Recovery Plan Recovery Group Pre Action[][] - one or more
action
block. which will be executed before the group recovery. - replicated
Protected 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
action
block. which will be executed after the group recovery. - pre_
actions Sequence[Sequence[GetReplication Recovery Plan Recovery Group Pre Action]] - one or more
action
block. 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.
- post
Actions List<List<Property Map>> - one or more
action
block. which will be executed after the group recovery. - pre
Actions List<List<Property Map>> - one or more
action
block. which will be executed before the group recovery. - replicated
Protected List<String>Items - one or more id of protected VM.
- type String
- Type of the action detail.
GetReplicationRecoveryPlanRecoveryGroupPostAction
- Fabric
Location string - The fabric location of runbook or script.
- Fail
Over List<string>Directions - Directions of fail over.
- Fail
Over List<string>Types - Types of fail over.
- Manual
Action stringInstruction - Instructions of manual action.
- Name string
- The name of the Replication Plan.
- Runbook
Id string - Id of runbook.
- Script
Path string - Path of action script.
- Type string
- Type of the action detail.
- Fabric
Location string - The fabric location of runbook or script.
- Fail
Over []stringDirections - Directions of fail over.
- Fail
Over []stringTypes - Types of fail over.
- Manual
Action stringInstruction - Instructions of manual action.
- Name string
- The name of the Replication Plan.
- Runbook
Id string - Id of runbook.
- Script
Path string - Path of action script.
- Type string
- Type of the action detail.
- fabric
Location String - The fabric location of runbook or script.
- fail
Over List<String>Directions - Directions of fail over.
- fail
Over List<String>Types - Types of fail over.
- manual
Action StringInstruction - Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbook
Id String - Id of runbook.
- script
Path String - Path of action script.
- type String
- Type of the action detail.
- fabric
Location string - The fabric location of runbook or script.
- fail
Over string[]Directions - Directions of fail over.
- fail
Over string[]Types - Types of fail over.
- manual
Action stringInstruction - Instructions of manual action.
- name string
- The name of the Replication Plan.
- runbook
Id string - Id of runbook.
- script
Path 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.
- fabric
Location String - The fabric location of runbook or script.
- fail
Over List<String>Directions - Directions of fail over.
- fail
Over List<String>Types - Types of fail over.
- manual
Action StringInstruction - Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbook
Id String - Id of runbook.
- script
Path String - Path of action script.
- type String
- Type of the action detail.
GetReplicationRecoveryPlanRecoveryGroupPreAction
- Fabric
Location string - The fabric location of runbook or script.
- Fail
Over List<string>Directions - Directions of fail over.
- Fail
Over List<string>Types - Types of fail over.
- Manual
Action stringInstruction - Instructions of manual action.
- Name string
- The name of the Replication Plan.
- Runbook
Id string - Id of runbook.
- Script
Path string - Path of action script.
- Type string
- Type of the action detail.
- Fabric
Location string - The fabric location of runbook or script.
- Fail
Over []stringDirections - Directions of fail over.
- Fail
Over []stringTypes - Types of fail over.
- Manual
Action stringInstruction - Instructions of manual action.
- Name string
- The name of the Replication Plan.
- Runbook
Id string - Id of runbook.
- Script
Path string - Path of action script.
- Type string
- Type of the action detail.
- fabric
Location String - The fabric location of runbook or script.
- fail
Over List<String>Directions - Directions of fail over.
- fail
Over List<String>Types - Types of fail over.
- manual
Action StringInstruction - Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbook
Id String - Id of runbook.
- script
Path String - Path of action script.
- type String
- Type of the action detail.
- fabric
Location string - The fabric location of runbook or script.
- fail
Over string[]Directions - Directions of fail over.
- fail
Over string[]Types - Types of fail over.
- manual
Action stringInstruction - Instructions of manual action.
- name string
- The name of the Replication Plan.
- runbook
Id string - Id of runbook.
- script
Path 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.
- fabric
Location String - The fabric location of runbook or script.
- fail
Over List<String>Directions - Directions of fail over.
- fail
Over List<String>Types - Types of fail over.
- manual
Action StringInstruction - Instructions of manual action.
- name String
- The name of the Replication Plan.
- runbook
Id String - Id of runbook.
- script
Path 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
azurerm
Terraform Provider.