Szerkesztés

Megosztás a következőn keresztül:


New-AzNetAppFilesBackupPolicy

Creates a new Azure NetApp Files (ANF) backup policy for an ANF account.

Syntax

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

Description

The New-AzNetAppFilesBackupPolicy cmdlet creates a new backup policy for an ANF account.

Examples

Example 1

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

This command creates the new ANF backup 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 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

-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

Outputs

PSNetAppFilesBackupPolicy