‎03-05-2019 01:20 PM
Select Top 1000000 tblAssets.AssetID,
tblAssets.AssetName,
tsysAssetTypes.AssetTypeIcon10 As icon,
tblAssets.IPAddress,
tsysIPLocations.IPLocation,
tblAssetCustom.Manufacturer,
tblAWSInstance.InstanceId,
tblAWSInstance.InstanceType,
tblAWSInstance.Platform,
tblAWSInstance.Region,
tblAWSInstance.State,
tblAWSSecurityGroup.GroupId As SecurityGroupId,
tblAWSSecurityGroup.Name,
tblAWSSecurityGroup.OwnerId,
tblAWSSecurityGroup.Description,
tblAWSSecurityGroupPermission.FromPort,
tblAWSSecurityGroupPermission.ToPort,
tblAWSSecurityGroupPermission.IpProtocol,
tblAWSSecurityGroupPermissionIpRange.CidrIp,
tblAWSSecurityGroupPermissionIpRange.Description As RangeDescription
From tblAssets
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
Inner Join tsysIPLocations On tsysIPLocations.LocationID =
tblAssets.LocationID
Inner Join tblState On tblState.State = tblAssetCustom.State
Inner Join tblAWSInstance On tblAWSInstance.AssetId = tblAssets.AssetID
Inner Join tblAWSInstanceSecurityGroup On
tblAWSInstanceSecurityGroup.AWSInstanceId = tblAWSInstance.AWSInstanceId
Inner Join tblAWSSecurityGroup On tblAWSSecurityGroup.AWSSecurityGroupId =
tblAWSInstanceSecurityGroup.AWSSecurityGroupId
Inner Join tblAWSSecurityGroupPermission On
tblAWSSecurityGroupPermission.AWSSecurityGroupId =
tblAWSSecurityGroup.AWSSecurityGroupId
Inner Join tblAWSSecurityGroupPermissionIpRange On
tblAWSSecurityGroupPermissionIpRange.AWSSecurityGroupPermissionId =
tblAWSSecurityGroupPermission.AWSSecurityGroupPermissionId
Where tblState.Statename = 'Active'
Order By tblAWSInstance.Region,
tblAssets.IPNumeric,
SecurityGroupId,
tblAWSSecurityGroupPermission.FromPort
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now