updateUsagePlan method

Future<UsagePlan> updateUsagePlan({
  1. required String usagePlanId,
  2. List<PatchOperation>? patchOperations,
})

Updates a usage plan of a given plan Id.

May throw BadRequestException. May throw ConflictException. May throw LimitExceededException. May throw NotFoundException. May throw TooManyRequestsException. May throw UnauthorizedException.

Parameter usagePlanId : The Id of the to-be-updated usage plan.

Parameter patchOperations : For more information about supported patch operations, see Patch Operations.

Implementation

Future<UsagePlan> updateUsagePlan({
  required String usagePlanId,
  List<PatchOperation>? patchOperations,
}) async {
  final $payload = <String, dynamic>{
    if (patchOperations != null) 'patchOperations': patchOperations,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PATCH',
    requestUri: '/usageplans/${Uri.encodeComponent(usagePlanId)}',
    exceptionFnMap: _exceptionFns,
  );
  return UsagePlan.fromJson(response);
}