![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.azure.dataprotection.BackupPolicyBlobStorage 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.BackupPolicyBlobStorageArgs;
import com.pulumi.azure.dataprotection.inputs.BackupPolicyBlobStorageState;
import com.pulumi.azure.dataprotection.outputs.BackupPolicyBlobStorageRetentionRule;
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 java.util.List;
import java.util.Optional;
import javax.annotation.Nullable;
/**
* Manages a Backup Policy Blob Storage.
*
* ## 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 com.pulumi.azure.dataprotection.BackupPolicyBlobStorage;
* import com.pulumi.azure.dataprotection.BackupPolicyBlobStorageArgs;
* 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());
*
* var exampleBackupPolicyBlobStorage = new BackupPolicyBlobStorage("exampleBackupPolicyBlobStorage", BackupPolicyBlobStorageArgs.builder()
* .name("example-backup-policy")
* .vaultId(exampleBackupVault.id())
* .operationalDefaultRetentionDuration("P30D")
* .build());
*
* }
* }
* }
*
* <!--End PulumiCodeChooser -->
*
* ## Import
*
* Backup Policy Blob Storages can be imported using the `resource id`, e.g.
*
* ```sh
* $ pulumi import azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.DataProtection/backupVaults/vault1/backupPolicies/backupPolicy1
* ```
*
*/
@ResourceType(type="azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage")
public class BackupPolicyBlobStorage extends com.pulumi.resources.CustomResource {
/**
* Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
@Export(name="backupRepeatingTimeIntervals", refs={List.class,String.class}, tree="[0,1]")
private Output* @Nullable */ List> backupRepeatingTimeIntervals;
/**
* @return Specifies a list of repeating time interval. It should follow `ISO 8601` repeating time interval. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
public Output>> backupRepeatingTimeIntervals() {
return Codegen.optional(this.backupRepeatingTimeIntervals);
}
/**
* The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
@Export(name="name", refs={String.class}, tree="[0]")
private Output name;
/**
* @return The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
public Output name() {
return this.name;
}
/**
* The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
@Export(name="operationalDefaultRetentionDuration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> operationalDefaultRetentionDuration;
/**
* @return The duration of operational default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
public Output> operationalDefaultRetentionDuration() {
return Codegen.optional(this.operationalDefaultRetentionDuration);
}
/**
* One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
*
* > **Note:** Setting `retention_rule` also requires setting `vault_default_retention_duration`.
*
*/
@Export(name="retentionRules", refs={List.class,BackupPolicyBlobStorageRetentionRule.class}, tree="[0,1]")
private Output* @Nullable */ List> retentionRules;
/**
* @return One or more `retention_rule` blocks as defined below. Changing this forces a new Backup Policy Blob Storage to be created.
*
* > **Note:** Setting `retention_rule` also requires setting `vault_default_retention_duration`.
*
*/
public Output>> retentionRules() {
return Codegen.optional(this.retentionRules);
}
/**
* Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
@Export(name="timeZone", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> timeZone;
/**
* @return Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
public Output> timeZone() {
return Codegen.optional(this.timeZone);
}
/**
* The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
*
* > **Note:** Setting `vault_default_retention_duration` also requires setting `backup_repeating_time_intervals`. At least one of `operational_default_retention_duration` or `vault_default_retention_duration` must be specified.
*
*/
@Export(name="vaultDefaultRetentionDuration", refs={String.class}, tree="[0]")
private Output* @Nullable */ String> vaultDefaultRetentionDuration;
/**
* @return The duration of vault default retention rule. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
*
* > **Note:** Setting `vault_default_retention_duration` also requires setting `backup_repeating_time_intervals`. At least one of `operational_default_retention_duration` or `vault_default_retention_duration` must be specified.
*
*/
public Output> vaultDefaultRetentionDuration() {
return Codegen.optional(this.vaultDefaultRetentionDuration);
}
/**
* The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
@Export(name="vaultId", refs={String.class}, tree="[0]")
private Output vaultId;
/**
* @return The ID of the Backup Vault within which the Backup Policy Blob Storage should exist. Changing this forces a new Backup Policy Blob Storage to be created.
*
*/
public Output vaultId() {
return this.vaultId;
}
/**
*
* @param name The _unique_ name of the resulting resource.
*/
public BackupPolicyBlobStorage(java.lang.String name) {
this(name, BackupPolicyBlobStorageArgs.Empty);
}
/**
*
* @param name The _unique_ name of the resulting resource.
* @param args The arguments to use to populate this resource's properties.
*/
public BackupPolicyBlobStorage(java.lang.String name, BackupPolicyBlobStorageArgs 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 BackupPolicyBlobStorage(java.lang.String name, BackupPolicyBlobStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage", name, makeArgs(args, options), makeResourceOptions(options, Codegen.empty()), false);
}
private BackupPolicyBlobStorage(java.lang.String name, Output id, @Nullable BackupPolicyBlobStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
super("azure:dataprotection/backupPolicyBlobStorage:BackupPolicyBlobStorage", name, state, makeResourceOptions(options, id), false);
}
private static BackupPolicyBlobStorageArgs makeArgs(BackupPolicyBlobStorageArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options) {
if (options != null && options.getUrn().isPresent()) {
return null;
}
return args == null ? BackupPolicyBlobStorageArgs.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 BackupPolicyBlobStorage get(java.lang.String name, Output id, @Nullable BackupPolicyBlobStorageState state, @Nullable com.pulumi.resources.CustomResourceOptions options) {
return new BackupPolicyBlobStorage(name, id, state, options);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy