AWS

Download 48
Last updated Jun 6, 2022

aws-ec2-subnets

Describes one or more of your AWS EC2 subnets.

aws-ec2-subnets [profile=PROFILE] [region=REGION]
profile=PROFILE
The identifier of AWS connect profile
region=REGION
AWS region

AWS IAM Policy

To use this command, you must allow the below permissions in your AWS IAM policy:

  • ec2:DescribeSubnets

Output Fields

FieldTypeNameDescription
aws_profileStringConnect profileThe identifier of AWS connect profile
regionStringRegione.g. ap-northeast-2
azStringAvailability Zonee.g. ap-northeast-2a
subnet_idStringSubnet ID
vpc_idStringVPC ID
default_azBoolDefault AZ
cidr_blockStringCIDR blocke.g. 172.31.0.0/20
stateStringStatee.g. available, pending
available_ip_countIntegerAvailable IP counte.g. 4087
owner_idStringOwner ID
assign_ipv6_on_creationBoolAssign IPv6 on creation
map_public_ip_on_launchBoolMap public IP on launch
subnet_arnStringSubnet ARN
ipv6_cidr_block_associationsListIPv6 CIDR block associationsElements with assoc_id, ipv6_cidr_block, state, and state_msg properties.
tagsListTagsElements with key and value properties.