listPackagesForDomain method
Lists all packages associated with an Amazon OpenSearch Service domain. 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 domainName :
The name of the domain for which you want to list associated packages.
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 ListPackagesForDomain operation returns a
nextToken, you can include the returned
nextToken in subsequent ListPackagesForDomain
operations, which returns results in the next page.
Implementation
Future<ListPackagesForDomainResponse> listPackagesForDomain({
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/domain/${Uri.encodeComponent(domainName)}/packages',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPackagesForDomainResponse.fromJson(response);
}