Call the EstimatedLogstashRestartTime to obtain the estimated time period during which the Logstash instance can be restarted.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. You can use OpenAPI Explorer to search for API operations, call API operations, and dynamically generate SDK sample code.

Request header

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

Request syntax

POST /openapi/logstashes/[InstanceId]/estimated-time/restart-time HTTPS|HTTP

Request parameters

Parameter Type Required Example Description
InstanceId String Yes ls-cn-oew1qbgl****

The ID of the instance.

force Boolean No false

Indicates whether the restart is forced. Default value: false.

RequestBody

You can also enter the following parameters in RequestBody to specify the restart parameters.

Parameter

Type

Required

Example

Description

restartType

String

No

instance

The restart type. Valid values: instance (restart instance. default) and nodeIp (restart node).

nodes

List<String\>

No

["127.0.xx.xx"]

Select the IP address list of the target node when the node restarts.

blueGreenDep

Boolean

No

false

Specifies whether to perform the blue-green change when the node is restarted. Default value: false.

batch

Integer

No

25.0

The concurrency of the forced instance restart. Default value: 1 /the total number of nodes.

batchUnit

String

No

percent

batch unit. Default value: percent.

  • The blueGreenDep parameter is ignored when restartType is set to instance.
    • force is set to true. The value of batch must be greater than 0, and smaller than or equal to 100. Otherwise, the system will prompt a RestartBatchValueError error.
    • The value of force is false. The default value of batch is 0. When another value is entered, NormalRestartNotSupportBatch error is reported.
  • When restartType is set to nodeIp, the batch parameter is ignored.
    • If nodeIp is empty, the system prompts a Parameter error.
    • If blueGreenDep is set to true, a blue-green change restart is performed. If blueGreenDep is set to false, a normal restart is performed.

Sample code:

{
    "restartType":"nodeIp",
    "nodes": ["172.16.xx.xx"],
    "blueGreenDep":true
}

Response parameters

Parameter Type Example Description
RequestId String 5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D***

The ID of the request.

Result Struct

The return results.

unit String second

The unit.

value Long 600

Estimated restart time.

Examples

Sample requests

POST /openapi/logstashes/ls-cn-oew1qbgl****/estimated-time/restart-time/restart-time?force=true HTTP/1.1
common request headers

Sample success responses

JSON Syntax

{
    "Result": {
        "unit": "second",
        "value": 600
    },
    "RequestId": "623E4A4C-199E-4A71-8096-842831A4****"
}

Error codes

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