b00k.jp ~積み上げ式読書ノート~
公開日:
最終更新日:2018/08/01

【AWS】CLIを使ってインスタンスの起動状態を取得する

AWS
EC2のインスタンスの起動状態をCLIで取得する。
AWS-CLIでインスタンスの情報をJSON形式で取得し、jq(JSON整形ツール)で起動状態のみを抜き出している。

・インスタンスの状態について
コード:名称
0 : pending
16 : running
32 : shutting-down
48 : terminated
64 : stopping
80 : stopped
■参考:https://docs.aws.amazon.com/cli/latest/reference/ec2/stop-instances.html

カテゴリー: IT, ネットワーク
タグ   : , ,


広告

オススメ記事


PAGE TOP ↑