updateApiKey method

Future<ApiKey> updateApiKey({
  1. required String apiKey,
  2. List<PatchOperation>? patchOperations,
})

Changes information about an ApiKey resource.

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

Parameter apiKey : Required The identifier of the ApiKey resource to be updated.

Parameter patchOperations : A list of update operations to be applied to the specified resource and in the order specified in this list.

Implementation

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