Difference between revisions of "Aws ec2 describe-subnets"

From wikieduonline
Jump to navigation Jump to search
Line 38: Line 38:
 
== Related ==
 
== Related ==
 
* <code>[[aws ec2 create-subnet]]</code>
 
* <code>[[aws ec2 create-subnet]]</code>
* [[AWS VPC]]
+
* [[AWS VPC]], [[AZ]]
 
* <code>[[aws list all]]</code>
 
* <code>[[aws list all]]</code>
* [[AZ]]
 
 
* <code>[[aws ec2 create-route]]</code>
 
* <code>[[aws ec2 create-route]]</code>
 +
* <code>aws ec2 describe-network-interfaces]] --filters Name=subnet-id,Values=your-subnet-id-here | grep Description</code>
  
 
== See also ==
 
== See also ==

Revision as of 10:09, 4 August 2022

https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-subnets.html

  • aws ec2 describe-subnets
  • aws ec2 describe-subnets | grep VpcId
  • aws ec2 describe-subnets --output=text | grep Name
  • aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-0987654321
  • aws ec2 describe-subnets --filters Name=vpc-id,Values=vpc-0987654321 --output table | egrep "MapPublicIpOnLaunch|Name|CidrBlock"
  • aws ec2 describe-subnets | grep -i DefaultForAz
  • aws ec2 describe-subnets | egrep -iw "AvailabilityZone|vpcid|MapPublicIpOnLaunch"
aws ec2 describe-subnets --output=table
||+-----------------------------+---------------------------------------------------------------------+||
||                                               Subnets                                               ||
|+------------------------------+----------------------------------------------------------------------+|
||  AssignIpv6AddressOnCreation |  False                                                               ||
||  AvailabilityZone            |  us-west-2a                                                          ||
||  AvailabilityZoneId          |  usw2-az2                                                            ||
||  AvailableIpAddressCount     |  239                                                                 ||
||  CidrBlock                   |  10.0.10.0/24                                                        ||
||  DefaultForAz                |  False                                                               ||
||  MapCustomerOwnedIpOnLaunch  |  False                                                               ||
||  MapPublicIpOnLaunch         |  False                                                               ||
||  OwnerId                     |  782871186567                                                        ||
||  State                       |  available                                                           ||
||  SubnetArn                   |  arn:aws:ec2:us-west-2:782871186567:subnet/subnet-0e038b0cdfcb53b19  ||
||  SubnetId                    |  subnet-0e038b0cdfcb53b19                                            ||
||  VpcId                       |  vpc-0a89965bb4754b25c                                               ||
|+------------------------------+----------------------------------------------------------------------+|
|||                                               Tags                                                |||
||+----------------------------+----------------------------------------------------------------------+||
|||             Key            |                                Value                                 |||
||+----------------------------+----------------------------------------------------------------------+||
|||  Name                      |  stage-us-west-2a-private-subnet                                     |||
|||  Environment               |  your_env                                                            |||

Related

See also

Advertising: