Share via


az storage-actions task

Note

This reference is part of the storage-actions extension for the Azure CLI (version 2.57.0 or higher). The extension will automatically install the first time you run an az storage-actions task command. Learn more about extensions.

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

Manage StorageTask.

Commands

Name Description Type Status
az storage-actions task create

Create a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent create request is issued with the exact same set of properties, the request will succeed.

Extension Preview
az storage-actions task delete

Delete the storage task resource.

Extension Preview
az storage-actions task list

List all the storage tasks available under the subscription.

Extension Preview
az storage-actions task list-assignment

List all the storage task assignments available under the given resource group.

Extension Preview
az storage-actions task list-report

List the storage tasks run report summary for each assignment.

Extension Preview
az storage-actions task preview-action

Runs the input conditions against input object metadata properties and designates matched objects in response.

Extension Preview
az storage-actions task show

Get the storage task properties.

Extension Preview
az storage-actions task update

Update a storage task resource with the specified parameters. If a storage task is already created and a subsequent update request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent update request is issued with the exact same set of properties, the request will succeed.

Extension Preview
az storage-actions task wait

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

Extension Preview

az storage-actions task create

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Create a new storage task resource with the specified parameters. If a storage task is already created and a subsequent create request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent create request is issued with the exact same set of properties, the request will succeed.

az storage-actions task create --action
                               --description
                               --enabled {0, 1, f, false, n, no, t, true, y, yes}
                               --identity
                               --name
                               --resource-group
                               [--location]
                               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                               [--tags]

Examples

storage-actions task create

az storage-actions task create -g rgteststorageactions -n testtask1 --identity "{type:SystemAssigned}" --tags "{key1:value1}" --action "{if:{condition:'[[equals(AccessTier,'/Cool'/)]]',operations:[{name:'SetBlobTier',parameters:{tier:'Hot'},onSuccess:'continue',onFailure:'break'}]},else:{operations:[{name:'DeleteBlob',onSuccess:'continue',onFailure:'break'}]}}" --description StorageTask1 --enabled true

Required Parameters

--action

The storage task action that is executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--description

Text that describes the purpose of the storage task.

--enabled

Storage Task is enabled when set to true and disabled when set to false.

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

The managed service identity of the resource. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--name --storage-task-name -n

The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 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

--location -l

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

--no-wait

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

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

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

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-actions task delete

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Delete the storage task resource.

az storage-actions task delete [--ids]
                               [--name]
                               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                               [--resource-group]
                               [--subscription]
                               [--yes]

Examples

storage-actions task delete

az storage-actions task delete -g rgteststorageactions -n testtask1

Optional Parameters

--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 --storage-task-name -n

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

--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 storage-actions task list

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all the storage tasks available under the subscription.

az storage-actions task list [--max-items]
                             [--next-token]
                             [--resource-group]

Examples

storage-actions task list

az storage-actions task list -g rgteststorageactions

Optional Parameters

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

--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-actions task list-assignment

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List all the storage task assignments available under the given resource group.

az storage-actions task list-assignment --name
                                        --resource-group
                                        [--max-items]
                                        [--maxpagesize]
                                        [--next-token]

Examples

storage-actions task list-assignment

az storage-actions task list-assignment -g rgteststorageactions -n testtask1

Required Parameters

--name --storage-task-name -n

The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 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

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--maxpagesize

Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

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-actions task list-report

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

List the storage tasks run report summary for each assignment.

az storage-actions task list-report --name
                                    --resource-group
                                    [--filter]
                                    [--max-items]
                                    [--maxpagesize]
                                    [--next-token]

Examples

storage-actions task list-report

az storage-actions task list-report -g rgteststorageactions -n testtask1

Required Parameters

--name --storage-task-name -n

The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 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

--filter

Optional. When specified, it can be used to query using reporting properties.

--max-items

Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token argument of a subsequent command.

--maxpagesize

Optional, specifies the maximum number of storage task assignment Ids to be included in the list response.

--next-token

Token to specify where to start paginating. This is the token value from a previously truncated response.

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-actions task preview-action

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Runs the input conditions against input object metadata properties and designates matched objects in response.

az storage-actions task preview-action --action
                                       --blobs
                                       --container
                                       [--ids]
                                       [--location]
                                       [--subscription]

Examples

storage-actions task preview-action

az storage-actions task preview-action -l eastus2euap --action "{if:{condition:'[[equals(AccessTier,'/Cool'/)]]'},else-block-exists:True}" --blobs "[{name:'folder2/file1.txt',properties:[{key:'Creation-Time',value:'Wed, 06 Jun 2023 05:23:29 GMT'},{key:'Last-Modified',value:'Wed, 06 Jun 2023 05:23:29 GMT'},{key:'Etag',value:'0x6FB67175454D36D'}],metadata:[{key:'mKey2',value:'mValue2'}],tags:[{key:'tKey2',value:'tValue2'}]}]" --container "{name:'firstContainer',metadata:[{key:'mContainerKey1',value:'mContainerValue1'}]}"

Required Parameters

--action

Preview action container properties to be tested for a match with the provided condition. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--blobs

Preview action container properties to be tested for a match with the provided condition. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--container

Preview action container properties to be tested for a match with the provided condition. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

Optional Parameters

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

--location -l

Location. Values from: az account list-locations. You can configure the default location using az configure --defaults location=<location>.

--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 storage-actions task show

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Get the storage task properties.

az storage-actions task show [--ids]
                             [--name]
                             [--resource-group]
                             [--subscription]

Examples

storage-actions task show

az storage-actions task show -g rgteststorageactions -n testtask1

Optional Parameters

--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 --storage-task-name -n

The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 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>.

--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 storage-actions task update

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

Update a storage task resource with the specified parameters. If a storage task is already created and a subsequent update request is issued with different properties, the storage task properties will be updated. If a storage task is already created and a subsequent update request is issued with the exact same set of properties, the request will succeed.

az storage-actions task update [--action]
                               [--add]
                               [--description]
                               [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                               [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                               [--identity]
                               [--ids]
                               [--name]
                               [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                               [--remove]
                               [--resource-group]
                               [--set]
                               [--subscription]
                               [--tags]

Examples

storage-actions task update

az storage-actions task update -g rgteststorageactions -n testtask1 --identity "{type:SystemAssigned}" --tags "{key2:value2}" --action "{if:{condition:'[[equals(BlobType,'/BlockBlob'/)]]',operations:[{name:'SetBlobTags',parameters:{Archive-Status:'Archived'},onSuccess:'continue',onFailure:'break'}]},else:{operations:[{name:'UndeleteBlob',onSuccess:'continue',onFailure:'break'}]}}" --description StorageTask1Update --enabled true

Optional Parameters

--action

The storage task action that is executed Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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

--description

Text that describes the purpose of the storage task.

--enabled

Storage Task is enabled when set to true and disabled when set to false.

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

The managed service identity of the resource. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--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 --storage-task-name -n

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

--no-wait

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

Accepted values: 0, 1, f, false, n, no, t, true, y, yes
--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.

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-actions task wait

Preview

Command group 'az storage-actions task' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

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

az storage-actions task wait [--created]
                             [--custom]
                             [--deleted]
                             [--exists]
                             [--ids]
                             [--interval]
                             [--name]
                             [--resource-group]
                             [--subscription]
                             [--timeout]
                             [--updated]

Optional Parameters

--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 --storage-task-name -n

The name of the storage task within the specified resource group. Storage task names must be between 3 and 18 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>.

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