describePackages method

Future<DescribePackagesResponse> describePackages({
  1. List<DescribePackagesFilter>? filters,
  2. int? maxResults,
  3. String? nextToken,
})

Describes all packages available to OpenSearch Service. 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 filters : Only returns packages that match the DescribePackagesFilterList values.

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

Implementation

Future<DescribePackagesResponse> describePackages({
  List<DescribePackagesFilter>? filters,
  int? maxResults,
  String? nextToken,
}) async {
  _s.validateNumRange(
    'maxResults',
    maxResults,
    0,
    100,
  );
  final $payload = <String, dynamic>{
    if (filters != null) 'Filters': filters,
    if (maxResults != null) 'MaxResults': maxResults,
    if (nextToken != null) 'NextToken': nextToken,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/2021-01-01/packages/describe',
    exceptionFnMap: _exceptionFns,
  );
  return DescribePackagesResponse.fromJson(response);
}