New-AzDataProtectionRetentionLifeCycleClientObject
Creates new Lifecycle object
Syntax
Default (Default)
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
Parameter properties
Type: | CopyOption |
Default value: | None |
Accepted values: | CustomCopyOption, ImmediateCopyOption, CopyOnExpiryOption |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceDataStore
Source Datastore
Parameter properties
Type: | DataStoreType |
Default value: | None |
Accepted values: | ArchiveStore, OperationalStore, VaultStore |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceRetentionDurationCount
Retention Duration Count
Parameter properties
Type: | Int32 |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-SourceRetentionDurationType
Retention Duration Type
Parameter properties
Type: | DurationType |
Default value: | None |
Accepted values: | Days, Weeks, Months, Years |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-TargetDataStore
Target Datastore
Parameter properties
Type: | DataStoreType |
Default value: | None |
Accepted values: | ArchiveStore, OperationalStore, VaultStore |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.