get Protection Container
suspend fun getProtectionContainer(argument: GetProtectionContainerPlainArgs): GetProtectionContainerResult
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",
});
Content copied to clipboard
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")
Content copied to clipboard
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",
});
});
Content copied to clipboard
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
})
}
Content copied to clipboard
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());
}
}
Content copied to clipboard
variables:
container:
fn::invoke:
function: azure:siterecovery:getProtectionContainer
arguments:
name: primary-container
recoveryVaultName: tfex-recovery_vault
resourceGroupName: tfex-resource_group
recoveryFabricName: primary-fabric
Content copied to clipboard
Return
A collection of values returned by getProtectionContainer.
Parameters
argument
A collection of arguments for invoking getProtectionContainer.
suspend fun getProtectionContainer(name: String, recoveryFabricName: String, recoveryVaultName: String, resourceGroupName: String): GetProtectionContainerResult
Return
A collection of values returned by getProtectionContainer.
Parameters
name
Specifies the name of the protection container.
recovery Fabric Name
The name of the fabric that contains the protection container.
recovery Vault Name
The name of the Recovery Services Vault that the protection container is associated witth.
resource Group Name
The name of the resource group in which the associated protection container resides.
See also
suspend fun getProtectionContainer(argument: suspend GetProtectionContainerPlainArgsBuilder.() -> Unit): GetProtectionContainerResult
Return
A collection of values returned by getProtectionContainer.
Parameters
argument
Builder for com.pulumi.azure.siterecovery.kotlin.inputs.GetProtectionContainerPlainArgs.