You can call this operation to restart a specified Elasticsearch instance.

Note After the instance is restarted, the instance enters the activating state. After the instance is restarted, its status changes to active.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request header

This operation uses the common request header only. For more information, see Common parameters.

Request syntax

POST /openapi/instances/[InstanceId]/actions/restart HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-nif1q8auz0003****

The ID of the instance.

force Boolean No false

Specifies whether to ignore the status of the instance and forcibly restart the instance.

clientToken String No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

A unique token generated by the client to guarantee the idempotency of the request. You can use the client to generate a token, but you must ensure that it is unique among different requests. The token can only contain ASCII characters and cannot exceed 64 characters in length.

Response parameters

Parameter Type Sample response Description
RequestId String F99407AB-2FA9-489E-A259-40CF6DC****

The ID of the request.

The returned data also includes the Result parameter. For more information, see ListInstance.

Examples

Sample requests

POST /openapi/instances/[InstanceId]/actions/restart HTTP/1.1
Common request headers
{
"InstanceId": "es-cn-nif1q8auz0003****"
}

Sample success responses

XML format

<Result>
    <instanceId>es-cn-nif1q8auz0003****</instanceId>
    <version>7.4.0_with_X-Pack</version>
    <description>es-cn-nif1q8auz0003****</description>
    <nodeAmount>3</nodeAmount>
    <paymentType>prepaid</paymentType>
    <status>active</status>
    <privateNetworkIpWhiteList>0.0.0.0/0</privateNetworkIpWhiteList>
    <enablePublic>false</enablePublic>
    <nodeSpec>
        <spec>elasticsearch.n4.small</spec>
        <disk>20</disk>
        <diskType>cloud_ssd</diskType>
        <diskEncryption>false</diskEncryption>
    </nodeSpec>
    <networkConfig>
        <vpcId>vpc-bp16k1dvzxtmagcva****</vpcId>
        <vswitchId>vsw-bp1k4ec6s7sjdbudw****</vswitchId>
        <vsArea>cn-hangzhou-i</vsArea>
        <type>vpc</type>
    </networkConfig>
    <createdAt>2020-07-06T10:18:48.662Z</createdAt>
    <updatedAt>2020-07-06T10:18:48.662Z</updatedAt>
    <commodityCode>elasticsearchpre</commodityCode>
    <extendConfigs>
        <configType>usageScenario</configType>
        <value>general</value>
    </extendConfigs>
    <extendConfigs>
        <configType>maintainTime</configType>
        <maintainStartTime>02:00Z</maintainStartTime>
        <maintainEndTime>06:00Z</maintainEndTime>
    </extendConfigs>
    <endTime>1596729600000</endTime>
    <vpcInstanceId>es-cn-nif1q8auz0003****-worker</vpcInstanceId>
    <resourceGroupId>rg-acfm2h5vbzd****</resourceGroupId>
    <zoneCount>1</zoneCount>
    <protocol>HTTP</protocol>
    <zoneInfos>
        <zoneId>cn-hangzhou-i</zoneId>
        <status>NORMAL</status>
    </zoneInfos>
    <instanceType>elasticsearch</instanceType>
    <inited>true</inited>
    <domain>es-cn-nif1q8auz0003****.elasticsearch.aliyuncs.com</domain>
    <port>9200</port>
    <esVersion>7.4.0_with_X-Pack</esVersion>
    <esConfig>
        <action.destructive_requires_name>true</action.destructive_requires_name>
        <xpack.watcher.enabled>false</xpack.watcher.enabled>
        <action.auto_create_index>+.*,-*</action.auto_create_index>
    </esConfig>
    <esIPWhitelist>0.0.0.0/0</esIPWhitelist>
    <kibanaIPWhitelist>0.0.0.0/0</kibanaIPWhitelist>
    <kibanaIPWhitelist>::/0</kibanaIPWhitelist>
    <kibanaDomain>es-cn-nif1q8auz0003****.kibana.elasticsearch.aliyuncs.com</kibanaDomain>
    <kibanaPort>5601</kibanaPort>
    <haveKibana>true</haveKibana>
    <instanceCategory>x-pack</instanceCategory>
    <dedicateMaster>false</dedicateMaster>
    <advancedDedicateMaster>false</advancedDedicateMaster>
    <masterConfiguration/>
    <haveClientNode>false</haveClientNode>
    <warmNode>false</warmNode>
    <warmNodeConfiguration/>
    <clientNodeConfiguration/>
    <kibanaConfiguration>
        <spec>elasticsearch.n4.small</spec>
        <amount>1</amount>
        <disk>0</disk>
    </kibanaConfiguration>
    <dictList>
        <name>SYSTEM_MAIN.dic</name>
        <fileSize>2782602</fileSize>
        <sourceType>ORIGIN</sourceType>
        <type>MAIN</type>
    </dictList>
    <dictList>
        <name>SYSTEM_STOPWORD.dic</name>
        <fileSize>132</fileSize>
        <sourceType>ORIGIN</sourceType>
        <type>STOP</type>
    </dictList>
    <haveGrafana>false</haveGrafana>
    <haveCerebro>false</haveCerebro>
    <enableKibanaPublicNetwork>true</enableKibanaPublicNetwork>
    <enableKibanaPrivateNetwork>false</enableKibanaPrivateNetwork>
    <advancedSetting>
        <gcName>CMS
    </advancedSetting>
</Result>
<RequestId>BB58A51D-CE72-49F9-AF08-F57F3C8A****</RequestId>

JSON format

{
    "Result": {
        "instanceId": "es-cn-nif1q8auz0003****",
        "version": "7.4.0_with_X-Pack",
        "description": "es-cn-nif1q8auz0003****",
        "nodeAmount": 3,
        "paymentType": "prepaid",
        "status": "active",
        "privateNetworkIpWhiteList": [
            "0.0.0.0/0"
        ],
        "enablePublic": false,
        "nodeSpec": {
            "spec": "elasticsearch.n4.small",
            "disk": 20,
            "diskType": "cloud_ssd",
            "diskEncryption": false
        },
        "networkConfig": {
            "vpcId": "vpc-bp16k1dvzxtmagcva****",
            "vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
            "vsArea": "cn-hangzhou-i",
            "type": "vpc"
        },
        "createdAt": "2020-07-06T10:18:48.662Z",
        "updatedAt": "2020-07-06T10:18:48.662Z",
        "commodityCode": "elasticsearchpre",
        "extendConfigs": [
            {
                "configType": "usageScenario",
                "value": "general"
            },
            {
                "configType": "maintainTime",
                "maintainStartTime": "02:00Z",
                "maintainEndTime": "06:00Z"
            }
        ],
        "endTime": 1596729600000,
        "clusterTasks": [],
        "vpcInstanceId": "es-cn-nif1q8auz0003****-worker",
        "resourceGroupId": "rg-acfm2h5vbzd****",
        "zoneCount": 1,
        "protocol": "HTTP",
        "zoneInfos": [
            {
                "zoneId": "cn-hangzhou-i",
                "status": "NORMAL"
            }
        ],
        "instanceType": "elasticsearch",
        "inited": true,
        "tags": [],
        "domain": "es-cn-nif1q8auz0003****.elasticsearch.aliyuncs.com",
        "port": 9200,
        "esVersion": "7.4.0_with_X-Pack",
        "esConfig": {
            "action.destructive_requires_name": "true",
            "xpack.watcher.enabled": "false",
            "action.auto_create_index": "+.*,-*"
        },
        "esIPWhitelist": [
            "0.0.0.0/0"
        ],
        "esIPBlacklist": [],
        "kibanaIPWhitelist": [
            "0.0.0.0/0",
            "::/0"
        ],
        "kibanaPrivateIPWhitelist": [],
        "publicIpWhitelist": [],
        "kibanaDomain": "es-cn-nif1q8auz0003****.kibana.elasticsearch.aliyuncs.com",
        "kibanaPort": 5601,
        "haveKibana": true,
        "instanceCategory": "x-pack",
        "dedicateMaster": false,
        "advancedDedicateMaster": false,
        "masterConfiguration": {},
        "haveClientNode": false,
        "warmNode": false,
        "warmNodeConfiguration": {},
        "clientNodeConfiguration": {},
        "kibanaConfiguration": {
            "spec": "elasticsearch.n4.small",
            "amount": 1,
            "disk": 0
        },
        "dictList": [
            {
                "name": "SYSTEM_MAIN.dic",
                "fileSize": 2782602,
                "sourceType": "ORIGIN",
                "type": "MAIN"
            },
            {
                "name": "SYSTEM_STOPWORD.dic",
                "fileSize": 132,
                "sourceType": "ORIGIN",
                "type": "STOP"
            }
        ],
        "synonymsDicts": [],
        "ikHotDicts": [],
        "aliwsDicts": [],
        "haveGrafana": false,
        "haveCerebro": false,
        "enableKibanaPublicNetwork": true,
        "enableKibanaPrivateNetwork": false,
        "advancedSetting": {
            "gcName": "CMS"
        }
    },
    "RequestId": "BB58A51D-CE72-49F9-AF08-F57F3C8A****"
}

Error codes.

For a list of error codes, visit the API Error Center.