Open Maashkinoozhe opened 2 years ago
ARM
Thank you for your feedback. This has been routed to the support team for assistance.
Any news on this ?
I got the same error but managed to find the correct combination of parameters:
az lock create --lock-type CanNotDelete --name DeleteLock --notes "your note here" --namespace Microsoft.Sql/servers/[server_name] --resource-type databases --resource-group [resource_group_name] --resource [database_name]
Just replace [server_name], [resource_group_name] and [database_name] with real values
Describe the bug
I tried to create a cannotdeletelock on an sql database.
It works with Powershell New-AzResourceLock but not with azure cli.
Command Name
az lock create
Errors:
To Reproduce:
Use this command with an existing sql database.
az lock create --name <lockName> --resource-group <rgName> --lock-type CanNotDelete --resource <servername>/<dbname> --resource-type Microsoft.Sql/servers/databases
Expected Behavior
Creates a lock on the sql db
Environment Summary
Additional Context