'Stop instance.'

def stop(self):

    if (not self.started):
        display.info(('Skipping    invalid    %s/%s    instance    %s.' % (self.platform, self.version, self.instance_id)), verbosity=1)
        return
    response = self.client.delete(self._uri)
    if (response.status_code == 404):
        self._clear()
        display.info(('Cleared    invalid    %s/%s    instance    %s.' % (self.platform, self.version, self.instance_id)), verbosity=1)
        return
    if (response.status_code == 200):
        self._clear()
        display.info(('Stopped    running    %s/%s    instance    %s.' % (self.platform, self.version, self.instance_id)), verbosity=1)
        return
    raise self._create_http_error(response)
