All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.azure.backup.ContainerStorageAccount Maven / Gradle / Ivy

Go to download

A Pulumi package for creating and managing Microsoft Azure cloud resources, based on the Terraform azurerm provider. We recommend using the [Azure Native provider](https://github.com/pulumi/pulumi-azure-native) to provision Azure infrastructure. Azure Native provides complete coverage of Azure resources and same-day access to new resources and resource updates.

There is a newer version: 6.10.0-alpha.1731737215
Show newest version
// *** WARNING: this file was generated by pulumi-java-gen. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

package com.pulumi.azure.backup;

import com.pulumi.azure.Utilities;
import com.pulumi.azure.backup.ContainerStorageAccountArgs;
import com.pulumi.azure.backup.inputs.ContainerStorageAccountState;
import com.pulumi.core.Output;
import com.pulumi.core.annotations.Export;
import com.pulumi.core.annotations.ResourceType;
import com.pulumi.core.internal.Codegen;
import java.lang.String;
import javax.annotation.Nullable;

/**
 * Manages registration of a storage account with Azure Backup. Storage accounts must be registered with an Azure Recovery Vault in order to backup file shares within the storage account. Registering a storage account with a vault creates what is known as a protection container within Azure Recovery Services. Once the container is created, Azure file shares within the storage account can be backed up using the `azure.backup.ProtectedFileShare` resource.
 * 
 * ## Example Usage
 * 
 * <!--Start PulumiCodeChooser -->
 * 
 * {@code
 * package generated_program;
 * 
 * import com.pulumi.Context;
 * import com.pulumi.Pulumi;
 * import com.pulumi.core.Output;
 * import com.pulumi.azure.core.ResourceGroup;
 * import com.pulumi.azure.core.ResourceGroupArgs;
 * import com.pulumi.azure.recoveryservices.Vault;
 * import com.pulumi.azure.recoveryservices.VaultArgs;
 * import com.pulumi.azure.storage.Account;
 * import com.pulumi.azure.storage.AccountArgs;
 * import com.pulumi.azure.backup.ContainerStorageAccount;
 * import com.pulumi.azure.backup.ContainerStorageAccountArgs;
 * 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) {
 *         var example = new ResourceGroup("example", ResourceGroupArgs.builder()
 *             .name("tfex-network-mapping-primary")
 *             .location("West Europe")
 *             .build());
 * 
 *         var vault = new Vault("vault", VaultArgs.builder()
 *             .name("example-recovery-vault")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .sku("Standard")
 *             .build());
 * 
 *         var sa = new Account("sa", AccountArgs.builder()
 *             .name("examplesa")
 *             .location(example.location())
 *             .resourceGroupName(example.name())
 *             .accountTier("Standard")
 *             .accountReplicationType("LRS")
 *             .build());
 * 
 *         var container = new ContainerStorageAccount("container", ContainerStorageAccountArgs.builder()
 *             .resourceGroupName(example.name())
 *             .recoveryVaultName(vault.name())
 *             .storageAccountId(sa.id())
 *             .build());
 * 
 *     }
 * }
 * }
 * 
* <!--End PulumiCodeChooser --> * * ## Import * * Backup Storage Account Containers can be imported using the `resource id`, e.g. * * ```sh * $ pulumi import azure:backup/containerStorageAccount:ContainerStorageAccount mycontainer "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resource-group-name/providers/Microsoft.RecoveryServices/vaults/recovery-vault-name/backupFabrics/Azure/protectionContainers/StorageContainer;storage;storage-rg-name;storage-account" * ``` * * Note the ID requires quoting as there are semicolons * */ @ResourceType(type="azure:backup/containerStorageAccount:ContainerStorageAccount") public class ContainerStorageAccount extends com.pulumi.resources.CustomResource { /** * The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. * */ @Export(name="recoveryVaultName", refs={String.class}, tree="[0]") private Output recoveryVaultName; /** * @return The name of the vault where the storage account will be registered. Changing this forces a new resource to be created. * */ public Output recoveryVaultName() { return this.recoveryVaultName; } /** * Name of the resource group where the vault is located. Changing this forces a new resource to be created. * */ @Export(name="resourceGroupName", refs={String.class}, tree="[0]") private Output resourceGroupName; /** * @return Name of the resource group where the vault is located. Changing this forces a new resource to be created. * */ public Output resourceGroupName() { return this.resourceGroupName; } /** * The ID of the Storage Account to be registered Changing this forces a new resource to be created. * * > **NOTE** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup * */ @Export(name="storageAccountId", refs={String.class}, tree="[0]") private Output storageAccountId; /** * @return The ID of the Storage Account to be registered Changing this forces a new resource to be created. * * > **NOTE** Azure Backup places a Resource Lock on the storage account that will cause deletion to fail until the account is unregistered from Azure Backup * */ public Output storageAccountId() { return this.storageAccountId; } /** * * @param name The _unique_ name of the resulting resource. */ public ContainerStorageAccount(java.lang.String name) { this(name, ContainerStorageAccountArgs.Empty); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. */ public ContainerStorageAccount(java.lang.String name, ContainerStorageAccountArgs args) { this(name, args, null); } /** * * @param name The _unique_ name of the resulting resource. * @param args The arguments to use to populate this resource's properties. * @param options A bag of options that control this resource's behavior. */ public ContainerStorageAccount(java.lang.String name, ContainerStorageAccountArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:backup/containerStorageAccount:ContainerStorageAccount", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false); } private ContainerStorageAccount(java.lang.String name, Output id, @Nullable ContainerStorageAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { super("azure:backup/containerStorageAccount:ContainerStorageAccount", name, state, makeResourceOptions(options, id), false); } private static ContainerStorageAccountArgs makeArgs(ContainerStorageAccountArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) { if (options != null && options.getUrn().isPresent()) { return null; } return args == null ? ContainerStorageAccountArgs.Empty : args; } private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@Nullable com.pulumi.resources.CustomResourceOptions options, @Nullable Output id) { var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .build(); return com.pulumi.resources.CustomResourceOptions.merge(defaultOptions, options, id); } /** * Get an existing Host resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state * @param options Optional settings to control the behavior of the CustomResource. */ public static ContainerStorageAccount get(java.lang.String name, Output id, @Nullable ContainerStorageAccountState state, @Nullable com.pulumi.resources.CustomResourceOptions options) { return new ContainerStorageAccount(name, id, state, options); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy