SnapshotPolicy

class SnapshotPolicy : KotlinCustomResource

Snapshot policy information Uses Azure REST API version 2022-11-01. In version 1.x of the Azure Native provider, it used API version 2020-12-01. Other available API versions: 2022-11-01-preview, 2023-05-01, 2023-05-01-preview, 2023-07-01, 2023-07-01-preview, 2023-11-01, 2023-11-01-preview, 2024-01-01, 2024-03-01, 2024-03-01-preview, 2024-05-01, 2024-05-01-preview, 2024-07-01, 2024-07-01-preview, 2024-09-01, 2024-09-01-preview.

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,
},
Enabled = true,
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,
},
});
});
package main
import (
netapp "github.com/pulumi/pulumi-azure-native-sdk/netapp/v2"
"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),
},
Enabled: pulumi.Bool(true),
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
})
}
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 com.pulumi.azurenative.netapp.inputs.DailyScheduleArgs;
import com.pulumi.azurenative.netapp.inputs.HourlyScheduleArgs;
import com.pulumi.azurenative.netapp.inputs.MonthlyScheduleArgs;
import com.pulumi.azurenative.netapp.inputs.WeeklyScheduleArgs;
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(DailyScheduleArgs.builder()
.hour(14)
.minute(30)
.snapshotsToKeep(4)
.build())
.enabled(true)
.hourlySchedule(HourlyScheduleArgs.builder()
.minute(50)
.snapshotsToKeep(2)
.build())
.location("eastus")
.monthlySchedule(MonthlyScheduleArgs.builder()
.daysOfMonth("10,11,12")
.hour(14)
.minute(15)
.snapshotsToKeep(5)
.build())
.resourceGroupName("myRG")
.snapshotPolicyName("snapshotPolicyName")
.weeklySchedule(WeeklyScheduleArgs.builder()
.day("Wednesday")
.hour(14)
.minute(45)
.snapshotsToKeep(3)
.build())
.build());
}
}

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/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.NetApp/netAppAccounts/{accountName}/snapshotPolicies/{snapshotPolicyName}

Properties

Link copied to clipboard

Schedule for daily snapshots

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

The property to decide policy is enabled or not

Link copied to clipboard
val etag: Output<String>

A unique read-only string that changes whenever the resource is updated.

Link copied to clipboard

Schedule for hourly snapshots

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

Link copied to clipboard

Schedule for monthly snapshots

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

Azure lifecycle management

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Azure Resource Manager metadata containing createdBy and modifiedBy information.

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

Resource tags.

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard

Schedule for weekly snapshots