Installs a plug-in.

Before you call this operation, note that:

The plug-ins to be installed must be included in the System Default Plug-ins list of Alibaba Cloud Logstash. External open-source plug-ins are not supported.

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

The GetLogs operation does not have operation-specific request headers and uses only common request headers. For more information, see the "Common request headers" section in the "Common HTTP headers" topic in API Reference.

Request syntax

POST /openapi/logstashes/{InstanceId}/plugins/system/actions/install HTTP/1.1

Request parameters

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

The ID of the instance.

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 make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

RequestBody

In the RequestBody, you must also enter the name of the plug-in to be installed in the ["pluginName1","pluginName2",.."pluginNamen"] format. Example:


[
    "logstash-input-datahub",
    "logstash-input-maxcompute"
]

Response parameters

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

The ID of the request.

Result Array of String ["logstash-input-datahub", "logstash-input-maxcompute"]

The list of successfully installed plug-ins.

The returned data also contains Headers parameters, indicating that header information is returned.

Examples

Sample requests

POST /openapi/logstashes/ls-cn-oew1qbgl****/plugins/system/actions/install?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json
[
    "logstash-input-datahub",
    "logstash-input-maxcompute"
]

Sample success responses

JSON format

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

{
  "Result" : [ "logstash-input-datahub", "logstash-input-maxcompute" ],
  "RequestId" : "93DE9165-49A9-455E-AD7E-64B6694F****",
  "Headers" : { }
}

Error codes

HttpCode Error code Error message Description
400 InstanceActivating Instance is activating. The instance is currently in effect.
400 InstanceNotFound The instanceId provided does not exist. The error message returned because the instance cannot be found. Check the instance status.

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