createInstances method

Creates instances with per-instance configurations in this regional managed instance group. Instances are created using the current instance template. The create instances operation is marked DONE if the createInstances request is successful. The underlying actions take additional time. You must separately verify the status of thecreating or actions with the listmanagedinstances method.

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

Future<Operation> createInstances(
  CreateInstancesRegionInstanceGroupManagerRequest request,
) async {
  final url = _endPoint.replace(
    path:
        '/compute/v1/projects/${request.project}/regions/${request.region}/instanceGroupManagers/${request.instanceGroupManager}/createInstances',
    queryParameters: {'requestId': ?request.requestId},
  );
  final response = await _client.post(
    url,
    body: request.regionInstanceGroupManagersCreateInstancesRequestResource,
  );
  return Operation.fromJson(response);
}