2017-02-20 98 views
0

我有一個帶有環境的Elastic Beanstalk應用程序,我正在使用Boto 3 SDK更新環境版本。我找不到任何有關如何等待Beanstalk狀態更改的示例。如何使用AWS Python SDK等待Elastic Beanstalk事件Boto 3

我可以看到服務生的例子爲CloudFormation http://boto3.readthedocs.io/en/latest/reference/services/cloudformation.html#waiters

沒有爲彈性魔豆http://boto3.readthedocs.io/en/latest/reference/services/elasticbeanstalk.html沒有服務員的文檔。

我更新的代碼看起來是這樣的

response = eb.update_environment(
    EnvironmentName=ebEnvironment, 
    VersionLabel=appVersion 
) 

    print response 

    # I would like to wait here for update to finish 

任何人都可以提供關於如何做到這一點一些幫助?

回答

0

它看起來並不像boto3 ElasticBeanstalk客戶對服務員的支持:

>>> import boto3 
>>> cf = boto3.client('cloudformation') 
>>> cf.waiter_names 
[u'change_set_create_complete', 
u'stack_create_complete', 
u'stack_delete_complete', 
u'stack_exists', 
u'stack_update_complete'] 
>>> eb = boto3.client('elasticbeanstalk') 
>>> eb.waiter_names 
[] 
>>> 

您可以創建在boto3 GitHub庫功能要求。