使用 Open API 创建一个应用。
请求URI
- /app/create_app
参数列表
响应数据
- {
- "code":200,
- "data":{
- "owner":"xxxxxxxx",
- "desiredState":"RUNNING",
- "buildpackId":11,
- "instances":1,
- "runnings":0,
- "description":"样例应用",
- "userId":"xxxxxxxx@aliyun.com",
- "launchTime":1466647411805,
- "prevState":"RUNNING",
- "hcUrl":"http://localhost:8080/appname/check.html",
- "createTime":1466578207327,
- "phone":"150xxxxxxxx",
- "regionId":"cn-beijing",
- "appId":"08208d49-f8c8-454a-99b6-98d4c63d262e",
- "name":"SampleApp",
- "id":"08208d49-f8c8-454a-99b6-98d4c63d262e",
- "state":"RUNNING",
- "targetBuildpackId":0,
- "email":"xxxxxx@aliyun.com"
- }
- }
示例
- Map<String,String> params = new HashMap<String,String>();
- params.put("AppName", "SampleApp");
- params.put("BuildPackId", "11");
- params.put("RegionId", "cn-beijing");
- params.put("EcuList", "f38bcf51-dd97-455d-b641-45250f094707,f38bcf51-dd97-455d-b641-45250f094707");
- params.put("HealthCheckUrl", "http://localhost:8080/appname/check.html");
- params.put("Desc", "样例应用");
- String resp = edasApiClient.callApi(EdasApiAction.App.create_app.path(), params);
- System.out.println(resp);