根据版本ID获取版本信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
opensearch:DescribeFunction |
get |
*FunctionInstance
|
无 | 无 |
请求语法
GET /v4/openapi/functions/{functionName}/versions/{versionId} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| functionName |
string |
是 |
功能名称 |
ctr |
| versionId |
integer |
是 |
版本 id |
100 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
示例
GET /v4/openapi/functions/ctr/version/101
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
响应体 |
{} |
|
| Status |
string |
请求状态 |
OK |
| HttpCode |
integer |
http 状态码 |
200 |
| RequestId |
string |
请求 id |
1638157479281 |
| Message |
string |
错误信息 |
version not exist. |
| Code |
string |
错误码 |
Version.NotExist |
| Result |
object |
结果体 |
[] |
| FunctionName |
string |
功能名称 |
ctr |
| FunctionType |
string |
功能类型
|
PAAS |
| ModelType |
string |
模型类型 |
tf_checkpoint |
| VersionConfig |
object |
配置信息 |
{ "createParameters": [ { "name": "params1", "required": "true", "formItemProps": "{\"required\": true, \"pattern?\": \"/^[a-zA-Z][a-zA-Z0-9_]{0,29}$/\"}", "componentProps": "{\"component\": \"Input\", \"attributes\": {\"defaultValue\": \"value1\"}}" } ], "depends": [ { "dependency": "依赖项", "condition": "条件", "description": "" } ], "usageParameters": [] } |
| CreateParameters |
array<object> |
创建实例时使用的参数列表 |
[ { "name": "params1", "required": "true", "formItemProps": "{\"required\": true, \"pattern?\": \"/^[a-zA-Z][a-zA-Z0-9_]{0,29}$/\"}", "componentProps": "{\"component\": \"Input\", \"attributes\": {\"defaultValue\": \"value1\"}}" } ] |
|
object |
参数体 |
{} |
|
| Name |
string |
Name |
params1 |
| Required |
string |
Required |
true |
| Depends |
array<object> |
实例的依赖项列表 |
[ { "dependency": "依赖项", "condition": "条件", "description": "" } ] |
|
object |
参数体 |
{} |
|
| Condition |
string |
条件 |
"" |
| Dependency |
string |
依赖项 |
"" |
| Description |
string |
描述 |
"" |
| UsageParameters |
array<object> |
实例在线使用过程中的参数列表 |
[] |
|
object |
参数体 |
{} |
|
| Name |
string |
Name |
"" |
| Required |
string |
Required |
"" |
| VersionId |
integer |
版本 ID |
101 |
| VersionName |
string |
版本名称 |
v1 |
| Latency |
integer |
任务最大运行时间 |
123 |
正常返回示例
{
"status": "OK",
"requestId": "",
"httpCode": 200,
"code": "",
"message": "",
"latency": 123,
"result": {
"versionName": "v1",
"versionId": 101,
"functionName": "ctr",
"modelType": "tf_checkpoint",
"functionType": "PAAS",
"versionConfig": {
"createParameters": [
{
"name": "params1",
"required": "true",
"formItemProps": "{\"required\": true, \"pattern?\": \"/^[a-zA-Z][a-zA-Z0-9_]{0,29}$/\"}",
"componentProps": "{\"component\": \"Input\", \"attributes\": {\"defaultValue\": \"value1\"}}"
}
],
"depends": [
{
"dependency": "依赖项",
"condition": "条件",
"description": ""
}
],
"usageParameters": []
}
}
}
示例
正常返回示例
JSON格式
{
"Status": "OK",
"HttpCode": 200,
"RequestId": "1638157479281",
"Message": "version not exist.",
"Code": "Version.NotExist",
"Result": {
"FunctionName": "ctr",
"FunctionType": "PAAS",
"ModelType": "tf_checkpoint",
"VersionConfig": {
"CreateParameters": [
{
"Name": "params1",
"Required": "true"
}
],
"Depends": [
{
"Condition": "\"\"",
"Dependency": "\"\"",
"Description": "\"\""
}
],
"UsageParameters": [
{
"Name": "\"\"",
"Required": "\"\""
}
]
},
"VersionId": 101,
"VersionName": "v1"
},
"Latency": 123
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。