getUpgradeHistory method
Retrieves the complete history of the last 10 upgrades performed on an Amazon OpenSearch Service domain.
May throw BaseException.
May throw DisabledOperationException.
May throw InternalException.
May throw ResourceNotFoundException.
May throw ValidationException.
Parameter domainName :
The name of an existing domain.
Parameter maxResults :
An optional parameter that specifies the maximum number of results to
return. You can use nextToken to get the next page of
results.
Parameter nextToken :
If your initial GetUpgradeHistory operation returns a
nextToken, you can include the returned
nextToken in subsequent GetUpgradeHistory
operations, which returns results in the next page.
Implementation
Future<GetUpgradeHistoryResponse> getUpgradeHistory({
required String domainName,
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/upgradeDomain/${Uri.encodeComponent(domainName)}/history',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetUpgradeHistoryResponse.fromJson(response);
}