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
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://docs.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>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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
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>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
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
[--add]
[--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
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>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Global Parameters
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.