listBuiltInIntents method
Gets a list of built-in intents provided by Amazon Lex that you can use in your bot.
To use a built-in intent as a the base for your own intent, include the
built-in intent signature in the parentIntentSignature
parameter when you call the CreateIntent operation. For more
information, see CreateIntent.
May throw InternalServerException.
May throw ServiceQuotaExceededException.
May throw ThrottlingException.
May throw ValidationException.
Parameter localeId :
The identifier of the language and locale of the intents to list. The
string must match one of the supported locales. For more information, see
Supported
languages.
Parameter maxResults :
The maximum number of built-in intents to return in each page of results.
If there are fewer results than the max page size, only the actual number
of results are returned.
Parameter nextToken :
If the response from the ListBuiltInIntents operation
contains more results than specified in the maxResults
parameter, a token is returned in the response. Use that token in the
nextToken parameter to return the next page of results.
Parameter sortBy :
Specifies sorting parameters for the list of built-in intents. You can
specify that the list be sorted by the built-in intent signature in either
ascending or descending order.
Implementation
Future<ListBuiltInIntentsResponse> listBuiltInIntents({
required String localeId,
int? maxResults,
String? nextToken,
BuiltInIntentSortBy? sortBy,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
20,
20,
);
final $payload = <String, dynamic>{
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (sortBy != null) 'sortBy': sortBy,
};
final response = await _protocol.send(
payload: $payload,
method: 'POST',
requestUri: '/builtins/locales/${Uri.encodeComponent(localeId)}/intents',
exceptionFnMap: _exceptionFns,
);
return ListBuiltInIntentsResponse.fromJson(response);
}