Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
az storage account management-policy
Manage storage account management policies.
Commands
| Name | Description | Type | Status |
|---|---|---|---|
| az storage account management-policy create |
Create the data policy rules associated with the specified storage account. |
Core | GA |
| az storage account management-policy delete |
Delete the data policy rules associated with the specified storage account. |
Core | GA |
| az storage account management-policy show |
Get the data policy rules associated with the specified storage account. |
Core | GA |
| az storage account management-policy update |
Update the data policy rules associated with the specified storage account. |
Core | GA |
az storage account management-policy create
Create the data policy rules associated with the specified storage account.
az storage account management-policy create --account-name
--policy
--resource-group
[--acquire-policy-token]
[--change-reference]
Examples
Create the data policy rules associated with the specified storage account. (autogenerated)
az storage account management-policy create --account-name myaccount --policy @policy.json --resource-group myresourcegroup
Required Parameters
The name of the storage account within the specified resource group.
The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://learn.microsoft.com/azure/storage/common/storage-lifecycle-managment-concepts.
Name of resource group. You can configure the default group using az configure --defaults group=<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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
az storage account management-policy delete
Delete the data policy rules associated with the specified storage account.
az storage account management-policy delete --account-name
--resource-group
[--acquire-policy-token]
[--change-reference]
Required Parameters
The name of the storage account within the specified resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
az storage account management-policy show
Get the data policy rules associated with the specified storage account.
az storage account management-policy show --account-name
--resource-group
Required Parameters
The name of the storage account within the specified resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<name>.
az storage account management-policy update
Update the data policy rules associated with the specified storage account.
az storage account management-policy update --account-name
--resource-group
[--acquire-policy-token]
[--add]
[--change-reference]
[--force-string]
[--remove]
[--set]
Examples
Update the data policy rules associated with the specified storage account.
az storage account management-policy update --account-name myaccount --resource-group myresourcegroup --set policy.rules[0].name=newname
Required Parameters
The name of the storage account within the specified resource group.
Name of resource group. You can configure the default group using az configure --defaults group=<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.
Acquiring an Azure Policy token automatically for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
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>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Default value: | [] |
The related change reference ID for this resource operation.
| Property | Value |
|---|---|
| Parameter group: | Global Policy Arguments |
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Default value: | False |
Remove a property or an element from a list. Example: --remove property.list <indexToRemove> OR --remove propertyToRemove.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Default value: | [] |
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>.
| Property | Value |
|---|---|
| Parameter group: | Generic Update Arguments |
| Default value: | [] |
Feedback
Was this page helpful?
