获取App版本列表

接口

get_app_revisions

参数

参数 类型 是否必须 描述
app_name string App 标识符。

返回值

get_app_revisions 方法将返回一个GetResponse 对象。

例子

Python源码:

  1. import time
  2. import batchcompute
  3. from batchcompute import CN_SHENZHEN as REGION
  4. from batchcompute import Client, ClientError
  5. ACCESS_KEY_ID = 'Your Access Key Id'
  6. ACCESS_KEY_SECRET = 'Your Access Key Secret'
  7. client = Client(REGION, ACCESS_KEY_ID, ACCESS_KEY_SECRET)
  8. def get_app_revisions():
  9. try:
  10. app_name = "test-copy"
  11. rsp = client.get_app_revisions(app_name)
  12. print rsp
  13. except ClientError, e:
  14. print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())
  15. if __name__ == '__main__':
  16. get_app_revisions()

执行结果:

  1. {
  2. "Date": "Tue, 13 Nov 2018 06:43:29 GMT",
  3. "Items": [
  4. {
  5. "UpdateTime": "2018-11-13 11:40:11.976941",
  6. "Revision": 0
  7. },
  8. {
  9. "UpdateTime": "2018-11-13 11:40:20.301549",
  10. "Revision": 1
  11. }
  12. ],
  13. "NextMarker": "",
  14. "RequestId": "42D74A70-5ABB-4F2E-B7D5-B4133B569FFD",
  15. "StatusCode": 200
  16. }