updateRescoreExecutionPlan method

Future<void> updateRescoreExecutionPlan({
  1. required String id,
  2. CapacityUnitsConfiguration? capacityUnits,
  3. String? description,
  4. String? name,
})

Updates a rescore execution plan. A rescore execution plan is an Amazon Kendra Intelligent Ranking resource used for provisioning the Rescore API. You can update the number of capacity units you require for Amazon Kendra Intelligent Ranking to rescore or re-rank a search service's results.

May throw AccessDeniedException. May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ServiceQuotaExceededException. May throw ThrottlingException. May throw ValidationException.

Parameter id : The identifier of the rescore execution plan that you want to update.

Parameter capacityUnits : You can set additional capacity units to meet the needs of your rescore execution plan. You are given a single capacity unit by default. If you want to use the default capacity, you don't set additional capacity units. For more information on the default capacity and additional capacity units, see Adjusting capacity.

Parameter description : A new description for the rescore execution plan.

Parameter name : A new name for the rescore execution plan.

Implementation

Future<void> updateRescoreExecutionPlan({
  required String id,
  CapacityUnitsConfiguration? capacityUnits,
  String? description,
  String? name,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.0',
    'X-Amz-Target':
        'AWSKendraRerankingFrontendService.UpdateRescoreExecutionPlan'
  };
  await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'Id': id,
      if (capacityUnits != null) 'CapacityUnits': capacityUnits,
      if (description != null) 'Description': description,
      if (name != null) 'Name': name,
    },
  );
}