Share via


az storage account or-policy

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Manage storage account Object Replication Policy.

Commands

Name Description Type Status
az storage account or-policy create

Create Object Replication Service Policy for storage account.

Core Preview
az storage account or-policy delete

Delete specified Object Replication Service Policy associated with the specified storage account.

Core Preview
az storage account or-policy list

List Object Replication Service Policies associated with the specified storage account.

Core Preview
az storage account or-policy rule

Manage Object Replication Service Policy Rules.

Core Preview
az storage account or-policy rule add

Add rule to the specified Object Replication Service Policy.

Core Preview
az storage account or-policy rule list

List all the rules in the specified Object Replication Service Policy.

Core Preview
az storage account or-policy rule remove

Remove the specified rule from the specified Object Replication Service Policy.

Core Preview
az storage account or-policy rule show

Show the properties of specified rule in Object Replication Service Policy.

Core Preview
az storage account or-policy rule update

Update rule properties to Object Replication Service Policy.

Core Preview
az storage account or-policy show

Show the properties of specified Object Replication Service Policy for storage account.

Core Preview
az storage account or-policy update

Update Object Replication Service Policy properties for storage account.

Core Preview

az storage account or-policy create

Preview

Command group 'storage account or-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create Object Replication Service Policy for storage account.

az storage account or-policy create --account-name
                                    [--dcont --destination-container]
                                    [--destination-account]
                                    [--min-creation-time]
                                    [--policy]
                                    [--policy-id]
                                    [--prefix --prefix-match]
                                    [--resource-group]
                                    [--rule-id]
                                    [--scont --source-container]
                                    [--source-account]

Examples

Create Object Replication Service Policy for storage account.

az storage account or-policy create -g ResourceGroupName -n storageAccountName -d destAccountName -s srcAccountName --destination-container dcont --source-container scont

Create Object Replication Service Policy through json file for storage account.

az storage account or-policy create -g ResourceGroupName -n storageAccountName --policy @policy.json

Create Object Replication Service Policy to source storage account through policy associated with destination storage account.

az storage account or-policy show -g ResourceGroupName -n destAccountName --policy-id "3496e652-4cea-4581-b2f7-c86b3971ba92" | az storage account or-policy create -g ResourceGroupName -n srcAccountName -p "@-"

Required Parameters

--account-name -n

The storage account 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.

--dcont --destination-container

The destination storage container name. Required when no --policy provided.

Property Value
Parameter group: Object Replication Policy Rule Arguments
--destination-account -d

The destination storage account name or resource Id. Apply --account-name value as destination account when there is no destination account provided in --policy and --destination-account.

--min-creation-time -t

Blobs created after the time will be replicated to the destination. It must be in datetime format 'yyyy-MM-ddTHH:mm:ssZ'. Example: 2020-02-19T16:05:00Z.

Property Value
Parameter group: Filters Arguments
--policy -p

The object replication policy definition between two storage accounts, in JSON format. Multiple rules can be defined in one policy.

--policy-id

The ID of object replication policy or "default" if the policy ID is unknown. Policy Id will be auto-generated when setting on destination account. Required when setting on source account.

Property Value
Default value: default
--prefix --prefix-match

Optional. Filter the results to replicate only blobs whose names begin with the specified prefix.

Property Value
Parameter group: Filters Arguments
--resource-group -g

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

--rule-id

Rule Id is auto-generated for each new rule on destination account. It is required for put policy on source account.

Property Value
Parameter group: Object Replication Policy Rule Arguments
--scont --source-container

The source storage container name. Required when no --policy provided.

Property Value
Parameter group: Object Replication Policy Rule Arguments
--source-account -s

The source storage account name or resource Id. Required when no --policy provided.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az storage account or-policy delete

Preview

Command group 'storage account or-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete specified Object Replication Service Policy associated with the specified storage account.

az storage account or-policy delete --account-name
                                    --policy-id
                                    [--resource-group]

Examples

Delete Object Replication Service Policy associated with the specified storage account.

az storage account or-policy delete -g ResourceGroupName -n StorageAccountName --policy-id "04344ea7-aa3c-4846-bfb9-e908e32d3bf8"

Required Parameters

--account-name -n

The storage account name.

--policy-id

The ID of object replication policy or "default" if the policy ID is unknown. Policy Id will be auto-generated when setting on destination account. Required when setting on source account.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az storage account or-policy list

Preview

Command group 'storage account or-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List Object Replication Service Policies associated with the specified storage account.

az storage account or-policy list --account-name
                                  [--resource-group]

Examples

List Object Replication Service Policies associated with the specified storage account.

az storage account or-policy list -g ResourceGroupName -n StorageAccountName

Required Parameters

--account-name -n

The storage account 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>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az storage account or-policy show

Preview

Command group 'storage account or-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Show the properties of specified Object Replication Service Policy for storage account.

az storage account or-policy show --account-name
                                  --policy-id
                                  [--resource-group]

Examples

Show the properties of specified Object Replication Service Policy for storage account.

az storage account or-policy show -g ResourceGroupName -n StorageAccountName --policy-id "04344ea7-aa3c-4846-bfb9-e908e32d3bf8"

Required Parameters

--account-name -n

The storage account name.

--policy-id

The ID of object replication policy or "default" if the policy ID is unknown. Policy Id will be auto-generated when setting on destination account. Required when setting on source account.

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

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False

az storage account or-policy update

Preview

Command group 'storage account or-policy' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update Object Replication Service Policy properties for storage account.

az storage account or-policy update --account-name
                                    [--add]
                                    [--destination-account]
                                    [--force-string]
                                    [--policy]
                                    [--policy-id]
                                    [--remove]
                                    [--resource-group]
                                    [--set]
                                    [--source-account]

Examples

Update source storage account in Object Replication Service Policy.

az storage account or-policy update -g ResourceGroupName -n StorageAccountName --source-account newSourceAccount --policy-id "04344ea7-aa3c-4846-bfb9-e908e32d3bf8"

Update Object Replication Service Policy through json file.

az storage account or-policy update -g ResourceGroupName -n StorageAccountName -p @policy.json

Required Parameters

--account-name -n

The storage account 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.

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

Property Value
Parameter group: Generic Update Arguments
Default value: []
--destination-account -d

The destination storage account name or resource Id. Apply --account-name value as destination account when there is no destination account provided in --policy and --destination-account.

--force-string

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
--policy -p

The object replication policy definition between two storage accounts, in JSON format. Multiple rules can be defined in one policy.

--policy-id

The ID of object replication policy or "default" if the policy ID is unknown. Policy Id will be auto-generated when setting on destination account. Required when setting on source account.

--remove

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: []
--resource-group -g

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

--set

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: []
--source-account -s

The source storage account name or resource Id. Required when no --policy provided.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--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.

Property Value
Default value: False