az keyvault --enable-purge-protection Deprecated: az cli Docs Need Updates
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 3.5k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 60
Description
**Describe the bug**
The documentation for [`az keyvault create`](https://docs.microsoft.com/en-us/cli/azure/keyvault?view=azure-cli-latest#az_keyvault_create) states that --enable-purge-protection is an available parameter, which it is not - it is only a placeholder for backwards compatibility and to inform users (at the time of CLI execution) that this parameter is deprecated.
**To Reproduce**
`az keyvault create --location --name --resource-group --enable-purge-protection false` **`--enable-soft-delete false`**
Response:
`Argument 'enable_soft_delete' has been deprecated and will be removed in a future release.`
`"--enable-soft-delete false" has been deprecated, you cannot disable Soft Delete via CLI. The value will be changed to true.`
**Expected behavior**
Either:
- Successful usage of the parameter, as documented.
or
- Updates to the documentation that indicate that `--enable-purge-protection` does not function and will generate the error message shown above, to prevent surprises during CLI execution.
**Environment summary**
Azure Cloud Shell:
> azure-cli 2.22.0 *
>
> core 2.22.0 *
> telemetry 1.0.6
>
> Extensions:
> ai-examples 0.2.5
> ssh 0.1.4
>
> Python location '/opt/az/bin/python3'
> Extensions directory '/home/azureuser/.azure/cliextensions'
> Extensions system directory '/opt/az/lib/python3.6/site-packages/azure-cli-extensions'
>
> Python (Linux) 3.6.10 (default, Apr 9 2021, 09:40:07)
> [GCC 8.3.0]
**Additional context**
The [announcement here](https://docs.microsoft.com/en-us/azure/key-vault/general/soft-delete-change) supports the fact that this parameter should be deprecated, however; it does not specifically state *when* that will occur other than to say,
> ...the ability to opt out of soft-delete will be deprecated soon.
Apparently it happened some time between the publishing of that announcement, and now.
Contributor guide
Assessment
This issue has not been assessed yet.