com.pulumi.azure.dataprotection.BackupVault Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure Show documentation
Show all versions of azure Show documentation
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.
// *** 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.dataprotection;
import com.pulumi.azure.Utilities;
import com.pulumi.azure.dataprotection.BackupVaultArgs;
import com.pulumi.azure.dataprotection.inputs.BackupVaultState;
import com.pulumi.azure.dataprotection.outputs.BackupVaultIdentity;
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.Boolean;
import java.lang.Double;
import java.lang.String;
import java.util.Map;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Backup Vault.
*
* ## 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.dataprotection.BackupVault;
* import com.pulumi.azure.dataprotection.BackupVaultArgs;
* 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("example-resources")
* .location("West Europe")
* .build());
*
* var exampleBackupVault = new BackupVault("exampleBackupVault", BackupVaultArgs.builder()
* .name("example-backup-vault")
* .resourceGroupName(example.name())
* .location(example.location())
* .datastoreType("VaultStore")
* .redundancy("LocallyRedundant")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Backup Vaults can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:dataprotection/backupVault:BackupVault example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1
* ```
*
*/
@ResourceType(type="azure:dataprotection/backupVault:BackupVault")
public class BackupVault extends com.pulumi.resources.CustomResource {
/**
* Whether to enable cross-region restore for the Backup Vault.
*
* > **Note:** The `cross_region_restore_enabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `cross_region_restore_enabled` is enabled, it cannot be disabled.
*
*/
@Export(name="crossRegionRestoreEnabled", refs={Boolean.class}, tree="[0]")
private Output* @Nullable */ Boolean> crossRegionRestoreEnabled;
/**
* @return Whether to enable cross-region restore for the Backup Vault.
*
* > **Note:** The `cross_region_restore_enabled` can only be specified when `redundancy` is specified for `GeoRedundant`. Once `cross_region_restore_enabled` is enabled, it cannot be disabled.
*
*/
public Output> crossRegionRestoreEnabled() {
return Codegen.optional(this.crossRegionRestoreEnabled);
}
/**
* Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
*
* > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
*
*/
@Export(name="datastoreType", refs={String.class}, tree="[0]")
private Output datastoreType;
/**
* @return Specifies the type of the data store. Possible values are `ArchiveStore`, `OperationalStore`, `SnapshotStore` and `VaultStore`. Changing this forces a new resource to be created.
*
* > **Note:** The `SnapshotStore` will be removed in version 4.0 as it has been replaced by `OperationalStore`.
*
*/
public Output datastoreType() {
return this.datastoreType;
}
/**
* An `identity` block as defined below.
*
*/
@Export(name="identity", refs={BackupVaultIdentity.class}, tree="[0]")
private Output* @Nullable */ BackupVaultIdentity> identity;
/**
* @return An `identity` block as defined below.
*
*/
public Output> identity() {
return Codegen.optional(this.identity);
}
/**
* The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
*
*/
@Export(name="location", refs={String.class}, tree="[0]")
private Output location;
/**
* @return The Azure Region where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
*
*/
public Output location() {
return this.location;
}
/**
* Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return Specifies the name of the Backup Vault. Changing this forces a new Backup Vault to be created.
*
*/
public Output name() {
return this.name;
}
/**
* Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
*
*/
@Export(name="redundancy", refs={String.class}, tree="[0]")
private Output redundancy;
/**
* @return Specifies the backup storage redundancy. Possible values are `GeoRedundant`, `LocallyRedundant` and `ZoneRedundant`. Changing this forces a new Backup Vault to be created.
*
*/
public Output redundancy() {
return this.redundancy;
}
/**
* The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
*
*/
@Export(name="resourceGroupName", refs={String.class}, tree="[0]")
private Output resourceGroupName;
/**
* @return The name of the Resource Group where the Backup Vault should exist. Changing this forces a new Backup Vault to be created.
*
*/
public Output resourceGroupName() {
return this.resourceGroupName;
}
/**
* The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
*
* > **Note:** The `retention_duration_in_days` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retention_duration_in_days` is required when the `soft_delete` is set to `On`.
*
*/
@Export(name="retentionDurationInDays", refs={Double.class}, tree="[0]")
private Output* @Nullable */ Double> retentionDurationInDays;
/**
* @return The soft delete retention duration for this Backup Vault. Possible values are between `14` and `180`. Defaults to `14`.
*
* > **Note:** The `retention_duration_in_days` is the number of days for which deleted data is retained before being permanently deleted. Retention period till 14 days are free of cost, however, retention beyond 14 days may incur additional charges. The `retention_duration_in_days` is required when the `soft_delete` is set to `On`.
*
*/
public Output> retentionDurationInDays() {
return Codegen.optional(this.retentionDurationInDays);
}
/**
* The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off` and `On`. Defaults to `On`.
*
* > **Note:** Once the `soft_delete` is set to `AlwaysOn`, the setting cannot be changed.
*
*/
@Export(name="softDelete", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> softDelete;
/**
* @return The state of soft delete for this Backup Vault. Possible values are `AlwaysOn`, `Off` and `On`. Defaults to `On`.
*
* > **Note:** Once the `soft_delete` is set to `AlwaysOn`, the setting cannot be changed.
*
*/
public Output> softDelete() {
return Codegen.optional(this.softDelete);
}
/**
* A mapping of tags which should be assigned to the Backup Vault.
*
*/
@Export(name="tags", refs={Map.class,String.class}, tree="[0,1,1]")
private Output* @Nullable */ Map> tags;
/**
* @return A mapping of tags which should be assigned to the Backup Vault.
*
*/
public Output>> tags() {
return Codegen.optional(this.tags);
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public BackupVault(java.lang.String name) {
this(name, BackupVaultArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public BackupVault(java.lang.String name, BackupVaultArgs 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 BackupVault(java.lang.String name, BackupVaultArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:dataprotection/backupVault:BackupVault", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private BackupVault(java.lang.String name, Output id, @Nullable BackupVaultState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:dataprotection/backupVault:BackupVault", name, state, makeResourceOptions(options, id), false);
}
private static BackupVaultArgs makeArgs(BackupVaultArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? BackupVaultArgs.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 BackupVault get(java.lang.String name, Output id, @Nullable BackupVaultState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new BackupVault(name, id, state, options);
}
}