部署应用
操作场景
本接口用于部署工业数字模型驱动引擎(Industrial Digital Model Engine,简称iDME)应用。
前提条件
操作步骤
- 获取待部署的应用ID。
- 接口相关信息
URI格式:GET /v1/{project_id}/apps
详情请参见获取租户下的应用清单。
- 请求示例
GET https://{iDME Endpoint}/v1/{project_id}/apps
{project_id}请从获取项目ID获取。
- 响应示例
{ "result": [ { "id": "44145d41ae294e111111eafd4da32ea8", "project_id": "cf49a20d85294c93b1111111ca9454bc", "mark_for_delete": 0, "create_by": "59779076d1dc********c91c2c54bd7a", "create_time": 1690427901000, "update_by": "59779076d1dc********c91c2c54bd7a", "update_time": 1690427901000, "name_cn": "TestApp", "name_en": "TestApp", "desc_cn": "", "desc_en": "", "database_type": "mysql", "environment": "beta", "owners": [ "user_1", "idme_container1" ] }, { "id": "c787dcd484944ad11111dd18693e4eb2", "project_id": "cf49a20d85294c93b1111111ca9454bc", "mark_for_delete": 0, "create_by": "59779076d1dc********c91c2c54bd7a", "create_time": 1689622165000, "update_by": "59779076d1dc********c91c2c54bd7a", "update_time": 1689622165000, "name_cn": "工业产品问卷调查", "name_en": "Questionnaire_Survey", "desc_cn": "", "desc_en": "", "database_type": "mysql", "environment": "dev", "owners": [ "dme-console" ] } ], "page_num": 1, "page_size": 500, "total_size": 2, "total_pages": 1 }
- 接口相关信息
- 获取待部署的运行服务。
- 接口相关信息
URI格式:GET /v1/{project_id}/envs
详情请参见获取运行服务清单。
- 请求示例
GET /v1/{project_id}/envs
- 响应示例
{ "result": [ { "project_id": "cf49a20d85294c93b1111111ca9454bc", "region_id": "cn-north-4", "env_id": "2f25874d-43d4-453c-91f7-3898f397ac22", "env_name": "MySQLTest1", "env_status": "RUNNING", "env_type": "CLOUD_BASIC", "env_app_link_status": "RUNNING", "env_conf_info": "基础版 数据建模引擎 节点*1", "env_app_link_id": "e2ad5c196eb5420657d3cb9eff8c0874", "app_id": "c787dcd484944ad11111dd18693e4eb2", "app_version": "500d48b0724a1111b6dfb4da338d342f_1690974321079", "app_name_en": "Questionnaire_Survey", "app_name_cn": "工业产品问卷调查", "app_environment": "dev", "enabled": false, "last_deploy_time": 1691026735000, "deploy_user_id": "16ee111111111b2c971d8d50ff9d0d42", "charging_mode": "prePaid", "create_time": 1690252391000, "resource_id": "2f25874d-43d4-453c-91f7-3898f397ac22", "resource_spec_code": "dme.instance.basic.standard", "org_code": "9190086000001158862", "org_name": "idme-test", "app_login_url": "https://orgid-test.huaweiapaas.com/oauth2/authorize?response_type=cod******", "app_create_time": 1690496417000, "database_type": "mysql" }, { "project_id": "cf49a20d85294c93b1111111ca9454bc", "region_id": "cn-north-4", "env_id": "5dc54ff9-f659-4ac2-b6f3-fe18227ea05e", "env_name": "测试体验版计费因子", "env_status": "RUNNING", "env_type": "CLOUD_TRIAL", "env_app_link_status": "DEPLOYING", "env_conf_info": "体验版 数据建模引擎 节点*1", "app_id": "44145d41ae294e111111eafd4da32ea8", "app_version": "44f5e16ea3554492a3aad3cff7039152_1690278188344", "app_name_en": "TestApp", "app_name_cn": "TestApp", "app_environment": "dev", "enabled": false, "last_deploy_time": 1691100385000, "deploy_user_id": "7e06441a333849c7bbca280992edd835", "charging_mode": "postPaid", "create_time": 1687650507000, "resource_id": "5dc54ff9-f659-4ac2-b6f3-fe18227ea05e", "resource_spec_code": "dme.instance.trial", "org_code": null, "org_name": null, "app_login_url": null, "app_create_time": 1690236458000, "security_group_id": "test" } ], "page_num": 1, "page_size": 500, "total_size": 5, "total_pages": 1 }
- 接口相关信息
- 部署应用。
- 接口相关信息
URI格式:POST /v1/{project_id}/envs/{env_id}/apps/{app_id}/deploy
详情请参见部署应用。
- 请求示例
PUT https://{iDME Endpoint}/v1/cf49a20d85294c93b1111111ca9454bc/envs/2f25874d-43d4-453c-91f7-3898f397ac22/apps/c787dcd484944ad11111dd18693e4eb2/deploy
Body:
{ "version": "500d48b0724a4445b6dfb4da338d342f_1690974321079", "org_code": "9190086000001158862", "org_name": "idme-test" }
- 响应示例
- 接口相关信息