你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Set-AzNetAppFilesSnapshotPolicy
使用新的数据集更新Azure NetApp 文档(ANF)快照策略。
语法
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>]
说明
Set-AzNetAppFilesSnapshotPolicy cmdlet 修改 ANF 快照策略。
示例
示例 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
此命令为名为帐户“MyAccount”的 ANF 帐户创建新的 ANF 快照策略。
参数
-AccountName
ANF 帐户的名称
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-AccountObject
新快照策略对象的帐户
类型: | PSNetAppFilesAccount |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Confirm
提示你在运行 cmdlet 之前进行确认。
类型: | SwitchParameter |
别名: | cf |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-DailySchedule
表示每日计划的哈希表数组
类型: | PSNetAppFilesDailySchedule |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-DefaultProfile
用于与 Azure 通信的凭据、帐户、租户和订阅。
类型: | IAzureContextContainer |
别名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-Enabled
决定策略的属性已启用或不启用
类型: | SwitchParameter |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-HourlySchedule
表示每小时计划的哈希表数组
类型: | PSNetAppFilesHourlySchedule |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Location
资源的位置
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-MonthlySchedule
表示 Montly Schedule 的哈希表数组
类型: | PSNetAppFilesMonthlySchedule |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-Name
ANF 快照策略的名称
类型: | String |
别名: | SnapshotPolicyName |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceGroupName
ANF 帐户的资源组
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-ResourceId
ANF 帐户的资源 ID
类型: | String |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | True |
接受通配符: | False |
-Tag
表示资源标记的哈希表数组
类型: | Hashtable |
别名: | Tags |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
-WeeklySchedule
表示 Montly Schedule 的哈希表数组
类型: | PSNetAppFilesWeeklySchedule |
Position: | Named |
默认值: | None |
必需: | True |
接受管道输入: | False |
接受通配符: | False |
-WhatIf
显示运行该 cmdlet 时会发生什么情况。 cmdlet 未运行。
类型: | SwitchParameter |
别名: | wi |
Position: | Named |
默认值: | None |
必需: | False |
接受管道输入: | False |
接受通配符: | False |
输入
输出
相关链接
- Get-AzNetAppFilesSnapshotPolicy
- New-AzNetAppFilesSnapshotPolicy
- Update-AzNetAppFilesSnapshotPolicy
- Remove-AzNetAppFilesSnapshotPolicy
- Get-AzNetAppFilesSnapshot
- New-AzNetAppFilesSnapshot
- Remove-AzNetAppFilesSnapshot
- Get-AzNetAppFilesVolume
- New-AzNetAppFilesVolume
- Update-AzNetAppFilesVolume
- Remove-AzNetAppFilesVolume