查询应用的基本信息、网络配置、模板配置和扩缩容配置
接口描述
GET /compute/workspace/data/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/workspaces/{workspace_name}/apps/{app_name}
请求头(Request Header)
请求参数(Request Parameters)
| 参数名 | 类型 | 必须 | 默认值 | 取值范围 | 描述 |
|---|---|---|---|---|---|
| subscription_name | string | true | --- | --- | (资源ID)订阅 |
| resource_group_name | string | true | --- | --- | (资源ID)资源组 |
| zone | string | true | --- | --- | (资源ID)可用区 |
| workspace_name | string | true | --- | --- | (资源ID)工作空间资源名称 |
| app_name | string | true | --- | --- | (资源ID)应用名称 |
请求体(Request Body)
无
请求示例(Request Example)
curl --request GET \
--url https://example.com/compute/workspace/data/v1/subscriptions/string/resourceGroups/string/zones/string/workspaces/string/apps/string \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}'
响应参数(Response Parameters)
| 名称 | 类型 | 描述 |
|---|---|---|
| » metadata | Metadata | 对象的元数据 |
| »» uid | string | 唯一标识 |
| »» deleted | boolean | 资源是否已删除 |
| »» create_time | string(date-time) | 资源创建时间 |
| »» update_time | string(date-time) | 资源更新时间 |
| » ownership | Ownership | 所有权关系 |
| »» creator_id | string | 创建者id |
| »» owner_id | string | 拥有者id |
| »» tenant_id | string | 租户id |
| »» creator_name | string | 创建者name |
| » info | AppInfo | true |
| »» subscription_name | string | 订阅 |
| »» resource_group_name | string | (资源ID)资源组 |
| »» zone | string | (资源ID)可用区 |
| »» workspace_name | string | (资源ID)工作空间资源名称 |
| »» workspace_display_name | string | (资源ID)工作空间资源名称 |
| »» aec2_name | string | true |
| »» aec2_id | string | AI弹性计算集群id |
| »» vpc_id | string | 虚拟私有集群 |
| »» name | string | 应用名称. 填写需要遵循规范,如果不填写,则由后台随机生成 |
| »» display_name | string | true |
| »» description | string | 应用描述 |
| » template | InstanceTemplate | true |
| »» init_containers | [Container] | 初始化容器列表 |
| »»» name | string | 容器名称 |
| »»» image_type | string(enum) | true |
| »»» image | string | true |
| »»» image_display_name | string | 镜像名,用于页面展示 |
| »»» command | [string] | 容器命令列表 |
| »»» env | [EnvVar] | 容器环境变量列表 |
| »»»» name | string | true |
| »»»» value | string | true |
| »»»» need_mosaic | boolean | true |
| »»» need_cache | boolean | 启动缓存 |
| »»» container_type | string(enum) | 容器类型 |
| »»» resource_request | object | 容器资源请求. 若资源请求为空时,直接取用resource spec的规格 |
| »»»» additionalProperties | string | none |
| »»» volume_mounts | [VolumeMount] | 卷挂载 |
| »»»» type | string(enum) | 挂载类型 |
| »»»» name | string | 卷名 |
| »»»» mount_path | string | 挂载路径 |
| »»»» afs_id | string | AI文件存储配置 |
| »»»» volume_capacity | string | 卷容量 |
| »» containers | [Container] | 容器列表 |
| »» compute_resource_spec | ComputeResourceSpec | true |
| »»» name | string | true |
| » scaling | Scaling | true |
| »» scaling_strategy | string | true |
| »» replicas | integer(int32) | true |
| »» cpu_load | integer(int32) | cpu负载 |
| »» min_replicas | integer(int32) | 最小副本数 |
| »» max_replicas | integer(int32) | 最大副本数 |
| » networking | Networking | 网络配置 |
| »» access_port | integer(int32) | true |
| »» intranet_ip | string | 内网访问IP |
| »» intranet_domain_name | string | 内网访问域名 |
| » scheduling | Scheduling | true |
| »» priority | string(enum) | true |
| »» cluster_id | string | 被调度集群id |
| »» resource_pool_id | string | 资源池id |
| » ready_replicas | integer(int32) | 应用当前副本中运行中状态的副本数量 |
| » state | string(enum) | 应用状态 |
| » transition_error | string | 失败原因 |
| » need_cache | boolean | 启动缓存, 每个容器内也有对应配置, 会被内部配置覆盖 |
| » app_port | [integer] | true |
| » execution_type | string(enum) | true |
| » aec2 | AEC2 | 应用所属集群 |
| »» id | string | aec2 id |
| »» uid | string | aec2的uuid |
| »» name | string | 资源标识 |
| »» display_name | string | 资源名称 |
| »» state | string | 资源状态 |
| » last_operation_type | string(enum) | service上一次操作 |
| » resource_spec | ResourceSpec | 资源规格属性 |
| »» id | string | 资源规格标识 |
| »» name | string | 资源规格标识 |
| »» description | string | 资源规格描述 |
| »» category | string | 资源规格类型, eg.ACN/JOB/CCI |
| »» sku_id | string | 云管sku_id |
| »» cpu | CPU | CPU |
| »»» manufacturer | string | cpu厂商. 例: Intel/AMD/Hygon |
| »»» type | string | CPU 类型. 例: 2680v4/6146 |
| »»» frequency | number(float) | CPU 主频 |
| »»» vcpu_allocatable | integer(int32) | 可分配vCPU数量 |
| »»» vcpu_capacity | integer(int32) | 物理vCPU总量(暂未使用) |
| »» memory | Memory | 内存 |
| »»» allocatable | number(float) | 可分配内存 |
| »»» capacity | number(float) | 物理内存总量(暂未使用) |
| »» device | Device | 加速芯片 |
| »»» manufacturer | string | 加速芯片厂商. 例:NVIDIA/DCU |
| »»» type | string | 加速芯片类型. 例:A100/A800/Z800 |
| »»» memory | number(float) | 显存 |
| »»» number | integer(int32) | 加速芯片数量 |
| »»» physical_interface | string | 显卡物理形态 |
| »» training_network | TrainingNetwork | 训练网 |
| »»» network | Network | 网络 |
| »»»» type | string | 网络类型. 例:IB/RoCE |
| »»»» nics_number | integer(int32) | 网卡数量 |
| »»»» bandwidth | string | 网络带宽 |
| »»» name | string | 训练网编号 |
| »» service_network | ServiceNetwork | 业务网 |
| »»» network | Network | 网络 |
| »» data_network | DataNetwork | 数据网 |
| »»» network | Network | 网络 |
| »» storage | Storage | 存储 |
| »» custom | string | 自定义字段 |
| 参数 | 取值 |
|---|---|
| » state | UNKNOWN_APP_STATE |
| » state | INIT |
| » state | UPDATING |
| » state | QUEUING |
| » state | SCHEDULED |
| » state | PROGRESSING |
| » state | RUNNING |
| » state | FAILED |
| » state | DELETING |
| » state | DELETED |
| » state | SUSPENDING |
| » state | SUSPENDED |
| » execution_type | UNKNOWN |
| » execution_type | START |
| » execution_type | SUSPEND |
| » last_operation_type | CREATION |
| » last_operation_type | UPDATE |
| » last_operation_type | SUSPENSION |
| » last_operation_type | DELETION |
响应示例(Response Example)
{
"metadata": {
"uid": "kn6a68crvuygfk4ipvtmjsv2h7ofgxcn5a66",
"deleted": false,
"create_time": "0001-01-01T00:00:00Z",
"update_time": "0001-01-01T00:00:00Z"
},
"ownership": {
"creator_id": "a6deef57-e856-4815-92b9-96bee61361b1",
"owner_id": "a6deef57-e856-4815-92b9-96bee61361b1",
"tenant_id": "224bae0c-a98f-41f5-b5d3-9f54aa98455f",
"creator_name": "longtao1"
},
"info": {
"subscription_name": "224bae0c-a98f-41f5-b5d3-9f54aa98455f",
"resource_group_name": "default",
"zone": "cn-sh-01z",
"workspace_name": "c3e1171c-d81f-4c63-a58d-bca5e17dd4d8",
"workspace_display_name": "",
"aec2_name": "d5cbf3bd-3d26-4b9a-b79f-7dc88ba6e256",
"aec2_id": "1f09eec2-6971-11ee-85b3-da68b9bf2c6e",
"vpc_id": "a2d59d8f-4882-11ed-92d5-de4d27e02dfe",
"name": "app-79xrcr42",
"display_name": "msw_test",
"description": ""
},
"template": {
"init_containers": [],
"containers": [
{
"name": "msw",
"image_type": "OFFICIAL",
"image": "registry.sensecore.tech/lepton-cci/ubuntu20.04-pytorch2.0.1-cuda11.8-text-generation-inference1.1.1-amd64:20231018-212034",
"image_display_name": "lepton-cci/ubuntu20.04-pytorch2.0.1-cuda11.8-text-generation-inference1.1.1-amd64:20231018-212034",
"command": [],
"env": [],
"need_cache": false,
"container_type": "MAIN",
"resource_request": {
"cpu": "1",
"memory": "8GiB",
"nvidia.com/gpu": "1"
},
"volume_mounts": []
}
],
"compute_resource_spec": {
"name": "N2lS.Ie.I60.1"
}
},
"scaling": {
"scaling_strategy": "",
"replicas": 1,
"cpu_load": 0,
"min_replicas": 0,
"max_replicas": 0
},
"networking": {
"access_port": 0,
"intranet_ip": "",
"intranet_domain_name": "app-79xrcr42.ns-code1030-17eecc6d.svc.cluster.local"
},
"scheduling": {
"priority": "HIGH",
"cluster_id": "",
"resource_pool_id": ""
},
"ready_replicas": 0,
"state": "INIT",
"transition_error": "",
"need_cache": false,
"app_port": [
200
],
"execution_type": "START",
"aec2": null,
"last_operation_type": "CREATION",
"resource_spec": null
}