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 :

  1. first import vpc connection from boto.vpc import vpcconnection
  2. connect region want

conn=boto.vpc.connect_to_region("ap-southeast-1")

  1. now route tables in object using conn object made. object return list of route tables.

c=conn.get_all_route_tables()

  1. 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

Popular posts from this blog

user interface - How to replace the Python logo in a Tkinter-based Python GUI app? -

objective c - Greedy NSProgressIndicator Allocation -

how to set an OCR language in Google Drive -