amazon vpc - How to get route table/acl content using boto? -
i'm trying contents of route table , acl destination, target...etc using boto. i'm able fetch ids not content, please suggest way resolve this.
to retrieve data need follow following steps :
- first import vpc connection
from boto.vpc import vpcconnection - connect region want
conn=boto.vpc.connect_to_region("ap-southeast-1")
- now route tables in object using conn object made. object return list of route tables.
c=conn.get_all_route_tables()
- c has objects of class routetable , further has 1 data member of class route . data member need retrieve details :
for c1 in c:
for in c1.routes: print a.destination_cidr_block print a.instance_id print a.gateway_id print a.state print a.dry_run if getting confused in point 4 , can see here : http://pydoc.net/python/boto/2.1.1/boto.vpc.routetable/ hope helps !
Comments
Post a Comment