获取App详情

接口

get_app_detail

参数

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

返回值

get_app_detail 方法将返回一个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_detail():
  9. try:
  10. app_name = "test-copy"
  11. qualifier = "1"
  12. rsp = client.get_app_detail(app_name, qualifier)
  13. print rsp
  14. except ClientError, e:
  15. print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())
  16. if __name__ == '__main__':
  17. get_app_detail()

执行结果:

  1. {
  2. "Name": "test-copy",
  3. "EnvVars": {
  4. "env-k3": "env-v3",
  5. "env-k5": "env-v5"
  6. },
  7. "Description": "Copy input file to output file",
  8. "CommandLine": "cp -rf ${inputFile} ${outputFile}",
  9. "OutputParameters": {
  10. "outputFile": {
  11. "Default": null,
  12. "Type": "String",
  13. "Description": "Output param",
  14. "LocalPath": "/tmp/outfile/"
  15. }
  16. },
  17. "VM": {
  18. "ECSImageId": "img-centos"
  19. },
  20. "Daemonize": false,
  21. "InputParameters": {
  22. "inputFile": {
  23. "Default": "",
  24. "Type": "String",
  25. "Description": "Input param",
  26. "LocalPath": "/tmp/infile/"
  27. }
  28. },
  29. "Config": {
  30. "InstanceCount": {
  31. "Default": 1,
  32. "Description": "Instance count",
  33. "Overwritable": true
  34. },
  35. "ResourceType": {
  36. "Default": "OnDemand",
  37. "Description": "Resource type",
  38. "Overwritable": true
  39. },
  40. "DiskType": {
  41. "Default": "cloud_efficiency",
  42. "Description": "Disk type",
  43. "Overwritable": true
  44. },
  45. "MaxRetryCount": {
  46. "Default": 1,
  47. "Description": "Max retry count",
  48. "Overwritable": true
  49. },
  50. "Timeout": {
  51. "Default": 1000,
  52. "Description": "Time out",
  53. "Overwritable": true
  54. },
  55. "MinDiskSize": {
  56. "Default": 40,
  57. "Description": "Min Disk size",
  58. "Overwritable": true
  59. },
  60. "InstanceType": {
  61. "Default": "ecs.sn2ne.large",
  62. "Description": "Instance type",
  63. "Overwritable": true
  64. }
  65. }
  66. }