i tried to get all operations (Get, Put, Delete)etc.. on a specific storage account but I don’t get all information (on which container, on which blob)..
I tried these two api :
1)
https://management.azure.com/subscriptions/XXX/resourceGroups/XXX/providers/Microsoft.Storage/storageAccounts/XXX/providers/microsoft.insights/metrics?metricnames=Transactions×pan=2022-12-18T02:00:00Z/2022-12-20T02:05:00Z&$filter=apiname+eq+'*'+and+ResponseType+eq+'*'+&interval=PT24H&aggregation=Total&orderby=Total+desc&api-version=2019-07-01
but I get only the number and the response type
2
Answers
Use the below params as headers to get rid of un- authorization error while accessing the API
x-ms-date :
x-ms-version :
Authorization : SharedKey storagename: Signature
Authorization is shown in below snippet
Create a storage account and container in Azure
Storage account
Container
code in C# to fetch the Headers of x-ms-date ,
x-ms-version , and Authorization
for more information, please check this link
Data layer operations are available on resource log(diagnostics logs).
Refer documentation how to enable logging into log analytics workspace: https://learn.microsoft.com/en-us/azure/storage/blobs/monitor-blob-storage?tabs=azure-portal#collection-and-routing
After turning on logging you can run queries to fetch operation from
StorageBlobLogs
table.