Skip to main content

resource_jobs

Creates, updates, deletes, gets or lists a resource_jobs resource.

Overview

Nameresource_jobs
TypeResource
Idazure.iot_hub.resource_jobs

Fields

The following fields are returned by SELECT queries:

This is a synchronous operation. The response contains a JSON-serialized description of the job in the IoT hub.

NameDatatypeDescription
endTimeUtcstring (date-time-rfc1123)The time the job stopped processing.
failureReasonstringIf status == failed, this string containing the reason for the failure.
jobIdstringThe job identifier.
parentJobIdstringThe job identifier of the parent job, if any.
startTimeUtcstring (date-time-rfc1123)The start time of the job.
statusstringThe status of the job.
statusMessagestringThe status message for the job.
typestringThe type of the job.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, resourceName, jobIdapi-versionGet the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.
listselectsubscriptionId, resourceGroupName, resourceNameapi-versionGet a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
jobIdstringThe job identifier.
resourceGroupNamestringThe name of the resource group that contains the IoT hub.
resourceNamestringThe name of the IoT hub.
subscriptionIdstringThe subscription identifier.
api-versionstringThe version of the API.

SELECT examples

Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.

SELECT
endTimeUtc,
failureReason,
jobId,
parentJobId,
startTimeUtc,
status,
statusMessage,
type
FROM azure.iot_hub.resource_jobs
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND resourceName = '{{ resourceName }}' -- required
AND jobId = '{{ jobId }}' -- required
AND api-version = '{{ api-version }}'
;