0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[雑メモ]サブネットの利用可能なIPアドレス数を取得する

Posted at

コマンド。

aws ec2 describe-subnets \
--filters "Name=tag-key,Values=Owner" "Name=tag-value,Values=okada" \
--query 'Subnets[*].{SubnetName:Tags[?Key==`Name`] | [0].Value, AvailableIp:AvailableIpAddressCount}' \
--output table

以下、実行結果。

------------------------------------
|          DescribeSubnets         |
+--------------+-------------------+
|  AvailableIp |    SubnetName     |
+--------------+-------------------+
|  251         |  okada-subnet-01  |
|  251         |  okada-subnet-02  |
+--------------+-------------------+
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?