PolicyFileShareArgs

data class PolicyFileShareArgs(val backup: Output<PolicyFileShareBackupArgs>? = null, val name: Output<String>? = null, val recoveryVaultName: Output<String>? = null, val resourceGroupName: Output<String>? = null, val retentionDaily: Output<PolicyFileShareRetentionDailyArgs>? = null, val retentionMonthly: Output<PolicyFileShareRetentionMonthlyArgs>? = null, val retentionWeekly: Output<PolicyFileShareRetentionWeeklyArgs>? = null, val retentionYearly: Output<PolicyFileShareRetentionYearlyArgs>? = null, val timezone: Output<String>? = null) : ConvertibleToJava<PolicyFileShareArgs>

Manages an Azure File Share Backup Policy within a Recovery Services vault.

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.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.inputs.PolicyFileShareRetentionWeeklyArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareRetentionMonthlyArgs;
import com.pulumi.azure.backup.inputs.PolicyFileShareRetentionYearlyArgs;
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 exampleVault = new Vault("exampleVault", VaultArgs.builder()
.location(exampleResourceGroup.location())
.resourceGroupName(exampleResourceGroup.name())
.sku("Standard")
.build());
var policy = new PolicyFileShare("policy", PolicyFileShareArgs.builder()
.resourceGroupName(exampleResourceGroup.name())
.recoveryVaultName(exampleVault.name())
.timezone("UTC")
.backup(PolicyFileShareBackupArgs.builder()
.frequency("Daily")
.time("23:00")
.build())
.retentionDaily(PolicyFileShareRetentionDailyArgs.builder()
.count(10)
.build())
.retentionWeekly(PolicyFileShareRetentionWeeklyArgs.builder()
.count(7)
.weekdays(
"Sunday",
"Wednesday",
"Friday",
"Saturday")
.build())
.retentionMonthly(PolicyFileShareRetentionMonthlyArgs.builder()
.count(7)
.weekdays(
"Sunday",
"Wednesday")
.weeks(
"First",
"Last")
.build())
.retentionYearly(PolicyFileShareRetentionYearlyArgs.builder()
.count(7)
.weekdays("Sunday")
.weeks("Last")
.months("January")
.build())
.build());
}
}

Import

Azure File Share Backup Policies can be imported using the resource id, e.g.

$ pulumi import azure:backup/policyFileShare:PolicyFileShare policy1 /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.RecoveryServices/vaults/example-recovery-vault/backupPolicies/policy1

Constructors

Link copied to clipboard
fun PolicyFileShareArgs(backup: Output<PolicyFileShareBackupArgs>? = null, name: Output<String>? = null, recoveryVaultName: Output<String>? = null, resourceGroupName: Output<String>? = null, retentionDaily: Output<PolicyFileShareRetentionDailyArgs>? = null, retentionMonthly: Output<PolicyFileShareRetentionMonthlyArgs>? = null, retentionWeekly: Output<PolicyFileShareRetentionWeeklyArgs>? = null, retentionYearly: Output<PolicyFileShareRetentionYearlyArgs>? = null, timezone: Output<String>? = null)

Functions

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

Properties

Link copied to clipboard
val backup: Output<PolicyFileShareBackupArgs>? = null

Configures the Policy backup frequency and times as documented in the backup block below.

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

Specifies the name of the policy. Changing this forces a new resource to be created.

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 policy. Changing this forces a new resource to be created.

Link copied to clipboard

Configures the policy daily retention as documented in the retention_daily block below.

Link copied to clipboard

Configures the policy monthly retention as documented in the retention_monthly block below.

Link copied to clipboard

Configures the policy weekly retention as documented in the retention_weekly block below.

Link copied to clipboard

Configures the policy yearly retention as documented in the retention_yearly block below.

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

Specifies the timezone. the possible values are defined here. Defaults to UTC