listOTAUpdates method

Future<ListOTAUpdatesResponse> listOTAUpdates({
  1. int? maxResults,
  2. String? nextToken,
  3. OTAUpdateStatus? otaUpdateStatus,
})

Lists OTA updates.

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

Parameter maxResults : The maximum number of results to return at one time.

Parameter nextToken : A token used to retrieve the next set of results.

Parameter otaUpdateStatus : The OTA update job status.

Implementation

Future<ListOTAUpdatesResponse> listOTAUpdates({
  int? maxResults,
  String? nextToken,
  OTAUpdateStatus? otaUpdateStatus,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    1,
    250,
  );
  final $query = <String, List<String>>{
    if (maxResults != null) 'maxResults': [maxResults.toString()],
    if (nextToken != null) 'nextToken': [nextToken],
    if (otaUpdateStatus != null)
      'otaUpdateStatus': [otaUpdateStatus.toValue()],
  };
  final response = await _protocol.send(
    payload: null,
    method: 'GET',
    requestUri: '/otaUpdates',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return ListOTAUpdatesResponse.fromJson(response);
}