describeJobExecution method
Gets details of a job execution.
Requires permission to access the DescribeJobExecution action.
May throw CertificateValidationException.
May throw InvalidRequestException.
May throw ResourceNotFoundException.
May throw ServiceUnavailableException.
May throw TerminalStateException.
May throw ThrottlingException.
Parameter jobId :
The unique identifier assigned to this job when it was created.
Parameter thingName :
The thing name associated with the device the job execution is running on.
Parameter executionNumber :
Optional. A number that identifies a particular job execution on a
particular device. If not specified, the latest job execution is returned.
Parameter includeJobDocument :
Optional. Unless set to false, the response contains the job document. The
default is true.
Implementation
Future<DescribeJobExecutionResponse> describeJobExecution({
required String jobId,
required String thingName,
int? executionNumber,
bool? includeJobDocument,
}) async {
final $query = <String, List<String>>{
if (executionNumber != null)
'executionNumber': [executionNumber.toString()],
if (includeJobDocument != null)
'includeJobDocument': [includeJobDocument.toString()],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri:
'/things/${Uri.encodeComponent(thingName)}/jobs/${Uri.encodeComponent(jobId)}',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return DescribeJobExecutionResponse.fromJson(response);
}