接口
deleteApp
参数
参数 | 类型 | 是否必需 | 说明 |
---|---|---|---|
appName | String | 是 | App名称 |
qualifier | String | 否 | App资源的版本号,如参数,那么系统会删除整个App。 |
返回值
调用成功后返回一个 DeleteAppResponse
实例;调用失败后,抛出异常: ClientException
。
例子
Java 源码:
import com.aliyuncs.batchcompute.main.v20151111.*;
import com.aliyuncs.batchcompute.model.v20151111.*;
import com.aliyuncs.exceptions.ClientException;
public class DeleteApp {
static String ACCESS_KEY_ID = ""; //这里填写您的 AccessKeyId
static String ACCESS_KEY_SECRET = ""; //这里填写您的 AccessKeySecret
static String REGION_ID = "cn-shenzhen"; //这里填写 region
static String appName = "JavaSdkApp";
public static void main(String[] args) {
BatchCompute client = new BatchComputeClient(REGION_ID, ACCESS_KEY_ID, ACCESS_KEY_SECRET);
try {
DeleteAppResponse response = client.deleteApp(appName);
//删除指定版本的app
//DeleteAppResponse response = client.deleteApp(appName, "0.1");
System.out.println("RequestId: " + response.getRequestId());
System.out.println("StatusCode: " + response.getStatusCode());
} catch (ClientException e) {
e.printStackTrace();
//创建失败
}
}
}
执行结果:
{
RequestId: null
StatusCode: 204
}
文档内容是否对您有帮助?