Set-​Azure​Rm​Sql​Database​Backup​Long​Term​Retention​Policy

Sets a server long term retention policy.

Syntax

Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-DatabaseName] <String>
   -ResourceId <String>
   -State <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The Set-AzureRmSqlDatabaseBackupLongTermRetentionPolicy cmdlet sets the long term retention policy registered to this database. The policy is an Azure Backup resource used to define backup storage policy.

Examples

1:

Required Parameters

-DatabaseName

Specifies the name of the SQL Database for which this cmdlet sets a policy.

Type:String
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

Specifies the name of the resource group that contains the database.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceId

Specifies the ID of a resource.

Type:String
Aliases:Id
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

Specifies the server that hosts the database.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-State

Specifies a state.

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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value: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:False
Accept pipeline input:False
Accept wildcard characters:False