Created
December 18, 2015 10:46
-
-
Save elbertwang/cad02ae7e21b1bcd698f to your computer and use it in GitHub Desktop.
Revisions
-
elbertwang created this gist
Dec 18, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ from boto import vpc connvpc = vpc.connect_to_region('cn-north-1') vpcs = connvpc.get_all_vpcs() subnets = connvpc.get_all_subnets() print vpcs print subnets for vpc in vpcs: print vpc for vpc_subnet in connvpc.get_all_subnets(filters={"vpcId":vpc.id}): print vpc_subnet