編集

次の方法で共有


Set-AzNetAppFilesBackupPolicy

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

Syntax

Set-AzNetAppFilesBackupPolicy
   -ResourceGroupName <String>
   -Location <String>
   -AccountName <String>
   -Name <String>
   [-Enabled]
   [-DailyBackupsToKeep <Int32>]
   [-WeeklyBackupsToKeep <Int32>]
   [-MonthlyBackupsToKeep <Int32>]
   [-Tag <Hashtable>]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetAppFilesBackupPolicy
   -Name <String>
   [-Enabled]
   [-DailyBackupsToKeep <Int32>]
   [-WeeklyBackupsToKeep <Int32>]
   [-MonthlyBackupsToKeep <Int32>]
   [-Tag <Hashtable>]
   -AccountObject <PSNetAppFilesAccount>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetAppFilesBackupPolicy
   -Name <String>
   [-Enabled]
   [-DailyBackupsToKeep <Int32>]
   [-WeeklyBackupsToKeep <Int32>]
   [-MonthlyBackupsToKeep <Int32>]
   [-Tag <Hashtable>]
   -ResourceId <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzNetAppFilesBackupPolicy cmdlet modifies an ANF BackupPolicy.

Examples

Example 1

Set-AzNetAppFilesBackupPolicy -ResourceGroupName "MyRG" -Location "westus2" -AccountName "MyAccount" -Name "MyBackupPolicy" -Tag @{"tag1" = "tagValue"} -Enabled -DailyBackupsToKeep 1 -WeeklyBackupsToKeep 2 -MonthlyBackupsToKeep 2

This command performs an update on the given backup policy.

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 object for the new Backup Policy

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

-DailyBackupsToKeep

Daily backups count to keep

Type:Nullable<T>[Int32]
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:SwitchParameter
Position:Named
Default value:None
Required:False
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

-MonthlyBackupsToKeep

Monthly backups count to keep

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the ANF backup policy

Type:String
Aliases:BackupPolicyName
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

-WeeklyBackupsToKeep

Weekly backups count to keep

Type:Nullable<T>[Int32]
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

PSNetAppFilesAccount

String

Outputs

PSNetAppFilesBackupPolicy