列舉服務。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
eas:ListServices |
get |
*Service
|
無 | 無 |
請求文法
GET /api/v2/services HTTP/1.1
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| Sort |
string |
否 |
排序欄位。按時間戳記類型預設倒序排序。 |
CreateTime |
| Order |
string |
否 |
排序方式,取值如下:
|
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 |
否 |
服務類型,取值如下:
枚舉值:
|
Standard |
| Label |
object |
否 |
按標籤過濾。 |
|
|
string |
否 |
按 |
{"key1":"value1","key2":null} |
|
| ServiceStatus |
string |
否 |
服務啟動並執行狀態。 枚舉值:
|
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 |
否 |
服務角色。 枚舉值:
|
LLMGateway |
| ResourceType |
string |
否 |
服務所使用的資源類型,取值如下:
枚舉值:
|
PublicResource |
| IncludeNoWorkspace |
boolean |
否 |
是否包含不屬於任何工作空間的服務。預設為 true。 |
true |
| ResourceAliasName |
string |
否 |
資源群組的自訂名稱。 |
example |
| ResourceId |
string |
否 |
資源群組的 ID。如何查詢資源群組 ID,請參見 ListResources 。 |
eas-r-asdas**** |
| ResourceBurstable |
boolean |
否 |
服務是否開啟彈性資源集區。 枚舉值:
|
true |
| CronscalerEnabled |
boolean |
否 |
服務是否開啟定時擴縮容。 枚舉值:
|
true |
| AutoscalerEnabled |
boolean |
否 |
服務是否開啟Auto Scaling。 枚舉值:
|
true |
| TrafficState |
string |
否 |
是否承接群組流量(僅對群組服務有效) 枚舉值:
|
grouping |
| CallerUid |
string |
否 |
服務建立帳號的 UID |
19989224166xxxxxxx |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
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
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。