We recommend using Azure Native.
Azure v6.13.0 published on Monday, Dec 9, 2024 by Pulumi
azure.siterecovery.getProtectionContainer
Explore with Pulumi AI
Use this data source to access information about an existing site recovery services protection container.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const container = azure.siterecovery.getProtectionContainer({
name: "primary-container",
recoveryVaultName: "tfex-recovery_vault",
resourceGroupName: "tfex-resource_group",
recoveryFabricName: "primary-fabric",
});
import pulumi
import pulumi_azure as azure
container = azure.siterecovery.get_protection_container(name="primary-container",
recovery_vault_name="tfex-recovery_vault",
resource_group_name="tfex-resource_group",
recovery_fabric_name="primary-fabric")
package main
import (
"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 {
_, err := siterecovery.LookupProtectionContainer(ctx, &siterecovery.LookupProtectionContainerArgs{
Name: "primary-container",
RecoveryVaultName: "tfex-recovery_vault",
ResourceGroupName: "tfex-resource_group",
RecoveryFabricName: "primary-fabric",
}, 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 container = Azure.SiteRecovery.GetProtectionContainer.Invoke(new()
{
Name = "primary-container",
RecoveryVaultName = "tfex-recovery_vault",
ResourceGroupName = "tfex-resource_group",
RecoveryFabricName = "primary-fabric",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.siterecovery.SiterecoveryFunctions;
import com.pulumi.azure.siterecovery.inputs.GetProtectionContainerArgs;
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 container = SiterecoveryFunctions.getProtectionContainer(GetProtectionContainerArgs.builder()
.name("primary-container")
.recoveryVaultName("tfex-recovery_vault")
.resourceGroupName("tfex-resource_group")
.recoveryFabricName("primary-fabric")
.build());
}
}
variables:
container:
fn::invoke:
Function: azure:siterecovery:getProtectionContainer
Arguments:
name: primary-container
recoveryVaultName: tfex-recovery_vault
resourceGroupName: tfex-resource_group
recoveryFabricName: primary-fabric
Using getProtectionContainer
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 getProtectionContainer(args: GetProtectionContainerArgs, opts?: InvokeOptions): Promise<GetProtectionContainerResult>
function getProtectionContainerOutput(args: GetProtectionContainerOutputArgs, opts?: InvokeOptions): Output<GetProtectionContainerResult>
def get_protection_container(name: Optional[str] = None,
recovery_fabric_name: Optional[str] = None,
recovery_vault_name: Optional[str] = None,
resource_group_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProtectionContainerResult
def get_protection_container_output(name: Optional[pulumi.Input[str]] = None,
recovery_fabric_name: Optional[pulumi.Input[str]] = None,
recovery_vault_name: Optional[pulumi.Input[str]] = None,
resource_group_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProtectionContainerResult]
func LookupProtectionContainer(ctx *Context, args *LookupProtectionContainerArgs, opts ...InvokeOption) (*LookupProtectionContainerResult, error)
func LookupProtectionContainerOutput(ctx *Context, args *LookupProtectionContainerOutputArgs, opts ...InvokeOption) LookupProtectionContainerResultOutput
> Note: This function is named LookupProtectionContainer
in the Go SDK.
public static class GetProtectionContainer
{
public static Task<GetProtectionContainerResult> InvokeAsync(GetProtectionContainerArgs args, InvokeOptions? opts = null)
public static Output<GetProtectionContainerResult> Invoke(GetProtectionContainerInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetProtectionContainerResult> getProtectionContainer(GetProtectionContainerArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: azure:siterecovery/getProtectionContainer:getProtectionContainer
arguments:
# arguments dictionary
The following arguments are supported:
- Name string
- Specifies the name of the protection container.
- Recovery
Fabric stringName - The name of the fabric that contains the protection container.
- Recovery
Vault stringName - The name of the Recovery Services Vault that the protection container is associated witth.
- Resource
Group stringName - The name of the resource group in which the associated protection container resides.
- Name string
- Specifies the name of the protection container.
- Recovery
Fabric stringName - The name of the fabric that contains the protection container.
- Recovery
Vault stringName - The name of the Recovery Services Vault that the protection container is associated witth.
- Resource
Group stringName - The name of the resource group in which the associated protection container resides.
- name String
- Specifies the name of the protection container.
- recovery
Fabric StringName - The name of the fabric that contains the protection container.
- recovery
Vault StringName - The name of the Recovery Services Vault that the protection container is associated witth.
- resource
Group StringName - The name of the resource group in which the associated protection container resides.
- name string
- Specifies the name of the protection container.
- recovery
Fabric stringName - The name of the fabric that contains the protection container.
- recovery
Vault stringName - The name of the Recovery Services Vault that the protection container is associated witth.
- resource
Group stringName - The name of the resource group in which the associated protection container resides.
- name str
- Specifies the name of the protection container.
- recovery_
fabric_ strname - The name of the fabric that contains the protection container.
- recovery_
vault_ strname - The name of the Recovery Services Vault that the protection container is associated witth.
- resource_
group_ strname - The name of the resource group in which the associated protection container resides.
- name String
- Specifies the name of the protection container.
- recovery
Fabric StringName - The name of the fabric that contains the protection container.
- recovery
Vault StringName - The name of the Recovery Services Vault that the protection container is associated witth.
- resource
Group StringName - The name of the resource group in which the associated protection container resides.
getProtectionContainer Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Recovery
Fabric stringName - Recovery
Vault stringName - Resource
Group stringName
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Recovery
Fabric stringName - Recovery
Vault stringName - Resource
Group stringName
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- recovery
Fabric StringName - recovery
Vault StringName - resource
Group StringName
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- recovery
Fabric stringName - recovery
Vault stringName - resource
Group stringName
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- recovery_
fabric_ strname - recovery_
vault_ strname - resource_
group_ strname
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- recovery
Fabric StringName - recovery
Vault StringName - resource
Group StringName
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.