Skip to content

describe_recipe async

describe_recipe(
    recipe_arn: Arn, *, config_overrides: Optional[AsyncPersonalizeClientConfig] = None
) -> DescribeRecipeResponse

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.

Parameters:

  • recipe_arn (Arn) –

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

Raises:

Source code in docs_src/capo_personalize/_services/async_personalize.py
async def describe_recipe(
    self,
    recipe_arn: "capo_personalize.types.arn.Arn",
    *,
    config_overrides: Optional[AsyncPersonalizeClientConfig] = None,
) -> "capo_personalize.types.describe_recipe_response.DescribeRecipeResponse":
    """<p>Describes a recipe.</p> <p>A recipe contains three items:</p> <ul> <li> <p>An algorithm that trains a model.</p> </li> <li> <p>Hyperparameters that govern the training.</p> </li> <li> <p>Feature transformation information for modifying the input data before training.</p> </li> </ul> <p>Amazon Personalize provides a set of predefined recipes. You specify a recipe when you create a solution with the <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateSolution.html">CreateSolution</a> API. <code>CreateSolution</code> 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 <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_RS_GetRecommendations.html">GetRecommendations</a> API.</p>

    Args:
        recipe_arn: <p>The Amazon Resource Name (ARN) of the recipe to describe.</p>

    Raises:
        capo_personalize.errors.invalid_input_exception.InvalidInputException: <p>Provide a valid value for the field or parameter.</p>
        capo_personalize.errors.resource_not_found_exception.ResourceNotFoundException: <p>Could not find the specified resource.</p>
        capo_personalize.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_personalize.types.describe_recipe_request.DescribeRecipeRequest]",
    ) -> AsyncOperationResponse[
        "capo_personalize.types.describe_recipe_response.DescribeRecipeResponse"
    ]:
        import capo_personalize._operations.amazon_personalize.describe_recipe

        (
            output,
            http_response,
        ) = await capo_personalize._operations.amazon_personalize.describe_recipe.async_describe_recipe(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("DescribeRecipe")
    )
    input_: capo_personalize.types.describe_recipe_request.DescribeRecipeRequest = {
        "recipe_arn": recipe_arn
    }

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output