Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

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

az storage container legal-hold clear

Clear legal hold tags.

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

Examples

Clear legal hold tags.

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

Required Parameters

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c

The container name.

--tags

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allow-protected-append-writes-all --w-all

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.

Property Value
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

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

az storage container legal-hold set

Set legal hold tags.

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

Examples

Set legal hold tags.

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

Required Parameters

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c

The container name.

--tags

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--allow-protected-append-writes-all --w-all

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.

Property Value
Accepted values: false, true
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--resource-group -g

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

az storage container legal-hold show

Get the legal hold properties of a container.

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

Examples

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

az storage container legal-hold show --account-name mystorageccount --container-name mycontainer

Required Parameters

--account-name

Storage account name. Related environment variable: AZURE_STORAGE_ACCOUNT.

--container-name -c

The container name.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--resource-group -g

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


Feedback

Was this page helpful?