updateRouteCalculator method
Updates the specified properties for a given route calculator resource.
May throw AccessDeniedException.
May throw InternalServerException.
May throw ResourceNotFoundException.
May throw ThrottlingException.
May throw ValidationException.
Parameter calculatorName :
The name of the route calculator resource to update.
Parameter description :
Updates the description for the route calculator resource.
Parameter pricingPlan :
No longer used. If included, the only allowed value is
RequestBasedUsage.
Implementation
Future<UpdateRouteCalculatorResponse> updateRouteCalculator({
required String calculatorName,
String? description,
PricingPlan? pricingPlan,
}) async {
final $payload = <String, dynamic>{
if (description != null) 'Description': description,
if (pricingPlan != null) 'PricingPlan': pricingPlan.value,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/routes/v0/calculators/${Uri.encodeComponent(calculatorName)}',
exceptionFnMap: _exceptionFns,
);
return UpdateRouteCalculatorResponse.fromJson(response);
}