I am trying to run this command
Set-AzSqlDatabaseAudit `
>> -ResourceGroupName "" `
>> -ServerName "" `
>> -DatabaseName "" `
>> -BlobStorageTargetState Enabled `
>> -StorageAccountResourceId "?"
To setup auditing on SQL database but I am not able to find a way how to get resource id of storage container I already created for this purpose. I don't see this property in the GUI and also I don't know how to retrieve it via CLI.
Is there some general way how to get resource id of an object or where do I find it?
The command
Set-AzSqlDatabaseAudityou are using is azure Powershell, not azure CLI, so if you want to Powershell to get theStorageAccountResourceId, just use the command below.If you want to use azure CLI, just use
az storage account show, theidis what you want.