listLanguageModels method
- int? maxResults,
- String? nameContains,
- String? nextToken,
- ModelStatus? statusEquals,
Provides more information about the custom language models you've created. You can use the information in this list to find a specific custom language model. You can then use the operation to get more information about it.
May throw BadRequestException. May throw LimitExceededException. May throw InternalFailureException.
Parameter maxResults
:
The maximum number of language models to return in the response. If there
are fewer results in the list, the response contains only the actual
results.
Parameter nameContains
:
When specified, the custom language model names returned contain the
substring you've specified.
Parameter nextToken
:
When included, fetches the next set of jobs if the result of the previous
request was truncated.
Parameter statusEquals
:
When specified, returns only custom language models with the specified
status. Language models are ordered by creation date, with the newest
models first. If you don't specify a status, Amazon Transcribe returns all
custom language models ordered by date.
Implementation
Future<ListLanguageModelsResponse> listLanguageModels({
int? maxResults,
String? nameContains,
String? nextToken,
ModelStatus? statusEquals,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nameContains',
nameContains,
1,
200,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
8192,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'Transcribe.ListLanguageModels'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'MaxResults': maxResults,
if (nameContains != null) 'NameContains': nameContains,
if (nextToken != null) 'NextToken': nextToken,
if (statusEquals != null) 'StatusEquals': statusEquals.toValue(),
},
);
return ListLanguageModelsResponse.fromJson(jsonResponse.body);
}