Bearbeiten

Freigeben über


New-AzDataProtectionRetentionLifeCycleClientObject

Creates new Lifecycle object

Syntax

New-AzDataProtectionRetentionLifeCycleClientObject
   -SourceDataStore <DataStoreType>
   -SourceRetentionDurationType <DurationType>
   -SourceRetentionDurationCount <Int32>
   [-TargetDataStore <DataStoreType>]
   [-CopyOption <CopyOption>]
   [<CommonParameters>]

Description

Creates new Lifecycle object

Examples

Example 1: Create a daily retention lifecycle

New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Days -SourceRetentionDurationCount 30

DeleteAfterDuration        : P30D
DeleteAfterObjectType      : AbsoluteDeleteOption
SourceDataStoreObjectType  : DataStoreInfoBase
SourceDataStoreType        : OperationalStore
TargetDataStoreCopySetting :

This command creates a lifecycle object which stores the backup data in operational store for 30 days.

Example 2: Create a weekly retention lifecycle.

New-AzDataProtectionRetentionLifeCycleClientObject -SourceDataStore OperationalStore -SourceRetentionDurationType Weeks -SourceRetentionDurationCount 20

DeleteAfterDuration        : P20W
DeleteAfterObjectType      : AbsoluteDeleteOption
SourceDataStoreObjectType  : DataStoreInfoBase
SourceDataStoreType        : OperationalStore
TargetDataStoreCopySetting :

This command creates a lifecycle object which stores the backup data in operational store for 20 weeks.

Parameters

-CopyOption

CopyOption

Type:CopyOption
Accepted values:CustomCopyOption, ImmediateCopyOption, CopyOnExpiryOption
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SourceDataStore

Source Datastore

Type:DataStoreType
Accepted values:ArchiveStore, OperationalStore, VaultStore
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SourceRetentionDurationCount

Retention Duration Count

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SourceRetentionDurationType

Retention Duration Type

Type:DurationType
Accepted values:Days, Weeks, Months, Years
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetDataStore

Target Datastore

Type:DataStoreType
Accepted values:ArchiveStore, OperationalStore, VaultStore
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

ISourceLifeCycle