python - Not able to retrieve information about db instances from the describe_instance method using boto.rds2 -


 <कोड> आयात boto.rds2 Conn = boto.rds2.connect_to_region ( "हमें पूर्व -1") डीईएफ़ स्थिति ( कॉन): प्रतिक्रिया = conn.describe_db_instances () उदाहरणों = प्रतिक्रियाओं [ 'DescribeDBInstancesResponse'] [ 'DescribeDBInstancesResult'] [ 'DBInstances'] प्रिंट (उदाहरणों [ 'इंजन'])  

मैं चाहता हूँ निम्न कोड का उपयोग करके आरडीएस उदाहरणों के बारे में जानकारी प्राप्त करने के लिए मैं इसे इंजन = mysql / sqlserver क्यों प्राप्त करने में सक्षम नहीं हूं? मुझे प्रतिक्रिया चर में शब्दकोष की एक सूची मिल रही है मैं उत्पादन को एक शब्दकोश या सूची में संग्रहीत करना चाहता हूं ताकि मैं उन वेरिएबल्स को बाद में आसानी से एक्सेस कर सकूं।

निम्न कोड आप के लिए काम करना चाहिए:

  डीईएफ़ स्थिति ( कॉन): status_map = {} प्रतिक्रिया = conn.describe_db_instances () उदाहरणों = प्रतिक्रिया [ 'DescribeDBInstancesResponse'] [ 'DescribeDBInstancesResult'] [ 'DBInstances'] मामलों में उदाहरण के लिए: status_map [उदाहरण [ 'DBInstanceIdentifier']] = उदाहरण [ ' इंजन '] वापसी status_map  

Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -