2016-08-02 55 views
-1

在這裏,我試圖從AWSLIMITCHECKER模塊獲取AWS限制檢查ID,並從中獲取我需要檢查的categorywise獲取在aws中描述屬性檢查

這是我的示例代碼:

from awslimitchecker.checker import AwsLimitChecker 
from awslimitchecker.trustedadvisor import TrustedAdvisor 
#from awslimitchecker.services.base import _AwsService 

res = TrustedAdvisor(all_services={}, 
    region='my region', 
    account_id='myacct id', 
    account_role='my role' 
) 

在這裏,我需要通過all_services這些PARAMS。我需要在這本詞典中通過什麼?我如何使用功能_get_limit_check_id獲得檢查ID。

下面是引用鏈接awslimitcheckerhttps://awslimitchecker.readthedocs.io/en/latest/_modules/awslimitchecker/trustedadvisor.html#TrustedAdvisor._get_limit_check_id

我已經檢查博託API還可以,但是否有可能得到可信的檢查使用awslimitcheckermodule本身顧問ID和AWS的檢查?

預先感謝

回答

0
Hi i have resolved this,but when i getting check ids it shows the following   

錯誤:

mycode: 

     d = TrustedAdvisor(services, 
       region='myregion', 
       account_id='none', 
       account_role='none' 
    ) 




     e = d._get_limit_check_id() 


error: 

      File "/usr/lib/python2.6/site-  packages/awslimitchecker/trustedadvisor.py", line 190, in _get_limit_check_id 
      checks = self.conn.describe_trusted_advisor_checks(
       AttributeError: 'NoneType' object has no attribute 'describe_trusted_advisor_checks' 
+0

爲比使用其他botoapi上述describe_trusted_advisor_checks任何建議? – hain