获取开发机实例列表
GET /compute/aicl/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/containerInstances
请求头(Request Header)
请求参数(Request Parameters
| 名称 | 类型 | 必须 | 位置 | 默认值 | 取值范围 | 描述 |
|---|---|---|---|---|---|---|
| subscription_name | string | 是 | path | - | - | 订阅名称. |
| resource_group_name | string | 是 | path | - | - | 资源组. |
| zone | string | 是 | path | - | - | 可用区. |
| filter | string | 否 | query | - | - | 过滤条件. |
| order_by | string | 否 | query | - | - | 排序,例:"create_time desc, name". |
| page_size | integer | 否 | query | - | - | 返回当前页的最大条目数. |
| page_token | string | 否 | query | - | - | 从上一个List请求返回的next_page_token值(如果有的话). |
请求示例(Request Example)
curl --location 'aicl-openapi-zh.sensecoreapi.dev/compute/aicl-openapi-zh/v1/subscriptions/5ca8ea29-75db-4f42-a08e-52ed52fc1348/resourceGroups/default/zones/cn-sh-01a/containerInstances?page_size=1000&filter=name%3D%22c4ac55ef-e9e4-409a-b5ed-c9a6d5976693%22' \
--header 'Accept-Language: zh-CN'
响应(Response)
| 名称 | 类型 | 描述 |
|---|---|---|
| container_instances | array[object] | 开发机实例资源详情列表. |
| next_page_token | string | 下一页的token. |
| total_size | integer | 开发机实例资源总数. |
其中,container_instances的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| id | string | 开发机实例资源id. |
| name | string | 开发机实例资源名称,需符合正则:^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$. |
| display_name | string | 开发机实例资源别名. |
| description | string | 开发机实例资源描述. |
| uid | string | 开发机实例资源uuid. |
| resource_type | string | 开发机实例资源类型, 例子: compute.aicl-openapi-zh.v1.instance. |
| creator_id | string | 开发机实例创建用户id. |
| owner_id | string | 开发机实例所有者id. |
| tenant_id | string | 租户id. |
| zone | string | 可用区. |
| state | string | 开发机实例状态. |
| sku_id | string | 最小库存单元id. |
| tags | object | 开发机实例资源标签. |
| properties | object | 开发机实例规格属性. |
| order_info | object | 订单信息. |
| deleted | boolean | 开发机实例资源是否删除. |
| create_time | string | 开发机实例资源创建时间. |
| update_time | string | 开发机实例资源更新时间. |
其中,state有如下情况
| 状态 | 含义 |
|---|---|
| CREATING | 创建中(默认值) |
| UPDATING | 更新中 |
| ACTIVE | 已激活 |
| SUSPENDING | 暂停中 |
| RESUMING | 恢复中 |
| DELETING | 删除中 |
| SUSPENDED | 已暂停 |
| DELETED | 已删除 |
| FAILED | 失败 |
其中,properties的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| resources | object | 规格属性. |
| volume_mounts | array[object] | 卷挂载. |
| expose_services | array[object] | 公开服务. |
| ssh_public_keys | array[string] | SSH公钥. |
| environment | object | 环境变量. |
| virtual_cluster | string | 虚拟集群. |
| image | object | 镜像 |
| commands | array[string] | 命令. |
| vpc | object | 虚拟专有网络. |
| cache_service | object | 缓存服务. |
其中,resources的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| compute_type | string | 计算类型. |
| gpu_type | string | GPU型号. |
| gpu | string | GPU卡数. |
| cpu | string | CPU核数. |
| memory | string | 内存规格,单位GB. |
| storage | string | 磁盘容量,单位GB. |
| network | string | 带宽限制,单位Mbps/s. |
| dcu_type | string | DCU型号. |
| dcu | string | DCU设备卡数目. |
| mlu_type | string | MLU型号. |
| mlu | string | MLU设备卡数目. |
| cpu_type | string | CPU型号. |
| cpu_frequency | string | CPU频率. |
| gpu_model | string | GPU实例模式. |
其中,compute_type有如下情况
| 状态 | 含义 |
|---|---|
| GPU | GPU型 |
| CPU | CPU型 |
| CPU_PRO | CPU专业型 |
| DCU | DCU型 |
| MLU | MLU型 |
其中,gpu_model有如下情况
| 状态 | 含义 |
|---|---|
| SINGLE | 单实例GPU |
| MULTI | 多实例GPU |
其中,volume_mounts的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| name | string | 卷名称 |
| host_path | string | Host地址 |
| mount_path | string | 挂载路径 |
| read_only | boolean | 是否只读 |
| volume_attributes | object | 卷属性 |
其中,volume_attributes的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| volume_id | string | 卷id |
| zone | string | 卷区域 |
| host | string | 卷host |
| port | string | 卷端口 |
| uri | string | 卷uri |
其中,expose_services的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| name | string | 服务名称 |
| display_name | string | 服务别名 |
| protocol | string | 协议 |
| port | integer | 端口 |
| address | string | 地址 |
| diag_code | string | 诊断码. |
其中,image的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| name | string | 镜像名称 |
| display_name | string | 镜像别名 |
| description | string | 镜像描述 |
| type | string | 镜像类型 |
| size | number | 镜像大小 |
| labels | object | 镜像标签 |
| resource_type | string | 资源类型 |
| image_path | string | 镜像地址 |
| creator_id | string | 镜像创建人 |
| creation_time | string | 镜像创建时间 |
| update_time | string | 镜像更新时间 |
| deletion_time | string | 镜像删除时间 |
其中,type有如下情况
| 状态 | 含义 |
|---|---|
| OFFICIAL | 官方镜像 |
| USER | 用户镜像 |
| SNAPSHOT | 用户快照 |
其中,vpc的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| vpc_id | string | 专有网络 ID. |
| namespace | string | 命名空间. |
其中,cache_service的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| enabled | boolean | 是否开启缓存服务. |
其中,order_info的参数如下
| 名称 | 类型 | 描述 |
|---|---|---|
| billing_cycle_number | integer | 购买时长. |
| auto_renew | boolean | 自动续费. |
| currency_code | string | 货币代码. |
| payment_channel | string | 支付方式. |
| note | string | 订单备注. |
| order_type | string | 订单类型. |
| order_id | string | 订单id. |
| start_time | string | 订单生效日期. |
| payment_model | string | 付费类型. |
| billing_model | string | 计费类型. |
| original_id | string | 合同包ID. |
| end_time | string | 订单结束时间. |
其中,payment_channel有如下情况
| 状态 | 含义 |
|---|---|
| PC_UNSPECIFIED | 未指定 |
| PC_BALANCE | 余额支付 |
| PC_CREDIT | 信用支付 |
| PC_FROZENACCOUNT | 冻结款支付 |
| PC_REMIT_OFFLINE | 线下汇款 |
| PC_ALIPAY | 支付宝支付 |
| PC_UNIONPAY | 银联支付 |
| PC_REMIT_ONLINE | 在线转账 |
| PC_CONTRACT | 合同包支付 |
其中,order_type有如下情况
| 状态 | 含义 |
|---|---|
| OT_UNSPECIFIED | 未指定 |
| OT_ORIGINAL | 原始订单 |
| OT_RENEW | 续费订单 |
| OT_UPGRADED | 升配订单 |
| OT_DOWNGRADED | 降配订单 |
| OT_CONTRACT | 合同订单 |
| OT_UNSUBSCRIBE | 退订订单 |
| OT_RESIZE | 扩缩容订单 |
其中,payment_model有如下情况
| 状态 | 含义 |
|---|---|
| PM_UNSPECIFIED | 未指定 |
| PM_PREPAID | 预付 |
| PM_POSTPAID | 后付费 |
其中,billing_model有如下情况
| 状态 | 含义 |
|---|---|
| BM_UNSPECIFIED | 未指定 |
| BM_USAGE | 按量计费 |
| BM_MONTHLY | 包月 |
| BM_YEARLY | 包年 |
响应示例(Response Example)
{
"container_instances": [
{
"id": "/subscriptions/5ca8ea29-75db-4f42-a08e-52ed52fc1348/resourceGroups/default/zones/cn-sh-01a/containerInstances/c4ac55ef-e9e4-409a-b5ed-c9a6d5976693",
"name": "c4ac55ef-e9e4-409a-b5ed-c9a6d5976693",
"display_name": "yxdcu",
"description": "yx devssss aiclsss2",
"uid": "565afb40-c23e-11ed-bd25-c9a6d5976693",
"resource_type": "compute.aicl-openapi-zh.v1.instance",
"creator_id": "df7c446f-2536-4115-b4ec-3aa34e78c493",
"owner_id": "df7c446f-2536-4115-b4ec-3aa34e78c493",
"tenant_id": "5ca8ea29-75db-4f42-a08e-52ed52fc1348",
"zone": "cn-sh-01a",
"state": "FAILED",
"sku_id": "f66dcad7-4e33-4968-882a-a7eb82ea82a6",
"tags": {},
"properties": {
"resources": {
"compute_type": "GPU",
"gpu_type": "A100",
"gpu": "1",
"cpu": "12",
"memory": "120GiB",
"storage": "300GiB",
"network": "1Mbps",
"dcu_type": "",
"dcu": "2",
"mlu_type": "",
"mlu": " ",
"cpu_type": "",
"cpu_frequency": "",
"gpu_model": "SINGLE"
},
"volume_mounts": [
{
"name": "",
"host_path": "/home/mnt",
"mount_path": "/home/mnt",
"read_only": false,
"volume_attributes": {
"volume_id": "",
"zone": "",
"host": "",
"port": "",
"uri": ""
}
},
{
"name": "",
"host_path": "/home/mnt1",
"mount_path": "/home/mnt1",
"read_only": false,
"volume_attributes": {
"volume_id": "",
"zone": "",
"host": "",
"port": "",
"uri": ""
}
}
],
"expose_services": [],
"ssh_public_keys": [
""
],
"environment": {
"AILAB_ENV": "dev",
"AILAB_IMAGE": "centos7.7-py3.8-cuda11.3-cudnn8.3-torch1.12.1-spring0.7.3",
"AILAB_VOLUME_PATH": ":/home/mnt,:/home/mnt1",
"COMMAND": "",
"DEV_GROUPS": "",
"DEV_USER": "root:2000",
"HOSTNAME": "c4ac55ef-e9e4-409a-b5ed-c9a6d5976693",
"JUPYTERLAB_PORT": "9000",
"NAMESPACE": "defaultcn-sh-01aaicl",
"PUBLIC_KEYS": "",
"ROOTABLE": "false",
"SCC_CONTAINER_MOUNTS": ":/home/mnt,:/home/mnt1",
"SCC_ENV": "dev",
"SCC_IMAGE": "centos7.7-py3.8-cuda11.3-cudnn8.3-torch1.12.1-spring0.7.3",
"SSHD_PASSWORD": "7XCTt0dprfIM7CLH",
"TELEPORT_AUTH_SERVERS": "aicl-openapi-zh-proxy.cn-sh-01.sensecore.dev:33080",
"TELEPORT_ID": "c4ac55ef-e9e4-409a-b5ed-c9a6d5976693",
"VSCODE_PASSWORD": "7XCTt0dprfIM7CLH",
"VSCODE_PORT": "8000",
"devmachine_id": "defaultcn-sh-01aaicl-c4ac55ef-e9e4-409a-b5ed-c9a6d5976693",
"frp_server_addr": "10.198.64.68",
"frp_server_port": "7000"
},
"virtual_cluster": "",
"image": {
"name": "centos7.7-py3.8-cuda11.3-cudnn8.3-torch1.12.1-spring0.7.3",
"display_name": "centos7.7-py3.8-cuda11.3-cudnn8.3-torch1.12.1-spring0.7.3",
"description": "",
"type": "USER",
"size": 0,
"labels": {},
"resource_type": "",
"image_path": "registry.sensetime.com/lepton/cloud-ai-lab/centos7.7-py3.8-cuda11.3-cudnn8.3-torch1.12.1-spring0.7.3:alpha2",
"creator_id": "",
"creation_time": null,
"update_time": null,
"deletion_time": null
},
"commands": [],
"vpc": {
"vpc_id": "ae54f3ac-3f30-11ed-ab30-6a25dc1220dd",
"namespace": ""
},
"cache_service": null
},
"order_info": {
"billing_cycle_number": 0,
"auto_renew": false,
"currency_code": "",
"payment_channel": "PC_UNSPECIFIED",
"note": "",
"order_type": "OT_UNSPECIFIED",
"order_id": "",
"start_time": null,
"payment_model": "PM_UNSPECIFIED",
"billing_model": "BM_UNSPECIFIED",
"original_id": "",
"end_time": null
},
"deleted": false,
"create_time": "2023-06-21T02:45:11.407881Z",
"update_time": "2023-08-01T02:12:01.905369Z"
}
],
"next_page_token": "",
"total_size": 1
}