listOTAUpdates method
Lists OTA updates.
Requires permission to access the ListOTAUpdates action.
May throw InternalFailureException.
May throw InvalidRequestException.
May throw ServiceUnavailableException.
May throw ThrottlingException.
May throw UnauthorizedException.
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.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/otaUpdates',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListOTAUpdatesResponse.fromJson(response);
}