Edit-AzDataProtectionPolicyTagClientObject
Adds or removes schedule tag in an existing backup policy.
Syntax
Edit-AzDataProtectionPolicyTagClientObject
-Policy <IBackupPolicy>
-Name <TagName>
[-RemoveRule]
[<CommonParameters>]
Edit-AzDataProtectionPolicyTagClientObject
-Policy <IBackupPolicy>
-Name <TagName>
-Criteria <IScheduleBasedBackupCriteria[]>
[<CommonParameters>]
Description
Adds or removes schedule tag in an existing backup policy.
Examples
Example 1: Add Weekly tag to Backup Policy
$criteria = New-AzDataProtectionPolicyTagCriteriaClientObject -AbsoluteCriteria FirstOfWeek
Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -Criteria $criteria
DatasourceType ObjectType
-------------- ----------
{Microsoft.Compute/disks} BackupPolicy
This command adds a weekly tag to given backup policy
Example 2: Remove Weeky tag from Backup Policy
Edit-AzDataProtectionPolicyTagClientObject -Policy $pol -Name Weekly -RemoveRule
DatasourceType ObjectType
-------------- ----------
{Microsoft.Compute/disks} BackupPolicy
This command removes Weekly tag from backup policy.
Parameters
-Criteria
Criterias to be associated with the schedule tag. To construct, see NOTES section for CRITERIA properties and create a hash table.
Type: | IScheduleBasedBackupCriteria[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Name of the Schedule tag.
Type: | TagName |
Accepted values: | Daily, Weekly, Monthly, Yearly |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Policy
Backup Policy Object. To construct, see NOTES section for POLICY properties and create a hash table.
Type: | IBackupPolicy |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-RemoveRule
Specify whether to remove the tag from the given policy object.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Collabora con noi su GitHub
L'origine di questo contenuto è disponibile in GitHub, in cui è anche possibile creare ed esaminare i problemi e le richieste pull. Per ulteriori informazioni, vedere la guida per i collaboratori.