AwsInspector\Model\Ec2\Instance::getJumpHost PHP Method

getJumpHost() public method

Overwrite this method in your inheriting class and return a \AwsInspector\Model\Ec2\Instance representing your bastion server
public getJumpHost ( ) : Instance | null
return Instance | null
    public function getJumpHost()
    {
        if ($config = $this->getInspectorConfiguration('jumptags')) {
            $ec2Repository = new Repository();
            $instances = $ec2Repository->findEc2InstancesByTags($config);
            if (count($instances) == 0) {
                throw new \Exception('Could not fund jump host for: ' . var_export($config, true));
            }
            return $instances->getFirst();
        }
        return null;
    }