az storage account management-policy

Manage storage account management policies.

Commands

az storage account management-policy create Creates the data policy rules associated with the specified storage account.
az storage account management-policy delete Deletes the managementpolicy associated with the specified storage account.
az storage account management-policy show Gets the managementpolicy associated with the specified storage account.
az storage account management-policy update Updates the data policy rules associated with the specified storage account.

az storage account management-policy create

Creates the data policy rules associated with the specified storage account.

az storage account management-policy create --account-name
--resource-group
[--policy]
[--subscription]

Required Parameters

--account-name

The name of the storage account within the specified resource group.

--resource-group -g

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

Optional Parameters

--policy

The Storage Account ManagementPolicies Rules, in JSON format. See more details in: https://docs.microsoft.com/en-us/azure/storage/common/storage-lifecycle-managment-concepts.

--subscription

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

az storage account management-policy delete

Deletes the managementpolicy associated with the specified storage account.

az storage account management-policy delete --account-name
--resource-group
[--subscription]

Required Parameters

--account-name

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

--resource-group -g

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

Optional Parameters

--subscription

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

az storage account management-policy show

Gets the managementpolicy associated with the specified storage account.

az storage account management-policy show --account-name
--resource-group
[--subscription]

Required Parameters

--account-name

The name of the storage account within the specified resource group. Storage account names must be between 3 and 24 characters in length and use numbers and lower-case letters only.

--resource-group -g

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

Optional Parameters

--subscription

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

az storage account management-policy update

Updates 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]
[--subscription]

Required Parameters

--account-name

The name of the storage account within the specified resource group.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<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>.

--force-string

When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.

--remove

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

--set

Update an object by specifying a property path and value to set. Example: --set property1.property2=.

--subscription

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