updateRecommender method

Future<UpdateRecommenderResponse> updateRecommender({
  1. required String recommenderArn,
  2. required RecommenderConfig recommenderConfig,
})

Updates the recommender to modify the recommender configuration. If you update the recommender to modify the columns used in training, Amazon Personalize automatically starts a full retraining of the models backing your recommender. While the update completes, you can still get recommendations from the recommender. The recommender uses the previous configuration until the update completes. To track the status of this update, use the latestRecommenderUpdate returned in the DescribeRecommender operation.

May throw InvalidInputException. May throw ResourceInUseException. May throw ResourceNotFoundException.

Parameter recommenderArn : The Amazon Resource Name (ARN) of the recommender to modify.

Parameter recommenderConfig : The configuration details of the recommender.

Implementation

Future<UpdateRecommenderResponse> updateRecommender({
  required String recommenderArn,
  required RecommenderConfig recommenderConfig,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AmazonPersonalize.UpdateRecommender'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'recommenderArn': recommenderArn,
      'recommenderConfig': recommenderConfig,
    },
  );

  return UpdateRecommenderResponse.fromJson(jsonResponse.body);
}