Editar

Compartilhar via


New-AzDataProtectionPolicyTagCriteriaClientObject

Creates a new criteria object

Syntax

New-AzDataProtectionPolicyTagCriteriaClientObject
   [-DaysOfWeek <DaysOfWeek[]>]
   [-WeeksOfMonth <WeeksOfMonth[]>]
   [-MonthsOfYear <MonthsOfYear[]>]
   [-ScheduleTimes <DateTime[]>]
   [<CommonParameters>]
New-AzDataProtectionPolicyTagCriteriaClientObject
   -AbsoluteCriteria <AbsoluteTagCriteria>
   [<CommonParameters>]
New-AzDataProtectionPolicyTagCriteriaClientObject
   [-MonthsOfYear <MonthsOfYear[]>]
   [-ScheduleTimes <DateTime[]>]
   -DaysOfMonth <String[]>
   [<CommonParameters>]

Description

Creates a new criteria object

Examples

Example 1: Create a tag with absolute criteria

New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfDay

ObjectType                  AbsoluteCriterion DaysOfTheWeek MonthsOfYear ScheduleTime WeeksOfTheMonth
----------                  ----------------- ------------- ------------ ------------ ---------------
ScheduleBasedBackupCriteria {FirstOfDay}

This command creates a criteria object with absolute criteria.

Example 2: create a tag with weekly criteria

New-AzDataProtectionPolicyTagCriteriaClientObject -DaysOfWeek @("Sunday", "Monday")

ObjectType                  AbsoluteCriterion DaysOfTheWeek    MonthsOfYear ScheduleTime WeeksOfTheMonth
----------                  ----------------- -------------    ------------ ------------ ---------------
ScheduleBasedBackupCriteria                   {Sunday, Monday}

This command creates a critetia object with weekly criteria

Parameters

-AbsoluteCriteria

Absolute criteria

Type:AbsoluteTagCriteria
Accepted values:AllBackup, FirstOfDay, FirstOfMonth, FirstOfWeek, FirstOfYear
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DaysOfMonth

Days of the month. Allowed values are 1 to 28 and Last

Type:String[]
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DaysOfWeek

Days of the week

Type:DaysOfWeek[]
Accepted values:Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-MonthsOfYear

Months of the year.

Type:MonthsOfYear[]
Accepted values:January, February, March, April, May, June, July, August, September, October, November, December
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ScheduleTimes

Schedule times.

Type:DateTime[]
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-WeeksOfMonth

Weeks of the month.

Type:WeeksOfMonth[]
Accepted values:First, Second, Third, Fourth, Last
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IScheduleBasedBackupCriteria