when running the azure CLI command:
az storage account blob-service-properties show --account-name sa36730 --resource-group rg-exercise1
The output json contains the filed isVersioningEnabled
.
I am trying to get this field using python sdk.
I wrote this code but the output doesnt contain the version enabled information.
def blob_service_properties():
connection_string = "<connection string>"
# Instantiate a BlobServiceClient using a connection string
blob_service_client = BlobServiceClient.from_connection_string(connection_string)
properties = blob_service_client.get_service_properties()
pprint.pprint(properties)
# [END get_blob_service_properties]
My output looks like:
{'analytics_logging': <azure.storage.blob._models.BlobAnalyticsLogging object at 0x7ff0f8b7c340>,
'cors': [<azure.storage.blob._models.CorsRule object at 0x7ff1088b61c0>],
'delete_retention_policy': <azure.storage.blob._models.RetentionPolicy object at 0x7ff0f8b9b1c0>,
'hour_metrics': <azure.storage.blob._models.Metrics object at 0x7ff0f8b9b700>,
'minute_metrics': <azure.storage.blob._models.Metrics object at 0x7ff0f8b9b3d0>,
'static_website': <azure.storage.blob._models.StaticWebsite object at 0x7ff0f8ba5c10>,
'target_version': None}
Is there a way to get the versioning information using Python SDK for storage blob?