删除App
接口
delete_app
参数
参数 | 类型 | 是否必须 | 描述 |
---|---|---|---|
app_name | string | 是 | App 标识符。 |
返回值
delete_app 方法将返回一个 ActionResponse
对象, ActionResponse
仅提供了 requestId 和状态码两个属性。
例子
Python源码:
import time
import string
import random
import batchcompute
from batchcompute import CN_SHENZHEN as REGION
from batchcompute import Client, ClientError
#from batchcompute.resources import (AppDescription, InputParameter, OutputParameter)
ACCESS_KEY_ID = 'Your Access Key Id'
ACCESS_KEY_SECRET = 'Your Access Key Secret'
client = Client(REGION, ACCESS_KEY_ID, ACCESS_KEY_SECRET)
def delete_app():
try:
app_name = 'test-copy'
#qualifier = '0'
#rsp = client.delete_app(app_name, qualifier)
rsp = client.delete_app(app_name)
print rsp
return True
except ClientError, e:
print (e.get_status_code(), e.get_code(), e.get_requestid(), e.get_msg())
return False
if __name__ == '__main__':
delete_app()
执行结果:
{
"Date": "Tue, 13 Nov 2018 06:47:49 GMT",
"RequestId": "B3E48F68-B017-4785-8B06-43B88F4C46B1",
"StatusCode": 204
}