Scalr\Service\OpenStack\Services\Network\V2\NetworkApi::associateLbHealthMonitorWithPool PHP Метод

associateLbHealthMonitorWithPool() публичный Метод

Associate health monitor with the pool (POST /lb/pools/pool-id/health_monitors)
public associateLbHealthMonitorWithPool ( string $poolId, string $healthMonitorId ) : object
$poolId string The identifier of the LBaaS pool
$healthMonitorId string The identifier of the LBaaS health monitor
Результат object
    public function associateLbHealthMonitorWithPool($poolId, $healthMonitorId)
    {
        $result = null;
        $options = array('health_monitor' => array('id' => (string) $healthMonitorId));
        $response = $this->getClient()->call($this->service, sprintf('/lb/pools/%s/health_monitors', $this->escape($poolId)), $options, 'POST');
        if ($response->hasError() === false) {
            $result = json_decode($response->getContent());
            $result = $result->health_monitor;
        }
        return $result;
    }