addInstances method

  1. @override
Future<Operation> addInstances(
  1. AddInstancesInstanceGroupRequest request
)
override

Adds a list of instances to the specified instance group. All of the instances in the instance group must be in the same network/subnetwork. Read Adding instances for more information.

Throws a http.ClientException if there were problems communicating with the API service. Throws a ServiceException if the API method failed for any reason.

Implementation

@override
Future<Operation> addInstances(
  AddInstancesInstanceGroupRequest request,
) async {
  if (isClosed) throw StateError('Service is closed');

  if (_addInstances case final addInstances?) {
    return addInstances(request);
  }
  throw UnsupportedError('addInstances');
}