๐ AWS
[AWS/CLI] describe-route-tables
dhyuck
2021. 10. 7. 21:42
๋ฐ์ํ
Describes one or more of your route tables.
๋ชจ๋ ๋ผ์ฐํ ํ ์ด๋ธ ID ์กฐํ
aws ec2 describe-route-tables \ --profile {PROFILE_NAME} --output=json \ --query "RouteTables[*].RouteTableId[]"
ํน์ VPC์ ํ ๋น๋์ด ์๋ ๋ชจ๋ ๋ผ์ฐํ ํ ์ด๋ธ ID ์กฐํ
aws ec2 describe-route-tables \ --profile {PROFILE_NAME} --output=json \ --query "RouteTables[*].RouteTableId[]" \ --filters "Name=vpc-id,Values={VPC_ID}"
ํน์ VPC์ ํ ๋น๋์ด ์๋ ๋ผ์ฐํ ํ ์ด๋ธ ID ์กฐํ(๊ธฐ๋ณธ ๋ผ์ฐํ ํ ์ด๋ธ ์ ์ธ, ์๋ธ๋ท๊ณผ ์ฐ๊ฒฐ๋์ง ์์ ๋ผ์ฐํ ํ ์ด๋ธ ์ ์ธ)
aws ec2 describe-route-tables \ --profile {PROFILE_NAME} --output=json \ --query "RouteTables[*].RouteTableId[]" \ --filters "Name=vpc-id,Values={VPC_ID}" "Name=association.main, Values=false"
๋ฐ์ํ