Iot Hub Resource - Get Job
De details van een taak ophalen uit een IoT-hub. Zie https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry voor meer informatie.
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}?api-version=2023-06-30
URI-parameters
| Name | In | Vereist | Type | Description |
|---|---|---|---|---|
|
job
|
path | True |
string |
De taak-id. |
|
resource
|
path | True |
string |
De naam van de resourcegroep die de IoT-hub bevat. |
|
resource
|
path | True |
string |
De naam van de IoT-hub. |
|
subscription
|
path | True |
string |
De abonnement-ID. |
|
api-version
|
query | True |
string |
De versie van de API. |
Antwoorden
| Name | Type | Description |
|---|---|---|
| 200 OK |
Dit is een synchrone bewerking. Het antwoord bevat een door JSON geserialiseerde beschrijving van de taak in de IoT-hub. |
|
| Other Status Codes |
DefaultErrorResponse |
Beveiliging
azure_auth
Azure Active Directory OAuth2-stroom
Type:
oauth2
Stroom:
implicit
Autorisatie-URL:
https://login.microsoftonline.com/common/oauth2/authorize
Bereiken
| Name | Description |
|---|---|
| user_impersonation | Uw gebruikersaccount imiteren |
Voorbeelden
IotHubResource_GetJob
Voorbeeldaanvraag
GET https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/jobs/test?api-version=2023-06-30
Voorbeeldrespons
{
"jobId": "test",
"startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
"endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
"type": "unknown",
"status": "unknown"
}
Definities
| Name | Description |
|---|---|
|
Error |
Foutdetails. |
|
Job |
De eigenschappen van het object Job Response. |
|
Job |
De status van de taak. |
|
Job |
Het type taak. |
ErrorDetails
Foutdetails.
| Name | Type | Description |
|---|---|---|
| code |
string |
De foutcode. |
| details |
string |
De foutdetails. |
| httpStatusCode |
string |
De HTTP-statuscode. |
| message |
string |
Het foutbericht. |
JobResponse
De eigenschappen van het object Job Response.
| Name | Type | Description |
|---|---|---|
| endTimeUtc |
string (date-time-rfc1123) |
De tijd dat de taak is gestopt met verwerken. |
| failureReason |
string |
Als de status == is mislukt, bevat deze tekenreeks de reden voor de fout. |
| jobId |
string |
De taak-id. |
| parentJobId |
string |
De taak-id van de bovenliggende taak, indien van toepassing. |
| startTimeUtc |
string (date-time-rfc1123) |
De begintijd van de taak. |
| status |
De status van de taak. |
|
| statusMessage |
string |
Het statusbericht voor de taak. |
| type |
Het type taak. |
JobStatus
De status van de taak.
| Waarde | Description |
|---|---|
| unknown | |
| enqueued | |
| running | |
| completed | |
| failed | |
| cancelled |
JobType
Het type taak.
| Waarde | Description |
|---|---|
| unknown | |
| export | |
| import | |
| backup | |
| readDeviceProperties | |
| writeDeviceProperties | |
| updateDeviceConfiguration | |
| rebootDevice | |
| factoryResetDevice | |
| firmwareUpdate |