你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Set-AzNetAppFilesSnapshotPolicy

Updates an Azure NetApp Files (ANF) Snapshot Policy with the new data set.

Syntax

Set-AzNetAppFilesSnapshotPolicy
   -ResourceGroupName <String>
   -Location <String>
   -AccountName <String>
   -Name <String>
   [-Enabled]
   -HourlySchedule <PSNetAppFilesHourlySchedule>
   -DailySchedule <PSNetAppFilesDailySchedule>
   -WeeklySchedule <PSNetAppFilesWeeklySchedule>
   -MonthlySchedule <PSNetAppFilesMonthlySchedule>
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetAppFilesSnapshotPolicy
   -Name <String>
   [-Enabled]
   -HourlySchedule <PSNetAppFilesHourlySchedule>
   -DailySchedule <PSNetAppFilesDailySchedule>
   -WeeklySchedule <PSNetAppFilesWeeklySchedule>
   -MonthlySchedule <PSNetAppFilesMonthlySchedule>
   [-Tag <Hashtable>]
   -AccountObject <PSNetAppFilesAccount>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetAppFilesSnapshotPolicy
   -Name <String>
   [-Enabled]
   -HourlySchedule <PSNetAppFilesHourlySchedule>
   -DailySchedule <PSNetAppFilesDailySchedule>
   -WeeklySchedule <PSNetAppFilesWeeklySchedule>
   -MonthlySchedule <PSNetAppFilesMonthlySchedule>
   [-Tag <Hashtable>]
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzNetAppFilesSnapshotPolicy cmdlet modifies an ANF Snapshot Policy.

Examples

Example 1

$hourlySchedule = @{
        Minute = 2
        SnapshotsToKeep = 6
    }
    $dailySchedule = @{
        Hour = 1
        Minute = 2
        SnapshotsToKeep = 6
    }
    $weeklySchedule = @{
        Minute = 2
        Hour = 1
        Day = "Sunday,Monday"
        SnapshotsToKeep = 6
    }
    $monthlySchedule = @{
        Minute = 2
        Hour = 1
        DaysOfMonth = "2,11,21"
        SnapshotsToKeep = 6
    }
Set-AzNetAppFilesSnapshotPolicy -ResourceGroupName "MyRG" -Location "westus2" -AccountName "MyAccount" -Name "MySnapshotPolicy" -Enabled -HourlySchedule $hourlySchedule -DailySchedule $dailySchedule -WeeklySchedule $weeklySchedule -MonthlySchedule $monthlySchedule

This command creates the new ANF snapshot policy for ANF account named account "MyAccount".

Parameters

-AccountName

The name of the ANF account

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AccountObject

The Account for the new Snapshot Policy object

Type:PSNetAppFilesAccount
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DailySchedule

A hashtable array which represents the daily Schedule

Type:PSNetAppFilesDailySchedule
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Enabled

The property to decide policy is enabled or not

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HourlySchedule

A hashtable array which represents the hourly Schedule

Type:PSNetAppFilesHourlySchedule
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Location

The location of the resource

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MonthlySchedule

A hashtable array which represents the montly Schedule

Type:PSNetAppFilesMonthlySchedule
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the ANF snapshot policy

Type:String
Aliases:SnapshotPolicyName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group of the ANF account

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceId

The resource id of the ANF account

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tag

A hashtable array which represents resource tags

Type:Hashtable
Aliases:Tags
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WeeklySchedule

A hashtable array which represents the montly Schedule

Type:PSNetAppFilesWeeklySchedule
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSNetAppFilesAccount

String

Outputs

PSNetAppFilesSnapshotPolicy