Κοινή χρήση μέσω


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

--account-name

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

--policy

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

--resource-group -g

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

--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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

--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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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

--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>.

Default value: []
--force-string

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

Default value: False
--remove

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

Default value: []
--set

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

Default value: []
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

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

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

--subscription

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

--verbose

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