listVersions method
List all supported versions of OpenSearch and Elasticsearch.
May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.
Parameter maxResults
:
Set this value to limit the number of results returned. Value must be
greater than 10 or it won't be honored.
Implementation
Future<ListVersionsResponse> listVersions({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
0,
100,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/2021-01-01/opensearch/versions',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListVersionsResponse.fromJson(response);
}