All Products
Search
Document Center

OpenSearch:ListInstances

Last Updated:Jul 16, 2024

Queries a list of instances.

Operation description

Method

GET

URI

/openapi/ha3/instances

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request syntax

GET /openapi/ha3/instances

Request parameters

ParameterTypeRequiredDescriptionExample
pageNumberintegerNo

The number of the page to return. Default value: 1.

1
pageSizeintegerNo

The number of entries to return on each page. Valid values: 1 to 50. Default value: 10.

10
instanceIdstringNo

The instance ID.

ha-cn-83570439y0n
descriptionstringNo

The description of the instance. You can use this description to filter instances. Fuzzy match is supported.

Havenask instance
resourceGroupIdstringNo

The ID of the resource group to which the instance belongs.

rg-aekzgpiswzbksdi
editionstringNo

The instance type. Valid values: vector: OpenSearch Vector Search Edition instance. engine: OpenSearch Retrieval Engine Edition instance.

vector
tagsarray<object>No

The tags of the instance.

objectNo
keystringNo

The tag key.

backup
valuestringNo

The tag value.

oboms-disk
ParameterTypeRequiredDescription
statusStringNoThe status of the instance. You can filter instances by status. Valid values: Running, Ready, Initializing,Starting
expiredTimeLongNoThe time when the instance expires. The value of this parameter must be accurate to the second. Only instances whose expiration time is greater than the value of this parameter will be returned. The instances that have already expired will not be returned.

Example

Sample requests

GET /openapi/ha3/instances?name=test&#x26;instanceId=abc&#x26;page=1&#x26;size=10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

resultarray<object>

The results returned.

object

InstanceItemType

descriptionstring

The description of the instance.

Emergency test
resourceGroupIdstring

The ID of the resource group.

rg-aekzgpiswzbksdi
expiredTimestring

The time when the instance expires.

1634885083
commodityCodestring

The commodity code of the instance.

""
statusstring

The instance status.

2
instanceIdstring

The instance ID.

ha-cn-2r42n8oh001
createTimestring

The time when the instance was created.

2022-06-04T02:03:21Z
lockModestring

The lock state of the instance.

Unlock
chargeTypestring

The billing method.

PrePaid
updateTimestring

The time when the instance was updated.

2018-12-06T11:17:49.0
inDebtboolean

Indicates whether an overdue payment is involved.

false
networkobject

The network information of the instance.

vSwitchIdstring

The vSwitch ID.

vsw-bp11ldcf59q2nbwkqgj6z
vpcIdstring

The ID of the virtual private cloud (VPC) in which the instance is deployed.

vpc-wz9axk41d9vffoc79x0oe
endpointstring

The instance endpoint.

""
tagsarray<object>

The tags of the instance.

object
keystring

The tag key.

env
valuestring

The tag value.

oboms-disk
totalCountinteger

The total number of entries returned

5
requestIdstring

The ID of the request

89B968E6-1E41-58DF-BB25-5F98ECC759CE

Sample responses

Sample success responses

{
    "requestId": "90D6B8F5-FE97-4509-9AAB-367836C51818",
    "result": [
        {
            "instanceId": "igraph-cn-xxxxxx1",
            "spec": {
                "password": "passwd",
                "searchResource": {
                    "disk": 50,
                    "mem": 8,
                    "cpu": 2,
                    "nodeCount": 2
                },
                "instanceName": "testInstance",
                "vSwitchId": "vswitch_id_xxx",
                "vpcId": "vpc_id_xxx",
                "qrsResource": {
                    "disk": 50,
                    "mem": 8,
                    "cpu": 2,
                    "nodeCount": 2
                },
                "region": "cn-hangzhou",
                "userName": "user"
            },
            "status": {
                "phase": "PENDING",
                "instancePhase": "INIT",
                "createSuccess": false
            }
        },
        {
            "instanceId": "igraph-cn-xxxxxx2",
            "spec": {
                "password": "passwd",
                "searchResource": {
                    "disk": 50,
                    "mem": 8,
                    "cpu": 2,
                    "nodeCount": 2
                },
                "instanceName": "testInstance",
                "vSwitchId": "vswitch_id_xxx",
                "vpcId": "vpc_id_xxx",
                "qrsResource": {
                    "disk": 50,
                    "mem": 8,
                    "cpu": 2,
                    "nodeCount": 2
                },
                "region": "cn-hangzhou",
                "userName": "user"
            },
            "status": {
                "phase": "PENDING",
                "instancePhase": "INIT",
                "createSuccess": false
            }
        }
    ],
    "totalCount": 20
}

Sample error responses

{
  "requestId": "BD1EA715-DF6F-06C2-004C-C1FA0D3A9820",
  "httpCode": 404,
  "code": "App.NotFound",
  "message": "App not found"
}

Examples

Sample success responses

JSONformat

{
  "result": [
    {
      "description": "Emergency test\n",
      "resourceGroupId": "rg-aekzgpiswzbksdi",
      "expiredTime": "1634885083",
      "commodityCode": "\"\"",
      "status": "2",
      "instanceId": "ha-cn-2r42n8oh001",
      "createTime": "2022-06-04T02:03:21Z",
      "lockMode": "Unlock",
      "chargeType": "PrePaid",
      "updateTime": "2018-12-06T11:17:49.0",
      "inDebt": false,
      "network": {
        "vSwitchId": "vsw-bp11ldcf59q2nbwkqgj6z",
        "vpcId": "vpc-wz9axk41d9vffoc79x0oe",
        "endpoint": "\"\""
      },
      "tags": [
        {
          "key": "env",
          "value": "oboms-disk"
        }
      ]
    }
  ],
  "totalCount": 5,
  "requestId": "89B968E6-1E41-58DF-BB25-5F98ECC759CE"
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2024-06-28The internal configuration of the API is changed, but the call is not affectedView Change Details
2022-01-12Add OperationView Change Details