获取Worker列表
获取Worker列表
Path Parameters
订阅
资源组
可用区. 工作空间可用区,一般为region+z,例如:上海的region为cn-sh-01,工作空间的可用区则为cn-sh-01z
工作空间名称
训练任务name
Query Parameters
可选,单页结果数,默认10,最大500,需为非负整数,如果不填或填0,则使用默认值。超过最大值则使用最大值,负值将返回错误
可选,指定要使用的页码,默认1.如果未指定则使用默认值,非正值返回错误
- 200
- default
OK
Schema
- Array [
- Array [
- ]
- Array [
- ]
- ]
workers object[]
Worker列表
worker uid
worker id
worker 名字
worker 命名空间
node 名字
worker ip
host ip
worker 状态
init_containers object[]
初始化容器
初始化容器名
resources object
Worker 资源
limits object
资源列表. key值: CPU(cpu)、内存(memory)、设备数量(device)
requests object
资源列表. key值: CPU(cpu)、内存(memory)、设备数量(device)
containers object[]
容器列表
容器名
resources object
Worker 资源
limits object
资源列表. key值: CPU(cpu)、内存(memory)、设备数量(device)
requests object
资源列表. key值: CPU(cpu)、内存(memory)、设备数量(device)
设备类型
node spec name
worker创建时间
worker更新时间
保留字段,暂未使用。下一页的token,用户需将该值作为下一次请求的page_token透传回来
符合当前查询条件的后台数据总数
{
"workers": [
{
"uid": "string",
"id": "string",
"name": "string",
"namespace": "string",
"node_name": "string",
"ip": "string",
"host_ip": "string",
"phase": "string",
"init_containers": [
{
"name": "string",
"resources": {
"limits": {},
"requests": {}
}
}
],
"containers": [
{
"name": "string",
"resources": {
"limits": {},
"requests": {}
},
"device_type": "string"
}
],
"node_spec_name": "string",
"create_time": "2024-12-05T02:41:59.559Z",
"update_time": "2024-12-05T02:41:59.559Z"
}
],
"next_page_token": "string",
"total_size": 0
}
Default error response
Schema
- Array [
- ]
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
details object[]
A list of messages that carry the error details. There is a common set of message types for APIs to use.
The type of the serialized message.
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}