All Products
Search
Document Center

OpenSearch:GetFunctionInstance

Last Updated:Mar 26, 2026

Query an algorithm instance by instance name.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

opensearch:DescribeFunction

get

*FunctionInstance

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

None None

Request syntax

GET /v4/openapi/app-groups/{appGroupIdentity}/functions/{functionName}/instances/{instanceName} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

appGroupIdentity

string

Yes

The name of the application.

150057101

functionName

string

Yes

The name of the feature.

ctr

instanceName

string

Yes

The name of the instance.

ctr_test

Request parameters

Parameter

Type

Required

Description

Example

output

string

No

Specifies the richness of returned information. Valid values:

  • simple: displays only the basic information.

  • normal: displays information such as createParameters and cron. This is the default value.

  • detail: returns the details of the training task.

detail

Sample requests

GET /v4/openapi/app-groups/my-app/functions/ctr/instances/ctr_test?output=detail

Response elements

Element

Type

Description

Example

object

The response body.

{}

Status

string

The status of the request.

OK

HttpCode

integer

The HTTP status code.

200

RequestId

string

The ID of the request.

68ED4E1B-92B8-5821-A886-9C90686139EB

Message

string

The error message.

instance not exist.

Code

string

The error code. If no error occurs, this parameter is left empty.

Instance.NotExist

Result

object

The details of the instance.

{}

Belongs

object

The information about the instance.

Category

string

The category.

general

Domain

string

The industry.

ecommerce

Language

string

The abbreviation of the language that applies.

zh(Default)

CreateParameters

array<object>

The parameters that are used to create the instance.

object

The parameter body.

Name

string

The name of the parameter.

param1

Value

string

The value of the parameter.

value1

UsageParameters

array<object>

The parameters that are used.

object

The parameter body.

Name

string

The name of the parameter.

use_param1

Value

string

The value of the parameter.

value1

CreateTime

integer

The time when the task was created. Unit: milliseconds.

1234

Cron

string

The cron expression used to schedule training, in the format of (Minutes Hours DayofMonth Month DayofWeek). If the value is empty, it indicates that no periodic training is performed.

0 3 ? * 0,1,3,5 (Sunday,Monday,Wednesday,Friday early morning3point)

Description

string

The description of the instance.

instance descriptions

ExtendInfo

string

The extended information, which is a JSON string.

{\"dataReport\":{},\"errors\":{}}

FunctionName

string

The name of the feature.

ctr

FunctionType

string

The type of the feature.

PAAS

InstanceName

string

The name of the instance.

ctr_test

ModelType

string

The type of the model.

tf_checkpoint

Source

string

How the instance is created. Valid values:

  • user: The instance is created by user.

  • builtin: The instance is created by the system.

user

Status

string

The status of the instance. Valid values:

  1. unavailable: No model is available. Models must be trained before you can use them.

  2. available: Models can be used.

available

Task

object

The information about the training task. This parameter is not displayed if no task is available.

DagStatus

string

The status of the task. Valid values:

  • success: succeeded

  • failed: failed

  • untrained: to be trained

  • pending: being scheduled

  • running: being trained

success

LastRunTime

integer

The time consumed for the most recent run, in milliseconds.

1234

VersionId

integer

The ID of the version.

101

Latency

integer

The time consumed for the request, in milliseconds.

123

Sample success responses

{
    "status": "OK",
    "requestId": "",
    "httpCode": 200,
    "code": "",
    "message": "",
    "latency": 123,
    "result": {
        "versionId": 100,
        "instanceName": "ctr_test",
        "functionName": "ctr",
        "functionType": "PAAS",
        "modelType": "tf_checkpoint",
        "Description": "test",
        "status": "available",
        "belongs": {
            "domain": "ecommerce",
            "category": "general",
            "language": "zh"
        },
        "createTime": 100010,
        "createParameters": [
            {
                "name": "param1",
                "value": "val1"
            }
        ],
        "usageParameters": [
            {
                "name": "use_param1",
                "value": "val1"
            }
        ],
        "extendInfo": "{\"error\":{},\"dataReport\":{}}",
        "cron": "",
        "task": {
            "dagStatus": "running",
            "progress": 30,
            "lastRunTime": 200020
        }
    }
}

Examples

Success response

JSON format

{
  "Status": "OK",
  "HttpCode": 200,
  "RequestId": "68ED4E1B-92B8-5821-A886-9C90686139EB",
  "Message": "instance not exist.",
  "Code": "Instance.NotExist",
  "Result": {
    "Belongs": {
      "Category": "general",
      "Domain": "ecommerce",
      "Language": "zh(Default)"
    },
    "CreateParameters": [
      {
        "Name": "param1",
        "Value": "value1"
      }
    ],
    "UsageParameters": [
      {
        "Name": "use_param1",
        "Value": "value1"
      }
    ],
    "CreateTime": 1234,
    "Cron": "0 3 ? * 0,1,3,5 (Sunday,Monday,Wednesday,Friday early morning3point)",
    "Description": "instance descriptions",
    "ExtendInfo": "{\\\"dataReport\\\":{},\\\"errors\\\":{}}",
    "FunctionName": "ctr",
    "FunctionType": "PAAS",
    "InstanceName": "ctr_test",
    "ModelType": "tf_checkpoint",
    "Source": "user",
    "Status": "available",
    "Task": {
      "DagStatus": "success",
      "LastRunTime": 1234
    },
    "VersionId": 101
  },
  "Latency": 123
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.