listThingRegistrationTaskReports method

Future<ListThingRegistrationTaskReportsResponse> listThingRegistrationTaskReports({
  1. required ReportType reportType,
  2. required String taskId,
  3. int? maxResults,
  4. String? nextToken,
})

Information about the thing registration tasks.

May throw InternalFailureException. May throw InvalidRequestException. May throw ThrottlingException. May throw UnauthorizedException.

Parameter reportType : The type of task report.

Parameter taskId : The id of the task.

Parameter maxResults : The maximum number of results to return per request.

Parameter nextToken : To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.

Implementation

Future<ListThingRegistrationTaskReportsResponse>
    listThingRegistrationTaskReports({
  required ReportType reportType,
  required String taskId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    'reportType': [reportType.value],
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri:
        '/thing-registration-tasks/${Uri.encodeComponent(taskId)}/reports',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListThingRegistrationTaskReportsResponse.fromJson(response);
}