I have a container on Azure and I want to see a list of all the blob I have in it. If I type on my shell
az storage blob list --container-name MYCONTAINER --account-name MYSTORAGEACCOUNT
I get as an output a list of all my blobs like this:
[
{
"content": null,
"deleted": false,
"metadata": null,
"name": "myblobname.csv",
"properties": {
"appendBlobCommittedBlockCount": null,
"blobTier": "Hot",
"blobTierChangeTime": null,
"blobTierInferred": true,
"blobType": "BlockBlob",
"contentLength": 275821,
"contentRange": null,
"contentSettings": {
"cacheControl": null,
"contentDisposition": null,
"contentEncoding": null,
"contentLanguage": null,
"contentMd5": "YmQ+hefF/6IdNRv+GbD94A==",
"contentType": "application/octet-stream"
},
"copy": {
"completionTime": null,
"id": null,
"progress": null,
"source": null,
"status": null,
"statusDescription": null
},
"creationTime": "2021-11-03T03:28:40+00:00",
"deletedTime": null,
"etag": "0x8D99E7A082AFA6A",
"lastModified": "2021-11-03T03:28:40+00:00",
"lease": {
"duration": null,
"state": "available",
"status": "unlocked"
},
"pageBlobSequenceNumber": null,
"remainingRetentionDays": null,
"serverEncrypted": true
},
"snapshot": null
},
{
...
}
]
but, as an output, I only would like the name and properties.contentLength.
can anyone suggest me how should I edit my script in order to get only the params I want? Thank you very much