listPromptRouters method
Retrieves a list of prompt routers.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of prompt routers to return in one page of results.
Parameter nextToken :
Specify the pagination token from a previous request to retrieve the next
page of results.
Parameter type :
The type of the prompt routers, such as whether it's default or custom.
Implementation
Future<ListPromptRoutersResponse> listPromptRouters({
int? maxResults,
String? nextToken,
PromptRouterType? type,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (type != null) 'type': [type.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/prompt-routers',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListPromptRoutersResponse.fromJson(response);
}