获取用户下,符合条件的所有实例。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
opensearch:DescribeFunction |
get |
*FunctionInstance
|
无 | 无 |
请求语法
GET /v4/openapi/app-groups/{appGroupIdentity}/functions/{functionName}/instances HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| appGroupIdentity |
string |
是 |
应用名称 |
app_group_name |
| functionName |
string |
是 |
功能名称 |
ctr |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| modelType |
string |
否 |
模型类型 |
tf_checkpoint |
| functionType |
string |
否 |
功能类型 |
"PAAS" |
| source |
string |
否 |
实例来源
|
user |
| pageNumber |
integer |
否 |
页码,默认值为 1 |
1 |
| pageSize |
integer |
否 |
每页大小,默认值为 10 |
10 |
| output |
string |
否 |
返回信息的丰富度
|
normal |
示例
GET /v4/openapi/app-groups/my-app/functions/ctr/instances?source=all&output=simple
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应体 |
||
| Status |
string |
请求状态 |
"OK" |
| HttpCode |
integer |
http 状态码 |
200 |
| TotalCount |
integer |
总条数 |
2 |
| RequestId |
string |
请求 id |
A4D487A9-A456-5AA5-A9C6-B7BF2889CF74 |
| Message |
string |
错误信息,正常为空 |
instance not exist. |
| Code |
string |
错误码,正常为空 |
Instance.NotExist |
| Result |
array<object> |
结果列表 |
[] |
|
array<object> |
实例信息 |
{} |
|
| Belongs |
object |
实例归属信息 |
{} |
| Category |
string |
垂类 |
"general" |
| Domain |
string |
行业 |
"ecommerce" |
| Language |
string |
适用的语种缩写 |
"zh" |
| CreateParameters |
array<object> |
实例的参数列表 |
[] |
|
object |
参数体 |
{} |
|
| Name |
string |
名字 |
"param1" |
| Value |
string |
值 |
"value1" |
| UsageParameters |
array<object> |
使用参数列表 |
|
|
object |
参数体 |
||
| Name |
string |
参数名称 |
use_param1 |
| Value |
string |
参数值 |
value1 |
| CreateTime |
integer |
创建时间 |
1234 |
| Cron |
string |
训练信息,cron 语法(Minutes Hours DayofMonth Month DayofWeek),为空表示不进行周期训练 |
0 3 ? * 0,1,3,5 (周日,周一,周三,周五凌晨3点) |
| Description |
string |
描述 |
" " |
| ExtendInfo |
string |
扩展信息,json string,包含模型评价信息,错误信息等 |
"{\"dataReport\":{},\"errors\":{}}" |
| FunctionName |
string |
功能名称 |
"ctr" |
| FunctionType |
string |
功能类型 |
"PAAS" |
| InstanceName |
string |
实例名称 |
"ctr_test" |
| ModelType |
string |
模型类型 |
"tf_checkpoint" |
| Source |
string |
实例来源
|
"user" |
| Status |
string |
实例状态
|
available |
| VersionId |
integer |
版本 ID |
123 |
| Latency |
integer |
api 请求耗时 (单位毫秒) |
123 |
正常返回结果:
{
"status": "OK",
"requestId": "A4D487A9-A456-5AA5-A9C6-B7BF2889CF74",
"httpCode": 200,
"code": "",
"message": "",
"latency": 123,
"totalCount": 2,
"result": [
{
"versionId": 100,
"instanceName": "instance_1",
"functionName": "hot",
"functionType": "PAAS",
"modelType": "offline_inference",
"description": "",
"status": "available",
"belongs": {
"domain": "ecommerce",
"category": "general",
"language": "zh"
},
"createTime": 100010,
"source": "user"
},
{
"versionId": 100,
"instanceName": "instance_2",
"functionName": "hot",
"functionType": "PAAS",
"modelType": "offline_inference",
"description": "",
"status": "available",
"belongs": {
"domain": "ecommerce",
"category": "general",
"language": "zh"
},
"createTime": 200020,
"source": "user",
"default": true
}
]
}
示例
正常返回示例
JSON格式
{
"Status": "\"OK\"",
"HttpCode": 200,
"TotalCount": 2,
"RequestId": "A4D487A9-A456-5AA5-A9C6-B7BF2889CF74",
"Message": "instance not exist.",
"Code": "Instance.NotExist",
"Result": [
{
"Belongs": {
"Category": "\"general\"",
"Domain": "\"ecommerce\"",
"Language": "\"zh\"\t"
},
"CreateParameters": [
{
"Name": "\"param1\"",
"Value": "\"value1\""
}
],
"UsageParameters": [
{
"Name": "use_param1",
"Value": "value1"
}
],
"CreateTime": 1234,
"Cron": "0 3 ? * 0,1,3,5 (周日,周一,周三,周五凌晨3点)",
"Description": "\" \"",
"ExtendInfo": "\"{\\\"dataReport\\\":{},\\\"errors\\\":{}}\"",
"FunctionName": "\"ctr\"",
"FunctionType": "\"PAAS\"",
"InstanceName": "\"ctr_test\"",
"ModelType": "\"tf_checkpoint\"",
"Source": "\"user\"",
"Status": "available",
"VersionId": 123
}
],
"Latency": 123
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。