1. Packages
  2. Azure Classic
  3. API Docs
  4. netapp
  5. SnapshotPolicy

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.netapp.SnapshotPolicy

Explore with Pulumi AI

Manages a NetApp Snapshot Policy.

NetApp Snapshot Policy Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = new azure.core.ResourceGroup("example", {
    name: "resource-group-01",
    location: "East US",
});
const exampleAccount = new azure.netapp.Account("example", {
    name: "netappaccount-01",
    location: example.location,
    resourceGroupName: example.name,
});
const exampleSnapshotPolicy = new azure.netapp.SnapshotPolicy("example", {
    name: "snapshotpolicy-01",
    location: example.location,
    resourceGroupName: example.name,
    accountName: exampleAccount.name,
    enabled: true,
    hourlySchedule: {
        snapshotsToKeep: 4,
        minute: 15,
    },
    dailySchedule: {
        snapshotsToKeep: 2,
        hour: 20,
        minute: 15,
    },
    weeklySchedule: {
        snapshotsToKeep: 1,
        daysOfWeeks: [
            "Monday",
            "Friday",
        ],
        hour: 23,
        minute: 0,
    },
    monthlySchedule: {
        snapshotsToKeep: 1,
        daysOfMonths: [
            1,
            15,
            20,
            30,
        ],
        hour: 5,
        minute: 45,
    },
});
Copy
import pulumi
import pulumi_azure as azure

example = azure.core.ResourceGroup("example",
    name="resource-group-01",
    location="East US")
example_account = azure.netapp.Account("example",
    name="netappaccount-01",
    location=example.location,
    resource_group_name=example.name)
example_snapshot_policy = azure.netapp.SnapshotPolicy("example",
    name="snapshotpolicy-01",
    location=example.location,
    resource_group_name=example.name,
    account_name=example_account.name,
    enabled=True,
    hourly_schedule={
        "snapshots_to_keep": 4,
        "minute": 15,
    },
    daily_schedule={
        "snapshots_to_keep": 2,
        "hour": 20,
        "minute": 15,
    },
    weekly_schedule={
        "snapshots_to_keep": 1,
        "days_of_weeks": [
            "Monday",
            "Friday",
        ],
        "hour": 23,
        "minute": 0,
    },
    monthly_schedule={
        "snapshots_to_keep": 1,
        "days_of_months": [
            1,
            15,
            20,
            30,
        ],
        "hour": 5,
        "minute": 45,
    })
Copy
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("resource-group-01"),
			Location: pulumi.String("East US"),
		})
		if err != nil {
			return err
		}
		exampleAccount, err := netapp.NewAccount(ctx, "example", &netapp.AccountArgs{
			Name:              pulumi.String("netappaccount-01"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
		})
		if err != nil {
			return err
		}
		_, err = netapp.NewSnapshotPolicy(ctx, "example", &netapp.SnapshotPolicyArgs{
			Name:              pulumi.String("snapshotpolicy-01"),
			Location:          example.Location,
			ResourceGroupName: example.Name,
			AccountName:       exampleAccount.Name,
			Enabled:           pulumi.Bool(true),
			HourlySchedule: &netapp.SnapshotPolicyHourlyScheduleArgs{
				SnapshotsToKeep: pulumi.Int(4),
				Minute:          pulumi.Int(15),
			},
			DailySchedule: &netapp.SnapshotPolicyDailyScheduleArgs{
				SnapshotsToKeep: pulumi.Int(2),
				Hour:            pulumi.Int(20),
				Minute:          pulumi.Int(15),
			},
			WeeklySchedule: &netapp.SnapshotPolicyWeeklyScheduleArgs{
				SnapshotsToKeep: pulumi.Int(1),
				DaysOfWeeks: pulumi.StringArray{
					pulumi.String("Monday"),
					pulumi.String("Friday"),
				},
				Hour:   pulumi.Int(23),
				Minute: pulumi.Int(0),
			},
			MonthlySchedule: &netapp.SnapshotPolicyMonthlyScheduleArgs{
				SnapshotsToKeep: pulumi.Int(1),
				DaysOfMonths: pulumi.IntArray{
					pulumi.Int(1),
					pulumi.Int(15),
					pulumi.Int(20),
					pulumi.Int(30),
				},
				Hour:   pulumi.Int(5),
				Minute: pulumi.Int(45),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = "resource-group-01",
        Location = "East US",
    });

    var exampleAccount = new Azure.NetApp.Account("example", new()
    {
        Name = "netappaccount-01",
        Location = example.Location,
        ResourceGroupName = example.Name,
    });

    var exampleSnapshotPolicy = new Azure.NetApp.SnapshotPolicy("example", new()
    {
        Name = "snapshotpolicy-01",
        Location = example.Location,
        ResourceGroupName = example.Name,
        AccountName = exampleAccount.Name,
        Enabled = true,
        HourlySchedule = new Azure.NetApp.Inputs.SnapshotPolicyHourlyScheduleArgs
        {
            SnapshotsToKeep = 4,
            Minute = 15,
        },
        DailySchedule = new Azure.NetApp.Inputs.SnapshotPolicyDailyScheduleArgs
        {
            SnapshotsToKeep = 2,
            Hour = 20,
            Minute = 15,
        },
        WeeklySchedule = new Azure.NetApp.Inputs.SnapshotPolicyWeeklyScheduleArgs
        {
            SnapshotsToKeep = 1,
            DaysOfWeeks = new[]
            {
                "Monday",
                "Friday",
            },
            Hour = 23,
            Minute = 0,
        },
        MonthlySchedule = new Azure.NetApp.Inputs.SnapshotPolicyMonthlyScheduleArgs
        {
            SnapshotsToKeep = 1,
            DaysOfMonths = new[]
            {
                1,
                15,
                20,
                30,
            },
            Hour = 5,
            Minute = 45,
        },
    });

});
Copy
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.SnapshotPolicy;
import com.pulumi.azure.netapp.SnapshotPolicyArgs;
import com.pulumi.azure.netapp.inputs.SnapshotPolicyHourlyScheduleArgs;
import com.pulumi.azure.netapp.inputs.SnapshotPolicyDailyScheduleArgs;
import com.pulumi.azure.netapp.inputs.SnapshotPolicyWeeklyScheduleArgs;
import com.pulumi.azure.netapp.inputs.SnapshotPolicyMonthlyScheduleArgs;
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("resource-group-01")
            .location("East US")
            .build());

        var exampleAccount = new Account("exampleAccount", AccountArgs.builder()
            .name("netappaccount-01")
            .location(example.location())
            .resourceGroupName(example.name())
            .build());

        var exampleSnapshotPolicy = new SnapshotPolicy("exampleSnapshotPolicy", SnapshotPolicyArgs.builder()
            .name("snapshotpolicy-01")
            .location(example.location())
            .resourceGroupName(example.name())
            .accountName(exampleAccount.name())
            .enabled(true)
            .hourlySchedule(SnapshotPolicyHourlyScheduleArgs.builder()
                .snapshotsToKeep(4)
                .minute(15)
                .build())
            .dailySchedule(SnapshotPolicyDailyScheduleArgs.builder()
                .snapshotsToKeep(2)
                .hour(20)
                .minute(15)
                .build())
            .weeklySchedule(SnapshotPolicyWeeklyScheduleArgs.builder()
                .snapshotsToKeep(1)
                .daysOfWeeks(                
                    "Monday",
                    "Friday")
                .hour(23)
                .minute(0)
                .build())
            .monthlySchedule(SnapshotPolicyMonthlyScheduleArgs.builder()
                .snapshotsToKeep(1)
                .daysOfMonths(                
                    1,
                    15,
                    20,
                    30)
                .hour(5)
                .minute(45)
                .build())
            .build());

    }
}
Copy
resources:
  example:
    type: azure:core:ResourceGroup
    properties:
      name: resource-group-01
      location: East US
  exampleAccount:
    type: azure:netapp:Account
    name: example
    properties:
      name: netappaccount-01
      location: ${example.location}
      resourceGroupName: ${example.name}
  exampleSnapshotPolicy:
    type: azure:netapp:SnapshotPolicy
    name: example
    properties:
      name: snapshotpolicy-01
      location: ${example.location}
      resourceGroupName: ${example.name}
      accountName: ${exampleAccount.name}
      enabled: true
      hourlySchedule:
        snapshotsToKeep: 4
        minute: 15
      dailySchedule:
        snapshotsToKeep: 2
        hour: 20
        minute: 15
      weeklySchedule:
        snapshotsToKeep: 1
        daysOfWeeks:
          - Monday
          - Friday
        hour: 23
        minute: 0
      monthlySchedule:
        snapshotsToKeep: 1
        daysOfMonths:
          - 1
          - 15
          - 20
          - 30
        hour: 5
        minute: 45
Copy

Create SnapshotPolicy Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new SnapshotPolicy(name: string, args: SnapshotPolicyArgs, opts?: CustomResourceOptions);
@overload
def SnapshotPolicy(resource_name: str,
                   args: SnapshotPolicyArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def SnapshotPolicy(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   account_name: Optional[str] = None,
                   enabled: Optional[bool] = None,
                   resource_group_name: Optional[str] = None,
                   daily_schedule: Optional[SnapshotPolicyDailyScheduleArgs] = None,
                   hourly_schedule: Optional[SnapshotPolicyHourlyScheduleArgs] = None,
                   location: Optional[str] = None,
                   monthly_schedule: Optional[SnapshotPolicyMonthlyScheduleArgs] = None,
                   name: Optional[str] = None,
                   tags: Optional[Mapping[str, str]] = None,
                   weekly_schedule: Optional[SnapshotPolicyWeeklyScheduleArgs] = None)
func NewSnapshotPolicy(ctx *Context, name string, args SnapshotPolicyArgs, opts ...ResourceOption) (*SnapshotPolicy, error)
public SnapshotPolicy(string name, SnapshotPolicyArgs args, CustomResourceOptions? opts = null)
public SnapshotPolicy(String name, SnapshotPolicyArgs args)
public SnapshotPolicy(String name, SnapshotPolicyArgs args, CustomResourceOptions options)
type: azure:netapp:SnapshotPolicy
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. SnapshotPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. SnapshotPolicyArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. SnapshotPolicyArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. SnapshotPolicyArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. SnapshotPolicyArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var snapshotPolicyResource = new Azure.NetApp.SnapshotPolicy("snapshotPolicyResource", new()
{
    AccountName = "string",
    Enabled = false,
    ResourceGroupName = "string",
    DailySchedule = new Azure.NetApp.Inputs.SnapshotPolicyDailyScheduleArgs
    {
        Hour = 0,
        Minute = 0,
        SnapshotsToKeep = 0,
    },
    HourlySchedule = new Azure.NetApp.Inputs.SnapshotPolicyHourlyScheduleArgs
    {
        Minute = 0,
        SnapshotsToKeep = 0,
    },
    Location = "string",
    MonthlySchedule = new Azure.NetApp.Inputs.SnapshotPolicyMonthlyScheduleArgs
    {
        DaysOfMonths = new[]
        {
            0,
        },
        Hour = 0,
        Minute = 0,
        SnapshotsToKeep = 0,
    },
    Name = "string",
    Tags = 
    {
        { "string", "string" },
    },
    WeeklySchedule = new Azure.NetApp.Inputs.SnapshotPolicyWeeklyScheduleArgs
    {
        DaysOfWeeks = new[]
        {
            "string",
        },
        Hour = 0,
        Minute = 0,
        SnapshotsToKeep = 0,
    },
});
Copy
example, err := netapp.NewSnapshotPolicy(ctx, "snapshotPolicyResource", &netapp.SnapshotPolicyArgs{
	AccountName:       pulumi.String("string"),
	Enabled:           pulumi.Bool(false),
	ResourceGroupName: pulumi.String("string"),
	DailySchedule: &netapp.SnapshotPolicyDailyScheduleArgs{
		Hour:            pulumi.Int(0),
		Minute:          pulumi.Int(0),
		SnapshotsToKeep: pulumi.Int(0),
	},
	HourlySchedule: &netapp.SnapshotPolicyHourlyScheduleArgs{
		Minute:          pulumi.Int(0),
		SnapshotsToKeep: pulumi.Int(0),
	},
	Location: pulumi.String("string"),
	MonthlySchedule: &netapp.SnapshotPolicyMonthlyScheduleArgs{
		DaysOfMonths: pulumi.IntArray{
			pulumi.Int(0),
		},
		Hour:            pulumi.Int(0),
		Minute:          pulumi.Int(0),
		SnapshotsToKeep: pulumi.Int(0),
	},
	Name: pulumi.String("string"),
	Tags: pulumi.StringMap{
		"string": pulumi.String("string"),
	},
	WeeklySchedule: &netapp.SnapshotPolicyWeeklyScheduleArgs{
		DaysOfWeeks: pulumi.StringArray{
			pulumi.String("string"),
		},
		Hour:            pulumi.Int(0),
		Minute:          pulumi.Int(0),
		SnapshotsToKeep: pulumi.Int(0),
	},
})
Copy
var snapshotPolicyResource = new SnapshotPolicy("snapshotPolicyResource", SnapshotPolicyArgs.builder()
    .accountName("string")
    .enabled(false)
    .resourceGroupName("string")
    .dailySchedule(SnapshotPolicyDailyScheduleArgs.builder()
        .hour(0)
        .minute(0)
        .snapshotsToKeep(0)
        .build())
    .hourlySchedule(SnapshotPolicyHourlyScheduleArgs.builder()
        .minute(0)
        .snapshotsToKeep(0)
        .build())
    .location("string")
    .monthlySchedule(SnapshotPolicyMonthlyScheduleArgs.builder()
        .daysOfMonths(0)
        .hour(0)
        .minute(0)
        .snapshotsToKeep(0)
        .build())
    .name("string")
    .tags(Map.of("string", "string"))
    .weeklySchedule(SnapshotPolicyWeeklyScheduleArgs.builder()
        .daysOfWeeks("string")
        .hour(0)
        .minute(0)
        .snapshotsToKeep(0)
        .build())
    .build());
Copy
snapshot_policy_resource = azure.netapp.SnapshotPolicy("snapshotPolicyResource",
    account_name="string",
    enabled=False,
    resource_group_name="string",
    daily_schedule={
        "hour": 0,
        "minute": 0,
        "snapshots_to_keep": 0,
    },
    hourly_schedule={
        "minute": 0,
        "snapshots_to_keep": 0,
    },
    location="string",
    monthly_schedule={
        "days_of_months": [0],
        "hour": 0,
        "minute": 0,
        "snapshots_to_keep": 0,
    },
    name="string",
    tags={
        "string": "string",
    },
    weekly_schedule={
        "days_of_weeks": ["string"],
        "hour": 0,
        "minute": 0,
        "snapshots_to_keep": 0,
    })
Copy
const snapshotPolicyResource = new azure.netapp.SnapshotPolicy("snapshotPolicyResource", {
    accountName: "string",
    enabled: false,
    resourceGroupName: "string",
    dailySchedule: {
        hour: 0,
        minute: 0,
        snapshotsToKeep: 0,
    },
    hourlySchedule: {
        minute: 0,
        snapshotsToKeep: 0,
    },
    location: "string",
    monthlySchedule: {
        daysOfMonths: [0],
        hour: 0,
        minute: 0,
        snapshotsToKeep: 0,
    },
    name: "string",
    tags: {
        string: "string",
    },
    weeklySchedule: {
        daysOfWeeks: ["string"],
        hour: 0,
        minute: 0,
        snapshotsToKeep: 0,
    },
});
Copy
type: azure:netapp:SnapshotPolicy
properties:
    accountName: string
    dailySchedule:
        hour: 0
        minute: 0
        snapshotsToKeep: 0
    enabled: false
    hourlySchedule:
        minute: 0
        snapshotsToKeep: 0
    location: string
    monthlySchedule:
        daysOfMonths:
            - 0
        hour: 0
        minute: 0
        snapshotsToKeep: 0
    name: string
    resourceGroupName: string
    tags:
        string: string
    weeklySchedule:
        daysOfWeeks:
            - string
        hour: 0
        minute: 0
        snapshotsToKeep: 0
Copy

SnapshotPolicy Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The SnapshotPolicy resource accepts the following input properties:

AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
Enabled This property is required. bool
Defines that the NetApp Snapshot Policy is enabled or not.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
DailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
HourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
MonthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
Name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
WeeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
AccountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
Enabled This property is required. bool
Defines that the NetApp Snapshot Policy is enabled or not.
ResourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
DailySchedule SnapshotPolicyDailyScheduleArgs
Sets a daily snapshot schedule. A daily_schedule block as defined below.
HourlySchedule SnapshotPolicyHourlyScheduleArgs
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
MonthlySchedule SnapshotPolicyMonthlyScheduleArgs
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
Name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
WeeklySchedule SnapshotPolicyWeeklyScheduleArgs
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
enabled This property is required. Boolean
Defines that the NetApp Snapshot Policy is enabled or not.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
hourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. String
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
weeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName
This property is required.
Changes to this property will trigger replacement.
string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
enabled This property is required. boolean
Defines that the NetApp Snapshot Policy is enabled or not.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
hourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
weeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
account_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
enabled This property is required. bool
Defines that the NetApp Snapshot Policy is enabled or not.
resource_group_name
This property is required.
Changes to this property will trigger replacement.
str
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
daily_schedule SnapshotPolicyDailyScheduleArgs
Sets a daily snapshot schedule. A daily_schedule block as defined below.
hourly_schedule SnapshotPolicyHourlyScheduleArgs
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthly_schedule SnapshotPolicyMonthlyScheduleArgs
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. str
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
weekly_schedule SnapshotPolicyWeeklyScheduleArgs
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName
This property is required.
Changes to this property will trigger replacement.
String
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
enabled This property is required. Boolean
Defines that the NetApp Snapshot Policy is enabled or not.
resourceGroupName
This property is required.
Changes to this property will trigger replacement.
String
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule Property Map
Sets a daily snapshot schedule. A daily_schedule block as defined below.
hourlySchedule Property Map
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule Property Map
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. String
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.
weeklySchedule Property Map
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.

Outputs

All input properties are implicitly available as output properties. Additionally, the SnapshotPolicy resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing SnapshotPolicy Resource

Get an existing SnapshotPolicy resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: SnapshotPolicyState, opts?: CustomResourceOptions): SnapshotPolicy
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        account_name: Optional[str] = None,
        daily_schedule: Optional[SnapshotPolicyDailyScheduleArgs] = None,
        enabled: Optional[bool] = None,
        hourly_schedule: Optional[SnapshotPolicyHourlyScheduleArgs] = None,
        location: Optional[str] = None,
        monthly_schedule: Optional[SnapshotPolicyMonthlyScheduleArgs] = None,
        name: Optional[str] = None,
        resource_group_name: Optional[str] = None,
        tags: Optional[Mapping[str, str]] = None,
        weekly_schedule: Optional[SnapshotPolicyWeeklyScheduleArgs] = None) -> SnapshotPolicy
func GetSnapshotPolicy(ctx *Context, name string, id IDInput, state *SnapshotPolicyState, opts ...ResourceOption) (*SnapshotPolicy, error)
public static SnapshotPolicy Get(string name, Input<string> id, SnapshotPolicyState? state, CustomResourceOptions? opts = null)
public static SnapshotPolicy get(String name, Output<String> id, SnapshotPolicyState state, CustomResourceOptions options)
resources:  _:    type: azure:netapp:SnapshotPolicy    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AccountName Changes to this property will trigger replacement. string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
DailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
Enabled bool
Defines that the NetApp Snapshot Policy is enabled or not.
HourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
MonthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
Name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
WeeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
AccountName Changes to this property will trigger replacement. string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
DailySchedule SnapshotPolicyDailyScheduleArgs
Sets a daily snapshot schedule. A daily_schedule block as defined below.
Enabled bool
Defines that the NetApp Snapshot Policy is enabled or not.
HourlySchedule SnapshotPolicyHourlyScheduleArgs
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
Location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
MonthlySchedule SnapshotPolicyMonthlyScheduleArgs
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
Name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
ResourceGroupName Changes to this property will trigger replacement. string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
Tags map[string]string
A mapping of tags to assign to the resource.
WeeklySchedule SnapshotPolicyWeeklyScheduleArgs
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName Changes to this property will trigger replacement. String
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
enabled Boolean
Defines that the NetApp Snapshot Policy is enabled or not.
hourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. String
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
tags Map<String,String>
A mapping of tags to assign to the resource.
weeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName Changes to this property will trigger replacement. string
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule SnapshotPolicyDailySchedule
Sets a daily snapshot schedule. A daily_schedule block as defined below.
enabled boolean
Defines that the NetApp Snapshot Policy is enabled or not.
hourlySchedule SnapshotPolicyHourlySchedule
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. string
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule SnapshotPolicyMonthlySchedule
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. string
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. string
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
weeklySchedule SnapshotPolicyWeeklySchedule
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
account_name Changes to this property will trigger replacement. str
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
daily_schedule SnapshotPolicyDailyScheduleArgs
Sets a daily snapshot schedule. A daily_schedule block as defined below.
enabled bool
Defines that the NetApp Snapshot Policy is enabled or not.
hourly_schedule SnapshotPolicyHourlyScheduleArgs
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. str
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthly_schedule SnapshotPolicyMonthlyScheduleArgs
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. str
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
resource_group_name Changes to this property will trigger replacement. str
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
weekly_schedule SnapshotPolicyWeeklyScheduleArgs
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.
accountName Changes to this property will trigger replacement. String
The name of the NetApp Account in which the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
dailySchedule Property Map
Sets a daily snapshot schedule. A daily_schedule block as defined below.
enabled Boolean
Defines that the NetApp Snapshot Policy is enabled or not.
hourlySchedule Property Map
Sets an hourly snapshot schedule. A hourly_schedule block as defined below.
location Changes to this property will trigger replacement. String
Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.
monthlySchedule Property Map
Sets a monthly snapshot schedule. A monthly_schedule block as defined below.
name Changes to this property will trigger replacement. String
The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
resourceGroupName Changes to this property will trigger replacement. String
The name of the resource group where the NetApp Snapshot Policy should be created. Changing this forces a new resource to be created.
tags Map<String>
A mapping of tags to assign to the resource.
weeklySchedule Property Map
Sets a weekly snapshot schedule. A weekly_schedule block as defined below.

Supporting Types

SnapshotPolicyDailySchedule
, SnapshotPolicyDailyScheduleArgs

Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
hour This property is required. Integer
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Integer
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Integer
How many hourly snapshots to keep, valid range is from 0 to 255.
hour This property is required. number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. number
How many hourly snapshots to keep, valid range is from 0 to 255.
hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshots_to_keep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
hour This property is required. Number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Number
How many hourly snapshots to keep, valid range is from 0 to 255.

SnapshotPolicyHourlySchedule
, SnapshotPolicyHourlyScheduleArgs

Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
minute This property is required. Integer
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Integer
How many hourly snapshots to keep, valid range is from 0 to 255.
minute This property is required. number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. number
How many hourly snapshots to keep, valid range is from 0 to 255.
minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshots_to_keep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
minute This property is required. Number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Number
How many hourly snapshots to keep, valid range is from 0 to 255.

SnapshotPolicyMonthlySchedule
, SnapshotPolicyMonthlyScheduleArgs

DaysOfMonths This property is required. List<int>
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
DaysOfMonths This property is required. []int
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfMonths This property is required. List<Integer>
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
hour This property is required. Integer
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Integer
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Integer
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfMonths This property is required. number[]
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
hour This property is required. number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. number
How many hourly snapshots to keep, valid range is from 0 to 255.
days_of_months This property is required. Sequence[int]
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshots_to_keep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfMonths This property is required. List<Number>
List of the days of the month when the snapshots will be created, valid range is from 1 to 30.
hour This property is required. Number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Number
How many hourly snapshots to keep, valid range is from 0 to 255.

SnapshotPolicyWeeklySchedule
, SnapshotPolicyWeeklyScheduleArgs

DaysOfWeeks This property is required. List<string>
List of the week days using English names when the snapshots will be created.
Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
DaysOfWeeks This property is required. []string
List of the week days using English names when the snapshots will be created.
Hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
Minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
SnapshotsToKeep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfWeeks This property is required. List<String>
List of the week days using English names when the snapshots will be created.
hour This property is required. Integer
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Integer
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Integer
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfWeeks This property is required. string[]
List of the week days using English names when the snapshots will be created.
hour This property is required. number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. number
How many hourly snapshots to keep, valid range is from 0 to 255.
days_of_weeks This property is required. Sequence[str]
List of the week days using English names when the snapshots will be created.
hour This property is required. int
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. int
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshots_to_keep This property is required. int
How many hourly snapshots to keep, valid range is from 0 to 255.
daysOfWeeks This property is required. List<String>
List of the week days using English names when the snapshots will be created.
hour This property is required. Number
Hour of the day that the snapshots will be created, valid range is from 0 to 23.
minute This property is required. Number
Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
snapshotsToKeep This property is required. Number
How many hourly snapshots to keep, valid range is from 0 to 255.

Import

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

$ pulumi import azure:netapp/snapshotPolicy:SnapshotPolicy example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.NetApp/netAppAccounts/account1/snapshotPolicies/snapshotpolicy1
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.