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

Note During the restart process, the instance is in 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 only uses common request headers. For more information, see the Common request parameters topic.

Request syntax

POST /openapi/instances/[InstanceId]/actions/restart HTTP/1.1

Request parameters

Parameter Type Required Example Description
InstanceId String Yes es-cn-xxxx

The ID of the instance.

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

A unique token generated by the client to guarantee the idempotency of the request. The maximum length of the token is 64 ASCII characters.

force Boolean No false

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

Response parameters

Parameter Type Example Description
RequestId String F99407AB-2FA9-489E-A259-40CF6DCC****

The ID of the request.

Examples

Sample requests

POST /openapi/instances/es-cn-abc/actions/restart? force=true&clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF****

Sample success responses

XML format

<Result>
    <instanceId>es-cn-abc</instanceId>
    <domain>es-cn-abc.elasticsearch.aliyuncs.com</domain>
    <description>es-cn-abc</description>
    <nodeAmount>2</nodeAmount>
    <paymentType>prepaid</paymentType>
    <paymentInfo>
        <duration>1</duration>
        <pricingCycle>Month</pricingCycle>
        <isAutoRenew>false</isAutoRenew>
        <autoRenewDuration>0</autoRenewDuration>
    </paymentInfo>
    <status>active</status>
    <port>9200</port>
    <esVersion>5.5.3_with_X-Pack</esVersion>
    <esConfig>
        <action.destructive_requires_name>true</action.destructive_requires_name>
        <xpack.security.audit.outputs>logfile</xpack.security.audit.outputs>
        <xpack.watcher.enabled>false</xpack.watcher.enabled>
        <action.auto_create_index>true</action.auto_create_index>
    </esConfig>
    <kibanaDomain>es-cn-abc.kibana.elasticsearch.aliyuncs.com</kibanaDomain>
    <publicDomain/>
    <enablePublic>false</enablePublic>
    <nodeSpec>
        <spec>elasticsearch.sn1ne.large</spec>
        <disk>20</disk>
    </nodeSpec>
    <networkConfig>
        <vpcId>vpc-abc</vpcId>
        <vswitchId>vsw-abc</vswitchId>
        <vsArea>cn-hangzhou-b</vsArea>
        <type>vpc</type>
    </networkConfig>
    <createdAt>2018-06-22T07:57:36.975Z</createdAt>
    <updatedAt>2018-06-22T07:57:36.975Z</updatedAt>
    <inited>true</inited>
    <dedicateMaster>false</dedicateMaster>
    <commodityCode>elasticsearchpre</commodityCode>
    <endTime>1532275200000</endTime>
</Result>
<RequestId>F99407AB-2FA9-489E-A259-40CF6DCC****</RequestId>

JSON format

{
	"Result":{
		"port":9200,
		"nodeAmount":2,
		"kibanaIPWhitelist":[],
		"esVersion":"5.5.3_with_X-Pack",
		"enablePublic":false,
		"endTime":1532275200000,
		"nodeSpec":{
			"spec":"elasticsearch.sn1ne.large",
			"disk":20
		},
		"inited":true,
		"description":"es-cn-abc",
		"kibanaDomain":"es-cn-abc.kibana.elasticsearch.aliyuncs.com",
		"createdAt":"2018-06-22T07:57:36.975Z",
		"dictList":[],
		"domain":"es-cn-abc.elasticsearch.aliyuncs.com",
		"dedicateMaster":false,
		"publicIpWhitelist":[],
		"esConfig":{
			"xpack.watcher.enabled":"false",
			"action.destructive_requires_name":"true",
			"xpack.security.audit.outputs":"logfile",
			"action.auto_create_index":"true"
		},
		"status":"active",
		"paymentType":"prepaid",
		"instanceId":"es-cn-abc",
		"esIPWhitelist":[],
		"updatedAt":"2018-06-22T07:57:36.975Z",
		"paymentInfo":{
			"duration":1,
			"isAutoRenew":false,
			"autoRenewDuration":0,
			"pricingCycle":"Month"
		},
		"esIPBlacklist":[],
		"networkConfig":{
			"vpcId":"vpc-abc",
			"vswitchId":"vsw-abc",
			"vsArea":"cn-hangzhou-b",
			"type":"vpc"
		},
		"commodityCode":"elasticsearchpre"
	},
	"RequestId":"F99407AB-2FA9-489E-A259-40CF6DCC****"
}

Error codes

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