Call the UpdateLogstash to modify some information about a specified instance, such as the number of nodes, quota, name, and disk size.

When you call this operation, take note of the following items:

You cannot modify instance information when the instance is in the activating, invalid, or inactive state.

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

PATCH|PUT /openapi/logstashes/[InstanceId] HTTPS|HTTP  

Request parameters

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

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 value of this parameter is generated by the client and is unique among different requests. The maximum length is 64 ASCII characters.

RequestBody

The configuration to be modified must be specified in RequestBody, as shown in the following example.

{
  "nodeSpec": {
      "disk": 40
    }
}

Response parameters

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

The ID of the request.

Result Boolean true

The returned results.

The Result also contains the following parameters.

Parameter

Type

Example

Description

instanceId

String

ls-cn-n6w1o5jq****

The ID of the instance.

description

String

test

The name of the instance.

nodeAmount

Integer

2

The number of data nodes.

paymentType

String

postpaid

The billing method of the instance. Supported: prepaid (subscription) and postpaid (pay-as-you-go).

status

String

active

The status of the instance. Valid values: normal (active), effective (activating), frozen (inactive), and invalid (invalid).

version

String

6.7.0_with_X-Pack

The version of the instance.

createdAt

String

2018-07-13T03:58:07.253Z

The time when the instance was created.

updatedAt

String

2018-07-18T10:10:04.484Z

The time when the instance was last updated.

nodeSpec

The configuration of the node.

└spec

String

logstash.sn2ne.xlarge

The specification of the node.

└disk

Integer

40

The hard disk size of the node.

networkConfig

The network configuration.

└type

String

vpc

The type of the network. Currently, only Virtual Private Cloud (VPC) is supported.

└vpcId

String

vpc-bp16k1dvzxtmagcva****

The ID of the VPC.

└vswitchId

String

vsw-bp1k4ec6s7sjdbudw****

The ID of the vSwitch.

vsArea

String

cn-hangzhou-a

The zone where the cluster resides.

Note └ indicates a sub-parameter. For more information about the parameter description, see ListLogstash.

Examples

Sample requests

PATCH /openapi/logstashes/ls-cn-n6w1o5jq**** HTTP/1.1
common request header
{
  "nodeSpec": {
      "disk": 40
    }
}

Sample success responses

JSON Syntax

{
    "Result": {
        "instanceId": "ls-cn-n6w1o5jq****",
        "version": "6.7.0_with_X-Pack",
        "description": "test",
        "nodeAmount": 1,
        "paymentType": "postpaid",
        "status": "active",
        "enablePublic": false,
        "nodeSpec": {
            "spec": "elasticsearch.sn1ne.large",
            "disk": 40,
            "diskType": "cloud_ssd"
        },
        "networkConfig": {
            "vpcId": "vpc-bp16k1dvzxtmagcva****",
            "vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
            "vsArea": "cn-hangzhou-i",
            "type": "vpc"
        },
        "createdAt": "2020-05-27T01:30:15.947Z",
        "updatedAt": "2020-05-27T01:40:51.333Z",
        "commodityCode": "elasticsearch_logstash_post",
        "extendConfigs": [],
        "endTime": 4746268800000,
        "clusterTasks": [],
        "resourceGroupId": "rg-acfm2h5vbzd****",
        "zoneCount": 1,
        "protocol": "HTTP",
        "zoneInfos": [
            {
                "zoneId": "cn-hangzhou-i",
                "status": "NORMAL"
            }
        ],
        "instanceType": "logstash",
        "inited": true,
        "tags": [],
        "config": {
            "xpack.monitoring.elasticsearch.username": "elastic",
            "xpack.monitoring.enabled": "true",
            "slowlog.threshold.debug": "500ms",
            "xpack.monitoring.elasticsearch.password": "Elasti****",
            "xpack.monitoring.elasticsearch.hosts": "[\"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200\"]",
            "slowlog.threshold.warn": "2s",
            "slowlog.threshold.info": "1s",
            "slowlog.threshold.trace": "100ms"
        },
        "endpointList": [
            {
                "host": "172.16.**.**",
                "port": 9600,
                "zoneId": "cn-hangzhou-i"
            }
        ]
    },
    "RequestId": "FBD56B2B-367F-470D-90D0-C3120832****"
}

Error codes

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