- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeJobExecutionCommand
Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { IoTJobsDataPlaneClient, DescribeJobExecutionCommand } from "@aws-sdk/client-iot-jobs-data-plane"; // ES Modules import
// const { IoTJobsDataPlaneClient, DescribeJobExecutionCommand } = require("@aws-sdk/client-iot-jobs-data-plane"); // CommonJS import
const client = new IoTJobsDataPlaneClient(config);
const input = { // DescribeJobExecutionRequest
jobId: "STRING_VALUE", // required
thingName: "STRING_VALUE", // required
includeJobDocument: true || false,
executionNumber: Number("long"),
};
const command = new DescribeJobExecutionCommand(input);
const response = await client.send(command);
// { // DescribeJobExecutionResponse
// execution: { // JobExecution
// jobId: "STRING_VALUE",
// thingName: "STRING_VALUE",
// status: "QUEUED" || "IN_PROGRESS" || "SUCCEEDED" || "FAILED" || "TIMED_OUT" || "REJECTED" || "REMOVED" || "CANCELED",
// statusDetails: { // DetailsMap
// "<keys>": "STRING_VALUE",
// },
// queuedAt: Number("long"),
// startedAt: Number("long"),
// lastUpdatedAt: Number("long"),
// approximateSecondsBeforeTimedOut: Number("long"),
// versionNumber: Number("long"),
// executionNumber: Number("long"),
// jobDocument: "STRING_VALUE",
// },
// };
DescribeJobExecutionCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
jobId Required | string | undefined | The unique identifier assigned to this job when it was created. |
thingName Required | string | undefined | The thing name associated with the device the job execution is running on. |
executionNumber | number | undefined | Optional. A number that identifies a particular job execution on a particular device. If not specified, the latest job execution is returned. |
includeJobDocument | boolean | undefined | Optional. Unless set to false, the response contains the job document. The default is true. |
DescribeJobExecutionCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
execution | JobExecution | undefined | Contains data about a job execution. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
CertificateValidationException | client | The certificate is invalid. |
InvalidRequestException | client | The contents of the request were invalid. |
ResourceNotFoundException | client | The specified resource does not exist. |
ServiceUnavailableException | server | The service is temporarily unavailable. |
TerminalStateException | client | The job is in a terminal state. |
ThrottlingException | client | The rate exceeds the limit. |
IoTJobsDataPlaneServiceException | Base exception class for all service exceptions from IoTJobsDataPlane service. |