axon_synapse
axon_synapse

Reputation: 71

Using a delimiter with azure storage blob list

The Python SDK for Azure provides the list_blobs method for listing blobs present in a container using a container name, prefix and a delimiter.

The Node.js based azure-cli also provides an option for listing blobs

azure storage blob list [options] [container] [prefix]

I checked the help for the above mentioned command and couldn't find an option for using a delimiter.

Is there a way for using a delimiter with the above mentioned command ?

Upvotes: 0

Views: 1689

Answers (2)

Mathieu Longtin
Mathieu Longtin

Reputation: 16720

As of now, there is:

$ az storage blob list -h
...
    --delimiter                    : When the request includes this parameter, the operation returns
                                     a :class:`~azure.storage.blob.models.BlobPrefix` element in the
                                     result list that acts as a placeholder for all blobs whose
                                     names begin with the same substring up to the appearance of the
                                     delimiter character. The delimiter may be a single character or
                                     a string.
...

Upvotes: 0

Gaurav Mantri
Gaurav Mantri

Reputation: 136356

Is there a way for using a delimiter with the above mentioned command ?

As of today, no. There's no option to specify a delimiter when listing blobs in a blob container.

CLI Tools source code is available on Github: https://github.com/Azure/azure-xplat-cli. What you could do is raise an issue there and ask for this feature or try to implement this feature yourself. The file where you would be making changes is: https://github.com/Azure/azure-xplat-cli/blob/dev/lib/commands/storage/storage.blob._js.

Upvotes: 0

Related Questions