updateDeployment method

Future<Deployment> updateDeployment({
  1. required String deploymentId,
  2. required String restApiId,
  3. List<PatchOperation>? patchOperations,
})

Changes information about a Deployment resource.

May throw UnauthorizedException. May throw NotFoundException. May throw BadRequestException. May throw TooManyRequestsException. May throw ServiceUnavailableException.

Parameter deploymentId : The replacement identifier for the Deployment resource to change information about.

Parameter restApiId : Required The string identifier of the associated RestApi.

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

Implementation

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