listDomainsForPackage method
Lists all Amazon OpenSearch Service domains associated with a given 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 for which to list associated domains.
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 ListDomainsForPackage operation returns a
nextToken, you can include the returned
nextToken in subsequent ListDomainsForPackage
operations, which returns results in the next page.
Implementation
Future<ListDomainsForPackageResponse> listDomainsForPackage({
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)}/domains',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListDomainsForPackageResponse.fromJson(response);
}