What are the Azure CLI commands to perform these tasks? If an example isn't provided, can links be added to the supporting documentation?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@tpeiffer Thanks for your question. We are checking on this and will respond to you soon.
@tpeiffer Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
Any update on this?
@tpeiffer @amit-jain CLI extension storage-preview 0.2.5 (https://docs.microsoft.com/en-us/cli/azure/azure-cli-extensions-list?view=azure-cli-latest) has support for lifecycle management. We will move this support to CLI core in the next several weeks. We will update this doc with a link then.
Is there any update on the CLI, I've not seen any clear documentation as yet and the following just errors:
az storage account management-policy create --account-name account --resource-group resource --policy roles/storage/cleanup-rule.json
Using the first Json example off this page results in an error:
Management Policy rule is not valid. Error: Could not find member 'enabled' on object of type 'ManagementPolicyRuleMarch18Preview'. Path 'properties.policy.rules[0].enabled', line 1, position
48.
I found my answer here, the schema requires a version and the enabled property needs removing from the rule:
https://github.com/Azure/azure-cli-extensions/blob/d253befbbfdbf26b4488195e698ded7f41332534/src/storage-preview/azext_storage_preview/tests/latest/mgmt_policy.json
The CLI documentation is at https://docs.microsoft.com/en-us/cli/azure/storage/account/management-policy?view=azure-cli-latest