createInstances method
Creates instances with per-instance configurations in this managed instance group. Instances are created using the current instance template. Thecreate instances operation is marked DONE if thecreateInstances 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(
CreateInstancesInstanceGroupManagerRequest request,
) async {
final url = _endPoint.replace(
path:
'/compute/v1/projects/${request.project}/zones/${request.zone}/instanceGroupManagers/${request.instanceGroupManager}/createInstances',
queryParameters: {'requestId': ?request.requestId},
);
final response = await _client.post(
url,
body: request.instanceGroupManagersCreateInstancesRequestResource,
);
return Operation.fromJson(response);
}