Queries the version information about the current feature when you create an instance.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
opensearch:DescribeFunction | get |
|
| none |
Request syntax
GET /v4/openapi/functions/{functionName}/current-version HTTP/1.1
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
functionName | string | Yes | The name of the feature. Valid values:
| ctr |
modelType | string | Yes | The type of the model. The following features correspond to different model types:
| tf_checkpoint |
functionType | string | No | The type of the feature. Valid values:
| PAAS |
domain | string | No | The industry. By default, this parameter is left empty, which indicates General-purpose Edition. | ecommerce |
category | string | No | The category. By default, this parameter is left empty. | general |
Response parameters
Sample success responses (In this example, hotword model is used.)
{
"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": "The level of the data integrity must be equal to or greater than 1."
}
],
"deployment": "",
"dagTemplate": "opensearch_hot_train"
}
}
}
Examples
Sample success responses
JSON
format
{
"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
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|