ovh\Cloud\CloudClient::deleteInstance PHP Method

deleteInstance() public method

Delete Instances of Project Cloud Public DELETE /cloud/project/{serviceName}/instance/{instanceId}
public deleteInstance ( $serviceName, $idInstance )
    public function deleteInstance($serviceName, $idInstance)
    {
        if (!$serviceName) {
            throw new BadMethodCallException('Missing parameter $serviceName (OVH Cloud Project).');
        }
        if (!$idInstance) {
            throw new BadMethodCallException('Missing parameter $idInstance (OVH Cloud Project Instance ID).');
        }
        try {
            $r = $this->delete('cloud/project/' . $serviceName . '/instance/' . $idInstance)->send();
        } catch (\Exception $e) {
            throw new CloudException($e->getMessage(), $e->getCode(), $e);
        }
        return $r->getBody(true);
    }