az dataprotection backup-policy tag
Note
This reference is part of the dataprotection extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az dataprotection backup-policy tag command. Learn more about extensions.
Create criterias and add or remove tag in policy.
Commands
Name | Description | Type | Status |
---|---|---|---|
az dataprotection backup-policy tag create-absolute-criteria |
Create absolute criteria. |
Extension | GA |
az dataprotection backup-policy tag create-generic-criteria |
Create generic criteria. |
Extension | GA |
az dataprotection backup-policy tag remove |
Remove existing tag from a backup policy. |
Extension | GA |
az dataprotection backup-policy tag set |
Add new tag or update existing tag of a backup policy. |
Extension | GA |
az dataprotection backup-policy tag create-absolute-criteria
Create absolute criteria.
az dataprotection backup-policy tag create-absolute-criteria --absolute-criteria {AllBackup, FirstOfDay, FirstOfMonth, FirstOfWeek, FirstOfYear}
Examples
create absolute criteria
az dataprotection backup-policy tag create-absolute-criteria --absolute-criteria FirstOfDay
Required Parameters
Specify retention criteria.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az dataprotection backup-policy tag create-generic-criteria
Create generic criteria.
az dataprotection backup-policy tag create-generic-criteria [--days-of-month]
[--days-of-week {Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday}]
[--months-of-year {April, August, December, February, January, July, June, March, May, November, October, September}]
[--weeks-of-month {First, Fourth, Last, Second, Third}]
Examples
Create generic criteria
az dataprotection backup-policy tag create-generic-criteria --days-of-week Sunday Monday
Optional Parameters
Specify days of month. Allowed values are 1 to 28 and Last.
Specify days of week.
Specify months of year.
Specify weeks of month.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az dataprotection backup-policy tag remove
Remove existing tag from a backup policy.
az dataprotection backup-policy tag remove --name {Daily, Monthly, Weekly, Yearly}
--policy
Examples
Remove daily tag.
az dataprotection backup-policy tag remove --name Daily --policy policy.json
Required Parameters
Specify the tag name to be removed in policy.
Existing policy Json string or file.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az dataprotection backup-policy tag set
Add new tag or update existing tag of a backup policy.
az dataprotection backup-policy tag set --criteria
--name {Daily, Monthly, Weekly, Yearly}
--policy
Examples
Add tag for daily retention in a backup policy.
az dataprotection backup-policy tag set --criteria criteria.json --name Daily --policy policy.json
Required Parameters
Crtierias to be associated with the tag. Specify space separated json file names.
Specify the tag name to be edited in policy.
Policy Json string or file.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.