describeRecipe method

Future<DescribeRecipeResponse> describeRecipe({
  1. required String recipeArn,
})

Describes a recipe.

A recipe contains three items:

  • An algorithm that trains a model.
  • Hyperparameters that govern the training.
  • Feature transformation information for modifying the input data before training.
Amazon Personalize provides a set of predefined recipes. You specify a recipe when you create a solution with the CreateSolution API. CreateSolution trains a model by using the algorithm in the specified recipe and a training dataset. The solution, when deployed as a campaign, can provide recommendations using the GetRecommendations API.

May throw InvalidInputException. May throw ResourceNotFoundException.

Parameter recipeArn : The Amazon Resource Name (ARN) of the recipe to describe.

Implementation

Future<DescribeRecipeResponse> describeRecipe({
  required String recipeArn,
}) async {
  ArgumentError.checkNotNull(recipeArn, 'recipeArn');
  _s.validateStringLength(
    'recipeArn',
    recipeArn,
    0,
    256,
    isRequired: true,
  );
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonPersonalize.DescribeRecipe'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'recipeArn': recipeArn,
    },
  );

  return DescribeRecipeResponse.fromJson(jsonResponse.body);
}