getBuiltinIntents method
Gets a list of built-in intents that meet the specified criteria.
This operation requires permission for the
lex:GetBuiltinIntents
action.
May throw LimitExceededException. May throw InternalFailureException. May throw BadRequestException.
Parameter locale
:
A list of locales that the intent supports.
Parameter maxResults
:
The maximum number of intents to return in the response. The default is
10.
Parameter nextToken
:
A pagination token that fetches the next page of intents. If this API call
is truncated, Amazon Lex returns a pagination token in the response. To
fetch the next page of intents, use the pagination token in the next
request.
Parameter signatureContains
:
Substring to match in built-in intent signatures. An intent will be
returned if any part of its signature matches the substring. For example,
"xyz" matches both "xyzabc" and "abcxyz." To find the signature for an
intent, see Standard
Built-in Intents in the Alexa Skills Kit.
Implementation
Future<GetBuiltinIntentsResponse> getBuiltinIntents({
Locale? locale,
int? maxResults,
String? nextToken,
String? signatureContains,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
50,
);
final $query = <String, List<String>>{
if (locale != null) 'locale': [locale.toValue()],
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (signatureContains != null) 'signatureContains': [signatureContains],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/builtins/intents/',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return GetBuiltinIntentsResponse.fromJson(response);
}