public function isAvailable()
{
$this->requiresValidImage(__METHOD__);
// what are we doing?
$log = usingLog()->startAction("make sure EC2 image '{$this->amiId}' is available");
// get the state of the image
$imageState = $this->image['State'];
if ($imageState != 'available') {
$log->endAction("image state is '{$imageState}'");
throw new E5xx_ExpectFailed(__METHOD__, "state is 'available'", "state is '{$imageState}'");
}
// if we get here, all is well
$log->endAction();
}