/** * List LBaaS Health Monitors action (GET /lb/health_monitors[/health-monitors-id]) * * @param string $healthMonitorId optional The ID of the health monitor to show detailed info * @param ListLbHealthMonitorsFilter $filter optional The query filter. * @return DefaultPaginationList|object Returns the list of the Health Monitors or the requested pool * @throws RestClientException */ public function listLbHealthMonitors($healthMonitorId = null, ListLbHealthMonitorsFilter $filter = null) { $result = null; $detailed = $healthMonitorId !== null ? sprintf("/%s", $this->escape($healthMonitorId)) : ''; $response = $this->getClient()->call($this->service, '/lb/health_monitors' . $detailed . ($filter !== null ? '?' . $filter->getQueryString() : '')); if ($response->hasError() === false) { $result = json_decode($response->getContent()); if (empty($detailed)) { $result = new DefaultPaginationList($this->service, 'health_monitors', $result->health_monitors, isset($result->health_monitors_links) ? $result->health_monitors_links : null); } else { $result = $result->health_monitor; } } return $result; }