All Products
Search
Document Center

OpenSearch:GetInstance

Last Updated:Oct 16, 2024

Queries the details of an instance based on the instance ID.

Operation description

Method

GET

URI

/openapi/ha3/instances/{instanceId}

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

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.
OperationAccess levelResource typeCondition keyAssociated operation
searchengine:GetInstanceget
  • Instance
    acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}
    none
none

Request syntax

GET /openapi/ha3/instances/{instanceId} HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
instanceIdstringYes

The instance ID.

ha-cn-7pp2pcna701

Sample requests

GET /openapi/ha3/instances/ha3-cn-xxxxxx

Response parameters

ParameterTypeDescriptionExample
object

Schema of Response

resultobject

Response parameters

descriptionstring

The description of the instance.

ha3_test
resourceGroupIdstring

The ID of the resource group.

rg-aekzjvw24el5lma
expiredTimestring

The time when the instance expires.

1634609702
commodityCodestring

The commodity code of the instance.

commodityCode
instanceIdstring

The instance ID.

ha-cn-7mz2qsgq301
createTimestring

The time when the instance was created.

2022-06-17T02:01:26Z
lockModestring

The lock status.

Unlock
chargeTypestring

The billing method.

POSYPAY
updateTimestring

The time when the instance was updated.

1634609702
inDebtboolean

Indicates whether an overdue payment is involved.

false
statusstring

The status of the instance. Valid values:

  • INIT: being initialized
  • WAIT_CONFIG: to be configured
  • CONFIG_UPDATING: configuration taking effect
  • READY: normal
INIT
tagsarray<object>

The tags of the instance.

tagsobject
keystring

The tag key.

env
valuestring

The tag value.

prod
editionstring

The edition of the instance. Valid values: vector and engine.

vector
userNamestring

The username.

admin
versionstring

The version of the engine.

ha3_3.10.0
noQrsboolean

Specifies whether the instance has only one node.

false
newModeboolean

Specifies whether the instance is of the new version.

true
networkobject

The network information of the instance.

vSwitchIdstring

The vSwitch ID.

vsw-bp11ldcf59q2n****
vpcIdstring

The VPC ID.

vpc-wz9axk41d9vff****
endpointstring

The instance endpoint.

ha-cn-35t3r****.ha.aliyuncs.com
publicEndpointstring

The public endpoint.

ha-cn-35t3ni****.public.ha.aliyuncs.com
allowstring

The public domain name whitelist.

127.0.0.1
specobject

The node specifications.

qrsResourceobject

The QRS worker specifications.

categorystring

The category. Valid values: local_ssd, SSD, and cloud.

local_ssd
cpuinteger

The number of vCPUs.

2
meminteger

The memory of the instance. Unit: GB.

10
diskinteger

The storage capacity. Unit: GB.

100
nodeCountinteger

The number of nodes.

1
searchResourceobject

The searcher worker specifications.

categorystring

The category. Valid values: local_ssd, SSD, and cloud.

local_ssd
cpuinteger

The number of vCPUs.

2
meminteger

The memory of the instance. Unit: GB.

10
diskinteger

The storage capacity. Unit: GB.

100
nodeCountinteger

The number of nodes.

1
requestIdstring

The request ID.

E7B7D598-B080-5C8E-AA35-D43EC0D5F886

Sample responses

Sample success response

{
    "result":
    {
        "inDebt": false,
        "lockMode": "Unlock",
        "trFreeUrl": "",
        "chargeType": "POSTPAY",
        "edition": "vector",
        "description": "ha-cn-vkl3rgrfc01",
        "updateTime": "2024-05-30 10:52:00.0",
        "userName": "admin",
        "version": "vector_service_1.2.2",
        "spec":
        {
            "qrsResource":
            {
                "category": "local_ssd",
                "cpu": 2,
                "mem": 8,
                "disk": 100,
                "nodeCount": 0
            },
            "searchResource":
            {
                "category": "local_ssd",
                "cpu": 2,
                "mem": 16,
                "disk": 100,
                "nodeCount": 1
            }
        },
        "network":
        {
            "vSwitchId": "vsw-bp16qw5mbrzx66lv4n0m2",
            "vpcId": "vpc-bp1956duqqe2lm2lvqjf1",
            "endpoint": "ha-cn-vkl3rgrfc01.ha.aliyuncs.com"
        },
        "tags":
        [
            {
                "value": "rg-acfmv2hk2jpsxia",
                "key": "acs:rm:rgId"
            }
        ],
        "noQrs": true,
        "instanceId": "ha-cn-vkl3rgrfc01",
        "createTime": "2024-05-30 10:50:33.0",
        "commodityCode": "opensearch_ha3post_public_cn",
        "resourceGroupId": "rg-acfmv2hk2jpsxia",
        "newMode": true,
        "status": "READY"
    },
    "requestId": "B916FBC8-DF19-1D12-A72F-61AFFDD871AD"
}

Sample error response

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

Examples

Sample success responses

JSONformat

{
  "result": {
    "description": "ha3_test",
    "resourceGroupId": "rg-aekzjvw24el5lma",
    "expiredTime": "1634609702",
    "commodityCode": "commodityCode",
    "instanceId": "ha-cn-7mz2qsgq301",
    "createTime": "2022-06-17T02:01:26Z",
    "lockMode": "Unlock",
    "chargeType": "POSYPAY",
    "updateTime": "1634609702",
    "inDebt": false,
    "status": "INIT",
    "tags": [
      {
        "key": "env",
        "value": "prod"
      }
    ],
    "edition": "vector",
    "userName": "admin",
    "version": "ha3_3.10.0",
    "noQrs": false,
    "newMode": true,
    "network": {
      "vSwitchId": "vsw-bp11ldcf59q2n****\n",
      "vpcId": "vpc-wz9axk41d9vff****\n",
      "endpoint": "ha-cn-35t3r****.ha.aliyuncs.com\n",
      "publicEndpoint": "ha-cn-35t3ni****.public.ha.aliyuncs.com\n",
      "allow": "127.0.0.1\n"
    },
    "spec": {
      "qrsResource": {
        "category": "local_ssd",
        "cpu": 2,
        "mem": 10,
        "disk": 100,
        "nodeCount": 1
      },
      "searchResource": {
        "category": "local_ssd",
        "cpu": 2,
        "mem": 10,
        "disk": 100,
        "nodeCount": 1
      }
    }
  },
  "requestId": "E7B7D598-B080-5C8E-AA35-D43EC0D5F886"
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-07-17The response structure of the API has changedView Change Details
2022-01-12Add OperationView Change Details