AwsInspector\Model\Ec2\Repository::findRouteTablesBySubnetId PHP Method

findRouteTablesBySubnetId() public method

public findRouteTablesBySubnetId ( $subnetId )
    public function findRouteTablesBySubnetId($subnetId)
    {
        $cacheKey = 'Ec2Repository->findRouteTablesBySubnetId:' . $subnetId;
        return StaticCache::get($cacheKey, function () use($subnetId) {
            $ec2Client = \AwsInspector\SdkFactory::getClient('ec2');
            /* @var $ec2Client \Aws\Ec2\Ec2Client */
            $results = $ec2Client->describeRouteTables(['Filters' => [['Name' => 'association.subnet-id', 'Values' => [$subnetId]]]]);
            return $results->search('RouteTables');
        });
    }