インスタンスの作成に使用される特徴のバージョン情報を取得します。
今すぐお試しください
テスト
RAM 認証
|
アクション |
アクセスレベル |
リソースタイプ |
条件キー |
依存アクション |
|
opensearch:DescribeFunction |
get |
*All Resource
|
なし | なし |
リクエスト構文
GET /v4/openapi/functions/{functionName}/current-version HTTP/1.1
パスパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| functionName |
string |
必須 |
特徴の名前。有効な値:
|
ctr |
リクエストパラメーター
|
パラメーター |
型 |
必須 / 任意 |
説明 |
例 |
| modelType |
string |
必須 |
モデルタイプ。特徴ごとに対応するモデルタイプが異なります:
列挙値:
|
tf_checkpoint |
| functionType |
string |
任意 |
特徴のタイプ。有効な値:
|
PAAS |
| domain |
string |
任意 |
業界。デフォルト値は Empty で、汎用型を示します。 列挙値:
|
ecommerce |
| category |
string |
任意 |
カテゴリ。デフォルト値は Empty です。 列挙値:
|
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 |
| 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
}
エラーコード
完全なリストについては、「エラーコード」をご参照ください。
変更履歴
完全なリストについては、「変更履歴」をご参照ください。