Snapshot Policy Args
data class SnapshotPolicyArgs(val accountName: Output<String>? = null, val dailySchedule: Output<DailyScheduleArgs>? = null, val enabled: Output<Boolean>? = null, val hourlySchedule: Output<HourlyScheduleArgs>? = null, val location: Output<String>? = null, val monthlySchedule: Output<MonthlyScheduleArgs>? = null, val resourceGroupName: Output<String>? = null, val snapshotPolicyName: Output<String>? = null, val tags: Output<Map<String, String>>? = null, val weeklySchedule: Output<WeeklyScheduleArgs>? = null) : ConvertibleToJava<SnapshotPolicyArgs>
Snapshot policy information API Version: 2020-12-01.
Example Usage
SnapshotPolicies_Create
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureNative = Pulumi.AzureNative;
return await Deployment.RunAsync(() =>
{
var snapshotPolicy = new AzureNative.NetApp.SnapshotPolicy("snapshotPolicy", new()
{
AccountName = "account1",
DailySchedule = new AzureNative.NetApp.Inputs.DailyScheduleArgs
{
Hour = 14,
Minute = 30,
SnapshotsToKeep = 4,
},
HourlySchedule = new AzureNative.NetApp.Inputs.HourlyScheduleArgs
{
Minute = 50,
SnapshotsToKeep = 2,
},
Location = "eastus",
MonthlySchedule = new AzureNative.NetApp.Inputs.MonthlyScheduleArgs
{
DaysOfMonth = "10,11,12",
Hour = 14,
Minute = 15,
SnapshotsToKeep = 5,
},
ResourceGroupName = "myRG",
SnapshotPolicyName = "snapshotPolicyName",
WeeklySchedule = new AzureNative.NetApp.Inputs.WeeklyScheduleArgs
{
Day = "Wednesday",
Hour = 14,
Minute = 45,
SnapshotsToKeep = 3,
},
});
});
Content copied to clipboard
package main
import (
netapp "github.com/pulumi/pulumi-azure-native-sdk/netapp"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netapp.NewSnapshotPolicy(ctx, "snapshotPolicy", &netapp.SnapshotPolicyArgs{
AccountName: pulumi.String("account1"),
DailySchedule: &netapp.DailyScheduleArgs{
Hour: pulumi.Int(14),
Minute: pulumi.Int(30),
SnapshotsToKeep: pulumi.Int(4),
},
HourlySchedule: &netapp.HourlyScheduleArgs{
Minute: pulumi.Int(50),
SnapshotsToKeep: pulumi.Int(2),
},
Location: pulumi.String("eastus"),
MonthlySchedule: &netapp.MonthlyScheduleArgs{
DaysOfMonth: pulumi.String("10,11,12"),
Hour: pulumi.Int(14),
Minute: pulumi.Int(15),
SnapshotsToKeep: pulumi.Int(5),
},
ResourceGroupName: pulumi.String("myRG"),
SnapshotPolicyName: pulumi.String("snapshotPolicyName"),
WeeklySchedule: &netapp.WeeklyScheduleArgs{
Day: pulumi.String("Wednesday"),
Hour: pulumi.Int(14),
Minute: pulumi.Int(45),
SnapshotsToKeep: pulumi.Int(3),
},
})
if err != nil {
return err
}
return nil
})
}
Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.netapp.SnapshotPolicy;
import com.pulumi.azurenative.netapp.SnapshotPolicyArgs;
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 snapshotPolicy = new SnapshotPolicy("snapshotPolicy", SnapshotPolicyArgs.builder()
.accountName("account1")
.dailySchedule(Map.ofEntries(
Map.entry("hour", 14),
Map.entry("minute", 30),
Map.entry("snapshotsToKeep", 4)
))
.hourlySchedule(Map.ofEntries(
Map.entry("minute", 50),
Map.entry("snapshotsToKeep", 2)
))
.location("eastus")
.monthlySchedule(Map.ofEntries(
Map.entry("daysOfMonth", "10,11,12"),
Map.entry("hour", 14),
Map.entry("minute", 15),
Map.entry("snapshotsToKeep", 5)
))
.resourceGroupName("myRG")
.snapshotPolicyName("snapshotPolicyName")
.weeklySchedule(Map.ofEntries(
Map.entry("day", "Wednesday"),
Map.entry("hour", 14),
Map.entry("minute", 45),
Map.entry("snapshotsToKeep", 3)
))
.build());
}
}
Content copied to clipboard
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:netapp:SnapshotPolicy account1/snapshotPolicy1 /subscriptions/D633CC2E-722B-4AE1-B636-BBD9E4C60ED9/resourceGroups/myRG/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotPolicy1
Content copied to clipboard
Constructors
Link copied to clipboard
constructor(accountName: Output<String>? = null, dailySchedule: Output<DailyScheduleArgs>? = null, enabled: Output<Boolean>? = null, hourlySchedule: Output<HourlyScheduleArgs>? = null, location: Output<String>? = null, monthlySchedule: Output<MonthlyScheduleArgs>? = null, resourceGroupName: Output<String>? = null, snapshotPolicyName: Output<String>? = null, tags: Output<Map<String, String>>? = null, weeklySchedule: Output<WeeklyScheduleArgs>? = null)
Properties
Link copied to clipboard
The name of the NetApp account
Link copied to clipboard
Schedule for daily snapshots
Link copied to clipboard
Schedule for hourly snapshots
Link copied to clipboard
Schedule for monthly snapshots
Link copied to clipboard
The name of the resource group.
Link copied to clipboard
The name of the snapshot policy
Link copied to clipboard
Schedule for weekly snapshots