根據版本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
}
錯誤碼
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。