listAdvancedPromptOptimizationJobs method
Lists the advanced prompt optimization jobs in your account.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ThrottlingException.
May throw ValidationException.
Parameter maxResults :
The maximum number of results to return in the response.
Parameter nextToken :
If the total number of results is greater than the maxResults
value provided in the request, use this token in a subsequent request to
get the next set of results.
Parameter sortBy :
The field to sort the results by.
Parameter sortOrder :
The sort order for the results.
Implementation
Future<ListAdvancedPromptOptimizationJobsResponse>
listAdvancedPromptOptimizationJobs({
int? maxResults,
String? nextToken,
SortJobsBy? sortBy,
SortOrder? sortOrder,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
1000,
);
final $query = <String, List<String>>{
if (maxResults != null) 'maxResults': [maxResults.toString()],
if (nextToken != null) 'nextToken': [nextToken],
if (sortBy != null) 'sortBy': [sortBy.value],
if (sortOrder != null) 'sortOrder': [sortOrder.value],
};
final response = await _protocol.send(
payload: null,
method: 'GET',
requestUri: '/advanced-prompt-optimization-jobs',
queryParams: $query,
exceptionFnMap: _exceptionFns,
);
return ListAdvancedPromptOptimizationJobsResponse.fromJson(response);
}