az sql db str-policy
This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage SQL database short term retention policy.
Commands
Name | Description | Type | Status |
---|---|---|---|
az sql db str-policy set |
Update short term retention settings for a live database. |
Core | Preview |
az sql db str-policy show |
Show the short term retention policy for a live database. |
Core | Preview |
az sql db str-policy wait |
Place the CLI in a waiting state until the policy is set. |
Core | Preview |
az sql db str-policy set
Command group 'sql db str-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update short term retention settings for a live database.
az sql db str-policy set --retention-days
[--diffbackup-hours]
[--ids]
[--name]
[--no-wait]
[--resource-group]
[--server]
[--subscription]
Examples
Set short term retention for a live database.
az sql db str-policy set -g mygroup -s myserver -n mydb --retention-days retentionindays --diffbackup-hours diffbackuphours
Required Parameters
New backup short term retention policy retention in days.Valid retention days for live database of (DTU) Basic can be 1-7 days; Rest models can be 1-35 days.
Optional Parameters
New backup short term retention policy differential backup interval in hours.Valid differential backup interval for live database can be 12 or 24 hours.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Azure SQL Database.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 sql db str-policy show
Command group 'sql db str-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show the short term retention policy for a live database.
az sql db str-policy show [--ids]
[--name]
[--resource-group]
[--server]
[--subscription]
Examples
Show short term retention policy for a live database.
az sql db str-policy show -g mygroup -s myserver -n mydb
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of the Azure SQL Database.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
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 sql db str-policy wait
Command group 'sql db str-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Place the CLI in a waiting state until the policy is set.
az sql db str-policy wait --policy-name
[--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--name]
[--resource-group]
[--server]
[--subscription]
[--timeout]
[--updated]
Required Parameters
The policy name. Should always be "default". "default" Required.
Optional Parameters
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Polling interval in seconds.
Name of the Azure SQL Database.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name of the Azure SQL Server. You can configure the default using az configure --defaults sql-server=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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.
Azure CLI