Steampipeは、SQLクエリだけを使用してクラウドAPIをクエリできるようにします。IP2Location.ioのSteampipeプラグインを使用すると、ユーザーはIP地理位置データとWHOISデータを照会できます。
あなたがしなければならないのは、 Steampipeをインストールし、その後以下のコマンドでIP2Location.ioのSteampipeプラグインをインストールすることです:
steampipe plugin install ip2location/ip2locationio
始めるためにはAPIキーが必要です。もしまだ持っていない場合は、無料のAPIキーに登録してください。
以下のようにSQLを使用してWHOISデータをクエリできます:
select
domain,
domain_id,
status,
create_date
from
ip2locationio_whois
where
domain = 'google.com';
次の情報が表示されます:
+------------+-------------------------+---------------------------------------------------------------------------+----------------------+ | domain | domain_id | status | create_date | +------------+-------------------------+---------------------------------------------------------------------------+----------------------+ | google.com | 2138514_DOMAIN_COM-VRSN | clientUpdateProhibited (https://www.icann.org/epp#clientUpdateProhibited) | 1997-09-15T07:00:00Z | +------------+-------------------------+---------------------------------------------------------------------------+----------------------+
詳細については、 IP2Location.io Steampipeドキュメントをご参照ください。