Restarts a specified Logstash cluster. After the cluster is restarted, it is in the activating state.

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 headers

This operation uses only common request headers. For more information, see Common request headers.

Request syntax

POST /openapi/logstashes/{InstanceId}/actions/restart HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
InstanceId String Path Yes ls-cn-v0h1kzca****

The ID of the instance.

force Boolean Query No true

Whether to forcibly restart:

  • true: mandatory,
  • false (default): does not force
clientToken String Query No 5A2CFF0E-5718-45B5-9D4D-70B3FF****

The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, 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.

Object Body No

The body of the request.

batchCount double Body No 20%

The concurrency of a forced restart. During a blue-green restart, a forced restart cannot be performed and no setting is required.

restartType String Body No instance

The restart type. Valid values:

  • instance: restarts the instance
  • nodeIp: restarts the node
nodes Array of String Body No ["192.168.1.1"]

The IP address list of the node to be restarted, in JSON array format.

nodeTypes Array of String Body No kibana

The type of the role node to restart. This parameter is not supported.

blueGreenDep Boolean Body No false

Specifies whether to perform a blue-green restart. Default value: false.

Response parameters

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

The ID of the request.

Result Logstash

The details of the current instance.

The returned data also includes the Result parameter. For more information about the parameters, see ListLogstash.

Examples

Sample requests

POST /openapi/logstashes/ls-cn-v0h1kzca****/actions/restart?force=true&clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

{
  "restartType" : "instance"
}

Sample responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "Result" : {
    "instanceId" : "ls-cn-v0h1kzca****",
    "version" : "7.4.0_with_X-Pack",
    "description" : "es-74-keepit",
    "nodeAmount" : 1,
    "paymentType" : "prepaid",
    "status" : "active",
    "enablePublic" : false,
    "nodeSpec" : {
      "spec" : "elasticsearch.sn1ne.large",
      "disk" : 20,
      "diskType" : "cloud_ssd"
    },
    "networkConfig" : {
      "vpcId" : "vpc-bp12nu14urf0upaf4****",
      "vswitchId" : "vsw-bp131d5ag0vjd5ja3****",
      "vsArea" : "cn-hangzhou-h",
      "type" : "vpc"
    },
    "createdAt" : "2020-03-26T09:23:06.575Z",
    "updatedAt" : "2020-05-12T11:06:14.132Z",
    "commodityCode" : "elasticsearch_logstash_pre",
    "extendConfigs" : [ ],
    "endTime" : 1619884800000,
    "clusterTasks" : [ ],
    "resourceGroupId" : "rg-acfm2h5vbzd****",
    "zoneCount" : 1,
    "protocol" : "HTTP",
    "zoneInfos" : [ {
      "zoneId" : "cn-hangzhou-h",
      "status" : "NORMAL"
    } ],
    "instanceType" : "logstash",
    "inited" : true,
    "tags" : [ ],
    "config" : {
      "slowlog.threshold.warn" : "2s",
      "slowlog.threshold.info" : "1s",
      "slowlog.threshold.debug" : "500ms",
      "slowlog.threshold.trace" : "100ms"
    },
    "endpointList" : [ {
      "host" : "10.7.**.**",
      "port" : 9600,
      "zoneId" : "cn-hangzhou-h"
    } ]
  },
  "RequestId" : "831AD23B-175F-47F1-8314-AFBB9947****"
}

Error codes

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