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

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

This operation updates a logical router. Beyond the name and the administrative state, the only parameter which can be updated with this operation is the external gateway. Please note that this operation does not allow to update router interfaces. To this aim, the add router interface and remove router interface should be used.
public updateRouter ( string $routerId, array | object $options ) : object
$routerId string The Id of the router
$options array | object Raw options object (It will be json_encoded and passed as is.)
Результат object Returns router object on success or throws an exception otherwise
    public function updateRouter($routerId, $options)
    {
        $result = null;
        $response = $this->getClient()->call($this->service, sprintf('/routers/%s', $this->escape($routerId)), array('_putData' => json_encode(array('router' => $options))), 'PUT');
        if ($response->hasError() === false) {
            $result = json_decode($response->getContent());
            $result = $result->router;
        }
        return $result;
    }