listSolutionVersions method
Returns a list of solution versions for the given solution. When a solution is not specified, all the solution versions associated with the account are listed. The response provides the properties for each solution version, including the Amazon Resource Name (ARN).
May throw InvalidInputException.
May throw InvalidNextTokenException.
May throw ResourceNotFoundException.
Parameter maxResults :
The maximum number of solution versions to return.
Parameter nextToken :
A token returned from the previous call to
ListSolutionVersions for getting the next set of solution
versions (if they exist).
Parameter solutionArn :
The Amazon Resource Name (ARN) of the solution.
Implementation
Future<ListSolutionVersionsResponse> listSolutionVersions({
int? maxResults,
String? nextToken,
String? solutionArn,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.ListSolutionVersions'
};
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,
if (solutionArn != null) 'solutionArn': solutionArn,
},
);
return ListSolutionVersionsResponse.fromJson(jsonResponse.body);
}