ProtectedFileShareArgs

data class ProtectedFileShareArgs(val backupPolicyId: Output<String>? = null, val recoveryVaultName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val sourceFileShareName: Output<String>? = null, val sourceStorageAccountId: Output<String>? = null) : ConvertibleToJava<ProtectedFileShareArgs>

Manages an Azure Backup Protected File Share to enable backups for file shares within an Azure Storage Account

Example Usage

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.storage.Share;
import com.pulumi.azure.storage.ShareArgs;
import com.pulumi.azure.backup.ContainerStorageAccount;
import com.pulumi.azure.backup.ContainerStorageAccountArgs;
import com.pulumi.azure.backup.PolicyFileShare;
import com.pulumi.azure.backup.PolicyFileShareArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareBackupArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareRetentionDailyArgs;
import com.pulumi.azure.backup.ProtectedFileShare;
import com.pulumi.azure.backup.ProtectedFileShareArgs;
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 exampleResourceGroup = new ResourceGroup("exampleResourceGroup", ResourceGroupArgs.builder()
.location("West Europe")
.build());
var vault = new Vault("vault", VaultArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.build());
var sa = new Account("sa", AccountArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.accountTier("Standard")
.accountReplicationType("LRS")
.build());
var exampleShare = new Share("exampleShare", ShareArgs.builder()
.storageAccountName(sa.name())
.quota(1)
.build());
var protection_container = new ContainerStorageAccount("protection-container", ContainerStorageAccountArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.recoveryVaultName(vault.name())
.storageAccountId(sa.id())
.build());
var examplePolicyFileShare = new PolicyFileShare("examplePolicyFileShare", PolicyFileShareArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.recoveryVaultName(vault.name())
.backup(PolicyFileShareBackupArgs.builder()
.frequency("Daily")
.time("23:00")
.build())
.retentionDaily(PolicyFileShareRetentionDailyArgs.builder()
.count(10)
.build())
.build());
var share1 = new ProtectedFileShare("share1", ProtectedFileShareArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.recoveryVaultName(vault.name())
.sourceStorageAccountId(protection_container.storageAccountId())
.sourceFileShareName(exampleShare.name())
.backupPolicyId(examplePolicyFileShare.id())
.build());
}
}

Import

Azure Backup Protected File Shares can be imported using the resource id, e.g.

$ pulumi import azure:backup/protectedFileShare:ProtectedFileShare item1 "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupFabrics/Azure/protectionContainers/StorageContainer;storage;group2;example-storage-account/protectedItems/AzureFileShare;3f6e3108a45793581bcbd1c61c87a3b2ceeb4ff4bc02a95ce9d1022b23722935"

->NOTE The ID requires quoting as there are semicolons. This user unfriendly ID can be found in the Deployments of the used resourcegroup, look for an Deployment which starts with ConfigureAFSProtection-, click then Go to resource.

Constructors

Link copied to clipboard
fun ProtectedFileShareArgs(backupPolicyId: Output<String>? = null, recoveryVaultName: Output<String>? = null, resourceGroupName: Output<String>? = null, sourceFileShareName: Output<String>? = null, sourceStorageAccountId: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): ProtectedFileShareArgs

Properties

Link copied to clipboard
val backupPolicyId: Output<String>? = null

Specifies the ID of the backup policy to use. The policy must be an Azure File Share backup policy. Other types are not supported.

Link copied to clipboard
val recoveryVaultName: Output<String>? = null

Specifies the name of the Recovery Services Vault to use. Changing this forces a new resource to be created.

Link copied to clipboard
val resourceGroupName: Output<String>? = null

The name of the resource group in which to create the Azure Backup Protected File Share. Changing this forces a new resource to be created.

Link copied to clipboard
val sourceFileShareName: Output<String>? = null

Specifies the name of the file share to backup. Changing this forces a new resource to be created.

Link copied to clipboard
val sourceStorageAccountId: Output<String>? = null

Specifies the ID of the storage account of the file share to backup. Changing this forces a new resource to be created.