接口
get_app_detail
参数
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
app_name | string | 是 | App 标识符。 |
qualifier | string | 否 | App 版本号。 |
返回值
get_app_detail 方法将返回一个GetResponse
对象。
例子
Python源码:
import time
import batchcompute
from batchcompute import CN_SHENZHEN as REGION
from batchcompute import Client, ClientError
ACCESS_KEY_ID = 'Your Access Key Id'
ACCESS_KEY_SECRET = 'Your Access Key Secret'
client = Client(REGION, ACCESS_KEY_ID, ACCESS_KEY_SECRET)
def get_app_detail():
try:
app_name = "test-copy"
qualifier = "1"
rsp = client.get_app_detail(app_name, qualifier)
print rsp
except ClientError, e:
print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())
if __name__ == '__main__':
get_app_detail()
执行结果:
{
"Name": "test-copy",
"EnvVars": {
"env-k3": "env-v3",
"env-k5": "env-v5"
},
"Description": "Copy input file to output file",
"CommandLine": "cp -rf ${inputFile} ${outputFile}",
"OutputParameters": {
"outputFile": {
"Default": null,
"Type": "String",
"Description": "Output param",
"LocalPath": "/tmp/outfile/"
}
},
"VM": {
"ECSImageId": "img-centos"
},
"Daemonize": false,
"InputParameters": {
"inputFile": {
"Default": "",
"Type": "String",
"Description": "Input param",
"LocalPath": "/tmp/infile/"
}
},
"Config": {
"InstanceCount": {
"Default": 1,
"Description": "Instance count",
"Overwritable": true
},
"ResourceType": {
"Default": "OnDemand",
"Description": "Resource type",
"Overwritable": true
},
"DiskType": {
"Default": "cloud_efficiency",
"Description": "Disk type",
"Overwritable": true
},
"MaxRetryCount": {
"Default": 1,
"Description": "Max retry count",
"Overwritable": true
},
"Timeout": {
"Default": 1000,
"Description": "Time out",
"Overwritable": true
},
"MinDiskSize": {
"Default": 40,
"Description": "Min Disk size",
"Overwritable": true
},
"InstanceType": {
"Default": "ecs.sn2ne.large",
"Description": "Instance type",
"Overwritable": true
}
}
}
文档内容是否对您有帮助?