Share via


az iot central job

Note

This reference is part of the azure-iot extension for the Azure CLI (version 2.46.0 or higher). The extension will automatically install the first time you run an az iot central job command. Learn more about extensions.

Manage and configure jobs for an IoT Central application.

Commands

Name Description Type Status
az iot central job create

Create and execute a job via its job definition.

Extension GA
az iot central job get-devices

Get job device statuses.

Extension GA
az iot central job list

Get the list of jobs for an IoT Central application.

Extension GA
az iot central job rerun

Re-run a job on all failed devices.

Extension GA
az iot central job resume

Resume a stopped job.

Extension GA
az iot central job show

Get the details of a job by ID.

Extension GA
az iot central job stop

Stop a running job.

Extension GA

az iot central job create

Experimental Preview Deprecated

Create and execute a job via its job definition.

az iot central job create --app-id
                          --content
                          --group-id
                          --job-id
                          [--api-version {2022-07-31}]
                          [--batch]
                          [--batch-type {number, percentage}]
                          [--cancellation-threshold]
                          [--cancellation-threshold-batch]
                          [--cancellation-threshold-type {number, percentage}]
                          [--central-api-uri]
                          [--desc]
                          [--job-name]
                          [--token]

Examples

Create a job with name

az iot central job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {jobName} --content {creationJSONPath}

Create a job with name and batch configuration.

az iot central job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {jobName} --content {creationJSONPath} --batch {jobBatchValue} --batch-type {jobBatchType}

Create a job with name and cancellation threshold configuration with no batch.

az iot central job create --app-id {appid} --job-id {jobId} --group-id {groupId} --job-name {jobName} --content {creationJSONPath} --cancellation-threshold {jobCancellationThresholdValue} --cancellation-threshold-type {jobCancellationThresholdType} --description {jobDesc}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--content -k
Experimental Preview Deprecated

The job data definition. Provide path to JSON file or raw stringified JSON. [File Path Example:./path/to/file.json] [Example of stringified JSON:[{Job Data JSON}]. The request body must contain array of JobData.

--group-id -g
Experimental Preview Deprecated

The ID of the device group on which to execute the job.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--batch -b
Experimental Preview Deprecated

The number or percentage of devices on which batching is done.

--batch-type --bt
Experimental Preview Deprecated

Specify if batching is done on a number of devices or a percentage of the total.

Accepted values: number, percentage
Default value: number
--cancellation-threshold --cth
Experimental Preview Deprecated

The number or percentage of devices on which the cancellation threshold is applied.

--cancellation-threshold-batch --ctb
Experimental Preview Deprecated

Whether the cancellation threshold applies per-batch or to the overall job.

Default value: number
--cancellation-threshold-type --ctt
Experimental Preview Deprecated

Specify if cancellation threshold applies for a number of devices or a percentage of the total.

Accepted values: number, percentage
Default value: number
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--desc --description
Experimental Preview Deprecated

Detailed description of the job.

--job-name
Experimental Preview Deprecated

Display name of the job.

--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job get-devices

Experimental Preview Deprecated

Get job device statuses.

az iot central job get-devices --app-id
                               --job-id
                               [--api-version {2022-07-31}]
                               [--central-api-uri]
                               [--token]

Examples

Get the list of individual device statuses by job ID

az iot central job get-devices --app-id {appid} --job-id {jobId}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job list

Experimental Preview Deprecated

Get the list of jobs for an IoT Central application.

az iot central job list --app-id
                        [--api-version {2022-07-31}]
                        [--central-api-uri]
                        [--token]

Examples

List jobs in an application

az iot central job list --app-id {appid}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job rerun

Experimental Preview Deprecated

Re-run a job on all failed devices.

az iot central job rerun --app-id
                         --job-id
                         --rerun-id
                         [--api-version {2022-07-31}]
                         [--central-api-uri]
                         [--token]

Examples

Rerun a job

az iot central job rerun --app-id {appid} --job-id {jobId} --rerun-id {rerunId}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

--rerun-id
Experimental Preview Deprecated

Unique identifier for the rerun.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job resume

Experimental Preview Deprecated

Resume a stopped job.

az iot central job resume --app-id
                          --job-id
                          [--api-version {2022-07-31}]
                          [--central-api-uri]
                          [--token]

Examples

Resume a job

az iot central job resume --app-id {appid} --job-id {jobId}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job show

Experimental Preview Deprecated

Get the details of a job by ID.

az iot central job show --app-id
                        --job-id
                        [--api-version {2022-07-31}]
                        [--central-api-uri]
                        [--token]

Examples

Get details of job

az iot central job show --app-id {appid} --job-id {jobId}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.

az iot central job stop

Experimental Preview Deprecated

Stop a running job.

az iot central job stop --app-id
                        --job-id
                        [--api-version {2022-07-31}]
                        [--central-api-uri]
                        [--token]

Examples

Stop a job

az iot central job stop --app-id {appid} --job-id {jobId}

Required Parameters

--app-id -n
Experimental Preview Deprecated

The App ID of the IoT Central app you want to manage. You can find the App ID in the "About" page for your application under the help menu.

--job-id -j
Experimental Preview Deprecated

Unique identifier for the job.

Optional Parameters

--api-version --av
Experimental Preview Deprecated

Argument 'api_version' has been deprecated and will be removed in a future release.

The API version for the requested operation.

Accepted values: 2022-07-31
Default value: 2022-07-31
--central-api-uri --central-dns-suffix
Experimental Preview Deprecated

The IoT Central DNS suffix associated with your application.

Default value: azureiotcentral.com
--token
Experimental Preview Deprecated

If you'd prefer to submit your request without authenticating against the Azure CLI, you can specify a valid user token to authenticate your request. You must specify the type of key as part of the request. Learn more at https://aka.ms/iotcentraldocsapi.

Global Parameters
--debug
Experimental Preview Deprecated

Increase logging verbosity to show all debug logs.

--help -h
Experimental Preview Deprecated

Show this help message and exit.

--only-show-errors
Experimental Preview Deprecated

Only show errors, suppressing warnings.

--output -o
Experimental Preview Deprecated

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query
Experimental Preview Deprecated

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription
Experimental Preview Deprecated

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

--verbose
Experimental Preview Deprecated

Increase logging verbosity. Use --debug for full debug logs.