az apr task

Note

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

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

View and manage background tasks.

Commands

Name Description Type Status
az apr task cancel

Cancel a task.

Extension Preview
az apr task list

List tasks.

Extension Preview
az apr task show

Show details for a particular task.

Extension Preview
az apr task wait

Wait for a set of tasks to finish.

Extension Preview

az apr task cancel

Preview

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

Cancel a task.

az apr task cancel --id
                   --registry
                   [--acquire-policy-token]
                   [--change-reference]
                   [--resource-group]
                   [--yes]

Examples

Cancel a running task by id.

az apr task cancel -g myrg -r myregistry --id mytaskid

Required Parameters

--id

Task id.

--registry -r

Name of the parent APR registry.

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
--resource-group -g

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

--yes -y

Do not prompt for confirmation.

Property Value
Default value: False
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 apr task list

Preview

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

List tasks.

az apr task list --registry
                 [--limit]
                 [--resource-group]
                 [--state {canceled, canceling, completed, failed, running, skipped, waiting}]

Examples

List all tasks in a registry.

az apr task list -g myrg -r myregistry

List only failed tasks.

az apr task list -g myrg -r myregistry --state failed

Required Parameters

--registry -r

Name of the parent APR registry.

Optional Parameters

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

--limit

Max number of tasks to return. Omit to return all.

--resource-group -g

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

--state

Filter by state.

Property Value
Accepted values: canceled, canceling, completed, failed, running, skipped, waiting
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 apr task show

Preview

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

Show details for a particular task.

az apr task show --id
                 --registry
                 [--resource-group]

Examples

Show a task by id.

az apr task show -g myrg -r myregistry --id mytaskid

Required Parameters

--id

Task id.

--registry -r

Name of the parent APR registry.

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

Preview

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

Wait for a set of tasks to finish.

az apr task wait --ids
                 --registry
                 [--acquire-policy-token]
                 [--change-reference]
                 [--resource-group]

Examples

Wait for several tasks to finish.

az apr task wait -g myrg -r myregistry --ids task1,task2

Required Parameters

--ids

Comma-separated list of task ids to wait on.

--registry -r

Name of the parent APR registry.

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