すべてのプロダクト
Search
ドキュメントセンター

OpenSearch:GetFunctionCurrentVersion

最終更新日:Nov 24, 2025

インスタンスの作成に使用される特徴のバージョン情報を取得します。

今すぐお試しください

この API を OpenAPI Explorer でお試しください。手作業による署名は必要ありません。呼び出しに成功すると、入力したパラメーターに基づき、資格情報が組み込まれた SDK コードが自動的に生成されます。このコードをダウンロードしてローカルで使用できます。

テスト

RAM 認証

下表に、この API を呼び出すために必要な認証情報を示します。認証情報は、RAM (Resource Access Management) ポリシーを使用して定義できます。以下で各列名について説明します。

  • アクション:特定のリソースに対して実行可能な操作。ポリシー構文ではAction要素として指定します。

  • API:アクションを具体的に実行するための API。

  • アクセスレベル:各 API に対して事前定義されているアクセスの種類。有効な値:create、list、get、update、delete。

  • リソースタイプ:アクションが作用するリソースの種類。リソースレベルでの権限をサポートするかどうかを示すことができます。ポリシーの有効性を確保するため、アクションの対象として適切なリソースを指定してください。

    • リソースレベルの権限を持つ API の場合、必要なリソースタイプはアスタリスク (*) でマークされます。ポリシーのResource要素で対応する ARN を指定してください。

    • リソースレベルの権限を持たない API の場合、「すべてのリソース」と表示され、ポリシーのResource要素でアスタリスク (*) でマークされます。

  • 条件キー:サービスによって定義された条件のキー。このキーにより、きめ細やかなアクセス制御が可能になります。この制御は、アクション単体に適用することも、特定のリソースに対するアクションに適用することもできます。Alibaba Cloud は、サービス固有の条件キーに加えて、すべての RAM 統合サービスに適用可能な一連の共通条件キーを提供しています。

  • 依存アクション:ある特定のアクションを実行するために、前提として実行が必要となる他のアクション。依存アクションの権限も RAM ユーザーまたは RAM ロールに付与する必要があります。

アクション

アクセスレベル

リソースタイプ

条件キー

依存アクション

opensearch:DescribeFunction

get

*All Resource

*

なし なし

リクエスト構文

GET /v4/openapi/functions/{functionName}/current-version HTTP/1.1

パスパラメータ

パラメーター

必須 / 任意

説明

functionName

string

必須

特徴の名前。有効な値:

  • ctr: クリックスルー率 (CTR) モデル

  • pop: 人気モデル

  • category: カテゴリモデル

  • hot: ホットワードモデル

  • hint: ヒントワードモデル

  • suggest: ドロップダウン提案モデル

  • analyzer: 単語分割モデル

  • termweight: term 重み付けモデル

ctr

リクエストパラメーター

パラメーター

必須 / 任意

説明

modelType

string

必須

モデルタイプ。特徴ごとに対応するモデルタイプが異なります:

  • CTR モデル: tf_checkpoint

  • 人気モデル: pop

  • カテゴリモデル: offline_inference

  • ホットワードモデル: offline_inference

  • ヒントワードモデル: offline_inference

  • ドロップダウン提案モデル: offline_inference

  • 単語分割モデル: text

  • term 重み付けモデル: tf_checkpoint

列挙値:

  • pop :

    人気モデル

  • offline_inference :

    ホットワード、ヒントワード、カテゴリ予測のモデル。

  • tf_checkpoint :

    CTR およびカスタム term 重み付けのモデル。

  • text :

    カスタムトークン化。

tf_checkpoint

functionType

string

任意

特徴のタイプ。有効な値:

  • PAAS (デフォルト)

  • SAAS

PAAS

domain

string

任意

業界。デフォルト値は Empty で、汎用型を示します。

列挙値:

  • education :

    教育

  • ecommerce :

    E コマース

  • community :

    コンテンツコミュニティ

ecommerce

category

string

任意

カテゴリ。デフォルト値は Empty です。

列挙値:

  • general :

    一般

  • question :

    教育業界向けの質疑応答検索。

  • it :

    IT コンテンツ

general

リクエストの例

GET /v4/openapi/functions/ctr/current-version?modelType=_checkpoint&functionType=PAAS&domain=ecommerce&category=general

レスポンスフィールド

フィールド

説明

object

応答本文。

{ "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": [] } } }

Status

string

リクエストのステータス。

OK

HttpCode

integer

HTTP ステータスコード。

200

RequestId

string

リクエスト ID。

1638157479281

Message

string

エラーメッセージ。

version not exist.

Code

string

エラーコード。

Version.NotExist

Result

object

返された結果。

{ "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": [] } }

FunctionName

string

特徴の名前。

ctr

FunctionType

string

特徴のタイプ。有効な値:

  • PAAS

  • SAAS

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": "params1", "required": "true", "formItemProps": "{\"required\": true, \"pattern?\": \"/^[a-zA-Z][a-zA-Z0-9_]{0,29}$/\"}", "componentProps": "{\"component\": \"Input\", \"attributes\": {\"defaultValue\": \"value1\"}}" }

Name

string

パラメーターの名前。

params1

Required

string

パラメーターが必須かどうかを指定します。

true

Depends

array<object>

インスタンスの依存関係のリスト。

[ { "dependency": "依赖项", "condition": "条件", "description": "" } ]

object

パラメーターオブジェクト。

{ "dependency": "依赖项", "condition": "条件", "description": "" }

Condition

string

条件。

""

Dependency

string

依存関係。

""

Description

string

説明。

""

UsageParameters

array<object>

インスタンスをオンラインで使用するためのパラメーター。

[]

object

パラメーターオブジェクト。

{}

Name

string

パラメーターの名前。

""

Required

string

パラメーターが必須かどうかを指定します。

""

VersionId

integer

バージョン ID。

101

VersionName

string

バージョン名。

v1

Latency

integer

リクエストのレイテンシー (ミリ秒)。

123

成功応答の例 (ホットワードモデル)

{
    "status": "OK",
    "requestId": "165890826219877085621759",
    "latency": 0.049,
    "httpCode": 200,
    "code": "",
    "message": "",
    "result": {
        "versionId": 37,
        "versionName": "v2",
        "description": "",
        "status": "available",
        "functionName": "hot",
        "modelType": "offline_inference",
        "functionType": "PAAS",
        "versionConfig": {
            "createParameters": [
                {
                    "name": "filter",
                    "required": "false",
                    "validations": "[{\"preprocess\": {\"pattern\": \"(\\\\w+)\\\\s*(>=|<=|>|<|=|!=)\\\\s*(\\\\w+)\", \"type\": \"regex\", \"group\": 1}, \"params\": {\"data\": [\"user_id\", \"biz_type\"], \"type\": \"trival\"}, \"class\": \"EnumerateRule\"}]",
                    "value": "{\"component\":\"Input\",\"attributes\":{\"defaultValue\":\"\",\"dataSource\":\"\"}}",
                    "valueSplit": ","
                }
            ],
            "usageParameters": [
                {
                    "name": "allow_dict_id",
                    "required": "false",
                    "validations": "[{\"params\": {\"restrictions\": \"type=hot_allowlist\", \"type\": \"passthrough\", \"dataSource\": \"dicts\"}, \"class\": \"EnumerateRule\"}]",
                    "value": "{\"component\":\"Select\",\"attributes\":{\"defaultValue\":\"\",\"dataSource\":\"\"}}"
                },
                {
                    "name": "deny_dict_id",
                    "required": "false",
                    "validations": "[{\"params\": {\"restrictions\": \"type=hot_denylist\", \"type\": \"passthrough\", \"dataSource\": \"dicts\"}, \"class\": \"EnumerateRule\"}]",
                    "value": "{\"component\":\"Select\",\"attributes\":{\"defaultValue\":\"\",\"dataSource\":\"\"}}"
                }
            ],
            "depends": [
                {
                    "condition": "integrity_level >= 1",
                    "dependency": "integrity_level",
                    "description": "データ整合性レベルは L1 以上である必要があります。"
                }
            ],
            "deployment": "",
            "dagTemplate": "opensearch_hot_train"
        }
    }
}

成功レスポンス

JSONJSON

{
  "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
}

エラーコード

完全なリストについては、「エラーコード」をご参照ください。

変更履歴

完全なリストについては、「変更履歴」をご参照ください。