Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

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 --snapshot-policy-name
 --resource-group
 [--acquire-policy-token]
 [--change-reference]
 [--daily-hour]
 [--daily-minute]
 [--daily-snapshots --snapshots-to-keep]
 [--days-of-month --monthly-days]
 [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
 [--hour --monthly-hour]
 [--hourly-minute --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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--daily-hour

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

Property Value
Parameter group: DailySchedule Arguments
--daily-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: DailySchedule Arguments
--daily-snapshots --snapshots-to-keep -d

Daily snapshot count to keep.

Property Value
Parameter group: DailySchedule Arguments
--days-of-month --monthly-days

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

Property Value
Parameter group: MonthlySchedule Arguments
--enabled -e

The property to decide policy is enabled or not.

Property Value
Parameter group: Properties Arguments
Default value: True
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.

Property Value
Parameter group: MonthlySchedule Arguments
--hourly-minute --minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: HourlySchedule Arguments
--hourly-snapshots -u

Hourly snapshot count to keep.

Property Value
Parameter group: HourlySchedule Arguments
--location -l

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

Property Value
Parameter group: Body Arguments
--monthly-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: MonthlySchedule Arguments
--monthly-snapshots -m

Monthly snapshot count to keep.

Property Value
Parameter group: MonthlySchedule Arguments
--tags

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

Property Value
Parameter group: Body Arguments
--weekly-day

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

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-hour

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

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-snapshots -w

Weekly snapshot count to keep.

Property Value
Parameter group: WeeklySchedule Arguments

az netappfiles snapshot policy delete

Delete snapshot policy.

az netappfiles snapshot policy delete [--account-name]
 [--acquire-policy-token]
 [--change-reference]
 [--ids]
 [--name --snapshot-policy-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name -a

The name of the NetApp account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --snapshot-policy-name -n

The name of the snapshot policy.

Property Value
Parameter group: Resource Id Arguments
--no-wait

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

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--yes -y

Do not prompt for confirmation.

Property Value
Default value: False

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

az netappfiles snapshot policy show

Get a snapshot Policy.

az netappfiles snapshot policy show [--account-name]
 [--ids]
 [--name --snapshot-policy-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name -a

The name of the NetApp account.

Property Value
Parameter group: Resource Id Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--name --snapshot-policy-name -n

The name of the snapshot policy.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az netappfiles snapshot policy update

Update a snapshot policy.

az netappfiles snapshot policy update [--account-name]
 [--acquire-policy-token]
 [--add]
 [--change-reference]
 [--daily-hour]
 [--daily-minute]
 [--daily-snapshots --snapshots-to-keep]
 [--days-of-month --monthly-days]
 [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
 [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
 [--hour --monthly-hour]
 [--hourly-minute --minute]
 [--hourly-snapshots]
 [--ids]
 [--monthly-minute]
 [--monthly-snapshots]
 [--name --snapshot-policy-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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name -a

The name of the NetApp account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--daily-hour

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

Property Value
Parameter group: DailySchedule Arguments
--daily-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: DailySchedule Arguments
--daily-snapshots --snapshots-to-keep -d

Daily snapshot count to keep.

Property Value
Parameter group: DailySchedule Arguments
--days-of-month --monthly-days

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

Property Value
Parameter group: MonthlySchedule Arguments
--enabled -e

The property to decide policy is enabled or not.

Property Value
Parameter group: Properties Arguments
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.

Property Value
Parameter group: Generic Update Arguments
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.

Property Value
Parameter group: MonthlySchedule Arguments
--hourly-minute --minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: HourlySchedule Arguments
--hourly-snapshots -u

Hourly snapshot count to keep.

Property Value
Parameter group: HourlySchedule Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--monthly-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: MonthlySchedule Arguments
--monthly-snapshots -m

Monthly snapshot count to keep.

Property Value
Parameter group: MonthlySchedule Arguments
--name --snapshot-policy-name -n

The name of the snapshot policy.

Property Value
Parameter group: Resource Id Arguments
--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
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--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
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--tags

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

Property Value
Parameter group: Body Arguments
--weekly-day

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

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-hour

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

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-minute

Indicates which minute snapshot should be taken.

Property Value
Parameter group: WeeklySchedule Arguments
--weekly-snapshots -w

Weekly snapshot count to keep.

Property Value
Parameter group: WeeklySchedule Arguments

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]
 [--acquire-policy-token]
 [--change-reference]
 [--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

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name -a

The name of the NetApp account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--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.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--snapshot-policy-name

The name of the snapshot policy.

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments

az netappfiles snapshot policy wait

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

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

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--account-name -a

The name of the NetApp account.

Property Value
Parameter group: Resource Id Arguments
--acquire-policy-token

Acquiring an Azure Policy token automatically for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--change-reference

The related change reference ID for this resource operation.

Property Value
Parameter group: Global Policy Arguments
--created

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

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--custom

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

Property Value
Parameter group: Wait Condition Arguments
--deleted

Wait until deleted.

Property Value
Parameter group: Wait Condition Arguments
Default value: False
--exists

Wait until the resource exists.

Property Value
Parameter group: Wait Condition Arguments
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.

Property Value
Parameter group: Resource Id Arguments
--interval

Polling interval in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 30
--name --snapshot-policy-name -n

The name of the snapshot policy.

Property Value
Parameter group: Resource Id Arguments
--resource-group -g

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

Property Value
Parameter group: Resource Id Arguments
--subscription

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

Property Value
Parameter group: Resource Id Arguments
--timeout

Maximum wait in seconds.

Property Value
Parameter group: Wait Condition Arguments
Default value: 3600
--updated

Wait until updated with provisioningState at 'Succeeded'.

Property Value
Parameter group: Wait Condition Arguments
Default value: False

Feedback

Was this page helpful?