Azure Classic

Pulumi Official
Package maintained by Pulumi
v5.5.0 published on Wednesday, May 4, 2022 by Pulumi

getProtectionContainer

Use this data source to access information about an existing site recovery services protection container.

Example Usage

using Pulumi;
using Azure = Pulumi.Azure;

class MyStack : Stack
{
    public MyStack()
    {
        var container = Output.Create(Azure.SiteRecovery.GetProtectionContainer.InvokeAsync(new Azure.SiteRecovery.GetProtectionContainerArgs
        {
            Name = "primary-container",
            RecoveryFabricName = "primary-fabric",
            RecoveryVaultName = "tfex-recovery_vault",
            ResourceGroupName = "tfex-resource_group",
        }));
    }

}
package main

import (
	"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 {
		_, err := siterecovery.LookupProtectionContainer(ctx, &siterecovery.LookupProtectionContainerArgs{
			Name:               "primary-container",
			RecoveryFabricName: "primary-fabric",
			RecoveryVaultName:  "tfex-recovery_vault",
			ResourceGroupName:  "tfex-resource_group",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import java.util.*;
import java.io.*;
import java.nio.*;
import com.pulumi.*;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var container = Output.of(SiterecoveryFunctions.getProtectionContainer(GetProtectionContainerArgs.builder()
            .name("primary-container")
            .recoveryFabricName("primary-fabric")
            .recoveryVaultName("tfex-recovery_vault")
            .resourceGroupName("tfex-resource_group")
            .build()));

        }
}
import pulumi
import pulumi_azure as azure

container = azure.siterecovery.get_protection_container(name="primary-container",
    recovery_fabric_name="primary-fabric",
    recovery_vault_name="tfex-recovery_vault",
    resource_group_name="tfex-resource_group")
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const container = pulumi.output(azure.siterecovery.getProtectionContainer({
    name: "primary-container",
    recoveryFabricName: "primary-fabric",
    recoveryVaultName: "tfex-recovery_vault",
    resourceGroupName: "tfex-resource_group",
}));
variables:
  container:
    Fn::Invoke:
      Function: azure:siterecovery:getProtectionContainer
      Arguments:
        name: primary-container
        recoveryFabricName: primary-fabric
        recoveryVaultName: tfex-recovery_vault
        resourceGroupName: tfex-resource_group

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.

RecoveryFabricName string

The name of the fabric that contains the protection container.

RecoveryVaultName string

The name of the Recovery Services Vault that the protection container is associated witth.

ResourceGroupName string

The name of the resource group in which the associated protection container resides.

Name string

Specifies the name of the protection container.

RecoveryFabricName string

The name of the fabric that contains the protection container.

RecoveryVaultName string

The name of the Recovery Services Vault that the protection container is associated witth.

ResourceGroupName string

The name of the resource group in which the associated protection container resides.

name String

Specifies the name of the protection container.

recoveryFabricName String

The name of the fabric that contains the protection container.

recoveryVaultName String

The name of the Recovery Services Vault that the protection container is associated witth.

resourceGroupName String

The name of the resource group in which the associated protection container resides.

name string

Specifies the name of the protection container.

recoveryFabricName string

The name of the fabric that contains the protection container.

recoveryVaultName string

The name of the Recovery Services Vault that the protection container is associated witth.

resourceGroupName string

The name of the resource group in which the associated protection container resides.

name str

Specifies the name of the protection container.

recovery_fabric_name str

The name of the fabric that contains the protection container.

recovery_vault_name str

The name of the Recovery Services Vault that the protection container is associated witth.

resource_group_name str

The name of the resource group in which the associated protection container resides.

name String

Specifies the name of the protection container.

recoveryFabricName String

The name of the fabric that contains the protection container.

recoveryVaultName String

The name of the Recovery Services Vault that the protection container is associated witth.

resourceGroupName String

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
RecoveryFabricName string
RecoveryVaultName string
ResourceGroupName string
Id string

The provider-assigned unique ID for this managed resource.

Name string
RecoveryFabricName string
RecoveryVaultName string
ResourceGroupName string
id String

The provider-assigned unique ID for this managed resource.

name String
recoveryFabricName String
recoveryVaultName String
resourceGroupName String
id string

The provider-assigned unique ID for this managed resource.

name string
recoveryFabricName string
recoveryVaultName string
resourceGroupName string
id str

The provider-assigned unique ID for this managed resource.

name str
recovery_fabric_name str
recovery_vault_name str
resource_group_name str
id String

The provider-assigned unique ID for this managed resource.

name String
recoveryFabricName String
recoveryVaultName String
resourceGroupName String

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes

This Pulumi package is based on the azurerm Terraform Provider.