az storage account blob-service-properties

Manage the properties of a storage account's blob service.

Commands

az storage account blob-service-properties show

Show the properties of a storage account's blob service.

az storage account blob-service-properties update

Update the properties of a storage account's blob service.

az storage account blob-service-properties show

Show the properties of a storage account's blob service.

Show the properties of a storage account's blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

az storage account blob-service-properties show --account-name
                                                [--resource-group]

Examples

Show the properties of the storage account 'mystorageaccount' in resource group 'MyResourceGroup'.

az storage account blob-service-properties show -n mystorageaccount -g MyResourceGroup

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

az storage account blob-service-properties update

Update the properties of a storage account's blob service.

Update the properties of a storage account's blob service, including properties for Storage Analytics and CORS (Cross-Origin Resource Sharing) rules.

az storage account blob-service-properties update --account-name
                                                  [--add]
                                                  [--container-days]
                                                  [--container-retention {false, true}]
                                                  [--delete-retention-days]
                                                  [--enable-change-feed {false, true}]
                                                  [--enable-delete-retention {false, true}]
                                                  [--enable-last-access-tracking {false, true}]
                                                  [--enable-restore-policy {false, true}]
                                                  [--enable-versioning {false, true}]
                                                  [--force-string]
                                                  [--remove]
                                                  [--resource-group]
                                                  [--restore-days]
                                                  [--set]

Examples

Enable the change feed for the storage account 'mystorageaccount' in resource group 'MyResourceGroup'.

az storage account blob-service-properties update --enable-change-feed true -n mystorageaccount -g MyResourceGroup

Enable delete retention policy and set delete retention days to 100 for the storage account 'mystorageaccount' in resource group 'MyResourceGroup'.

az storage account blob-service-properties update --enable-delete-retention true --delete-retention-days 100 -n mystorageaccount -g MyResourceGroup

Enable versioning for the storage account 'mystorageaccount' in resource group 'MyResourceGroup'.

az storage account blob-service-properties update --enable-versioning -n mystorageaccount -g MyResourceGroup

Required Parameters

--account-name -n

The storage account name.

Optional Parameters

--add

Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.

--container-days --container-delete-retention-days

Indicate the number of days that the deleted container should be retained. The minimum specified value can be 1 and the maximum value can be 365.

--container-retention --enable-container-delete-retention

Enable container delete retention policy for container soft delete when set to true. Disable container delete retention policy when set to false.

accepted values: false, true
--delete-retention-days

Indicate the number of days that the deleted blob should be retained. The value must be in range [1,365]. It must be provided when --enable-delete-retention is true.

--enable-change-feed

Indicate whether change feed event logging is enabled. If it is true, you enable the storage account to begin capturing changes. The default value is true. You can see more details in https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-change-feed?tabs=azure-portal#register-by-using-azure-cli.

accepted values: false, true
--enable-delete-retention

Indicate whether delete retention policy is enabled for the blob service.

accepted values: false, true
--enable-last-access-tracking -t

When set to true last access time based tracking policy is enabled.

accepted values: false, true
--enable-restore-policy

Enable blob restore policy when it set to true.

accepted values: false, true
--enable-versioning

Versioning is enabled if set to true.

accepted values: false, true
--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--remove

Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--restore-days

The number of days for the blob can be restored. It should be greater than zero and less than Delete Retention Days.

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.