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

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

azure.siterecovery.getReplicationRecoveryPlan

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi

    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/v5/go/azure/recoveryservices"
    	"github.com/pulumi/pulumi-azure/sdk/v5/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.
    RecoveryVaultId string
    The ID of the vault that should be updated.
    Name string
    The name of the Replication Plan.
    RecoveryVaultId string
    The ID of the vault that should be updated.
    name String
    The name of the Replication Plan.
    recoveryVaultId String
    The ID of the vault that should be updated.
    name string
    The name of the Replication Plan.
    recoveryVaultId string
    The ID of the vault that should be updated.
    name str
    The name of the Replication Plan.
    recovery_vault_id str
    The ID of the vault that should be updated.
    name String
    The name of the Replication Plan.
    recoveryVaultId 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

    GetReplicationRecoveryPlanRecoveryGroup

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

    GetReplicationRecoveryPlanRecoveryGroupPostAction

    FabricLocation string
    The fabric location of runbook or script.
    FailOverDirections List<string>
    Directions of fail over.
    FailOverTypes List<string>
    Types of fail over.
    ManualActionInstruction string
    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.
    FailOverDirections []string
    Directions of fail over.
    FailOverTypes []string
    Types of fail over.
    ManualActionInstruction string
    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.
    failOverDirections List<String>
    Directions of fail over.
    failOverTypes List<String>
    Types of fail over.
    manualActionInstruction String
    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.
    failOverDirections string[]
    Directions of fail over.
    failOverTypes string[]
    Types of fail over.
    manualActionInstruction string
    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_directions Sequence[str]
    Directions of fail over.
    fail_over_types Sequence[str]
    Types of fail over.
    manual_action_instruction str
    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.
    failOverDirections List<String>
    Directions of fail over.
    failOverTypes List<String>
    Types of fail over.
    manualActionInstruction String
    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.
    FailOverDirections List<string>
    Directions of fail over.
    FailOverTypes List<string>
    Types of fail over.
    ManualActionInstruction string
    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.
    FailOverDirections []string
    Directions of fail over.
    FailOverTypes []string
    Types of fail over.
    ManualActionInstruction string
    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.
    failOverDirections List<String>
    Directions of fail over.
    failOverTypes List<String>
    Types of fail over.
    manualActionInstruction String
    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.
    failOverDirections string[]
    Directions of fail over.
    failOverTypes string[]
    Types of fail over.
    manualActionInstruction string
    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_directions Sequence[str]
    Directions of fail over.
    fail_over_types Sequence[str]
    Types of fail over.
    manual_action_instruction str
    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.
    failOverDirections List<String>
    Directions of fail over.
    failOverTypes List<String>
    Types of fail over.
    manualActionInstruction String
    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 azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.73.0 published on Monday, Apr 22, 2024 by Pulumi