BackupPolicyArgs

data class BackupPolicyArgs(val accountName: Output<String>? = null, val dailyBackupsToKeep: Output<Int>? = null, val enabled: Output<Boolean>? = null, val location: Output<String>? = null, val monthlyBackupsToKeep: Output<Int>? = null, val name: Output<String>? = null, val resourceGroupName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val weeklyBackupsToKeep: Output<Int>? = null) : ConvertibleToJava<BackupPolicyArgs>

Manages a NetApp Backup Policy.

NetApp Backup Policy Usage

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 exampleAccount = new azure.netapp.Account("example", {
name: "example-netappaccount",
location: example.location,
resourceGroupName: example.name,
});
const exampleBackupPolicy = new azure.netapp.BackupPolicy("example", {
name: "example-netappbackuppolicy",
resourceGroupName: example.name,
location: example.location,
accountName: exampleAccount.name,
enabled: true,
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_account = azure.netapp.Account("example",
name="example-netappaccount",
location=example.location,
resource_group_name=example.name)
example_backup_policy = azure.netapp.BackupPolicy("example",
name="example-netappbackuppolicy",
resource_group_name=example.name,
location=example.location,
account_name=example_account.name,
enabled=True)
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 exampleAccount = new Azure.NetApp.Account("example", new()
{
Name = "example-netappaccount",
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleBackupPolicy = new Azure.NetApp.BackupPolicy("example", new()
{
Name = "example-netappbackuppolicy",
ResourceGroupName = example.Name,
Location = example.Location,
AccountName = exampleAccount.Name,
Enabled = true,
});
});
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/netapp"
"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
}
exampleAccount, err := netapp.NewAccount(ctx, "example", &netapp.AccountArgs{
Name: pulumi.String("example-netappaccount"),
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
_, err = netapp.NewBackupPolicy(ctx, "example", &netapp.BackupPolicyArgs{
Name: pulumi.String("example-netappbackuppolicy"),
ResourceGroupName: example.Name,
Location: example.Location,
AccountName: exampleAccount.Name,
Enabled: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
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.netapp.Account;
import com.pulumi.azure.netapp.AccountArgs;
import com.pulumi.azure.netapp.BackupPolicy;
import com.pulumi.azure.netapp.BackupPolicyArgs;
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 exampleAccount = new Account("exampleAccount", AccountArgs.builder()
.name("example-netappaccount")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleBackupPolicy = new BackupPolicy("exampleBackupPolicy", BackupPolicyArgs.builder()
.name("example-netappbackuppolicy")
.resourceGroupName(example.name())
.location(example.location())
.accountName(exampleAccount.name())
.enabled(true)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleAccount:
type: azure:netapp:Account
name: example
properties:
name: example-netappaccount
location: ${example.location}
resourceGroupName: ${example.name}
exampleBackupPolicy:
type: azure:netapp:BackupPolicy
name: example
properties:
name: example-netappbackuppolicy
resourceGroupName: ${example.name}
location: ${example.location}
accountName: ${exampleAccount.name}
enabled: true

API Providers

This resource uses the following Azure API Providers:

  • Microsoft.NetApp: 2025-01-01

Import

NetApp Backup Policy can be imported using the resource id, e.g.

$ pulumi import azure:netapp/backupPolicy:BackupPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/backupPolicies/backuppolicy1

Constructors

Link copied to clipboard
constructor(accountName: Output<String>? = null, dailyBackupsToKeep: Output<Int>? = null, enabled: Output<Boolean>? = null, location: Output<String>? = null, monthlyBackupsToKeep: Output<Int>? = null, name: Output<String>? = null, resourceGroupName: Output<String>? = null, tags: Output<Map<String, String>>? = null, weeklyBackupsToKeep: Output<Int>? = null)

Properties

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

The name of the NetApp account in which the NetApp Policy should be created under. Changing this forces a new resource to be created.

Link copied to clipboard
val dailyBackupsToKeep: Output<Int>? = null

Provides the number of daily backups to keep, defaults to 2 which is the minimum, maximum is 1019.

Link copied to clipboard
val enabled: Output<Boolean>? = null

Whether the Backup Policy is enabled. Defaults to true.

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

Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

Link copied to clipboard
val monthlyBackupsToKeep: Output<Int>? = null

Provides the number of monthly backups to keep, defaults to 1 which is the minimum, maximum is 1019.

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

The name of the NetApp Backup Policy. Changing this forces a new resource to be created.

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

The name of the resource group where the NetApp Backup Policy should be created. Changing this forces a new resource to be created.

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A mapping of tags to assign to the resource.

Link copied to clipboard
val weeklyBackupsToKeep: Output<Int>? = null

Provides the number of weekly backups to keep, defaults to 1 which is the minimum, maximum is 1019.

Functions

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