updateStage method
Future<Stage>
updateStage({
- required String restApiId,
- required String stageName,
- List<
PatchOperation> ? patchOperations,
Changes information about a Stage resource.
May throw UnauthorizedException. May throw NotFoundException. May throw ConflictException. May throw BadRequestException. May throw TooManyRequestsException.
Parameter restApiId
:
Required
The string identifier of the associated RestApi.
Parameter stageName
:
Required
The name of the Stage resource to change information
about.
Parameter patchOperations
:
A list of update operations to be applied to the specified resource and in
the order specified in this list.
Implementation
Future<Stage> updateStage({
required String restApiId,
required String stageName,
List<PatchOperation>? patchOperations,
}) async {
ArgumentError.checkNotNull(restApiId, 'restApiId');
ArgumentError.checkNotNull(stageName, 'stageName');
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);
}