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

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

azure.netapp.SnapshotPolicy

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi

    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,
        },
    });
    
    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,
        })
    
    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
    	})
    }
    
    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,
            },
        });
    
    });
    
    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());
    
        }
    }
    
    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
    

    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 string
    The unique name of the resource.
    args SnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args SnapshotPolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotPolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args 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,
        },
    });
    
    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),
    	},
    })
    
    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());
    
    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,
        })
    
    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,
        },
    });
    
    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
    

    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 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 bool
    Defines that the NetApp Snapshot Policy is enabled or not.
    ResourceGroupName 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 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 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 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 bool
    Defines that the NetApp Snapshot Policy is enabled or not.
    ResourceGroupName 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 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 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 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 Boolean
    Defines that the NetApp Snapshot Policy is enabled or not.
    resourceGroupName 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 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 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 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 boolean
    Defines that the NetApp Snapshot Policy is enabled or not.
    resourceGroupName 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 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 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 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 bool
    Defines that the NetApp Snapshot Policy is enabled or not.
    resource_group_name 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 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 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 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 Boolean
    Defines that the NetApp Snapshot Policy is enabled or not.
    resourceGroupName 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 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 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)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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 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 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 string
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    ResourceGroupName 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 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 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 string
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    ResourceGroupName 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 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 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 String
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    resourceGroupName 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 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 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 string
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    resourceGroupName 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 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 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 str
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    resource_group_name 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 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 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 String
    The name of the NetApp Snapshot Policy. Changing this forces a new resource to be created.
    resourceGroupName 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 int
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    Minute int
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    SnapshotsToKeep int
    How many hourly snapshots to keep, valid range is from 0 to 255.
    Hour int
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    Minute int
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    SnapshotsToKeep int
    How many hourly snapshots to keep, valid range is from 0 to 255.
    hour Integer
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    minute Integer
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    snapshotsToKeep Integer
    How many hourly snapshots to keep, valid range is from 0 to 255.
    hour number
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    minute number
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    snapshotsToKeep number
    How many hourly snapshots to keep, valid range is from 0 to 255.
    hour int
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    minute int
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    snapshots_to_keep int
    How many hourly snapshots to keep, valid range is from 0 to 255.
    hour Number
    Hour of the day that the snapshots will be created, valid range is from 0 to 23.
    minute Number
    Minute of the hour that the snapshots will be created, valid range is from 0 to 59.
    snapshotsToKeep Number
    How many hourly snapshots to keep, valid range is from 0 to 255.

    SnapshotPolicyHourlySchedule, SnapshotPolicyHourlyScheduleArgs

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

    SnapshotPolicyMonthlySchedule, SnapshotPolicyMonthlyScheduleArgs

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

    SnapshotPolicyWeeklySchedule, SnapshotPolicyWeeklyScheduleArgs

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

    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.
    azure logo

    We recommend using Azure Native.

    Azure v6.10.0 published on Tuesday, Nov 19, 2024 by Pulumi