全部產品
Search
文件中心

OpenSearch:GetFunctionVersion

更新時間:Oct 20, 2026

根據版本 ID 取得版本資訊。

調試

您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。

調試

授權資訊

下表是API對應的授權資訊,可以在RAM權限原則語句的Action元素中使用,用來給RAM使用者或RAM角色授予調用此API的許可權。具體說明如下:

  • 操作:是指具體的許可權點。

  • 存取層級:是指每個操作的存取層級,取值為寫入(Write)、讀取(Read)或列出(List)。

  • 資源類型:是指操作中支援授權的資源類型。具體說明如下:

    • 對於必選的資源類型,用前面加 * 表示。

    • 對於不支援資源級授權的操作,用全部資源表示。

  • 條件關鍵字:是指雲產品自身定義的條件關鍵字。

  • 關聯操作:是指成功執行操作所需要的其他許可權。操作者必須同時具備關聯操作的許可權,操作才能成功。

操作

存取層級

資源類型

條件關鍵字

關聯操作

opensearch:DescribeFunction

get

*FunctionInstance

acs:opensearch:{#regionId}:{#accountId}:apps/{#AppGroupId}

無 無

請求文法

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 SAAS。

PAAS

modelType

string

模型類型。

tf_checkpoint

versionConfig

object

設定資訊。

createParameters

array<object>

建立執行個體時使用的參數清單。

object

參數主體。

string

建立執行個體參數中動態鍵對應的值。

depends

array<object>

執行個體的相依項目清單。

object

參數主體。

condition

string

條件。

""

dependency

string

相依項目。

""

description

string

描述。

""

usageParameters

array<object>

執行個體線上使用過程中的參數清單。

object

參數主體。

string

使用執行個體參數中動態鍵對應的值。

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": "Dependency",
                    "condition": "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": [
        {
          "key": ""
        }
      ],
      "depends": [
        {
          "condition": "\"\"",
          "dependency": "\"\"",
          "description": "\"\""
        }
      ],
      "usageParameters": [
        {
          "key": ""
        }
      ]
    },
    "versionId": 101,
    "versionName": "v1"
  },
  "latency": 123
}

錯誤碼

訪問錯誤中心查看更多錯誤碼。

變更歷史

更多資訊,參考變更詳情。