get Protection Container
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")
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 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
})
}
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
API Providers
This data source uses the following Azure API Providers:
Microsoft.RecoveryServices
: 2024-04-01
Return
A collection of values returned by getProtectionContainer.
Parameters
A collection of arguments for invoking getProtectionContainer.
Return
A collection of values returned by getProtectionContainer.
Parameters
Specifies the name of the protection container.
The name of the fabric that contains the protection container.
The name of the Recovery Services Vault that the protection container is associated witth.
The name of the resource group in which the associated protection container resides.
See also
Return
A collection of values returned by getProtectionContainer.
Parameters
Builder for com.pulumi.azure.siterecovery.kotlin.inputs.GetProtectionContainerPlainArgs.