calendarMode method

Advise how, where and when to create the requested amount of instances with specified accelerators, within the specified time and location limits. The method recommends creating future reservations for the requested resources.

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<CalendarModeAdviceResponse> calendarMode(
  CalendarModeAdviceRpcRequest request,
) async {
  final url = _endPoint.replace(
    path:
        '/compute/v1/projects/${request.project}/regions/${request.region}/advice/calendarMode',
  );
  final response = await _client.post(
    url,
    body: request.calendarModeAdviceRequestResource,
  );
  return CalendarModeAdviceResponse.fromJson(response);
}