listSensorStatistics method

Future<ListSensorStatisticsResponse> listSensorStatistics({
  1. required String datasetName,
  2. String? ingestionJobId,
  3. int? maxResults,
  4. String? nextToken,
})

Lists statistics about the data collected for each of the sensors that have been successfully ingested in the particular dataset. Can also be used to retreive Sensor Statistics for a previous ingestion job.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter datasetName : The name of the dataset associated with the list of Sensor Statistics.

Parameter ingestionJobId : The ingestion job id associated with the list of Sensor Statistics. To get sensor statistics for a particular ingestion job id, both dataset name and ingestion job id must be submitted as inputs.

Parameter maxResults : Specifies the maximum number of sensors for which to retrieve statistics.

Parameter nextToken : An opaque pagination token indicating where to continue the listing of sensor statistics.

Implementation

Future<ListSensorStatisticsResponse> listSensorStatistics({
  required String datasetName,
  String? ingestionJobId,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    500,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target': 'AWSLookoutEquipmentFrontendService.ListSensorStatistics'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'DatasetName': datasetName,
      if (ingestionJobId != null) 'IngestionJobId': ingestionJobId,
      if (maxResults != null) 'MaxResults': maxResults,
      if (nextToken != null) 'NextToken': nextToken,
    },
  );

  return ListSensorStatisticsResponse.fromJson(jsonResponse.body);
}