Share via


az storage container legal-hold

Manage container legal holds.

Commands

Name Description Type Status
az storage container legal-hold clear

Clear legal hold tags.

Core GA
az storage container legal-hold set

Set legal hold tags.

Core GA
az storage container legal-hold show

Get the legal hold properties of a container.

Core GA
Experimental Preview Deprecated

Clear legal hold tags.

az storage container legal-hold clear --account-name
                                      --container-name
                                      --tags
                                      [--allow-protected-append-writes-all {false, true}]
                                      [--resource-group]

Clear legal hold tags.

az storage container legal-hold clear --tags tag1 tag2 --container-name mycontainer --account-name mystorageccount -g MyResourceGroup
--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c
Experimental Preview Deprecated

The container name.

--tags
Experimental Preview Deprecated

Space-separated tags. Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case.

--allow-protected-append-writes-all --w-all
Experimental Preview Deprecated

When enabled, new blocks can be written to both Append and Block Blobs while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.

Accepted values: false, true
--resource-group -g
Experimental Preview Deprecated

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

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

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

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

Experimental Preview Deprecated

Set legal hold tags.

az storage container legal-hold set --account-name
                                    --container-name
                                    --tags
                                    [--allow-protected-append-writes-all {false, true}]
                                    [--resource-group]

Set legal hold tags.

az storage container legal-hold set --tags tag1 tag2 --container-name mycontainer --account-name mystorageccount -g MyResourceGroup
--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c
Experimental Preview Deprecated

The container name.

--tags
Experimental Preview Deprecated

Space-separated tags. Each tag should be 3 to 23 alphanumeric characters and is normalized to lower case.

--allow-protected-append-writes-all --w-all
Experimental Preview Deprecated

When enabled, new blocks can be written to both Append and Block Blobs while maintaining legal hold protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted.

Accepted values: false, true
--resource-group -g
Experimental Preview Deprecated

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

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

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

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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

Experimental Preview Deprecated

Get the legal hold properties of a container.

az storage container legal-hold show --account-name
                                     --container-name
                                     [--resource-group]

Get the legal hold properties of a container. (autogenerated)

az storage container legal-hold show --account-name mystorageccount --container-name mycontainer
--account-name
Experimental Preview Deprecated

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c
Experimental Preview Deprecated

The container name.

--resource-group -g
Experimental Preview Deprecated

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

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

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

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

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

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