Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.dataprotection.kotlin
import com.pulumi.azure.dataprotection.BackupPolicyBlobStorageArgs.builder
import com.pulumi.azure.dataprotection.kotlin.inputs.BackupPolicyBlobStorageRetentionRuleArgs
import com.pulumi.azure.dataprotection.kotlin.inputs.BackupPolicyBlobStorageRetentionRuleArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Deprecated
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* Manages a Backup Policy Blob Storage.
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as azure from "@pulumi/azure";
* const example = new azure.core.ResourceGroup("example", {
* name: "example-resources",
* location: "West Europe",
* });
* const exampleBackupVault = new azure.dataprotection.BackupVault("example", {
* name: "example-backup-vault",
* resourceGroupName: example.name,
* location: example.location,
* datastoreType: "VaultStore",
* redundancy: "LocallyRedundant",
* });
* const exampleBackupPolicyBlobStorage = new azure.dataprotection.BackupPolicyBlobStorage("example", {
* name: "example-backup-policy",
* vaultId: exampleBackupVault.id,
* retentionDuration: "P30D",
* });
* ```
* ```python
* import pulumi
* import pulumi_azure as azure
* example = azure.core.ResourceGroup("example",
* name="example-resources",
* location="West Europe")
* example_backup_vault = azure.dataprotection.BackupVault("example",
* name="example-backup-vault",
* resource_group_name=example.name,
* location=example.location,
* datastore_type="VaultStore",
* redundancy="LocallyRedundant")
* example_backup_policy_blob_storage = azure.dataprotection.BackupPolicyBlobStorage("example",
* name="example-backup-policy",
* vault_id=example_backup_vault.id,
* retention_duration="P30D")
* ```
* ```csharp
* using System.Collections.Generic;
* using System.Linq;
* using Pulumi;
* using Azure = Pulumi.Azure;
* return await Deployment.RunAsync(() =>
* {
* var example = new Azure.Core.ResourceGroup("example", new()
* {
* Name = "example-resources",
* Location = "West Europe",
* });
* var exampleBackupVault = new Azure.DataProtection.BackupVault("example", new()
* {
* Name = "example-backup-vault",
* ResourceGroupName = example.Name,
* Location = example.Location,
* DatastoreType = "VaultStore",
* Redundancy = "LocallyRedundant",
* });
* var exampleBackupPolicyBlobStorage = new Azure.DataProtection.BackupPolicyBlobStorage("example", new()
* {
* Name = "example-backup-policy",
* VaultId = exampleBackupVault.Id,
* RetentionDuration = "P30D",
* });
* });
* ```
* ```go
* package main
* import (
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
* "github.com/pulumi/pulumi-azure/sdk/v5/go/azure/dataprotection"
* "github.com/pulumi/pulumi/sdk/v3/go/pulumi"
* )
* func main() {
* pulumi.Run(func(ctx *pulumi.Context) error {
* example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
* Name: pulumi.String("example-resources"),
* Location: pulumi.String("West Europe"),
* })
* if err != nil {
* return err
* }
* exampleBackupVault, err := dataprotection.NewBackupVault(ctx, "example", &dataprotection.BackupVaultArgs{
* Name: pulumi.String("example-backup-vault"),
* ResourceGroupName: example.Name,
* Location: example.Location,
* DatastoreType: pulumi.String("VaultStore"),
* Redundancy: pulumi.String("LocallyRedundant"),
* })
* if err != nil {
* return err
* }
* _, err = dataprotection.NewBackupPolicyBlobStorage(ctx, "example", &dataprotection.BackupPolicyBlobStorageArgs{
* Name: pulumi.String("example-backup-policy"),
* VaultId: exampleBackupVault.ID(),
* RetentionDuration: pulumi.String("P30D"),
* })
* if err != nil {
* return err
* }
* return nil
* })
* }
* ```
* ```java
* 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())
* .retentionDuration("P30D")
* .build());
* }
* }
* ```
* ```yaml
* resources:
* example:
* type: azure:core:ResourceGroup
* properties:
* name: example-resources
* location: West Europe
* exampleBackupVault:
* type: azure:dataprotection:BackupVault
* name: example
* properties:
* name: example-backup-vault
* resourceGroupName: ${example.name}
* location: ${example.location}
* datastoreType: VaultStore
* redundancy: LocallyRedundant
* exampleBackupPolicyBlobStorage:
* type: azure:dataprotection:BackupPolicyBlobStorage
* name: example
* properties:
* name: example-backup-policy
* vaultId: ${exampleBackupVault.id}
* retentionDuration: P30D
* ```
*
* ## 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
* ```
* @property backupRepeatingTimeIntervals 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.
* @property name The name which should be used for this Backup Policy Blob Storage. Changing this forces a new Backup Policy Blob Storage to be created.
* @property operationalDefaultRetentionDuration 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.
* @property retentionDuration Duration of deletion after given timespan. It should follow `ISO 8601` duration format. Changing this forces a new Backup Policy Blob Storage to be created.
* > **Note:** > `retention_duration` is deprecated in version 3.0 and will be removed in version 4.0 of the AzureRM Provider. Please use the `operational_default_retention_duration` instead.
* @property retentionRules 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`.
* @property timeZone Specifies the Time Zone which should be used by the backup schedule. Changing this forces a new Backup Policy Blob Storage to be created.
* @property vaultDefaultRetentionDuration 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`, `retention_duration` or `vault_default_retention_duration` must be specified.
* @property vaultId 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 data class BackupPolicyBlobStorageArgs(
public val backupRepeatingTimeIntervals: Output>? = null,
public val name: Output? = null,
public val operationalDefaultRetentionDuration: Output? = null,
@Deprecated(
message = """
This property has been renamed to `operational_default_retention_duration` and will be removed in
v4.0 of the AzureRM provider
""",
)
public val retentionDuration: Output? = null,
public val retentionRules: Output>? = null,
public val timeZone: Output? = null,
public val vaultDefaultRetentionDuration: Output? = null,
public val vaultId: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.dataprotection.BackupPolicyBlobStorageArgs =
com.pulumi.azure.dataprotection.BackupPolicyBlobStorageArgs.builder()
.backupRepeatingTimeIntervals(
backupRepeatingTimeIntervals?.applyValue({ args0 ->
args0.map({ args0 -> args0 })
}),
)
.name(name?.applyValue({ args0 -> args0 }))
.operationalDefaultRetentionDuration(
operationalDefaultRetentionDuration?.applyValue({ args0 ->
args0
}),
)
.retentionDuration(retentionDuration?.applyValue({ args0 -> args0 }))
.retentionRules(
retentionRules?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.timeZone(timeZone?.applyValue({ args0 -> args0 }))
.vaultDefaultRetentionDuration(vaultDefaultRetentionDuration?.applyValue({ args0 -> args0 }))
.vaultId(vaultId?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [BackupPolicyBlobStorageArgs].
*/
@PulumiTagMarker
public class BackupPolicyBlobStorageArgsBuilder internal constructor() {
private var backupRepeatingTimeIntervals: Output>? = null
private var name: Output? = null
private var operationalDefaultRetentionDuration: Output? = null
private var retentionDuration: Output? = null
private var retentionRules: Output>? = null
private var timeZone: Output? = null
private var vaultDefaultRetentionDuration: Output? = null
private var vaultId: Output? = null
/**
* @param value 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.
*/
@JvmName("qwrakjacpkxilldq")
public suspend fun backupRepeatingTimeIntervals(`value`: Output>) {
this.backupRepeatingTimeIntervals = value
}
@JvmName("tecuurrkvkuferjw")
public suspend fun backupRepeatingTimeIntervals(vararg values: Output) {
this.backupRepeatingTimeIntervals = Output.all(values.asList())
}
/**
* @param values 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.
*/
@JvmName("jwdyadrjeiqoctja")
public suspend fun backupRepeatingTimeIntervals(values: List