getPackageVersionHistory method

Future<GetPackageVersionHistoryResponse> getPackageVersionHistory({
  1. required String packageID,
  2. int? maxResults,
  3. String? nextToken,
})

Returns a list of Amazon OpenSearch Service package versions, along with their creation time, commit message, and plugin properties (if the package is a zip plugin package). For more information, see Custom packages for Amazon OpenSearch Service.

May throw AccessDeniedException. May throw BaseException. May throw InternalException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter packageID : The unique identifier of the package.

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 GetPackageVersionHistory operation returns a nextToken, you can include the returned nextToken in subsequent GetPackageVersionHistory operations, which returns results in the next page.

Implementation

Future<GetPackageVersionHistoryResponse> getPackageVersionHistory({
  required String packageID,
  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/packages/${Uri.encodeComponent(packageID)}/history',
    queryParams: $query,
    exceptionFnMap: _exceptionFns,
  );
  return GetPackageVersionHistoryResponse.fromJson(response);
}