describeJobExecution method
Describes a job execution.
May throw InvalidRequestException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ServiceUnavailableException.
Parameter jobId
:
The unique identifier you assigned to this job when it was created.
Parameter thingName
:
The name of the thing on which the job execution is running.
Parameter executionNumber
:
A string (consisting of the digits "0" through "9" which is used to
specify a particular job execution on a particular device.
Implementation
Future<DescribeJobExecutionResponse> describeJobExecution({
required String jobId,
required String thingName,
int? executionNumber,
}) async {
ArgumentError.checkNotNull(jobId, 'jobId');
_s.validateStringLength(
'jobId',
jobId,
1,
64,
isRequired: true,
);
ArgumentError.checkNotNull(thingName, 'thingName');
_s.validateStringLength(
'thingName',
thingName,
1,
128,
isRequired: true,
);
final $query = <String, List<String>>{
if (executionNumber != null)
'executionNumber': [executionNumber.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);
}