获取开发机实例列表 | 大装置帮助中心
跳到主要内容

获取开发机实例列表

GET /compute/aicl/v1/subscriptions/{subscription_name}/resourceGroups/{resource_group_name}/zones/{zone}/containerInstances

请求头(Request Header)

参考认证(authentication)

请求参数(Request Parameters

名称类型必须位置默认值取值范围描述
subscription_namestringpath--订阅名称.
resource_group_namestringpath--资源组.
zonestringpath--可用区.
filterstringquery--过滤条件.
order_bystringquery--排序,例:"create_time desc, name".
page_sizeintegerquery--返回当前页的最大条目数.
page_tokenstringquery--从上一个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_instancesarray[object]开发机实例资源详情列表.
next_page_tokenstring下一页的token.
total_sizeinteger开发机实例资源总数.

其中,container_instances的参数如下

名称类型描述
idstring开发机实例资源id.
namestring开发机实例资源名称,需符合正则:^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$.
display_namestring开发机实例资源别名.
descriptionstring开发机实例资源描述.
uidstring开发机实例资源uuid.
resource_typestring开发机实例资源类型, 例子: compute.aicl-openapi-zh.v1.instance.
creator_idstring开发机实例创建用户id.
owner_idstring开发机实例所有者id.
tenant_idstring租户id.
zonestring可用区.
statestring开发机实例状态.
sku_idstring最小库存单元id.
tagsobject开发机实例资源标签.
propertiesobject开发机实例规格属性.
order_infoobject订单信息.
deletedboolean开发机实例资源是否删除.
create_timestring开发机实例资源创建时间.
update_timestring开发机实例资源更新时间.

其中,state有如下情况

状态含义
CREATING创建中(默认值)
UPDATING更新中
ACTIVE已激活
SUSPENDING暂停中
RESUMING恢复中
DELETING删除中
SUSPENDED已暂停
DELETED已删除
FAILED失败

其中,properties的参数如下

名称类型描述
resourcesobject规格属性.
volume_mountsarray[object]卷挂载.
expose_servicesarray[object]公开服务.
ssh_public_keysarray[string]SSH公钥.
environmentobject环境变量.
virtual_clusterstring虚拟集群.
imageobject镜像
commandsarray[string]命令.
vpcobject虚拟专有网络.
cache_serviceobject缓存服务.

其中,resources的参数如下

名称类型描述
compute_typestring计算类型.
gpu_typestringGPU型号.
gpustringGPU卡数.
cpustringCPU核数.
memorystring内存规格,单位GB.
storagestring磁盘容量,单位GB.
networkstring带宽限制,单位Mbps/s.
dcu_typestringDCU型号.
dcustringDCU设备卡数目.
mlu_typestringMLU型号.
mlustringMLU设备卡数目.
cpu_typestringCPU型号.
cpu_frequencystringCPU频率.
gpu_modelstringGPU实例模式.

其中,compute_type有如下情况

状态含义
GPUGPU型
CPUCPU型
CPU_PROCPU专业型
DCUDCU型
MLUMLU型

其中,gpu_model有如下情况

状态含义
SINGLE单实例GPU
MULTI多实例GPU

其中,volume_mounts的参数如下

名称类型描述
namestring卷名称
host_pathstringHost地址
mount_pathstring挂载路径
read_onlyboolean是否只读
volume_attributesobject卷属性

其中,volume_attributes的参数如下

名称类型描述
volume_idstring卷id
zonestring卷区域
hoststring卷host
portstring卷端口
uristring卷uri

其中,expose_services的参数如下

名称类型描述
namestring服务名称
display_namestring服务别名
protocolstring协议
portinteger端口
addressstring地址
diag_codestring诊断码.

其中,image的参数如下

名称类型描述
namestring镜像名称
display_namestring镜像别名
descriptionstring镜像描述
typestring镜像类型
sizenumber镜像大小
labelsobject镜像标签
resource_typestring资源类型
image_pathstring镜像地址
creator_idstring镜像创建人
creation_timestring镜像创建时间
update_timestring镜像更新时间
deletion_timestring镜像删除时间

其中,type有如下情况

状态含义
OFFICIAL官方镜像
USER用户镜像
SNAPSHOT用户快照

其中,vpc的参数如下

名称类型描述
vpc_idstring专有网络 ID.
namespacestring命名空间.

其中,cache_service的参数如下

名称类型描述
enabledboolean是否开启缓存服务.

其中,order_info的参数如下

名称类型描述
billing_cycle_numberinteger购买时长.
auto_renewboolean自动续费.
currency_codestring货币代码.
payment_channelstring支付方式.
notestring订单备注.
order_typestring订单类型.
order_idstring订单id.
start_timestring订单生效日期.
payment_modelstring付费类型.
billing_modelstring计费类型.
original_idstring合同包ID.
end_timestring订单结束时间.

其中,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
}