Share via


az netappfiles snapshot policy

Manage Azure NetApp Files (ANF) Snapshot Policy Resources.

Commands

Name Description Type Status
az netappfiles snapshot policy create

Create a snapshot policy.

Core GA
az netappfiles snapshot policy delete

Delete snapshot policy.

Core GA
az netappfiles snapshot policy list

List snapshot policy.

Core GA
az netappfiles snapshot policy show

Get a snapshot Policy.

Core GA
az netappfiles snapshot policy update

Update a snapshot policy.

Core GA
az netappfiles snapshot policy volumes

List volumes associated with snapshot policy.

Core GA
az netappfiles snapshot policy wait

Place the CLI in a waiting state until a condition is met.

Core GA

az netappfiles snapshot policy create

Create a snapshot policy.

az netappfiles snapshot policy create --account-name
                                      --name
                                      --resource-group
                                      [--daily-hour]
                                      [--daily-minute]
                                      [--daily-snapshots]
                                      [--days-of-month]
                                      [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--hour]
                                      [--hourly-minute]
                                      [--hourly-snapshots]
                                      [--location]
                                      [--monthly-minute]
                                      [--monthly-snapshots]
                                      [--tags]
                                      [--weekly-day]
                                      [--weekly-hour]
                                      [--weekly-minute]
                                      [--weekly-snapshots]

Examples

Create an ANF snapshot policy

az netappfiles snapshot policy create -g mygroup --account-name myaccountname --snapshot-policy-name mysnapshotpolicyname -l westus2 --hourly-snapshots 1 --hourly-minute 5 --enabled true

Required Parameters

--account-name -a

The name of the NetApp account.

--name --snapshot-policy-name -n

The name of the snapshot policy.

--resource-group -g

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

Optional Parameters

--daily-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--daily-minute

Indicates which minute snapshot should be taken.

--daily-snapshots --snapshots-to-keep -d

Daily snapshot count to keep.

--days-of-month --monthly-days

Indicates which days of the month snapshot should be taken. A comma delimited string.

--enabled -e

The property to decide policy is enabled or not.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
Default value: True
--hour --monthly-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--hourly-minute --minute

Indicates which minute snapshot should be taken.

--hourly-snapshots -u

Hourly snapshot count to keep.

--location -l

The geo-location where the resource lives When not specified, the location of the resource group will be used.

--monthly-minute

Indicates which minute snapshot should be taken.

--monthly-snapshots -m

Monthly snapshot count to keep.

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--weekly-day

Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english.

--weekly-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--weekly-minute

Indicates which minute snapshot should be taken.

--weekly-snapshots -w

Weekly snapshot count to keep.

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 netappfiles snapshot policy delete

Delete snapshot policy.

az netappfiles snapshot policy delete [--account-name]
                                      [--ids]
                                      [--name]
                                      [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--resource-group]
                                      [--subscription]
                                      [--yes]

Examples

Delete an ANF snapshot policy

az netappfiles snapshot policy delete -g mygroup --account-name myaccname --snapshot-policy-name mysnapshotpolicyname

Optional Parameters

--account-name -a

The name of the NetApp account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --snapshot-policy-name -n

The name of the snapshot policy.

--no-wait

Do not wait for the long-running operation to finish.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--resource-group -g

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

--subscription

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

--yes -y

Do not prompt for confirmation.

Default value: False
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 netappfiles snapshot policy list

List snapshot policy.

az netappfiles snapshot policy list --account-name
                                    --resource-group

Examples

List the snapshot policies for the ANF account

az netappfiles snapshot policy list -g mygroup --account-name myname

Required Parameters

--account-name -a

The name of the NetApp account.

--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 netappfiles snapshot policy show

Get a snapshot Policy.

az netappfiles snapshot policy show [--account-name]
                                    [--ids]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]

Examples

Get an ANF snapshot policy

az netappfiles snapshot policy show -g mygroup --account-name myaccname --snapshot-policy-name mysnapshotpolicyname

Optional Parameters

--account-name -a

The name of the NetApp account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--name --snapshot-policy-name -n

The name of the snapshot policy.

--resource-group -g

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

--subscription

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

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 netappfiles snapshot policy update

Update a snapshot policy.

az netappfiles snapshot policy update [--account-name]
                                      [--add]
                                      [--daily-hour]
                                      [--daily-minute]
                                      [--daily-snapshots]
                                      [--days-of-month]
                                      [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                      [--hour]
                                      [--hourly-minute]
                                      [--hourly-snapshots]
                                      [--ids]
                                      [--monthly-minute]
                                      [--monthly-snapshots]
                                      [--name]
                                      [--remove]
                                      [--resource-group]
                                      [--set]
                                      [--subscription]
                                      [--tags]
                                      [--weekly-day]
                                      [--weekly-hour]
                                      [--weekly-minute]
                                      [--weekly-snapshots]

Examples

Update specific values for an ANF snapshot policy

az netappfiles snapshot policy update -g mygroup --account-name myaccountname --snapshot-policy-name mysnapshotpolicyname --daily-snapshots 1 --enabled false

Optional Parameters

--account-name -a

The name of the NetApp account.

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

--daily-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--daily-minute

Indicates which minute snapshot should be taken.

--daily-snapshots --snapshots-to-keep -d

Daily snapshot count to keep.

--days-of-month --monthly-days

Indicates which days of the month snapshot should be taken. A comma delimited string.

--enabled -e

The property to decide policy is enabled or not.

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--force-string

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--hour --monthly-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--hourly-minute --minute

Indicates which minute snapshot should be taken.

--hourly-snapshots -u

Hourly snapshot count to keep.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--monthly-minute

Indicates which minute snapshot should be taken.

--monthly-snapshots -m

Monthly snapshot count to keep.

--name --snapshot-policy-name -n

The name of the snapshot policy.

--remove

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

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

--subscription

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

--tags

Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--weekly-day

Indicates which weekdays snapshot should be taken, accepts a comma separated list of week day names in english.

--weekly-hour

Indicates which hour in UTC timezone a snapshot should be taken.

--weekly-minute

Indicates which minute snapshot should be taken.

--weekly-snapshots -w

Weekly snapshot count to keep.

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 netappfiles snapshot policy volumes

List volumes associated with snapshot policy.

Get the all ANF volumes associated with snapshot policy.

az netappfiles snapshot policy volumes [--account-name]
                                       [--ids]
                                       [--resource-group]
                                       [--snapshot-policy-name]
                                       [--subscription]

Examples

Get ANF volumes associated with the specified snapshot policy

az netappfiles snapshot policy volumes -g mygroup --account-name myaccname --snapshot-policy-name mysnapshotpolicyname

Optional Parameters

--account-name -a

The name of the NetApp account.

--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--resource-group -g

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

--snapshot-policy-name

The name of the snapshot policy.

--subscription

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

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 netappfiles snapshot policy wait

Place the CLI in a waiting state until a condition is met.

az netappfiles snapshot policy wait [--account-name]
                                    [--created]
                                    [--custom]
                                    [--deleted]
                                    [--exists]
                                    [--ids]
                                    [--interval]
                                    [--name]
                                    [--resource-group]
                                    [--subscription]
                                    [--timeout]
                                    [--updated]

Optional Parameters

--account-name -a

The name of the NetApp account.

--created

Wait until created with 'provisioningState' at 'Succeeded'.

Default value: False
--custom

Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].

--deleted

Wait until deleted.

Default value: False
--exists

Wait until the resource exists.

Default value: False
--ids

One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.

--interval

Polling interval in seconds.

Default value: 30
--name --snapshot-policy-name -n

The name of the snapshot policy.

--resource-group -g

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

--subscription

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

--timeout

Maximum wait in seconds.

Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Default value: False
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.