listRecipes method
Returns a list of available recipes. The response provides the properties for each recipe, including the recipe's Amazon Resource Name (ARN).
May throw InvalidInputException.
May throw InvalidNextTokenException.
Parameter domain :
Filters returned recipes by domain for a Domain dataset group. Only
recipes (Domain dataset group use cases) for this domain are included in
the response. If you don't specify a domain, all recipes are returned.
Parameter maxResults :
The maximum number of recipes to return.
Parameter nextToken :
A token returned from the previous call to ListRecipes for
getting the next set of recipes (if they exist).
Parameter recipeProvider :
The default is SERVICE.
Implementation
Future<ListRecipesResponse> listRecipes({
Domain? domain,
int? maxResults,
String? nextToken,
RecipeProvider? recipeProvider,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
100,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AmazonPersonalize.ListRecipes'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
if (domain != null) 'domain': domain.value,
if (maxResults != null) 'maxResults': maxResults,
if (nextToken != null) 'nextToken': nextToken,
if (recipeProvider != null) 'recipeProvider': recipeProvider.value,
},
);
return ListRecipesResponse.fromJson(jsonResponse.body);
}