Share via


az storage account blob-service-properties

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

Commands

Name Description Type Status
az storage account blob-service-properties cors-rule

Manage the Cross-Origin Resource Sharing (CORS) rules of a storage account's blob service properties.

Core GA
az storage account blob-service-properties cors-rule add

Add a CORS rule for a storage account.

Core GA
az storage account blob-service-properties cors-rule clear

Clear all CORS rules for a storage account.

Core GA
az storage account blob-service-properties cors-rule list

List all CORS rules of a storage account's blob service properties.

Core GA
az storage account blob-service-properties show

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

Core GA
az storage account blob-service-properties update

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

Core GA

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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

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]
                                                  [--change-feed-days]
                                                  [--container-days]
                                                  [--container-retention {false, true}]
                                                  [--default-service-version]
                                                  [--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 change feed and set change feed retention days to infinite 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 change feed and set change feed retention days to 100 for the storage account 'mystorageaccount' in resource group 'myresourcegroup'.

az storage account blob-service-properties update --enable-change-feed --change-feed-days 100 -n mystorageaccount -g myresourcegroup

Disable change feed for the storage account 'mystorageaccount' in resource group 'myresourcegroup'.

az storage account blob-service-properties update --enable-change-feed false -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

Set default version for incoming request for storage account 'mystorageaccount'.

az storage account blob-service-properties update --default-service-version 2020-04-08 -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>.

Default value: []
--change-feed-days --change-feed-retention-days
Preview

Indicate the duration of changeFeed retention in days. Minimum value is 1 day and maximum value is 146000 days (400 years). A null value indicates an infinite retention of the change feed.(Use --enable-change-feed without --change-feed-days to indicate null).

--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
--default-service-version -d

Indicate the default version to use for requests to the Blob service if an incoming request's version is not specified.

--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/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.

Default value: False
--remove

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

Default value: []
--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=<value>.

Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.