updateStage method

Future<Stage> updateStage({
  1. required String restApiId,
  2. required String stageName,
  3. List<PatchOperation>? patchOperations,
})

Changes information about a Stage resource.

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

Parameter restApiId : The string identifier of the associated RestApi.

Parameter stageName : The name of the Stage resource to change information about.

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

Implementation

Future<Stage> updateStage({
  required String restApiId,
  required String stageName,
  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)}/stages/${Uri.encodeComponent(stageName)}',
    exceptionFnMap: _exceptionFns,
  );
  return Stage.fromJson(response);
}