ovh\Cloud\CloudClient::postInstanceReboot PHP Метод

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

POST Reboot Instance POST /cloud/project/{serviceName}/instance/{instanceId}/reboot
public postInstanceReboot ( $serviceName, $idInstance, $type = 'soft' ) : null
Результат null
    public function postInstanceReboot($serviceName, $idInstance, $type = 'soft')
    {
        if (!$serviceName) {
            throw new BadMethodCallException('Missing parameter $serviceName (OVH Cloud Project).');
        }
        if (!$idInstance) {
            throw new BadMethodCallException('Missing parameter $idInstance (OVH Cloud Instance ID).');
        }
        $post = array('type' => $type);
        try {
            $r = $this->post('cloud/project/' . $serviceName . '/instance/' . $idInstance . '/reboot', array('Content-Type' => 'application/json;charset=UTF-8'), json_encode($post))->send();
        } catch (\Exception $e) {
            throw new CloudException($e->getMessage(), $e->getCode(), $e);
        }
        return $r->getBody(true);
    }