updateMethod method
Updates an existing Method resource.
May throw BadRequestException.
May throw ConflictException.
May throw NotFoundException.
May throw TooManyRequestsException.
May throw UnauthorizedException.
Parameter httpMethod :
The HTTP verb of the Method resource.
Parameter resourceId :
The Resource identifier for the Method resource.
Parameter restApiId :
The string identifier of the associated RestApi.
Parameter patchOperations :
For more information about supported patch operations, see Patch
Operations.
Implementation
Future<Method> updateMethod({
required String httpMethod,
required String resourceId,
required String restApiId,
List<PatchOperation>? patchOperations,
}) async {
final $payload = <String, dynamic>{
if (patchOperations != null) 'patchOperations': patchOperations,
};
final response = await _protocol.send(
payload: $payload,
method: 'PATCH',
requestUri:
'/restapis/${Uri.encodeComponent(restApiId)}/resources/${Uri.encodeComponent(resourceId)}/methods/${Uri.encodeComponent(httpMethod)}',
exceptionFnMap: _exceptionFns,
);
return Method.fromJson(response);
}