Share via


az storage account task-assignment

Note

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

Manage storage account task assignment.

Commands

Name Description Type Status
az storage account task-assignment create

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

Extension GA
az storage account task-assignment delete

Delete the storage task assignment sub-resource.

Extension GA
az storage account task-assignment list

List all the storage task assignments in an account.

Extension GA
az storage account task-assignment list-report

List the report summary of a single storage task assignment's instances.

Extension GA
az storage account task-assignment show

Get the storage task assignment properties.

Extension GA
az storage account task-assignment update

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

Extension GA
az storage account task-assignment wait

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

Extension GA

az storage account task-assignment create

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

az storage account task-assignment create --account-name
                                          --description
                                          --enabled {0, 1, f, false, n, no, t, true, y, yes}
                                          --execution-context
                                          --name --storage-task-assignment-name
                                          --report
                                          --resource-group
                                          --task-id
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]

Examples

Create Storage TaskAssignment

az storage account task-assignment create -g rg_name -n task_assignment_name --account-name storage_account_name --description 'My Storage task assignment' --enabled false --task-id 'task_id' --report '{prefix:container1}' --execution-context '{trigger:{type:OnSchedule,parameters:{start-from:'2024-08-14T21:52:47Z',end-by:'2024-09-04T21:52:47.203074Z',interval:10,interval-unit:Days}},target:{prefix:[prefix1,prefix2],exclude-prefix:[prefix3]}}'

Required Parameters

--account-name

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

--description

Text that describes the purpose of the storage task assignment.

--enabled

Whether the storage task assignment is enabled or not.

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

The storage task assignment execution context Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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

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

--report

The storage task assignment report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--resource-group -g

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

--task-id

Id of the corresponding storage task.

Optional Parameters

--no-wait

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

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

Delete the storage task assignment sub-resource.

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

Examples

Delete Storage TaskAssignment

az storage account task-assignment delete --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1

Optional Parameters

--account-name

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

--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-assignment-name -n

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

List all the storage task assignments in an account.

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

Examples

List Storage TaskAssignments

az storage account task-assignment list --resource-group res4228 --account-name sto4445

Required Parameters

--account-name

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

List the report summary of a single storage task assignment's instances.

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

Examples

List Storage TaskAssignment InstancesReportSummary

az storage account task-assignment list-report --resource-group res4228 --account-name sto4445 --storage-task-assignment-name myassignment1

Required Parameters

--account-name

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

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

The name of the storage task assignment within the specified resource group. Storage task assignment names must be between 3 and 24 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. See Constructing Filter Strings for details.

--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 instances 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 account task-assignment show

Get the storage task assignment properties.

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

Examples

Get Storage TaskAssignment

az storage account task-assignment show -g rg_name -n task_assignment_name --account-name storage_account_name

Optional Parameters

--account-name

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

--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-assignment-name -n

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

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

az storage account task-assignment update [--account-name]
                                          [--add]
                                          [--description]
                                          [--enabled {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--execution-context]
                                          [--force-string {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--ids]
                                          [--name --storage-task-assignment-name]
                                          [--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
                                          [--remove]
                                          [--report]
                                          [--resource-group]
                                          [--set]
                                          [--subscription]
                                          [--task-id]

Examples

Update Storage TaskAssignment

az storage account task-assignment update -g rg_name -n task_assignment_name --account-name storage_account_name --description 'My Storage task assignment' --enabled true --task-id 'task_id' --report '{prefix:container1}' --execution-context '{trigger:{type:OnSchedule,parameters:{start-from:'2024-08-15T21:52:47Z',end-by:'2024-09-05T21:52:47.203074Z',interval:10,interval-unit:Days}},target:{prefix:[prefix1,prefix2],exclude-prefix:[prefix3]}}'

Optional Parameters

--account-name

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

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

--enabled

Whether the storage task assignment is enabled or not.

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

The storage task assignment execution context Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

--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
--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-assignment-name -n

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

--report

The storage task assignment report Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.

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

--task-id

Id of the corresponding storage task.

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

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

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

Optional Parameters

--account-name

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

--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-assignment-name -n

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

Request timeout in seconds. Applies to each call to the service.

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.