DescribeJobExecution
data class DescribeJobExecution(val thingName: ThingName, val jobId: JobId, val executionNumber: Long? = null, val includeJobDocument: Boolean? = null) : IotJobsDataPlaneAction<DescribedJobExecution> (source)
Gets details of a job execution, without any state transition: jobId may be JobId.NEXT (the literal $next), which reads the device's next pending execution - the oldest IN_PROGRESS one, else the oldest QUEUED one - and, being read-only, is safe to poll on every connect. With $next and nothing pending the service answers 200 with an empty document, surfaced here as a null DescribedJobExecution.execution (the AWS docs imply this by leaving the response's execution member optional).
includeJobDocument defaults to true ON THE SERVER when the query is omitted, per the AWS API reference ("Unless set to false, the response contains the job document. The default is true.").