listSchemas method
Returns the list of schemas associated with the account. The response provides the properties for each schema, including the Amazon Resource Name (ARN). For more information on schemas, see CreateSchema.
May throw InvalidNextTokenException.
Parameter maxResults
:
The maximum number of schemas to return.
Parameter nextToken
:
A token returned from the previous call to ListSchemas
for
getting the next set of schemas (if they exist).
Implementation
Future<ListSchemasResponse> listSchemas({
int? maxResults,
String? nextToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
_s.validateStringLength(
'nextToken',
nextToken,
0,
1300,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.ListSchemas'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
},
);
return ListSchemasResponse.fromJson(jsonResponse.body);
}