ListServices - 查询服务列表

列举服务。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

下表是API对应的授权信息,可以在RAM权限策略语句的Action元素中使用,用来给RAM用户或RAM角色授予调用此API的权限。具体说明如下:

  • 操作:是指具体的权限点。

  • 访问级别:是指每个操作的访问级别,取值为写入(Write)、读取(Read)或列出(List)。

  • 资源类型:是指操作中支持授权的资源类型。具体说明如下:

    • 对于必选的资源类型,用前面加 * 表示。

    • 对于不支持资源级授权的操作,用全部资源表示。

  • 条件关键字:是指云产品自身定义的条件关键字。

  • 关联操作:是指成功执行操作所需要的其他权限。操作者必须同时具备关联操作的权限,操作才能成功。

操作

访问级别

资源类型

条件关键字

关联操作

eas:ListServices

get

*Service

acs:eas:{#regionId}:{#accountId}:service/*

请求语法

GET /api/v2/services HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

Sort

string

排序字段。按时间戳类型默认倒序排序。

CreateTime

Order

string

排序方式,取值如下:

  • desc(默认值):降序。

  • asc:升序。

asc

Filter

string

模糊匹配字段。只支持按服务名字模糊匹配。

foo

PageNumber

integer

服务列表的请求页码,默认为 1。

1

PageSize

integer

分页查询时设置的每页显示的服务数量,默认为 100。

100

GroupName

string

服务群组名称,如何获取服务群组名称,请参见ListServices

foo

ParentServiceUid

string

Band 成员服务对应的主服务 ID。

eas-m-ijafy3c8cxxxx

ServiceType

string

服务类型,取值如下:

  • Async

  • Standard

  • Queue

  • LLM

  • RAG

  • Serverless

  • LLMGatewayService

  • Offline Task

  • SDCluster

  • ScalableJob

  • ScalableJobService

  • AssistantJob

枚举值:

  • AssistantJob :

    AssistantJob

  • Async :

    异步服务

  • LLMGatewayService :

    LLM 智能路由

  • RAG :

    RAG 场景化部署

  • Standard :

    标准部署

  • SDCluster :

    SDCluster

  • ScalableJob :

    可伸缩任务

  • ScalableJobService :

    可伸缩任务服务

  • OfflineTask :

    离线任务

  • Serverless :

    Serverless

  • LLM :

    LLM 场景化部署

  • Queue :

    队列服务

Standard

Label

object

按标签过滤。

string

{"key":"value"}格式填写。Value 可为 null 或空字符,代表只按 Key 过滤,Value 可为任意值。

{"key1":"value1","key2":null}

ServiceStatus

string

服务运行的状态。

枚举值:

  • Creating :

    Creating

  • Stopped :

    Stopped

  • Failed :

    Failed

  • Complete :

    Complete

  • Cloning :

    Cloning

  • Stopping :

    Stopping

  • Updating :

    Updating

  • Waiting :

    Waiting

  • HotUpdate :

    HotUpdate

  • Committing :

    Committing

  • Starting :

    Starting

  • DeleteFailed :

    DeleteFailed

  • Running :

    Running

  • Developing :

    Developing

  • Scaling :

    Scaling

  • Deleted :

    Deleted

  • Pending :

    Pending

  • Deleting :

    Deleting

Running

ServiceName

string

服务名。

echo_test

ServiceUid

string

服务 UID。

eas-m-c9iw3yitxxxx

ResourceName deprecated

string

服务所属的资源组名称或 ID。

eas-r-hd0qwy8cxxxx

WorkspaceId

string

工作空间 ID。

1234**

QuotaId

string

配额 ID。

quota1****

Gateway

string

私有网关 ID。

gw-1uhcqmsc7x22******

Role

string

服务角色。

枚举值:

  • DataLoader :

    DataLoader

  • FrontEnd :

    FrontEnd

  • DataSet :

    DataSet

  • SDProxy :

    SDProxy

  • LLMScheduler :

    LLMScheduler

  • ScalableJob :

    ScalableJob

  • LLMGateway :

    LLMGateway

  • Job :

    Job

  • Queue :

    Queue

LLMGateway

ResourceType

string

服务所使用的资源类型,取值如下:

  • PublicResource

  • DedicatedResource

  • Lingjun

  • SelfManagedLingjun

枚举值:

  • Lingjun :

    灵骏资源配额

  • PublicResource :

    公共资源组

  • DedicatedResource :

    专属资源组

  • SelfManagedLingjun :

    灵骏自运维资源组

PublicResource

IncludeNoWorkspace

boolean

是否包含不属于任何工作空间的服务。默认为 true。

true

ResourceAliasName

string

资源组的自定义名称。

example

ResourceId

string

资源组的 ID。如何查询资源组 ID,请参见 ListResources

eas-r-asdas****

ResourceBurstable

boolean

服务是否开启弹性资源池。

枚举值:

  • true :

    true

  • false :

    false

true

CronscalerEnabled

boolean

服务是否开启定时扩缩容。

枚举值:

  • true :

    true

  • false :

    false

true

AutoscalerEnabled

boolean

服务是否开启弹性伸缩。

枚举值:

  • true :

    true

  • false :

    false

true

TrafficState

string

返回参数

名称

类型

描述

示例值

object

返回结果。

RequestId

string

请求 ID。

40325405-579C-4D82****

Services

array

服务列表。

Service

服务实例。

PageNumber

integer

返回查询的服务列表的当前页码。

1

PageSize

integer

返回每页显示的服务数量。

100

TotalCount

integer

服务总数。

2

示例

正常返回示例

JSON格式

{
  "RequestId": "40325405-579C-4D82****",
  "Services": [
    {
      "ServiceGroup": "my_group",
      "Memory": 1024,
      "Cpu": 1,
      "Image": "registry.cn-shanghai.aliyuncs.com/eas/echo_cn-shanghai:v0.0.1-20210129111320",
      "Gpu": 0,
      "TotalInstance": 1,
      "AccessToken": "MzJiMDI5MDliODc0MTlkYmI0ZDhlYmExYjczYTIyZTE3Zm********",
      "ResourceBurstable": true,
      "InternetEndpoint": "http://10123*****.cn-shanghai.aliyuncs.com/api/predict/echo",
      "ResourceAlias": "my_resource",
      "Status": "Running",
      "TrafficState": "standalone",
      "RequestId": "40325405-579C-4D82********",
      "Resource": "eas-r-xxxxxxx",
      "SecondaryInternetEndpoint": "http://10123*****.cn-shanghai.aliyuncs.com/api/predict/async_path.echo\n",
      "Labels": [
        {
          "LabelValue": "value1",
          "LabelKey": "key1"
        }
      ],
      "Namespace": "echo",
      "Weight": 100,
      "Role": "Queue",
      "SecondaryIntranetEndpoint": "http://10123*****.vpc.cn-shanghai.aliyuncs.com/api/predict/async_path.echo\n",
      "PendingInstance": 0,
      "ServiceName": "echo",
      "SafetyLock": "dangerous",
      "Region": "cn-shanghai",
      "AppType": "LLM",
      "InstanceCountInResource": {
        "Quota": 10,
        "Public": 10,
        "Dedicated": 10
      },
      "IntranetEndpoint": "http://10123*****.vpc.cn-shanghai.aliyuncs.com/api/predict/echo",
      "QuotaId": "quotaxxxxx",
      "Message": "Service start successfully",
      "CurrentVersion": 1,
      "RunningInstance": 1,
      "WorkspaceId": "123445",
      "CallerUid": "20123*******",
      "Reason": "RUNNING",
      "Source": "dsw",
      "ServiceId": "eas-m-xxasdat",
      "AppVersion": "v1",
      "CronscalerEnabled": true,
      "ServiceConfig": "{\"metadata\":{\"cpu\":1,\"instance\":1,\"memory\":1024},\"name\":\"echo\",\"processor_entry\":\"libecho.so\",\"processor_path\":\"http://oss-cn-hangzhou-zmf.aliyuncs.com/059247/echo_processor_release.tar.gz\",\"processor_type\":\"cpp\"}",
      "Gateway": "gw-xxxxxx",
      "AppSpecName": "llama_7b_fp16",
      "GPUCorePercentage": 50,
      "GPUMemory": 20,
      "AppConfig": "{\"ModelStorage\":\"oss\"}",
      "CreateTime": "2021-01-29T11:13:20Z",
      "AutoscalerEnabled": true,
      "ExtraData": "{\"blue_green_services\":[\"test\",\"testxxxx\"]}",
      "LatestVersion": 1,
      "UpdateTime": "2021-01-29T11:13:20Z",
      "ServiceUid": "eas-m-xxasdat\n",
      "ParentUid": "11234*******",
      "RoleAttrs": "{\"ApproxMaxLength\":null,\"Length\":null,\"MaxPayloadBytes\":null}"
    }
  ],
  "PageNumber": 1,
  "PageSize": 100,
  "TotalCount": 2
}

错误码

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情