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

Update-AzNetAppFilesSnapshotPolicy

Updates an Azure NetApp Files (ANF) snapshot policy to the optional modifiers provided.

Syntax

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

Description

The Update-AzNetAppFilesSnapshotPolicy cmdlet modifies an ANF snapshot policy.

Examples

Example 1

$hourlySchedule = @{
        Minute = 1
        SnapshotsToKeep = 3
    }
Update-AzNetAppFilesSnapshotPolicy -ResourceGroupName "MyRG" -AccountName "MyAccount" -Name "MySnapshotPolicy" -HourlySchedule $hourlySchedule

This command changes the ANF backup policy "MySnapshotPolicy" to have the given HourlySchedule.

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:False
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:Nullable<T>[Boolean]
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:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

The snapshot object to remove

Type:PSNetAppFilesSnapshotPolicy
Position:Named
Default value:None
Required:True
Accept pipeline input:True
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:False
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 Snapshot Policy

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:False
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

String

PSNetAppFilesAccount

PSNetAppFilesSnapshotPolicy

Outputs

PSNetAppFilesSnapshotPolicy