0% found this document useful (0 votes)
15 views

API Reference Intl en-US

This document provides an overview of the Elasticsearch API reference, including documentation conventions, authentication requirements, rate limits, common parameters, and operations for managing Elasticsearch instances like create, list, describe, restart, update, and delete. It also includes a table of contents outlining the sections within the reference document.

Uploaded by

sawengsheng9096
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

API Reference Intl en-US

This document provides an overview of the Elasticsearch API reference, including documentation conventions, authentication requirements, rate limits, common parameters, and operations for managing Elasticsearch instances like create, list, describe, restart, update, and delete. It also includes a table of contents outlining the sections within the reference document.

Uploaded by

sawengsheng9096
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 458

Alibaba Cloud

Alibaba Cloud

Elasticsearch
Elasticsearch
API Reference
API Reference

Document Version: 20220524

Document Version: 20220524


Elast icsearch API Reference· Legal disclaimer

Legal disclaimer
Alibaba Cloud reminds you t o carefully read and fully underst and t he t erms and condit ions of t his legal
disclaimer before you read or use t his document . If you have read or used t his document , it shall be deemed
as your t ot al accept ance of t his legal disclaimer.

1. You shall download and obt ain t his document from t he Alibaba Cloud websit e or ot her Alibaba Cloud-
aut horized channels, and use t his document for your own legal business act ivit ies only. The cont ent of
t his document is considered confident ial informat ion of Alibaba Cloud. You shall st rict ly abide by t he
confident ialit y obligat ions. No part of t his document shall be disclosed or provided t o any t hird part y for
use wit hout t he prior writ t en consent of Alibaba Cloud.

2. No part of t his document shall be excerpt ed, t ranslat ed, reproduced, t ransmit t ed, or disseminat ed by
any organizat ion, company or individual in any form or by any means wit hout t he prior writ t en consent of
Alibaba Cloud.

3. The cont ent of t his document may be changed because of product version upgrade, adjust ment , or
ot her reasons. Alibaba Cloud reserves t he right t o modify t he cont ent of t his document wit hout not ice
and an updat ed version of t his document will be released t hrough Alibaba Cloud-aut horized channels
from t ime t o t ime. You should pay at t ent ion t o t he version changes of t his document as t hey occur and
download and obt ain t he most up-t o-dat e version of t his document from Alibaba Cloud-aut horized
channels.

4. This document serves only as a reference guide for your use of Alibaba Cloud product s and services.
Alibaba Cloud provides t his document based on t he "st at us quo", "being defect ive", and "exist ing
funct ions" of it s product s and services. Alibaba Cloud makes every effort t o provide relevant operat ional
guidance based on exist ing t echnologies. However, Alibaba Cloud hereby makes a clear st at ement t hat
it in no way guarant ees t he accuracy, int egrit y, applicabilit y, and reliabilit y of t he cont ent of t his
document , eit her explicit ly or implicit ly. Alibaba Cloud shall not t ake legal responsibilit y for any errors or
lost profit s incurred by any organizat ion, company, or individual arising from download, use, or t rust in
t his document . Alibaba Cloud shall not , under any circumst ances, t ake responsibilit y for any indirect ,
consequent ial, punit ive, cont ingent , special, or punit ive damages, including lost profit s arising from t he
use or t rust in t his document (even if Alibaba Cloud has been not ified of t he possibilit y of such a loss).

5. By law, all t he cont ent s in Alibaba Cloud document s, including but not limit ed t o pict ures, archit ect ure
design, page layout , and t ext descript ion, are int ellect ual propert y of Alibaba Cloud and/or it s
affiliat es. This int ellect ual propert y includes, but is not limit ed t o, t rademark right s, pat ent right s,
copyright s, and t rade secret s. No part of t his document shall be used, modified, reproduced, publicly
t ransmit t ed, changed, disseminat ed, dist ribut ed, or published wit hout t he prior writ t en consent of
Alibaba Cloud and/or it s affiliat es. The names owned by Alibaba Cloud shall not be used, published, or
reproduced for market ing, advert ising, promot ion, or ot her purposes wit hout t he prior writ t en consent of
Alibaba Cloud. The names owned by Alibaba Cloud include, but are not limit ed t o, "Alibaba Cloud",
"Aliyun", "HiChina", and ot her brands of Alibaba Cloud and/or it s affiliat es, which appear separat ely or in
combinat ion, as well as t he auxiliary signs and pat t erns of t he preceding brands, or anyt hing similar t o
t he company names, t rade names, t rademarks, product or service names, domain names, pat t erns,
logos, marks, signs, or special descript ions t hat t hird part ies ident ify as Alibaba Cloud and/or it s
affiliat es.

6. Please direct ly cont act Alibaba Cloud for any errors of t his document .

> Document Version: 20220524 I


API Reference· Document convent io
Elast icsearch
ns

Document conventions
St yle Descript io n Example

A danger notice indicates a situation that Danger:


Danger will cause major system changes, faults,
Resetting will result in the loss of user
physical injuries, and other adverse
configuration data.
results.

W arning:
A warning notice indicates a situation
W arning that may cause major system changes, Restarting will cause business
faults, physical injuries, and other adverse interruption. About 10 minutes are
results. required to restart an instance.

A caution notice indicates warning No t ice:


No t ice information, supplementary instructions,
If the weight is set to 0, the server no
and other content that the user must
longer receives new requests.
understand.

A note indicates supplemental No t e:


No t e instructions, best practices, tips, and
You can use Ctrl + A to select all files.
other content.

Closing angle brackets are used to Click Set t ings > Net w o rk > Set net w o rk
>
indicate a multi-level menu cascade. t ype .

Bold formatting is used for buttons ,


Bo ld menus, page names, and other UI Click OK .
elements.

Run the cd /d C:/window command to


Courier font Courier font is used for commands
enter the Windows system folder.

bae log list --instanceid


Italic formatting is used for parameters
Italic
and variables.
Instance_ID

T his format is used for an optional value,


[] or [a|b] ipconfig [-all|-t]
where only one item can be selected.

T his format is used for a required value,


{} or {a|b} switch {active|stand}
where only one item can be selected.

> Document Version: 20220524 I


Elast icsearch API Reference· Table of Cont ent s

Table of Contents
1.List of operations by function 10

2.Getting started 19

3.Make API requests 23

4.Request signatures 24

5.QPS limits 28

6.Common parameters 29

7.Elasticsearch instances 31

7.1. Manage clusters 31

7.1.1. createInstance 31

7.1.2. ListInstance 48

7.1.3. DescribeInstance 55

7.1.4. EstimatedRestartTime 65

7.1.5. RestartInstance 68

7.1.6. UpdateInstanceChargeType 77

7.1.7. UpdateDescription 80

7.1.8. DeleteInstance 82

7.1.9. CancelDeletion 86

7.1.10. RenewInstance 88

7.1.11. ActivateZones 90

7.1.12. DeactivateZones 92

7.1.13. DescribeRegions 93

7.1.14. InterruptElasticsearchTask 95

7.1.15. ResumeElasticsearchTask 97

7.1.16. ListAllNode 98

7.1.17. DescribeElasticsearchHealth 102

7.1.18. ListInstanceIndices 103

> Document Version: 20220524 I


API Reference· Table of Cont ent s Elast icsearch

7.1.19. MigrateToOtherZone 108

7.1.20. MoveResourceGroup 111

7.1.21. ModifyInstanceMaintainTime 121

7.1.22. GetRegionConfiguration 124

7.1.23. ListShardRecoveries 132

7.1.24. CapacityPlan 135

7.2. Manage cluster tags 145

7.2.1. ListTags 145

7.2.2. ListTagResources 146

7.2.3. TagResources 149

7.2.4. UntagResources 151

7.3. Migrate Data 153

7.3.1. GetTransferableNodes 153

7.3.2. ValidateTransferableNodes 156

7.3.3. TransferNode 158

7.3.4. ListDataTasks 160

7.3.5. CreateDataTasks 165

7.3.6. GetClusterDataInformation 173

7.3.7. DeleteDataTask 178

7.3.8. CancelTask 179

7.4. Upgrade or downgrade a cluster 181

7.4.1. GetSuggestShrinkableNodes 181

7.4.2. ValidateShrinkNodes 183

7.4.3. ShrinkNode 185

7.4.4. UpgradeEngineVersion 188

7.4.5. UpdateInstance 191

7.5. Configure clusters 204

7.5.1. UpdateInstanceSettings 204

II > Document Version: 20220524


Elast icsearch API Reference· Table of Cont ent s

7.5.2. UpdateHotIkDicts 209

7.5.3. UpdateSynonymsDicts 214

7.5.4. UpdateDict 219

7.5.5. UpdateAliwsDict 223

7.5.6. ListDictInformation 228

7.5.7. UpdateAdvancedSetting 230

7.5.8. ListDicts 232

7.6. Manage plug-ins 234

7.6.1. ListPlugins 234

7.6.2. InstallSystemPlugin 237

7.6.3. UninstallPlugin 238

7.6.4. InstallUserPlugins 240

7.7. Query logs 242

7.7.1. ListSearchLog 242

7.8. Backup data 246

7.8.1. CreateSnapshot 246

7.8.2. DescribeSnapshotSetting 248

7.8.3. UpdateSnapshotSetting 249

7.8.4. ListSnapshotReposByInstanceId 251

7.8.5. ListAlternativeSnapshotRepos 253

7.8.6. AddSnapshotRepo 254

7.8.7. DeleteSnapshotRepo 257

7.9. Intelligent maintenance 259

7.9.1. OpenDiagnosis 259

7.9.2. CloseDiagnosis 260

7.9.3. DiagnoseInstance 262

7.9.4. ListDiagnoseReport 265

7.9.5. ListDiagnoseReportIds 269

> Document Version: 20220524 III


API Reference· Table of Cont ent s Elast icsearch

7.9.6. ListDiagnoseIndices 271

7.9.7. DescribeDiagnoseReport 273

7.9.8. DescribeDiagnosisSettings 277

7.9.9. UpdateDiagnosisSettings 278

8.Kibana 281

8.1. DescribeKibanaSettings 281

8.2. UpdateKibanaSettings 283

8.3. ListKibanaPlugins 284

8.4. InstallKibanaSystemPlugin 286

8.5. UninstallKibanaPlugin 288

8.6. UpdateKibanaWhiteIps 290

9.Logstash 298

9.1. Manage clusters 298

9.1.1. CreateLogstash 298

9.1.2. ListLogstash 303

9.1.3. DescribeLogstash 307

9.1.4. UpdateLogstash 312

9.1.5. RenewLogstash 316

9.1.6. RestartLogstash 318

9.1.7. EstimatedLogstashRestartTime 320

9.1.8. UpdateLogstashDescription 323

9.1.9. UpdateLogstashChargeType 328

9.1.10. DeleteLogstash 331

9.1.11. CancelLogstashDeletion 333

9.2. Configure clusters 335

9.2.1. UpdateLogstashSettings 335

9.2.2. ListExtendfiles 338

9.2.3. UpdateExtendfiles 339

IV > Document Version: 20220524


Elast icsearch API Reference· Table of Cont ent s

9.3. Manage plug-ins 342

9.3.1. ListLogstashPlugins
342
9.3.2. InstallLogstashSystemPlugin 345

9.3.3. UninstallLogstashPlugin 347

9.4. Monitoring cluster 349

9.4.1. ListAvailableEsInstanceIds 349

9.4.2. DescribeXpackMonitorConfig 350

9.4.3. UpdateXpackMonitorConfig 352

9.4.4. ValidateConnection 355

9.5. Query logs 357

9.5.1. ListLogstashLog 357

9.6. Manage cluster task 360

9.6.1. InterruptLogstashTask 360

9.6.2. ResumeLogstashTask 362

9.7. Manage pipelines 364

9.7.1. CreatePipelines 364

9.7.2. ListPipeline 367

9.7.3. DescribePipeline 368

9.7.4. UpdatePipelines 371

9.7.5. RunPipelines 374

9.7.6. StopPipelines 375

9.7.7. UpdatePipelineManagementConfig 377

9.7.8. DescribePipelineManagementConfig 380

9.7.9. DeletePipelines 382

9.7.10. ListPipelineIds 383

10.Beats 387

10.1. CreateCollector 387

10.2. DescribeCollector 394

> Document Version: 20220524 V


API Reference· Table of Cont ent s Elast icsearch

10.3. ReinstallCollector 399

10.4. ListCollectors 402

10.5. ListDefaultCollectorConfigurations 408

10.6. UpdateCollectorName 410

10.7. UpdateCollector 415

10.8. StartCollector 427

10.9. RestartCollector 429

10.10. StopCollector 430

10.11. DeleteCollector 431

10.12. ECS-based deployment 433

10.12.1. ListEcsInstances 433

10.12.2. ModifyDeployMachine 439

10.12.3. ListNodes 441

10.13. ACK-based deployment 444

10.13.1. ListAckClusters 444

10.13.2. ListAckNamespaces 446

10.13.3. DescribeAckOperator 448

10.13.4. InstallAckOperator 449

11.RAM 452

11.1. InitializeOperationRole 452

11.2. ValidateSlrPermission 454

12.Common data structures 456

VI > Document Version: 20220524


API Reference· List of operat ions by
Elast icsearch
funct ion

1.List of operations by function


T he following t ables list t he API operat ions available for use in Elast icsearch, Kibana, Logst ash, and
Beat s. If you want t o use an API operat ion t hat is not list ed in t hese t ables, cont act Alibaba Cloud
t echnical support engineers t o obt ain it .

Elasticsearch

Category Operation Description

createInstance Creates an Elasticsearch cluster.

Queries the detailed information of all Elasticsearch


ListInstance
clusters or a specified Elasticsearch cluster.

Queries the detailed information of a specified


DescribeInstance
Elasticsearch cluster.

Obtains the estimated time that is required to


EstimatedRestartT ime
restart an Elasticsearch cluster.

RestartInstance Restarts a specified Elasticsearch cluster.

UpdateInstanceChargeT Switches the billing method of an Elasticsearch


ype cluster from pay-as-you-go to subscription.

Changes the name of a specified Elasticsearch


UpdateDescription
cluster.

Releases a specified pay-as-you-go Elasticsearch


cluster. After the cluster is released, the physical
resources used by the cluster are reclaimed. T he
DeleteInstance data stored in the cluster is deleted and cannot be
recovered. T he disks attached to the nodes in the
cluster and the snapshots created for the cluster
are released.

Restores an Elasticsearch cluster that is frozen after


CancelDeletion
it is released.

RenewInstance Renews a subscription Elasticsearch cluster.

Restores the nodes in a disabled zone. T his


ActivateZones operation is available only for multi-zone
Elasticsearch clusters.

Disables one or more zones where a multi-zone


DeactivateZones Elasticsearch cluster resides and migrates the nodes
in the disabled zones to other zones.

Queries the regions whether Elasticsearch is


DescribeRegions
available.

Cluster management

> Document Version: 20220524 10


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description

Suspends a change task of an Elasticsearch cluster.


InterruptElasticsearchT a After the task is suspended, the cluster is in the
sk suspended state. T his operation is available only for
Elasticsearch clusters in the activating state.

ResumeElasticsearchT as
Resumes a change task of an Elasticsearch cluster.
k

Queries the information of all the nodes in an


ListAllNode
Elasticsearch cluster.

DescribeElasticsearchHe Queries the health status of a specified Elasticsearch


alth cluster.

Queries the indexes stored in an Elasticsearch


ListInstanceIndices
cluster.

MigrateT oOtherZone Migrates nodes across zones.

Migrates an Elasticsearch cluster to a specified


MoveResourceGroup
resource group.

ModifyInstanceMaintain Enables and modifies the maintenance window of


T ime an Elasticsearch cluster.

Queries the configuration information in the current


region. T his operation returns all the configuration
GetRegionConfiguration information in the current region. T he information is
for reference only. T he actual information in the
console and on the buy page prevails.

Queries the information of shards that are being


restored or shards that are restored. By default, this
ListShardRecoveries
operation returns only the information of shards
that are being restored after you call this operation.

Queries the configurations that are recommended


by the system for capacity planning of a cluster
CapacityPlan
based on the business scenarios, queries per
second, and number of logs for the cluster.

ListT ags Queries all visible user tags.

Queries the tags that are added to one or more


ListT agResources
resources.
T ag management

T agResources Adds tags to resources.

UntagResources Removes tags from resources.

Queries the nodes on which data can be migrated


GetT ransferableNodes based on the specified node type and number of
nodes.

11 > Document Version: 20220524


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description

ValidateT ransferableNo Checks whether the data on specific nodes in a


des specified Elasticsearch cluster can be migrated.

T ransferNode Runs a data migration task.

Data migration ListDataT asks Queries the information of data migration tasks.

Creates a data migration task to migrate data from


CreateDataT asks a specified Elasticsearch cluster to the current
Elasticsearch cluster.

GetClusterDataInformati Queries the data information of an Elasticsearch


on cluster.

DeleteDataT ask Deletes a data migration task.

CancelT ask Cancels a data migration task.

Queries the nodes that can be removed from an


GetSuggestShrinkableN
Elasticsearch cluster based on the specified node
odes
type and number of nodes.

Checks whether specific nodes can be removed from


ValidateShrinkNodes
a specified Elasticsearch cluster.
Cluster configuration
upgrade and ShrinkNode Removes nodes from an Elasticsearch cluster.
downgrade
Upgrades the version or kernel version of an
UpgradeEngineVersion Elasticsearch cluster. You can upgrade the version of
an Elasticsearch cluster only from V6.3 to V6.7.

Upgrades or downgrades the configuration of an


UpdateInstance
Elasticsearch cluster.

Updates the configuration in the YML file of a


UpdateInstanceSettings
specified Elasticsearch cluster.

Performs a rolling update for the IK dictionaries of a


UpdateHotIkDicts
specified Elasticsearch cluster.

Updates the synonym dictionary of a specified


UpdateSynonymsDicts
Elasticsearch cluster.

Performs a standard update for the IK dictionaries


UpdateDict
of a specified Elasticsearch cluster.

Updates the dictionary file of the analysis-aliws


UpdateAliwsDict plug-in. T his plug-in allows you to upload a tailored
dictionary file to it.

Cluster configuration

> Document Version: 20220524 12


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description

Queries and verifies the details of the dictionary


ListDictInformation object stored in Object Storage Service (OSS) when
you upload the object to an Elasticsearch cluster.

Updates the garbage collector (GC) configuration of


UpdateAdvancedSetting
a specified Elasticsearch cluster.

Queries the details of a specified type of dictionary


ListDicts and the link that is generated based on the related
signature to download the dictionary.

Queries the plug-ins that are installed on a specified


ListPlugins
Elasticsearch cluster.

InstallSystemPlugin Installs a built-in plug-in.


Plug-in management
UninstallPlugin Uninstalls a built-in plug-in.

Installs a custom plug-in that is uploaded to the


InstallUserPlugins
Elasticsearch console.

Log query ListSearchLog Queries the logs of an Elasticsearch cluster.

Enables or disables the Public Network Access or


T riggerNetwork Private Network Access feature for Elasticsearch or
Kibana.

UpdatePrivateNetwork Updates the private IP address whitelist of a


WhiteIps specified Elasticsearch cluster.

Updates the public IP address whitelist of a


UpdatePublicWhiteIps
specified Elasticsearch cluster.

Enables or disables the Public Network Access


UpdatePublicNetwork
feature for a specified Elasticsearch cluster.

Updates the private IP address whitelist of a


UpdateWhiteIps
specified Elasticsearch cluster.

Updates the IP address whitelist of a specified


ModifyWhiteIps
Elasticsearch cluster.

Updates the password for the elastic account of a


UpdateAdminPassword
specified Elasticsearch cluster.

Enables HT T PS. Before you call this operation, make


OpenHttps sure that your Elasticsearch cluster contains client
nodes.

CloseHttps Disables HT T PS.


Security configuration

AddConnectableCluster Connects Elasticsearch clusters.

13 > Document Version: 20220524


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description

DeleteConnectedCluster Disconnects Elasticsearch clusters.

Queries the Elasticsearch clusters that can be


DescribeConnectableClu connected to a specified Elasticsearch cluster. T he
sters Elasticsearch clusters that are connected to the
specified Elasticsearch cluster are excluded.

Queries the Elasticsearch clusters that are connected


ListConnectedClusters
to a specified Elasticsearch cluster.

Creates an endpoint in the virtual private cloud (VPC)


within the Elasticsearch service account. You can use
CreateVpcEndpoint the endpoint to connect to the endpoint service in
your VPC. T his way, a private connection is
established between the two VPCs.

Deletes an endpoint in the VPC within the


DeleteVpcEndpoint
Elasticsearch service account.

Queries the status of an endpoint in the VPC within


ListVpcEndpoints
the Elasticsearch service account.

CreateSnapshot Creates a snapshot in an Elasticsearch cluster.

DescribeSnapshotSettin Queries the data backup configuration of an


g Elasticsearch cluster.

Updates the data backup configuration of a


UpdateSnapshotSetting
specified Elasticsearch cluster.

ListSnapshotReposByIns Queries the shared OSS repositories configured for


Data backup tanceId an Elasticsearch cluster.

ListAlternativeSnapshot Queries the shared OSS repositories that can be


Repos configured for an Elasticsearch cluster.

Creates a shared OSS repository for an Elasticsearch


AddSnapshotRepo
cluster.

Deletes a shared OSS repository for an Elasticsearch


DeleteSnapshotRepo
cluster.

Enables the intelligent O&M feature for an


OpenDiagnosis
Elasticsearch cluster.

Disables the intelligent O&M feature for an


CloseDiagnosis
Elasticsearch cluster.

DiagnoseInstance Diagnoses an Elasticsearch cluster.

Queries the historical intelligent O&M reports of an


ListDiagnoseReport
Elasticsearch cluster.

> Document Version: 20220524 14


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description


Intelligent O&M
Queries the IDs of the historical intelligent O&M
ListDiagnoseReportIds
reports of an Elasticsearch cluster.

Queries the indexes for health diagnosis performed


ListDiagnoseIndices
on a specified Elasticsearch cluster.

DescribeDiagnoseReport Queries a historical intelligent O&M report.

DescribeDiagnosisSettin Queries the scenario settings for intelligent O&M of


gs an Elasticsearch cluster.

UpdateDiagnosisSetting Updates the scenario settings for intelligent O&M of


s an Elasticsearch cluster.

Kibana

Operation Description

DescribeKibanaSettings Queries the configuration of Kibana.

Modifies the configuration of Kibana. You can change only the


UpdateKibanaSettings
language setting of Kibana.

ListKibanaPlugins Queries the plug-ins of Kibana.

Installs a built-in plug-in for Kibana. Before you call this operation,
InstallKibanaSystemPlugin make sure that the specifications of your Kibana node are 2 vCPUs and
4 GiB of memory or higher.

UninstallKibanaPlugin Uninstalls a plug-in for Kibana.

Updates the IP address whitelist that allows access to the Kibana


UpdateKibanaWhiteIps
console of a specified Elasticsearch cluster.

Logstash

Category Operation Description

CreateLogstash Creates a Logstash cluster.

Queries the detailed information of all Logstash


ListLogstash
clusters or a specified Logstash cluster.

Queries the detailed information of a specified


DescribeLogstash
Logstash cluster.

Modifies the configuration of a specified Logstash


UpdateLogstash cluster, such as the name, quota, disk size, and
number of nodes.

RenewLogstash Renews a Logstash cluster.

15 > Document Version: 20220524


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description


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

UpdateLogstashDescrip
Changes the name of a specified Logstash cluster.
tion

UpdateLogstashCharge Switches the billing method of a Logstash cluster


T ype from pay-as-you-go to subscription.

EstimatedLogstashRest Queries the estimated time that is required to


artT ime restart a Logstash cluster.

DeleteLogstash Releases a specified Logstash cluster.

Restores a Logstash cluster that is frozen after it is


CancelLogstashDeletion
released.

UpdateLogstashSetting Updates the configuration of a specified Logstash


s cluster.

Queries the third-party libraries of a Logstash


Cluster configuration ListExtendfiles
cluster.

Updates the third-party libraries of a Logstash


UpdateExtendfiles
cluster.

Queries the Elasticsearch clusters that can be


ListAvailableEsInstanceI associated with a Logstash cluster when you
ds configure the X-Pack Monitoring feature for the
Logstash cluster.

T ests the connectivity between a Logstash cluster


and its associated Elasticsearch cluster when you
ValidateConnection
Cluster monitoring configure the X-Pack Monitoring feature for the
Logstash cluster.

UpdateXpackMonitorCo Updates the configuration of the X-Pack Monitoring


nfig feature of a Logstash cluster.

DescribeXpackMonitorC Queries the configuration of the X-Pack Monitoring


onfig feature of a Logstash cluster.

Queries the detailed information of all plug-ins or a


ListLogstashPlugins
specified plug-in.

Plug-in management InstallLogstashSystemPl


Installs a plug-in.
ugin

UninstallLogstashPlugin Uninstalls a plug-in.

Log query ListLogstashLog Queries the logs of a Logstash cluster.

> Document Version: 20220524 16


API Reference· List of operat ions by
Elast icsearch
funct ion

Category Operation Description

Suspends a change task of a Logstash cluster. After


InterruptLogstashT ask the task is suspended, the Logstash cluster is in the
suspended state.
Change task
management
Resumes a change task of a Logstash cluster. After
ResumeLogstashT ask the task is resumed, the Logstash cluster is in the
activating state.

CreatePipelines Creates a pipeline in a Logstash cluster.

ListPipeline Queries the pipelines of a Logstash cluster.

Queries the detailed information of a pipeline in a


DescribePipeline
Logstash cluster.

Updates the information of pipelines in a Logstash


UpdatePipelines
cluster.

RunPipelines Runs pipelines in a Logstash cluster.

StopPipelines Stops pipelines in a Logstash cluster.


Pipeline management

UpdatePipelineManage Updates the management method of pipelines in a


mentConfig Logstash cluster.

DescribePipelineManage Queries the management configuration of pipelines


mentConfig in a Logstash cluster.

DeletePipelines Deletes a specified pipeline in a Logstash cluster.

T ests the connectivity between a Logstash cluster


and the Kibana console of an Elasticsearch cluster,
ListPipelineIds
and queries the IDs of pipelines that are created in
the Kibana console of the Elasticsearch cluster.

Beats

Operation Description

CreateCollector Creates a shipper.

DescribeCollector Queries the detailed information of a shipper.

Installs a shipper that failed to be installed when you create the


ReinstallCollector
shipper.

ListCollectors Queries shippers.

ListDefaultCollectorConfiguration
Queries the default configuration files of shippers.
s

UpdateCollectorName Changes the name of a shipper.

17 > Document Version: 20220524


API Reference· List of operat ions by
Elast icsearch
funct ion

Operation Description

UpdateCollector Updates the information of a shipper.

StartCollector Starts a shipper.

RestartCollector Restarts a shipper.

StopCollector Stops a shipper.

DeleteCollector Deletes a shipper.

ListEcsInstances Queries Elastic Compute Service (ECS) instances.

ModifyDeployMachine Changes the ECS instances on which a shipper is installed.

ListNodes Queries the statuses of ECS instances on which a shipper is installed.

ListAckClusters Queries Container Service for Kubernetes (ACK) clusters.

ListAckNamespaces Queries all the namespaces of a specified ACK cluster.

Queries the information of ES-operator that is installed for a specified


DescribeAckOperator
ACK cluster.

InstallAckOperator Installs ES-operator for a specified ACK cluster.

Access control

Operation Description

InitializeOperationRole Creates a service-linked role.

ValidateSlrPermission Checks whether a service-linked role is created.

> Document Version: 20220524 18


API Reference· Get t ing st art ed Elast icsearch

2.Getting started
T his t opic describes how t o use developer t ools, such as Alibaba Cloud CLI, OpenAPI Explorer, and
Alibaba Cloud SDKs, t o call an Elast icsearch API operat ion. T he List SearchLog API operat ion is used in
t he examples in t his t opic.

Context
Before you call an API operat ion, you must underst and relat ed inst ruct ions in API documentation and
obt ain t he values of t he required request paramet ers. If an error code is ret urned aft er you send a
request , you can obt ain t he descript ion of t he error code in t he API document at ion.

Methods to make API requests

Method Use scenario Usage note

Before you use this method, make sure that Alibaba


Cloud CLI is installed on the host that you use to
Use Alibaba send requests. For more information about how to
Cloud CLI to If you want to use a command install Alibaba Cloud CLI in different operating
call an line tool, you can use this systems, see the following topics:
Elasticsearch method. Windows
API operation
Linux
macOS

Use OpenAPI You can use this method if you


Explorer to call want to use an interactive You can also debug API operations and obtain
an operation interface or you are a sample SDK requests in OpenAPI Explorer. For more
Elasticsearch developer user who is unfamiliar information, see What is OpenAPI Explorer?
API operation with Alibaba Cloud products.

Use SDK for


Java to call an SDK for Java is ideal for scenarios Before you use SDK for Java, you must install a JDK
Elasticsearch such as SDK encoding or DevOps. and Maven. T he JDK version must be 1.6 or later.
API operation

Use Alibaba Cloud CLI to call an Elasticsearch API operation


1. Obt ain t he ID of t he clust er t hat you want t o access.
You can use one of t he following met hods t o obt ain t he ID:
In t he Kibana console, run t he GET / command. For more informat ion, see Log on t o t he
Kibana console.
On your on-premises machine, call t he List Inst ance operat ion.

aliyun elasticsearch ListInstance --zoneId cn-hangzhou

2. Call t he ListSearchLog operat ion t o query t he syst em logs of t he clust er.

aliyun elasticsearch ListSearchLog --type INSTANCELOG --query level:warn --beginTime 15


93332477000 --endTime 1593418877000 --page 1 --size 20 --InstanceId es-cn-n6w1o1x0w00**
****

19 > Document Version: 20220524


Elast icsearch API Reference· Get t ing st art ed

Use O penAPI Explorer to call an Elasticsearch API operation


1. Call t he ListInstance operat ion t o obt ain t he ID of t he clust er t hat you want t o access.
2. Call t he ListSearchLog operat ion t o query t he syst em logs of t he clust er.
If t he query is successful, OpenAPI Explorer displays relat ed logs.

Use SDK for Java to call an Elasticsearch API operation


1. Creat e a Maven project .

Not e For more informat ion, see Inst all ECS SDK for Java.

2. Add Project Object Model (POM) dependencies.

<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-elasticsearch</artifactId>
<version>3.0.16</version>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-core</artifactId>
<version>4.4.6</version>
</dependency>

Not ice SDK packages are frequent ly updat ed. We recommend t hat you visit t he Alibaba
Cloud SDK Cent er t o obt ain dependencies of t he lat est version.

3. Creat e a Java program and call t he ListSearchLog operat ion t o query t he syst em logs of t he clust er
t hat you want t o access.

> Document Version: 20220524 20


API Reference· Get t ing st art ed Elast icsearch

import com.aliyuncs.CommonRequest;
import com.aliyuncs.CommonResponse;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.http.FormatType;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
public class ListSearchLog {
public static void main(String[] args) {
DefaultProfile profile = DefaultProfile.getProfile("<RegionId>", "<accessKeyId>
", "<accessSecret>");
IAcsClient client = new DefaultAcsClient(profile);
CommonRequest request = new CommonRequest();
//request.setProtocol(ProtocolType.HTTPS);
request.setMethod(MethodType.GET);
request.setDomain("elasticsearch.<RegionId>.aliyuncs.com");
request.setVersion("2017-06-13");
request.setUriPattern("/openapi/instances/<instanceid>/search-log");
request.putQueryParameter("type", "INSTANCELOG");
request.putQueryParameter("query", "level:warn");
request.putQueryParameter("beginTime", "1593332477000");
request.putQueryParameter("endTime", "1593418877000");
request.putQueryParameter("page", "1");
request.putQueryParameter("size", "20");
request.putHeadParameter("Content-Type", "application/json");
String requestBody = "" +
"{}";
request.setHttpContent(requestBody.getBytes(), "utf-8", FormatType.JSON);
try {
CommonResponse response = client.getCommonResponse(request);
System.out.println(response.getData());
} catch (ServerException e) {
e.printStackTrace();
} catch (ClientException e) {
e.printStackTrace();
}
}
}

Parameter Description

T he ID of the region where the cluster resides. For more information


<RegionId>
about how to obtain the ID, see Parameters.

T he AccessKey ID of your Alibaba Cloud account. For more


<accessKeyId> information about how to obtain the AccessKey ID, see Obtain an
AccessKey pair.

T he AccessKey secret of your Alibaba Cloud account. For more


<accessSecret> information about how to obtain the AccessKey secret, see Obtain
an AccessKey pair.

21 > Document Version: 20220524


Elast icsearch API Reference· Get t ing st art ed

Parameter Description

T he ID of the cluster. For more information about how to obtain the


<instanceId>
ID, see View the basic information of a cluster and ListInstance.

Not e For more informat ion about request paramet ers, see List SearchLog.

> Document Version: 20220524 22


API Reference· Make API request s Elast icsearch

3.Make API requests


T o send an Elast icsearch API request , you must send an HT T P request t o t he Elast icsearch endpoint .
You must add t he request paramet ers t hat correspond t o t he API operat ion being called. Aft er you call
t he API operat ion, t he syst em ret urns a response. T he request and response are encoded in UT F-8.

Endpoints
T he endpoint of t he Elast icsearch API is elast icsearch.<RegionId>.aliyuncs.com.

Not e T he <RegionId> paramet er is required. You must replace it wit h t he ID of t he region


where your Elast icsearch clust er resides. For more informat ion about how t o obt ain t he ID, see
Paramet ers.

Protocols
You can send request s over HT T P or HT T PS. For securit y purposes, we recommend t hat you send
request s over HT T PS.

Request syntax
T he following code provides t he request synt ax:

HTTPMethod /resource_URI_parameters
RequestHeader
RequestBody

HT T PMet hod: t he met hod of t he HT T P request , such as PUT , POST , PAT CH, GET , and DELET E.
resource_URI_paramet ers: t he ident ifier of t he resource t hat you want t o access, such as
/cluster .

Request Header: t he request headers. In most cases, informat ion such as t he API version number,
host name, and aut hent icat ion informat ion is included. For more informat ion, see Common
paramet ers.
Request Body: t he request paramet ers. T he paramet ers include common request paramet ers and
operat ion-specific request paramet ers. T he common request paramet ers cont ain informat ion such as
t he API version number and aut hent icat ion informat ion.

Sample request :

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/recover-zones HTTP/1.1


Common request parameters
["cn-hangzhou-i","cn-hangzhou-h"]

Encoding
T he request and response are encoded in UT F-8.

23 > Document Version: 20220524


Elast icsearch API Reference· Request signat ures

4.Request signatures
You must sign all API request s t o ensure securit y. Alibaba Cloud uses t he request signat ure t o verify t he
ident it y of t he API caller. Each API request must cont ain t he signat ure, regardless of whet her it is sent
by using HT T P or HT T PS.

O verview
T o sign a REST ful API request , you must add t he Aut horizat ion paramet er t o t he request header in t he
following format :

Authorization:acs:AccessKeyId:Singature

acs: t he abbreviat ion for Alibaba Cloud Service. T his is a fixed field and cannot be modified.
AccessKeyId: t he AccessKey ID t hat is used t o call t he API.
Signat ure: t he signat ure generat ed aft er t he request is symmet rically encrypt ed by using t he
AccessKey secret .

Signature calculation
T he signat ure algorit hm complies wit h t he HMAC-SHA1 specificat ions in RFC 2104. It uses an AccessKey
secret t o calculat e t he HMAC value of an encoded, format t ed query st ring and use t he HMAC value as
t he signat ure. Some paramet ers in a request are used t o calculat e t he signat ure. T herefore, t he
signat ures of request s vary wit h API request paramet ers.

Signature = Base64( HMAC-SHA1( AccessSecret, UTF-8-Encoding-Of(


StringToSign)) )

T o calculat e a signat ure, perform t he following st eps:

1. Compose a st ring-t o-sign.

T he st ring-t o-sign is a st ring assembled by using relat ed element s in an API request . It is used t o
calculat e t he signat ure and cont ains t he following element s:

HT T P header
Alibaba Cloud prot ocol headers (CanonicalizedHeaders)
Canonicalized resource (CanonicalizedResource)
Body

T he st ring-t o-sign must be creat ed in t he following format :

> Document Version: 20220524 24


API Reference· Request signat ures Elast icsearch

StringToSign =
//HTTP header
HTTP-Verb + "\n" +
Accept + "\n" +
Content-MD5 + "\n" +//Specify the request body that is encrypted by using the M
D5 algorithm.
Content-Type + "\n" +
Date + "\n" +
//Alibaba Cloud protocol headers (CanonicalizedHeaders)
CanonicalizedHeaders +
//Canonicalized resource (CanonicalizedResource)
CanonicalizedResource

Sample original request :

POST /stacks?name=test_alert&status=COMPLETE HTTP/1.1


Host: ***.aliyuncs.com
Accept: application/json
Content-MD5: ChDfdfwC+Tn874znq7Dw7Q==
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Date: Thu, 22 Feb 2018 07:46:12 GMT
x-acs-signature-nonce: 550e8400-e29b-41d4-a716-446655440000
x-acs-signature-method: HMAC-SHA1
x-acs-signature-version: 1.0
x-acs-version: 2016-01-02

Sample canonicalized request :

POST
application/json
ChDfdfwC+Tn874znq7Dw7Q==
application/x-www-form-urlencoded;charset=utf-8
Thu, 22 Feb 2018 07:46:12 GMT
x-acs-signature-nonce: 550e8400-e29b-41d4-a716-446655440000
x-acs-signature-method:HMAC-SHA1
x-acs-signature-version:1.0
x-acs-version:2016-01-02
/stacks?name=test_alert&status=COMPLETE

2. Add t he signat ure st ring.

Add t he calculat ed signat ure st ring t o t he request header in t he following format :

Authorization: acs AccessKeyId:Signature

HTTP header
T he HT T P header in t he st ring-t o-sign must cont ain t he values of t he following paramet ers. T he
paramet ers must be sort ed in alphabet ical order. If a paramet er has no value, set it t o \n .

Accept : t he response t ype required by t he client . Valid values: application/json and application/xml.
Cont ent -MD5: t he Base64-encoded 128-bit MD5 hash value of t he request body.
Cont ent -T ype: t he t ype of t he HT T P request body. T he t ype is defined in RFC 2616.
Dat e: t he GMT t ime specified in HT T P 1.1. Example: Wed, 05 Sep.2012 23:00:00 GMT .

25 > Document Version: 20220524


Elast icsearch API Reference· Request signat ures

Not e You do not need t o specify your AccessKey pair in t he HT T P header.

Sample original header:

Accept: application/json
Content-MD5: ChDfdfwC+Tn874znq7Dw7Q==
Content-Type: application/x-www-form-urlencoded;charset=utf-8
Date: Thu, 22 Feb 2018 07:46:12 GMT

Sample canonicalized header:

application/json
ChDfdfwC+Tn874znq7Dw7Q==
application/x-www-form-urlencoded;charset=utf-8
Thu, 22 Feb 2018 07:46:12 GMT

Alibaba Cloud protocol headers (CanonicalizedHeaders)


CanonicalizedHeaders are non-st andard HT T P headers of Alibaba Cloud. T hey are paramet ers prefixed
wit h x-acs- in a request . A request must cont ain t he following paramet ers:

x-acs-signat ure-nonce: a unique, random number used t o prevent replay at t acks. You must use
different numbers for different request s.
x-acs-signat ure-version: t he version of t he signat ure encrypt ion algorit hm. Set t he value t o 1.0.
x-acs-version: t he version number of t he API.

T o const ruct Alibaba Cloud canonicalized headers, perform t he following st eps:

1. Convert t he names of all HT T P request headers prefixed wit h x-acs- t o lowercase let t ers. For
example, convert X-acs-OSS-Meta-Name: TaoBao int o x-acs-oss-meta-name: TaoBao .

2. Arrange all HT T P request headers t hat are obt ained from t he preceding st ep in alphabet ical order.
3. Delet e spaces from each side of a delimit er bet ween t he request header and it s cont ent . For
example, convert x-acs-oss-meta-name: TaoBao,Alipay int o x-acs-oss-meta-name:TaoBao,Ali
pay .

4. Separat e all headers and cont ent wit h delimit ers (\n) t o form t he final CanonicalizedHeaders.

Sample original header:

x-acs-signature-nonce: 550e8400-e29b-41d4-a716-446655440000
x-acs-signature-method: HMAC-SHA1
x-acs-signature-version: 1.0
x-acs-version: 2016-01-02GMT

Sample canonicalized header:

x-acs-signature-nonce:550e8400-e29b-41d4-a716-446655440000
x-acs-signature-method:HMAC-SHA1
x-acs-signature-version:1.0
x-acs-version:2016-01-02

> Document Version: 20220524 26


API Reference· Request signat ures Elast icsearch

Canonicalized resource (CanonicalizedResource)


CanonicalizedResource is t he canonical descript ion of t he resource t hat you want t o access. Sort sub-
resources along wit h t he query paramet ers in ascending lexicographic order and separat e t hem wit h
ampersands (&) t o generat e a sub-resource st ring. T he sub-resource st ring consist s of all paramet ers
t hat follow t he quest ion mark (?).

Sample original request :

/stacks?status=COMPLETE&name=test_alert

Sample canonicalized request :

/stacks?name=test_alert&status=COMPLETE

Body
Encrypt t he request body by using t he MD5 algorit hm, encode t he encrypt ed request body in Base64,
and add t he Base64-encoded st ring t o t he value of t he Cont ent -MD5 paramet er.

27 > Document Version: 20220524


Elast icsearch API Reference· QPS limit s

5.QPS limits
Alibaba Cloud Elast icsearch limit s t he queries per second (QPS) of an API operat ion for a single user and
all users. If t he number of calls of an API operat ion per second exceeds a specific QPS limit , t hrot t ling is
t riggered. As a result , your services may be affect ed. We recommend t hat you t ake not e of t he limit s
when you call an API operat ion. T his t opic describes t he QPS limit s on API operat ions of Elast icsearch.

Terms

T erm Description

Maximum QPS per user refers to the total number of calls that a single
Alibaba Cloud account, and the RAM users and RAM roles within the
Alibaba Cloud account can make to an API operation per second.

For example, the maximum QPS per user for an API operation is 20. T his
Maximum QPS per user
indicates that a single Alibaba Cloud account, and the RAM users and
RAM roles within the Alibaba Cloud account can make a total number
of 20 calls to the operation per second. If the upper limit is exceeded,
throttling is triggered.

Maximum QPS for all users refers to the total number of calls that all
Alibaba Cloud accounts, and all RAM users and RAM roles within the
Alibaba Cloud accounts can make to an API operation per second.

For example, the maximum QPS for all users for an API operation is 200.
Maximum QPS for all users
T his indicates that all Alibaba Cloud accounts, and all RAM users and
RAM roles within the Alibaba Cloud accounts can make a total number
of 200 calls to the operation per second. If the upper limit is exceeded,
throttling is triggered.

Q PS limits on the API operations of Elasticsearch


T he following t able list s t he maximum QPS per user and t he maximum QPS for all users for some API
operat ions. For ot her API operat ions, t he maximum QPS per user and t he maximum QPS for all users are
bot h 100.

Operation Maximum QPS per user Maximum QPS for all users

RenewLogstash 1000 1000

UpdateLogstashChargeT ype 1000 1000

UpdateInstanceChargeT ype 1000 1000

ListAllNode 10 10

ListSearchLog 10 10

> Document Version: 20220524 28


API Reference· Common paramet ers Elast icsearch

6.Common parameters
T his t opic describes common paramet ers, including common request paramet ers and common response
paramet ers. Common paramet ers are required by all API operat ions.

Common request parameters


Common request paramet ers must be included in all Elast icsearch API request s. T he following t able list s
t he paramet ers.

Parameter Required Example Description

T he authentication
information that is used
to verify the validity of
the request. Specify the
information in the
AccessKeyId:Signat
ure format.

acs<yourAccessKeyId>: AccessKeyId: the


Authorization Yes
<yourSignature> AccessKey ID
provided to you by
Alibaba Cloud.
Signature: the
signature string of
the request. For more
information, see
Request signatures.

T he time when the


request was created.
T hu,17 Nov 2018
Date Yes T he time must be the
18:49:58 GMT
GMT time specified in
HT T P 1.1.

T he type of the
response that is
Accept Yes application/json required by the client.
Set the value to
application/json.

T he name of the API


operation. For more
x-acs-action Yes ListInstance
information, see List of
operations by function.

T he version number of
x-acs-version Yes 2017-06-13
the API operation.

29 > Document Version: 20220524


Elast icsearch API Reference· Common paramet ers

Parameter Required Example Description

A unique, random
number used to prevent
51284580-614a-11eb- replay attacks. You
x-acs-signature-nonce No
8a9b-9dcfec8d**** must use different
numbers for different
requests.

T he encryption method
of the signature string.
x-acs-signature-method Yes HMAC-SHA1
Set the value to HMAC-
SHA1.

T he Base64-encoded
MACiECZtnLiNkNS1v5**** 128-bit MD5 hash value
ContentMD5 Yes
=1 of the HT T P request
body.

T he following code provides a sample request :

GET https://elasticsearch.cn-hangzhou.aliyuncs.com/openapi/instances HTTP/1.1


Authorization: acs DemoAccessKey:31nTIpResD/0C8gb+ChUeuv****=
Date: Thu, 17 Nov 2018 18:49:58 GMT
Accept: application/json
x-acs-action: ListInstance
x-acs-version: 2017-06-13
x-acs-signature-nonce: 51284580-614a-11eb-8a9b-9dcfec8d****
x-acs-signature-method: HMAC-SHA1
ContentMD5:MACiECZtnLiNkNS1v5****=1

Common response parameters

Parameter T ype Description

T he ID of the request. T his parameter is returned


RequestId String
regardless of whether the call is successful.

> Document Version: 20220524 30


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.Elasticsearch instances
7.1. Manage clusters
7.1.1. createInstance
Creat es an Elast icsearch clust er.

Before you call t he API operat ion, not e t hat :

Make sure t hat you have read and underst and t he billing and pricing st andards of Alibaba Cloud
Elast icsearch.

For more informat ion, see Alibaba Cloud Elast icsearch pricing.

Before you creat e an inst ance, you must complet e real-name verificat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, refer t o t he document at ion of
common request paramet ers.

Request syntax
POST /openapi/instances HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

31 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

T he 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. T he token can
5A2CFF0E- contain only ASCII characters and
5718-45B5- cannot exceed 64 characters in
clientT oken String Query No
9D4D- length.
70B3FF****

> Document Version: 20220524 32


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

{ "description":
"xpack-hot-
cold",
"nodeAmount":
2, "esVersion":
"7.10_with_X-
Pack",
"instanceCateg
ory": "x-pack",
"nodeSpec": {
"spec":
"elasticsearch.s
n2ne.xlarge",
"disk": 20,
"diskT ype":
"cloud_ssd" },
"warmNodeCon
figuration": {
"spec":
"elasticsearch.s
n1ne.xlarge",
"amount": 3,
"diskT ype":
"cloud_efficien
cy", "disk": 500
String Body No T he request body parameters.
},
"networkConfig
": { "type":
"vpc", "vpcId":
"vpc-
8vbfu74bmw4
m7m84a****",
"vswitchId":
"vsw-
8vbnk6cmurbp
ump2f****",
"vsArea": "cn-
zhangjiakou-c"
},
"paymentT ype"
: "postpaid",
"esAdminPassw
ord":
"yourPassword
",
"kibanaConfigur
ation": {
"spec":
"elasticsearch.s
n1ne.large" } }

RequestBody

33 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

You must also specify t he following paramet ers in t he Request Body paramet er t o specify t he
informat ion of t he inst ance t o be creat ed.

Parameter T ype Required Example Description

T he number of
zones for the
specified instance.
zoneCount String No 2
Valid values: 1, 2,
and 3. Default
value: 1.

T he billing
method of the
cluster. Valid
paymentT ype String Yes postpaid values: postpaid
(pay-as-you-go)
and prepaid
(subscription).

T he payment
details of the
subscription
instance. T his
paymentInfo Map No postpaid parameter is
required when you
create a
subscription
instance.

T he purchase
time. Monthly and
yearly purchases
are supported.
└duration
Integer No 1 T his parameter is
required when you
create a
subscription
instance.

T he subscription
unit. Valid values:
Year and Month.
T his parameter is
└pricingCycle String No Month
required when you
create a
subscription
instance.

> Document Version: 20220524 34


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

Specifies whether
to enable auto-
renewal settings.
Valid values: true
and false. Default
└isAutoRenew Boolean No true
value: false.

T he auto-renewal
period. Unit:
month. T his
parameter is
required if the
isAut o Renew
└autoRenewDurat
Integer No 3 parameter is set
ion
to t rue . T he
optional range of
parameter values
is the same as
that on the
purchase page.

T he number of
nodeAmount int Yes 3
data nodes.

Version type. Valid


values: IS(Indexing
Service Series
Instance) and x-
pack (Commercial
Edition). T o create
instanceCategory String No advanced
an enhanced
instance with
OpenStore
enabled, you must
also enable
Indexing Service.

35 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he access
password of the
Elasticsearch
instance. T hree of
the following
characters are
required:
esAdminPassword String Yes es_password uppercase letters,
lowercase letters,
digits, and special
characters:!
@# $%^&*()_+-=,
which must be 8
to 32 bits in
length.

T he version of the
read-only
instance. Valid
values:
7.10_with_X-Pack,
esVersion String Yes 5.5.3_with_X-Pack 6.7_with_X-Pack,
7.7_with_X-Pack,
6.8_with_X-Pack,
6.3_with_X-Pack,
5.6_with_X-Pack,
and with_X-Pack.

T he configuration
nodeSpec Map Yes
of the data node.

node
specifications, the
specification
elasticsearch.sn2n
└spec String Yes information can
e.xlarge
be viewed by
product
specifications.

T he storage space
└disk String Yes 20 of a single node.
Unit: GB.

> Document Version: 20220524 36


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of the
storage. Valid
values:
cloud_ssd(SSD),
└diskT ype String Yes cloud_ssd cloud_essd
(Enhanced SSD),
and
cloud_efficiency
(ultra disk).

T he performance
level of the ESSD.
T his parameter is
└performanceLev required when the
String No PL1
el storage type is
cloud_essd. Valid
values: PL1, PL2,
and PL3.

Specifies whether
to enable disk
└diskEncryption Boolean No true encryption. Valid
values: true and
false.

T he configuration
masterConfigurati
Map No of the dedicated
on
master node.

node
specifications, the
specification
String elasticsearch.sn2n
└spec Yes information can
e.xlarge
be viewed by
product
specifications.

T he number of
nodes. Currently,
└amount int Yes 3
the value is fixed
to 3.

37 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he size of the
storage space per
└disk int Yes 20
node. Only 20GB is
supported.

T he storage type
of the node. Valid
values:
└diskT ype string Yes cloud_ssd
cloud_ssd(SSD)
and cloud_essd
(Enhanced SSD).

Configure the cold


warmNodeConfigu Map No data node.
ration

node
specifications, the
specification
information can
be viewed by
product
elasticsearch.ic5.la
└spec string Yes specifications. T he
rge
openstore.i2g.4xla
rge specification
indicates that
OpenStore
storage is
enabled.

T he number of
└amount Integer Yes 2
nodes.

> Document Version: 20220524 38


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he storage type
of the node.
Optional value:
cloud_efficiency
(ultra disk). T he
Standard
Commercial
└diskT ype string No cloud_efficiency Edition allows you
to select the disk
type of the cold
data node. You
do not need to
set this value for
Log Performance-
enhanced Edition.

T he storage space
└disk Integer Yes 500
of a single node.

clientNodeConfigu Coordination node


Map No
ration configuration.

node
specifications, the
specification
elasticsearch.ic5.la
└spec string Yes information can
rge
be viewed by
product
specifications.

T he number of
└amount Integer Yes 2
nodes.

T he storage type
of the node.
└diskT ype string Yes cloud_efficiency Optional value:
cloud_efficiency
(ultra disk).

T he size of the
└disk Integer Yes 20 storage space per
node.

39 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he configuration
elasticDataNodeC
Map No of the elastic
onfiguration
node.

node
specifications, the
specification
elasticsearch.ic5.la
└spec string Yes information can
rge
be viewed by
product
specifications.

└amount Integer Yes 2 T he quantity.

T he storage type
of the node. Valid
values:
cloud_ssd(SSD),
└diskT ype string Yes cloud_efficiency cloud_essd
(Enhanced SSD),
and
cloud_efficiency
(ultra disk).

T he size of the
└disk Integer Yes 20 storage space per
node.

T he performance
level of the ESSD.
T his parameter is
└performanceLev required when the
String No PL1
el storage type is
cloud_essd. Valid
values: PL1, PL2,
and PL3.

Specifies whether
to enable disk
└diskEncryption Boolean No true encryption. Valid
values: true and
false.

> Document Version: 20220524 40


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he configuration
kibanaConfiguratio
Map No of the kibana
n
node.

node
specifications, the
specification
elasticsearch.n4.s
└spec String Yes information can
mall
be viewed by
product
specifications.

T he network
networkConfig Map Yes
configurations.

T he network type
of the instance.
└type string Yes VPC
Only VPC is
supported.

vpc- T he ID of the
└vpcId string Yes bp16k1dvzxtmagc virtual private
va**** cloud (VPC).

T he ID of the zone
└vsArea string Yes cn-hangzhou-i to which the
vSwitch belongs.

vsw-
T he ID of the
└vswitchId string Yes bp1k4ec6s7sjdbud
vSwitch.
w****

Specifies whether
to verify the
configuration
when you create
the instance. Valid
dryRun boolean No true
values: true (only
verified, not
created) and false
(verified and
created).

41 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Not e
└ indicat es a child paramet er.
For a list of support ed node specificat ions, see Alibaba Cloud Elast icsearch pricing
informat ion and product specificat ions.

For example, you can execut e t he following st at ement s:


Creat e a general-purpose commercial edit ion inst ance t hat cont ains bot h cold and hot nodes.

{
"description": "xpack-hot-cold",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "x-pack",
"nodeSpec": {
"spec": "elasticsearch.sn2ne.xlarge",
"disk": 20,
"diskType": "cloud_ssd"
},
"warmNodeConfiguration": {
"spec": "elasticsearch.sn1ne.xlarge",
"amount": 3,
"diskType": "cloud_efficiency",
"disk": 500
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Creat e an Indexing Service Series inst ance t hat cont ains only hot nodes.

> Document Version: 20220524 42


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"description": "is-hot",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "IS",
"nodeSpec": {
"spec": "elasticsearch.sn1ne.xlarge",
"disk": 20,
"diskType": "cloud_ssd"
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Creat e an Indexing Service Series inst ance t hat cont ains only cold nodes.

{
"description": "is-cold",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "IS",
"warmNodeConfiguration": {
"spec": "group.c6.large.500",
"amount": 3,
"disk": 300
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Creat e an Indexing Service Series inst ance t hat cont ains bot h cold and hot nodes.

43 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"description": "is-hot-cold",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "IS",
"nodeSpec": {
"spec": "elasticsearch.sn2ne.xlarge",
"disk": 50,
"diskType": "cloud_ssd"
},
"warmNodeConfiguration": {
"spec": "group.c6.large.500",
"amount": 3,
"disk": 300
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Creat e an Indexing Service series inst ance, enable OpenSt ore st orage, and cont ain bot h cold and hot
nodes.

> Document Version: 20220524 44


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"description": "os-1",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "IS",
"nodeSpec": {
"spec": "elasticsearch.sn2ne.xlarge",
"disk": 50,
"diskType": "cloud_ssd"
},
"warmNodeConfiguration": {
"spec": "openstore.i2g.4xlarge",
"amount": 3
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Creat e an Indexing Service series inst ance, enable OpenSt ore st orage, and include hot and cold
shared nodes.

45 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"description": "os-2",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "IS",
"nodeSpec": {
"spec": "openstore.i2g.4xlarge",
"disk": 50,
"diskType": "cloud_ssd"
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Response parameters

Parameter T ype Example Description

838D9D11-8EEF-
RequestId String 46D8-BF0D- T he ID of the request.
BC8FC2B0C2F3

Result Object T he return results.

instanceId String es-is-0u2ecp69tt**** T he ID of instance.

Examples
Sample request s

> Document Version: 20220524 46


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1


Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"description": "xpack-hot-cold",
"nodeAmount": 2,
"esVersion": "7.10_with_X-Pack",
"instanceCategory": "x-pack",
"nodeSpec": {
"spec": "elasticsearch.sn2ne.xlarge",
"disk": 20,
"diskType": "cloud_ssd"
},
"warmNodeConfiguration": {
"spec": "elasticsearch.sn1ne.xlarge",
"amount": 3,
"diskType": "cloud_efficiency",
"disk": 500
},
"networkConfig": {
"type": "vpc",
"vpcId": "vpc-8vbfu74bmw4m7m84a****",
"vswitchId": "vsw-8vbnk6cmurbpump2f****",
"vsArea": "cn-zhangjiakou-c"
},
"paymentType": "postpaid",
"esAdminPassword": "yourPassword",
"kibanaConfiguration": {
"spec": "elasticsearch.sn1ne.large"
}
}

Sample success responses


XML format

HTTP/1.1 200 OK
Content-Type:application/xml
<createInstanceResponse>
<RequestId>838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3</RequestId>
<Result>
<instanceId>es-is-0u2ecp69tt****</instanceId>
</Result>
</createInstanceResponse>

JSON format

47 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "838D9D11-8EEF-46D8-BF0D-BC8FC2B0C2F3",
"Result" : {
"instanceId" : "es-is-0u2ecp69tt****"
}
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.1.2. ListInstance
You can call t his operat ion t o display t he det ails of all inst ances in t he list .

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances HTTP/1.1

Request parameter

Positi Require
Parameter T ype Example Description
on d

T he page number of the returned


page Integer Query No 1 page.

Starting value: 1 . Default value: 1 .

T he number of entries to return on


size Integer Query No 10 each page. Maximum value: 100 .
Default value: 10 .

> Document Version: 20220524 48


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

T he name of the instance. You can


specify a keyword to match
multiple instances. For example, if
description String Query No aliyunes_test1
you search for all instances of a
abc , you might return all instances
of abc , abcde , xyabc , and xabcy .

es-cn-
T he ID of the ApsaraDB for Redis
instanceId String Query No v641a0ta3000g
instance.
****

6.7.0_with_X-
esVersion String Query No T he version of the instance.
Pack

resourceGroupI rg- T he ID of the resource group to


String Query No
d aekzvowej3i**** which the instance belongs.

[{"tagKey":"key
tags String Query No 1","tagValue":" Details about the tags.
value1"}]

vpc-
T he ID of the Virtual Private Cloud
vpcId String Query No bp16k1dvzxtm
to which the instance belongs.
agcva****

zoneId String Query No cn-hangzhou-i T he zone ID of the instance.

T he billing method of the instance.


Valid values:
paymentT ype String Query No postpaid
postpaid (pay-as-you-go)
prepaid (subscription)

T he version of the instance. Valid


values:
instanceCatego
String Query No advanced x-pack: Commercial Edition.
ry
advanced: enhanced edition.
community: the basic version.

Response parameters

Parameter T ype Sample response Description

Headers Struct T he header of the response.

49 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Sample response Description

T he number of instances that match the


X-T otal-Count Integer 10
query string.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Array of T he return result of the video moderation


Result
Instance task.

Specifies whether to include dedicated


advancedDedic master nodes. Valid values:
Boolean false
ateMaster true: T he resource tags are returned.
flase: not included.

clientNodeConf
Struct Coordinate node configurations.
iguration

amount Integer 3 T he number of nodes.

T he size of the node storage space. Unit:


disk Integer 20
GB.

T he storage type of the node. Only ultra


diskT ype String cloud_efficiency
disks (cloud_efficiency) are supported.

T he node specification. Specification


elasticsearch.sn2ne.l
spec String information is available through Product
arge
Specifications View.

2018-07-
createdAt String T he time when the instance was created.
13T 03:58:07.253Z

Specifies whether to include dedicated


master nodes (obsolete). Valid values:
dedicateMaster Boolean false
true: T he resource tags are returned.
flase: not included.

T he name of the instance.


description String es-cn-abc

elasticDataNod
Struct T he configuration of the elastic data node.
eConfiguration

> Document Version: 20220524 50


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Sample response Description

amount Integer 3 T he number of nodes.

T he size of the node storage space. Unit:


disk Integer 20
GB.

Specifies whether to enable disk encryption


for the node. Valid values:
diskEncryption Boolean true
true: enables MFA
flase: disabled.

T he storage type of the node. Valid values:

cloud_ssd: standard SSD


diskT ype String cloud_ssd
cloud_essd: enhanced SSD
cloud_efficiency: ultra disk

T he node specification. Specification


elasticsearch.sn2ne.l
spec String information is available through Product
arge
Specifications View.

esVersion String 6.7.0_with_X-Pack T he version of the instance.

[{ "configT ype":
"aliVersion", T he configuration of cluster extension
extendConfigs List
"aliVersion": parameters.
"ali1.3.0" }]

es-cn-
instanceId String T he ID of the ApsaraDB for Redis instance.
v641a0ta3000g****

isNewDeploym Specifies whether to deploy the new


String true
ent architecture.

kibanaConfigur
Struct T he configuration of Kibana nodes.
ation

amount Integer 1 T he number of DRDS server nodes.

T he size of the node storage space. Unit:


disk Integer 20
GB.

diskT ype String cloud_ssd T he storage type of the node.

51 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Sample response Description

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

masterConfigur T he configuration of dedicated master


Struct
ation nodes.

amount Integer 3 T he number of nodes.

T he size of the node storage space. Unit:


disk Integer 20
GB.

T he storage type of the node. Only


diskT ype String cloud_ssd
cloud_ssd(SSD) is supported.

T he node specification. Specification


elasticsearch.sn2ne.l
spec String information is available through Product
arge
Specifications View.

networkConfig Struct T he network configuration.

T he network type. Only Virtual Private Cloud


type String vpc
(VPC) is supported.

vpcId String vpc-abc T he ID of the virtual private cloud (VPC).

vsArea String cn-hangzhou-e T he zone where the instance is deployed.

T he ID of the vSwitch associated with the


vswitchId String vsw-def
specified VPC.

nodeAmount Integer 2 T he number of data nodes.

nodeSpec Struct T he configuration of data nodes.

disk Integer 50 T he storage space of the node. Unit: GB.

> Document Version: 20220524 52


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Sample response Description

Specifies whether to use disk encryption.


Valid values:
diskEncryption Boolean false
true
false

T he storage type of the node. Valid values:


diskT ype String cloud_ssd cloud_ssd: standard SSD
cloud_efficiency: ultra disk

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

T he billing method of the instance. Valid


values:
paymentT ype String postpaid
prepaid : subscription.
po st paid : pay-as-you-go.

T he status of the pay-as-you-go service


overlaid on the subscription instance. Valid
values:
postpaidServic
String active act ive : normal.
eStatus
clo sed : disabled.
indebt : T he overdue payment is being
frozen.

resourceGroupI T he ID of the resource group to which the


String rg-aekzvowej3i****
d instance belongs.

serviceVpc Boolean true whether it is a service vpc.

T he status of the instance. Valid values:

active: normal.
status String active activating: T he instance is taking effect.
inactive: freezes.
invalid: invalid.

tags Array of T ag Details about the tags.

53 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Sample response Description

tagKey String env T he tag key of the disk.

tagValue String dev T he tag value of the disk.

T he time when the instance was last


2018-07- updated.
updatedAt String
18T 10:10:04.484Z

Not e In t he following ret urn example, t his art icle only guarant ees t hat t he paramet ers in t he
ret urn dat a list are included, and t he paramet ers not ment ioned are for reference only. T he
program cannot force t o rely on obt aining t hese paramet ers.

Examples
Sample request s

GET /openapi/instances?description=abc&page=1&size=10

Sample success response


JSON format

> Document Version: 20220524 54


API Reference· Elast icsearch inst anc
Elast icsearch
es

{ "Result": [ { "instanceId": "es-cn-v641a0ta3000g****", "description": "aliyunes_test


1", "nodeAmount": 3, "paymentType": "postpaid", "status": "active", "esVersion": "6.7.0_wit
h_X-Pack", "esConfig": {}, "esIPWhitelist": [], "esIPBlacklist": [], "privateNetworkIpWhite
List": [], "kibanaIPWhitelist": [], "publicIpWhitelist": [], "serviceVpc": true, "enablePub
lic": false, "haveKibana": true, "nodeSpec": { "spec": "elasticsearch.sn1ne.large", "disk":
20, "diskType": "cloud_ssd", "diskEncryption": true }, "networkConfig": { "vpcId": "vpc-bp1
xk0naij7jx4ph1****", "vswitchId": "vsw-bp1ogpdintii5qvyx****", "vsArea": "cn-hangzhou-g", "
type": "vpc" }, "createdAt": "2019-08-26T08:18:06.652Z", "updatedAt": "2019-08-26T08:19:49.
448Z", "inited": true, "tags": [ { "tagKey": "key1", "tagValue": "value1" } ], "dedicateMas
ter": false, "advancedDedicateMaster": true, "masterConfiguration": { "spec": "elasticsearc
h.ic5.large", "amount": 3, "diskType": "cloud_ssd", "disk": 20 }, "haveClientNode": true, "
warmNode": true, "warmNodeConfiguration": { "spec": "elasticsearch.ic5.large", "amount": 2,
"diskType": "cloud_efficiency", "disk": 500, "diskEncryption": true }, "clientNodeConfigura
tion": { "spec": "elasticsearch.ic5.large", "amount": 2, "diskType": "cloud_efficiency", "d
isk": 20 }, "kibanaConfiguration": { "spec": "elasticsearch.n4.small", "amount": 1, "disk":
0 }, "commodityCode": "elasticsearch", "endTime": 4722508800000, "dictList": [], "synonymsD
icts": [], "ikHotDicts": [], "aliwsDicts": [], "clusterTasks": [], "resourceGroupId": "rg-a
cfmwriiikz****", "zoneCount": 1, "protocol": "HTTP", "haveGrafana": false, "haveCerebro": f
alse, "zoneInfos": [ { "zoneId": "cn-hangzhou-g", "status": "NORMAL" } ], "enableKibanaPubl
icNetwork": false, "advancedSetting": { "gcName": "CMS" } }, { "instanceId": "es-cn-v641920
bh0006****", "description": "aliyunes_test2", "nodeAmount": 2, "paymentType": "postpaid", "
status": "active", "esVersion": "6.7.0_with_X-Pack", "esConfig": {}, "esIPWhitelist": [], "
esIPBlacklist": [], "privateNetworkIpWhiteList": [], "kibanaIPWhitelist": [], "publicIpWhit
elist": [], "enablePublic": false, "haveKibana": true, "nodeSpec": { "spec": "elasticsearch
.sn2ne.2xlarge", "disk": 20, "diskType": "cloud_ssd", "diskEncryption": false }, "networkCo
nfig": { "vpcId": "vpc-bp1op7luys63go2x5****", "vswitchId": "vsw-bp1rusvg785q97ucp****", "v
sArea": "cn-hangzhou-i", "type": "vpc" }, "createdAt": "2019-08-07T13:14:07.974Z", "updated
At": "2019-08-12T03:04:27.215Z", "inited": true, "tags": [], "dedicateMaster": false, "adva
ncedDedicateMaster": false, "masterConfiguration": {}, "haveClientNode": false, "warmNode":
false, "warmNodeConfiguration": {}, "clientNodeConfiguration": {}, "kibanaConfiguration": {
"spec": "elasticsearch.n4.small", "amount": 1, "disk": 0 }, "commodityCode": "elasticsearch
", "endTime": 4720867200000, "dictList": [], "synonymsDicts": [], "ikHotDicts": [], "aliwsD
icts": [], "clusterTasks": [], "resourceGroupId": "rg-acfmwriiikz****", "zoneCount": 1, "pr
otocol": "HTTP", "haveGrafana": false, "haveCerebro": false, "zoneInfos": [ { "zoneId": "cn
-hangzhou-i", "status": "NORMAL" } ], "enableKibanaPublicNetwork": false, "advancedSetting"
: { "gcName": "CMS" } } ] }

Error code
For a list of error codes, visit t he API Error Cent er .

7.1.3. DescribeInstance
You can call t his operat ion t o query det ailed informat ion about a specified Elast icsearch inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers

55 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId] HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes 3h4k3axh33th9 T he ID of the DRDS instance.
****

Response parameters

Parameter T ype Example Description

Result Struct T he returned results.

Indicates whether the instance contains


dedicated master nodes. T he values are as
follows:
advancedDedic true: Contains dedicated master nodes.
Boolean true
ateMaster
false: Not contains dedicated master
nodes.

advancedSettin
Struct Advanced configuration.
g

T he name of the GC garbage collector. CMS


gcName String CMS
and G1.

T he configuration of the alibaba cloud


aliwsDicts Array of Dict
dictionary.

fileSize Long 2782602 T he size of the dictionary file. Unit: bytes.

name String aliws_ext_dict.txt T he name of the dictionary file.

> Document Version: 20220524 56


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he source type of the dictionary file. Valid


values:

OSS: OSS is open for storage (you need to


sourceT ype String OSS ensure that the OSS bucket is publicly
readable).
ORIGIN: the open source Elasticsearch.
UPLOAD: the uploaded file.

T he type of the dictionary file. Valid values:

ST OP: stop words.


type String ALI_WS MAIN: the main dictionary.
SYNONYMS: synonym dictionary.
ALI_WS: Alibaba Dictionary.

clientNodeConf T he configuration information of the


Struct
iguration coordination node.

amount Integer 3 T he number of nodes.

disk Integer 40 T he storage space of the node. Unit: GB.

T he storage type of the node. Only ultra


diskT ype String cloud_efficiency
disks (cloud_efficiency) are supported.

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

2018-07-
createdAt String T he time when the instance was created.
13T 03:58:07.253Z

dedicateMaster Boolean false Dedicated master node (obsolete).

description String es-cn-abc T he name of the instance.

dictList Array of DictList T he configuration of the IK dictionary.

fileSize Long 2782602 T he size of the dictionary file. Unit: bytes.

57 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

name String SYST EM_MAIN.dic T he name of the dictionary file.

T he source type of the dictionary file. Valid


values:

OSS: OSS is open for storage (you need to


sourceT ype String ORIGIN ensure that the OSS bucket is publicly
readable).
ORIGIN: the open source Elasticsearch.
UPLOAD: the uploaded file.

T he type of the dictionary file. Valid values:

ST OP: stop words.


type String MAIN MAIN: the main dictionary.
SYNONYMS: synonym dictionary.
ALI_WS: Alibaba Dictionary.

es-cn-
3h4k3axh33th9****.e
domain String T he internal endpoint of the instance.
lasticsearch.aliyuncs
.com

elasticDataNod
Struct T he configuration of the elastic data node.
eConfiguration

amount Integer 3 T he number of nodes.

disk Integer 20 T he storage space of the node. Unit: GB.

Specifies whether to enable disk encryption


for the node. Valid values:
diskEncryption Boolean true
true: enables MFA
flase: disabled.

T he storage type of the node. Valid values:

cloud_ssd: standard SSD.


diskT ype String cloud_ssd
cloud_essd: enhanced SSD
cloud_efficiency: ultra disk

T he node specification. Specification


elasticsearch.sn2ne.l
spec String information is available through Product
arge
Specifications View.

> Document Version: 20220524 58


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Specifies whether to enable Kibana private


enableKibanaPri network access. T he values are as follows:
Boolean false
vateNetwork true: BFD is enabled.
false: BFD is disabled.

Specifies whether to enable Internet access


enableKibanaPu to Kibana. T he values are as follows:
Boolean true
blicNetwork true: BFD is enabled.
false: BFD is disabled.

Specifies whether to enable the public


network access feature for the Elasticsearch
enablePublic Boolean true cluster. T he values are as follows:

true: BFD is enabled.


false: BFD is disabled.

{"http.cors.allow- T he YML file configuration information of the


esConfig Map
credentials":"false"} instance.

T he private network access blacklist


esIPBlacklist List [ "0.0.0.0/0" ]
(obsolete).

T he private network access whitelist


esIPWhitelist List [ "0.0.0.0/0" ]
(obsolete).

esVersion String 6.3.2_with_X-Pack T he version of the instance.

[{ "configT ype":
extendConfigs List "aliVersion","aliVersi T he extended configurations of the instance.
on": "ali1.3.0" }]

Indicates whether the instance contains


client nodes. T he values are as follows:
haveClientNode Boolean true
true: Contains client nodes.
false: Not contains client nodes.

Indicates whether the instance contains


Kibana nodes. T he values are as follows:
haveKibana Boolean true
true: Contains Kibana nodes.
false: Not contains Kibana nodes.

59 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

es-cn-
instanceId String T he ID of the instance.
3h4k3axh33th9****

isNewDeploym Specifies whether to deploy the new


Boolean true
ent architecture.

kibanaConfigur
Struct T he configuration of Kibana nodes.
ation

amount Integer 1 T he number of DRDS server nodes.

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

es-cn-
3h4k3axh33th9****.k
kibanaDomain String T he endpoint of Kibana.
ibana.elasticsearch.
aliyuncs.com

kibanaIPWhiteli T he list of Kibana public endpoint access


List [ "0.0.0.0/0" ]
st whitelists.

kibanaPort Integer 5601 T he access port of Kibana.

kibanaPrivateIP
List ["192.168.XX.XX"] T he whitelist of Kibana private endpoint.
Whitelist

T he configuration of dedicated master


masterConfigur
Struct nodes.
ation

amount Integer 3 T he number of nodes.

disk Integer 40 T he storage space of the node. Unit: GB.

T he storage type of the node. Only


diskT ype String cloud_ssd
cloud_ssd(SSD) is supported.

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

> Document Version: 20220524 60


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

networkConfig Struct T he network configuration.

T he network type. Only Virtual Private Cloud


type String vpc
(VPC) is supported.

vpcId String vpc-abc T he ID of the VPC network.

vsArea String cn-hangzhou-b T he zone where the instance is deployed.

vswitchId String vsw-abc T he IDs of vSwitches.

Array of
whiteIpGroupLi
whiteIpGroupLi T he list of whitelists.
st
st

T he group name of the whitelist group. T he


groupName String default
default group is included by default.

["0.0.0.0", T he list of IP addresses in the whitelist


ips List
"127.0.XX.XX"] group.

T he type of the whitelist. T he values are as


follows:

PRIVAT E_ES: Elasticsearch the private


network.
whiteIpT ype String PRIVAT E_ES PUBLIC_ES: Elasticsearch the Internet.
PRIVAT E_KIBANA: the Kibana private
network.
PUBLIC_KIBANA: the public network of
Kibana.

nodeAmount Integer 2 T he number of data nodes.

nodeSpec Struct T he configuration of data nodes.

disk Integer 0 T he storage space of the node. Unit: GB.

61 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Specifies whether to enable disk encryption.


Valid values:
diskEncryption Boolean true
true: BFD is enabled.
false: BFD is disabled.

T he disk type of the node. Supported:


diskT ype String cloud_ssd cloud_ssd(SSD) and cloud_efficiency (ultra
disk).

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

T he billing method of the instance. Valid


values:
paymentT ype String postpaid
prepaid: subscription.
postpaid: pay-as-you-go.

T he port number that is used to access your


port Integer 9200
Elasticsearch cluster.

T he status of the pay-as-you-go service


overlaid on the subscription instance. T he
values are as follows:
postpaidServic
String active active: normal.
eStatus
closed: disabled.
indebt: T he overdue payment is being
frozen.

privateNetwork T he whitelist of the private endpoint of the


List 0.0.0.0/0
IpWhiteList instance.

T he communication protocol. Supported:


protocol String HT T P
HT T P and HT T PS.

es-cn-
3h4k3axh33th9****.e
publicDomain String T he public endpoint of the instance.
lasticsearch.aliyuncs
.com

publicIpWhitelis T he public endpoint access whitelist of the


List [ "0.0.0.0/0" ]
t instance.

> Document Version: 20220524 62


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

publicPort Integer 9200 T he public access port of the instance.

resourceGroupI T he ID of the resource group to which the


String rg-aekzvowej3i****
d ApsaraDB for Redis instance belongs.

serviceVpc Boolean true whether it is a service vpc.

T he status of the instance. Valid values:

active: normal.
status String active activating: T he instance is taking effect.
inactive: freezes.
invalid: invalid.

Array of
synonymsDicts T he configuration of the synonym dictionary.
SynonymsDicts

fileSize Long 2782602 T he size of the dictionary file. Unit: bytes.

name String SYST EM_MAIN.dic T he name of the dictionary file.

sourceT ype String ORIGIN T he source of the synonym dictionary file.

T he type of the synonym dictionary. T he


values are as follows:

ST OP: stop words.


type String ST OP
MAIN: the main dictionary.
SYNONYMS: synonym dictionary.
ALI_WS: Alibaba Dictionary.

tags Array of T ag Details about the tags.

tagKey String env T he key of tag N.

tagValue String dev T he value of the label.

2018-07- T he time when the instance was last


updatedAt String
13T 03:58:07.253Z updated.

63 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

vpc-
vpcInstanceId String T he ID of the virtual private cloud (VPC).
bp1uag5jj38c****

Specifies whether to enable the cold data


node. T he values are as follows:
warmNode Boolean true
true: BFD is enabled.
false: BFD is disabled.

warmNodeConf T he configuration information of the cold


Struct
iguration data node.

amount Integer 6 T he number of nodes.

disk Integer 500 T he storage space of the node. Unit: GB.

Specifies whether to enable disk encryption.


T he values are as follows:
diskEncryption Boolean true
true: BFD is enabled.
false: BFD is disabled.

T he storage type of the node. Only


diskT ype String cloud_efficiency
cloud_efficiency (ultra disks) are supported.

T he specification of data nodes.


elasticsearch.n4.sm
spec String Specification information is available through
all
Product Specifications View.

zoneCount Integer 2 T he number of zones.

Array of
zoneInfos Zone information.
ZoneInfo

T he status of the zone. Supported:


status String NORMAL
ISOLAT ION and NORMAL.

T he ID of the zone to which the resources


zoneId String cn-hangzhou-b
belong.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

> Document Version: 20220524 64


API Reference· Elast icsearch inst anc
Elast icsearch
es

Not e In t he following ret urn example, t his art icle only guarant ees t hat t he paramet ers in t he
ret urn dat a list are included, and t he paramet ers not ment ioned are for reference only. T he
program cannot force t o rely on obt aining t hese paramet ers.

Examples
Sample request s

GET /openapi/instances/es-cn-3h4k3axh33th9**** HTTP/1.1 common request headers

Sample success responses


JSON format

{ "Result": { "instanceId": "es-cn-3h4k3axh33th9****", "domain": "es-cn-3h4k3axh33th9*


***.elasticsearch.aliyuncs.com", "description": "es-cn-3h4k3axh33th9****", "nodeAmount": 2,
"paymentType": "postpaid", "status": "active", "port": 9200, "esVersion": "6.3.2_with_X-Pac
k", "instanceCategory": "x-pack", "esConfig": { "action.destructive_requires_name": "true",
"xpack.security.audit.outputs": "index", "xpack.watcher.enabled": "false", "xpack.security.
audit.enabled": "false", "action.auto_create_index": "+.*,-*" }, "esIPWhitelist": [ "0.0.0.
0/0" ], "esIPBlacklist": [], "privateNetworkIpWhiteList": [ "0.0.0.0/0" ], "kibanaIPWhiteli
st": [ "0.0.0.0/0", "::/0" ], "publicIpWhitelist": [], "kibanaDomain": "es-cn-3h4k3axh33th9
****.kibana.elasticsearch.aliyuncs.com", "kibanaPort": 5601, "enablePublic": false, "haveKi
bana": true, "nodeSpec": { "spec": "elasticsearch.sn1ne.large", "disk": 21, "diskType": "cl
oud_ssd" }, "serviceVpc": true, "networkConfig": { "vpcId": "vpc-bp13n1j3fcv1cqfkg****", "v
switchId": "vsw-bp12q2vrqvko0ilg8****", "vsArea": "cn-hangzhou-h", "type": "vpc", "whiteIpG
roupList": [ { "groupName": "default", "whiteIpType": "PRIVATE_ES", "ips": [ "0.0.0.0", "12
7.0.XX.XX" ] } ] }, "createdAt": "2019-08-28T07:48:59.736Z", "updatedAt": "2019-08-28T08:11
:33.229Z", "inited": true, "dedicateMaster": false, "advancedDedicateMaster": false, "maste
rConfiguration": {}, "haveClientNode": true, "warmNode": true, "warmNodeConfiguration": { "
spec": "elasticsearch.ic5.large", "amount": 2, "diskType": "cloud_efficiency", "disk": 500,
"diskEncryption": true }, "clientNodeConfiguration": { "spec": "elasticsearch.ic5.large", "
amount": 2, "diskType": "cloud_efficiency", "disk": 20 }, "kibanaConfiguration": { "spec":
"elasticsearch.n4.small", "amount": 1, "disk": 0 }, "commodityCode": "elasticsearch", "endT
ime": 4722681600000, "dictList": [ { "name": "SYSTEM_MAIN.dic", "fileSize": 2782602, "type"
: "MAIN", "sourceType": "ORIGIN" }, { "name": "SYSTEM_STOPWORD.dic", "fileSize": 132, "type
": "STOP", "sourceType": "ORIGIN" } ], "synonymsDicts": [], "ikHotDicts": [], "aliwsDicts":
[], "clusterTasks": [], "vpcInstanceId": "es-cn-3h4k3axh33th9****-worker", "resourceGroupId
": "rg-acfm3ghp32r****", "zoneCount": 1, "protocol": "HTTP", "haveGrafana": false, "haveCer
ebro": false, "zoneInfos": [ { "zoneId": "cn-hangzhou-h", "status": "NORMAL" } ], "enableKi
banaPublicNetwork": true, "advancedSetting": { "gcName": "CMS" } }, "RequestId": "68104CC2-
DA27-446D-8049-A024F0D4EFEC" }

Error code
For a list of error codes, visit t he API Error Cent er .

7.1.4. EstimatedRestartTime
Obt ains t he est imat ed t ime t hat is required t o rest art an Elast icsearch clust er.

65 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/estimated-time/restart-time HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the cluster.
c****

Whether it is a forced restart.


Boolea
force Query No false Default: false.
n

RequestBody
You can also ent er t he following paramet ers in t he Request Body t o specify t he rest art paramet er
informat ion.

Parameter T ype Required Example Description

Restart type,
support: instance
(restart instance),
nodeIp (node
restart). Default
value: Restart the
restartT ype String No instance instance.

> Document Version: 20220524 66


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

Select the IP
address list of the
nodes List<String\> No ["127.0.0.1"]
target node when
the node restarts.

Whether to make
a blue-green
change when the
blueGreenDep Boolean No false
node is restarted.
Default value:
false.

T he degree of
concurrency of
instance forced
restart. Default
batch Integer No 25.0
value: 1 /T otal
number of nodes
of the instance.

T he batch unit.
batchUnit String No percent Default value:
percent.

T he blueGreenDep paramet er is ignored when t he rest art T ype is inst ance.


Force is t rue,bat ch must be great er t han 0 and less t han or equal t o 100, ot herwise t he syst em will
prompt t he Rest art Bat chValueError t o report an error.
Force is false and bat ch default s t o 0. When ot her values are ent ered, an error
NormalRest art Not Support Bat ch will be report ed.

T he bat ch paramet er is ignored when rest art T ype is nodeIp.


If nodeIp is empt y, t he syst em will prompt a paramet er error.
BlueGreenDep is t rue, and t he blue-green change is rest art ed; false, normal rest art .

Sample t emplat e:

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

Response parameters

Parameter T ype Example Description

67 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he returned results.

unit String second T he unit.

value Long 50 Estimated restart time.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/estimated-time/restart-time?force=true
HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": { "unit": "second", "value": 4200 }, "RequestId": "7ACE8751-DD1B-40DB-A253


-9080CA58****" }

Error code
For a list of error codes, visit t he API Error Cent er .

7.1.5. RestartInstance
You can call t his operat ion t o rest art a specified Elast icsearch inst ance.

Not e Aft er t he inst ance is rest art ed, t he inst ance ent ers t he act ivat ing st at e. Aft er t he
inst ance is rest art ed, it s st at us changes t o act ive. Alibaba Cloud Elast icsearch support s rest art ing a
single node. Rest art ing a node can be divided int o normal rest art and blue-green rest art .

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

> Document Version: 20220524 68


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request syntax
POST /openapi/instances/[InstanceId]/actions/restart HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q8auz0003*** T he ID of the instance.
*

Specifies whether to ignore the status


force Boolean No false of the instance and forcibly restart the
instance.

A unique token generated by the client


5A2CFF0E-5718-
to guarantee the idempotency of the
clientT oken String No 45B5-9D4D-
request. T he maximum length of the
70B3FF****
token is 64 ASCII characters.

RequestBody
T he following paramet ers must be specified in Request Body:

Parameter T ype Required Example Description

T he restart type.
Valid values:

inst ance (default)


: Instance restart.

no deIp : T o
restart the node,
you need to
specify the IP
address of the
restartT ype String No instance
node.

no deEcsId : T o
restart a node,
you need to
specify the ID of
the ECS instance in
the cluster.

69 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

When selecting a
node to restart,
specify the IP
nodes List<String> No ["127.0.0.1"]
address or ID of
the node to be
restarted.

Whether to enable
blue-green
deployment when
blueGreenDep Boolean No false
the node restarts.
Default value:
f alse .

Set the
concurrency when
the instance is
batchCount Double No 25.0
forced to restart.

T he unit of the
bat chCo unt .
batchUnit String No percent
Default value:
percent .

Not e
If t he rest art T ype paramet er is not specified or is empt y, t he default value is inst ance . For
inst ance t he blueGreenDep paramet er is ignored by default , and t he following condit ions
must be met :
When t he value of f orce is t rue , t he value of bat chCount must be great er t han 0
but less t han or equal t o 100. Ot herwise, a Rest art Bat chValueError error is ret urned.
When t he f orce paramet er is set t o f alse , bat chCount is set t o 0 by default . If it is
set t o anot her value, an error NormalRest art Not Support Bat ch.

is
When t he value of rest art T ype is nodeIp , t he bat chCount paramet er is ignored. And t he
following condit ions are met :
T he error message ret urned if t he nodes paramet er is null.
when t he bluependep is t rue, t he blue-green deployment is enabled when t he
node is rest art ed. When t his paramet er is set t o f alse , t he syst em does not enable
t he blue-green deployment and rest art s normally.

> Document Version: 20220524 70


API Reference· Elast icsearch inst anc
Elast icsearch
es

Example:

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

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DC****

Result Struct T he return results.

2020-07-
createdAt String T he time when the instance was created.
06T 10:18:48.662Z

description String es-cn-abc T he name of the instance.

dictList Array of dictList T he configuration of the IK dictionaries.

dictList

fileSize Long 2782602 T he size of the Dictionary File. Unit: bytes.

name String SYST EM_MAIN.dic T he name of the dictionary file.

T he source type. Valid values:

OSS: OSS open storage (need to ensure


that OSS storage space is public
sourceT ype String ORIGIN
readable.)
ORIGIN: Open source Elasticsearch
UPLOAD: Uploaded files

T he type of the dictionary. Valid values:

ST OP: T he ST OP word.
type String MAIN MAIN: MAIN Dictionary
SYNONYMS: SYNONYMS
ALI_WS: an Alibaba Dictionary.

71 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

es-cn-
nif1q8auz0003****.e
domain String T he intranet access address of the instance.
lasticsearch.aliyuncs
.com

esVersion String 6.7.0_with_X-Pack T he version of the instance.

es-cn-
instanceId String T he ID of the instance.
n6w1o1x0w001c****

kibanaConfigur
Struct T he configuration of Kibana nodes.
ation

amount Integer 1 T he number of performance metrics.

T he size of the node storage space. Unit:


disk Integer 20
GB.

diskT ype String cloud_ssd T he storage type of the node.

elasticsearch.n4.sm
spec String T he specification of data nodes.
all

es-cn-
nif1q8auz0003****.ki T he public network access address of
kibanaDomain String Kibana.
bana.elasticsearch.a
liyuncs.com

kibanaPort Integer 5601 T he public port of the Kibana network.

masterConfigur T he configuration of dedicated master


Struct
ation nodes.

amount Integer 3 T he number of nodes in the cluster.

T he size of the node storage space. Unit:


disk Integer 20
GB.

T he storage type of the node. T his tool only


diskT ype String cloud_ssd
supports cloud_ssd (cloud SSD) disks.

elasticsearch.sn2ne.l
spec String T he node specifications of the cluster.
arge

> Document Version: 20220524 72


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

networkConfig Struct T he network configuration.

T he network type. Only Virtual Private Cloud


type String vpc
(VPC) is supported.

vpc-
vpcId String bp16k1dvzxtmagcv T he ID of the VPC.
a****

vsArea String cn-hangzhou-i T he zone where the instance is deployed.

vsw-
T he ID of the vSwitch associated with the
vswitchId String bp1k4ec6s7sjdbudw
specified VPC.
****

nodeAmount Integer 2 T he number of data nodes.

nodeSpec Struct T he configuration of data nodes.

T he storage space size per data node. Unit:


disk Integer 50
GB.

T he storage type of the node. Valid values:


diskT ype String cloud_ssd
cloud_ssd and cloud_efficiency.

elasticsearch.n4.sm
spec String T he specification of data nodes.
all

T he billing method of the created ECS


paymentT ype String postpaid instance.

Valid values: prepaid and postpaid.

es-cn-
n6w1o1x0w001c****
publicDomain String T he public network access address.
.public.elasticsearch
.aliyuncs.com

publicPort Integer 9200 T he public network port.

73 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he state of the cluster.

status String active Supported: active (normal), activating


(initializing), inactive (blocked), and invalid
(expired).

Array of T he configuration of the synonym


synonymsDicts
synonymsDicts dictionaries.

synonymsDicts

fileSize Long 2782602 T he size of the Dictionary File. Unit: bytes.

name String SYST EM_MAIN.dic T he name of the dictionary file.

T he source type. Valid values:

OSS:OSS open storage (the OSS storage


space must be publicly readable.)
sourceT ype String ORIGIN
ORIGIN: open-source Elasticsearch
UPLOAD

T he type of the dictionary. Valid values:

ST OP: T he ST OP word.
type String ST OP MAIN: MAIN Dictionary
SYNONYMS: SYNONYMS
ALI_WS: an Alibaba Dictionary.

2018-07- T he time when the instance was last


updatedAt String
18T 10:10:04.484Z updated.

T he following response examples may cont ain t he paramet ers in t he list of ret urned dat a. T hese
paramet ers are for reference only. You must make sure t hat your applicat ion is not st rongly reliant on
t hese paramet ers.

Examples
Sample request s

> Document Version: 20220524 74


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/es-cn-nif1q8auz0003****/actions/restart HTTP/1.1


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

Sample success responses

JSON format

{
"Result": {
"instanceId": "es-cn-nif1q8auz0003****",
"version": "7.4.0_with_X-Pack",
"description": "es-cn-nif1q8auz0003****",
"nodeAmount": 3,
"paymentType": "prepaid",
"status": "active",
"privateNetworkIpWhiteList": [
"0.0.0.0/0"
],
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.n4.small",
"disk": 20,
"diskType": "cloud_ssd",
"diskEncryption": false
},
"networkConfig": {
"vpcId": "vpc-bp16k1dvzxtmagcva****",
"vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
"vsArea": "cn-hangzhou-i",
"type": "vpc"
},
"createdAt": "2020-07-06T10:18:48.662Z",
"updatedAt": "2020-07-06T10:18:48.662Z",
"commodityCode": "elasticsearchpre",
"extendConfigs": [
{
"configType": "usageScenario",
"value": "general"
},
{
"configType": "maintainTime",
"maintainStartTime": "02:00Z",
"maintainEndTime": "06:00Z"
}
],
"endTime": 1596729600000,
"clusterTasks": [],
"vpcInstanceId": "es-cn-nif1q8auz0003****-worker",
"resourceGroupId": "rg-acfm2h5vbzd****",

75 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es
"resourceGroupId": "rg-acfm2h5vbzd****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-i",
"status": "NORMAL"
}
],
"instanceType": "elasticsearch",
"inited": true,
"tags": [],
"domain": "es-cn-nif1q8auz0003****.elasticsearch.aliyuncs.com",
"port": 9200,
"esVersion": "7.4.0_with_X-Pack",
"esConfig": {
"action.destructive_requires_name": "true",
"xpack.watcher.enabled": "false",
"action.auto_create_index": "+.*,-*"
},
"esIPWhitelist": [
"0.0.0.0/0"
],
"esIPBlacklist": [],
"kibanaIPWhitelist": [
"0.0.0.0/0",
"::/0"
],
"kibanaPrivateIPWhitelist": [],
"publicIpWhitelist": [],
"kibanaDomain": "es-cn-nif1q8auz0003****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort": 5601,
"haveKibana": true,
"instanceCategory": "x-pack",
"dedicateMaster": false,
"advancedDedicateMaster": false,
"masterConfiguration": {},
"haveClientNode": false,
"warmNode": false,
"warmNodeConfiguration": {},
"clientNodeConfiguration": {},
"kibanaConfiguration": {
"spec": "elasticsearch.n4.small",
"amount": 1,
"disk": 0
},
"dictList": [
{
"name": "SYSTEM_MAIN.dic",
"fileSize": 2782602,
"sourceType": "ORIGIN",
"type": "MAIN"
},
{
"name": "SYSTEM_STOPWORD.dic",

> Document Version: 20220524 76


API Reference· Elast icsearch inst anc
Elast icsearch
es

"fileSize": 132,
"sourceType": "ORIGIN",
"type": "STOP"
}
],
"synonymsDicts": [],
"ikHotDicts": [],
"aliwsDicts": [],
"haveGrafana": false,
"haveCerebro": false,
"enableKibanaPublicNetwork": true,
"enableKibanaPrivateNetwork": false,
"advancedSetting": {
"gcName": "CMS"
}
},
"RequestId": "BB58A51D-CE72-49F9-AF08-F57F3C8A****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.1.6. UpdateInstanceChargeType
Call Updat eInst anceChargeT ype t o change t he billing met hod of a pay-as-you-go inst ance t o
subscript ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/convert-pay-type HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
0pp1jxvcl000z****

77 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
You must also specify t he following paramet ers in Request Body t o specify t he billing informat ion for
t he inst ance aft er t he billing met hod is convert ed t o subscript ion.

Parameter T ype Required Example Description

T he billing
information of the
paymentInfo Array Yes
instance after
conversion.

T he payment
duration of the
instance. 1 to 3 if
the pricingCycle
└duration Integer Yes 1 parameter is set
to Year. 1 to 9 if
the pricingCycle
parameter is set
to Month.

T he billing cycle
String of the instance.
└pricingCycle Yes Year
Valid values: Year
and Month.

> Document Version: 20220524 78


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he billing
method of the
instance. Only the
functions of pay-
as-you-go
instances can be
paymentT ype String Yes prepaid
converted to
subscription
instances.
T herefore, this
parameter is set
to prepaid.

Not e └ indicat es a child paramet er.

Example:

{
"paymentInfo":{
"duration":1,
"pricingCycle":"Month"
},
"paymentType":"prepaid"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Return results:
Result Boolean true true: conversion successful
false: conversion failed

Examples
Sample request s

79 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/es-cn-0pp1jxvcl000z****/actions/convert-pay-type HTTP/1.1


Common request parameters
{
"paymentInfo":{
"duration":1,
"pricingCycle":"Month"
},
"paymentType":"prepaid"
}

Sample success responses

JSON format

{
"Result":true,
"RequestId":"3760F67B-691D-4663-B4E5-6783554F****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.1.7. UpdateDescription
Changes t he name of a specified Elast icsearch clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request paramet ers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
PATCH|POST /openapi/instances/[InstanceId]/description HTTP/1.1

Request parameters

> Document Version: 20220524 80


API Reference· Elast icsearch inst anc
Elast icsearch
es

Locati Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1ptcb3000 T he IDs of the added ECS instances.
9****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B350**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

aliyunes_name_ Specify the updated instance


description String Body No
test name.

Response parameters

Parameter T ype Example Description

FDF34727-1664-
RequestId String 44C1-A8DA- T he ID of the request.
3EB72D60****

Result Struct T he returned results.

description String aliyunes_test_name T he new name of the instance.

Not e In t he following ret urn example, t his art icle is guarant eed t o cont ain only t he
paramet ers in t he ret urn dat a list , and t he paramet ers not ment ioned are for reference only.
List Inst ance . T he program cannot force t o rely on obt aining t hese paramet ers.

Examples
Sample request s

PATCH /openapi/instances/es-cn-n6w1ptcb30009****/description?description=aliyunes_name
_test HTTP/1.1 public request header

Sample success responses


JSON format

81 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{ "Result": { "instanceId": "es-cn-n6w1ptcb30009****", "version": "5.5.3_with_X-Pack",


"description": "aliyunes_name_test", "nodeAmount": 3, "paymentType": "postpaid", "status":
"activating", "privateNetworkIpWhiteList": [ "0.0.0.0/0" ], "enablePublic": true, "nodeSpec
": { "spec": "elasticsearch.n4.small", "disk": 40, "diskType": "cloud_ssd", "diskEncryption
": false }, "networkConfig": { "vpcId": "vpc-bp16k1dvzxtmagcva****", "vswitchId": "vsw-bp1k
4ec6s7sjdbudw****", "vsArea": "cn-hangzhou-i", "type": "vpc" }, "createdAt": "2020-06-28T08
:25:52.895Z", "updatedAt": "2020-07-06T09:21:11.615Z", "commodityCode": "elasticsearch", "e
xtendConfigs": [ { "configType": "usageScenario", "value": "general" }, { "configType": "ma
intainTime", "maintainStartTime": "02:00Z", "maintainEndTime": "06:00Z" } ], "endTime": 474
9724800000, "clusterTasks": [ { "type": "updating", "progress": 59.84375, "status": "RUNNIN
G", "canCancelable": false, "interruptible": true, "subTasks": [ { "type": "ecs", "progress
": 100, "detail": { "totalNodeCount": 4, "completedNodeCount": 4 }, "status": "FINISHED", "
canCancelable": false, "interruptible": false, "subTasks": [] }, { "type": "hippo", "progre
ss": 100, "detail": {}, "status": "FINISHED", "canCancelable": false, "interruptible": fals
e, "subTasks": [] }, { "type": "rolling", "progress": 39.375, "detail": { "totalNodeCount":
4, "completedNodeCount": 1 }, "status": "RUNNING", "canCancelable": false, "interruptible":
false, "subTasks": [] }, { "type": "finally", "progress": 0, "detail": {}, "status": "READY
", "canCancelable": false, "interruptible": false, "subTasks": [] } ] } ], "vpcInstanceId":
"es-cn-n6w1ptcb30009****-worker", "resourceGroupId": "rg-acfm2h5vbzd****", "zoneCount": 1,
"protocol": "HTTP", "zoneInfos": [ { "zoneId": "cn-hangzhou-i", "status": "NORMAL" } ], "in
stanceType": "elasticsearch", "inited": true, "tags": [], "domain": "es-cn-n6w1ptcb30009***
*.elasticsearch.aliyuncs.com", "port": 9200, "esVersion": "5.5.3_with_X-Pack", "esConfig":
{ "action.destructive_requires_name": "true", "xpack.security.audit.outputs": "index", "xpa
ck.watcher.enabled": "false", "xpack.security.audit.enabled": "false", "action.auto_create_
index": "true" }, "esIPWhitelist": [ "0.0.0.0/0" ], "esIPBlacklist": [], "kibanaIPWhitelist
": [ "0.0.0.0/0", "::/0" ], "kibanaPrivateIPWhitelist": [], "publicIpWhitelist": [ "::1", "
0.0.0.0/0" ], "kibanaDomain": "es-cn-n6w1ptcb30009****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort": 5601, "publicPort": 9200, "publicDomain": "es-cn-n6w1ptcb30009****.public.ela
sticsearch.aliyuncs.com", "haveKibana": true, "instanceCategory": "x-pack", "dedicateMaster
": false, "advancedDedicateMaster": false, "masterConfiguration": {}, "haveClientNode": fal
se, "warmNode": false, "warmNodeConfiguration": {}, "clientNodeConfiguration": {}, "kibanaC
onfiguration": { "spec": "elasticsearch.n4.small", "amount": 1, "disk": 0 }, "dictList": [
{ "name": "SYSTEM_MAIN.dic", "fileSize": 3058510, "sourceType": "ORIGIN", "type": "MAIN" },
{ "name": "SYSTEM_STOPWORD.dic", "fileSize": 164, "sourceType": "ORIGIN", "type": "STOP" }
], "synonymsDicts": [], "ikHotDicts": [], "aliwsDicts": [], "haveGrafana": false, "haveCere
bro": false, "enableKibanaPublicNetwork": true, "enableKibanaPrivateNetwork": false, "advan
cedSetting": { "gcName": "CMS" } }, "RequestId": "24A68E4C-94B4-45E4-9068-CB12F33C****" }

Error codes

HttpCode Error code Error message Description

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.1.8. DeleteInstance

> Document Version: 20220524 82


API Reference· Elast icsearch inst anc
Elast icsearch
es

You can call t his operat ion t o release a pay-as-you-go Elast icsearch inst ance. Aft er t he inst ance is
released, t he physical resources of t he inst ance is reclaimed. T he dat a of t he inst ance is delet ed and
cannot be recovered. T he disks mount ed t o t he inst ance nodes and t he snapshot s are released.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
DELETE /openapi/instances/[InstanceId] HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Required t57p81n7ai89v*** T he ID of the instance.
*

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

Response parameters

Parameter T ype Example Description

94B03BBA-A132-
RequestId String 42C3-8367- T he ID of the request.
0A0C1C45****

T he ret urned dat a also includes t he Result paramet er. For more informat ion, see List Inst ance.

Examples
Sample request s

DELETE /openapi/instances/es-cn-t57p81n7ai89v**** HTTP/1.1


Common request header

83 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Sample success responses

JSON format

{
"Result": {
"instanceId": "es-cn-t57p81n7ai89v****",
"version": "6.7.0_with_X-Pack",
"description": "aliyunes_name_test",
"nodeAmount": 3,
"paymentType": "postpaid",
"status": "active",
"privateNetworkIpWhiteList": [
"0.0.0.0/0"
],
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.sn2ne.xlarge",
"disk": 20,
"diskType": "cloud_ssd"
},
"networkConfig": {
"vpcId": "vpc-bp16k1dvzxtmagcva****",
"vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
"vsArea": "cn-hangzhou-i",
"type": "vpc"
},
"createdAt": "2020-07-06T07:00:33.090Z",
"updatedAt": "2020-07-06T09:51:08.635Z",
"commodityCode": "elasticsearch",
"extendConfigs": [
{
"configType": "usageScenario",
"value": "general"
},
{
"configType": "maintainTime",
"maintainStartTime": "02:00Z",
"maintainEndTime": "06:00Z"
},
{
"configType": "aliVersion",
"aliVersion": "ali1.2.0"
}
],
"endTime": 4749724800000,
"clusterTasks": [],
"vpcInstanceId": "es-cn-t57p81n7ai89v****-worker",
"resourceGroupId": "rg-acfm2h5vbzd****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-i",
"status": "NORMAL"

> Document Version: 20220524 84


API Reference· Elast icsearch inst anc
Elast icsearch
es
"status": "NORMAL"
}
],
"instanceType": "elasticsearch",
"inited": true,
"tags": [],
"domain": "es-cn-t57p81n7ai89v****.elasticsearch.aliyuncs.com",
"port": 9200,
"esVersion": "6.7.0_with_X-Pack",
"esConfig": {
"action.destructive_requires_name": "true",
"xpack.security.audit.outputs": "index",
"xpack.watcher.enabled": "false",
"xpack.security.audit.enabled": "false",
"action.auto_create_index": "+.*,-*"
},
"esIPWhitelist": [
"0.0.0.0/0"
],
"esIPBlacklist": [],
"kibanaIPWhitelist": [
"0.0.0.0/0",
"::/0"
],
"kibanaPrivateIPWhitelist": [],
"publicIpWhitelist": [],
"kibanaDomain": "es-cn-t57p81n7ai89v****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort": 5601,
"haveKibana": true,
"instanceCategory": "x-pack",
"dedicateMaster": false,
"advancedDedicateMaster": false,
"masterConfiguration": {},
"haveClientNode": false,
"warmNode": false,
"warmNodeConfiguration": {},
"clientNodeConfiguration": {},
"kibanaConfiguration": {
"spec": "elasticsearch.n4.small",
"amount": 1,
"disk": 0
},
"dictList": [
{
"name": "SYSTEM_MAIN.dic",
"fileSize": 2782602,
"sourceType": "ORIGIN",
"type": "MAIN"
},
{
"name": "SYSTEM_STOPWORD.dic",
"fileSize": 132,
"sourceType": "ORIGIN",
"type": "STOP"
}

85 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es
}
],
"synonymsDicts": [],
"ikHotDicts": [],
"aliwsDicts": [],
"haveGrafana": false,
"haveCerebro": false,
"enableKibanaPublicNetwork": true,
"enableKibanaPrivateNetwork": false,
"advancedSetting": {
"gcName": "CMS"
}
},
"RequestId": "CC95EF0A-12FD-4BCA-AF76-F34B04BA****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.1.9. CancelDeletion
You can call t he CancelDelet ion operat ion t o rest ore t he released Elast icsearch inst ance t hat is frozen.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/cancel-deletion HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
T he ID of the instance.
InstanceId String Path Yes z2q1wk6z0000
7****

> Document Version: 20220524 86


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

A unique token generated by the


client to guarantee the
idempotency of the request. You
5A2CFF0E-
can use the client to generate the
5718-45B5-
clientT oken String Query No value, but you must ensure that it
9D4D-
is unique among different requests.
70B3FF****
T he token can contain only ASCII
characters and cannot exceed 64
characters in length.

Response parameters

Parameter T ype Example Description

D682B6B3-B425-
RequestId String 46DA-A5FC- T he ID of the request.
5F5C60553622

Indicates whether the restoration of the


instance is successful. Valid values:
Result Boolean true
true
false

Examples
Sample request s

POST /openapi/instances/es-cn-z2q1wk6z00007****/actions/cancel-deletion HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "D682B6B3-B425-46DA-A5FC-5F5C60553622"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

87 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.1.10. RenewInstance
Call RenewInst ance t o renew a subscript ion inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/renew HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

T his parameter is used to ensure the


idempotence of the request. You can
5A2CFF0E-5718- use the client to generate the value,
clientT oken String No 45B5-9D4D- but you must ensure that it is unique
70B350**** among different requests. T he token
can only contain ASCII characters and
cannot exceed 64 characters in length.

RequestBody
T he following fields are also required in Request Body t o specify t he renewal informat ion.

Field T ype Required Example Description

> Document Version: 20220524 88


API Reference· Elast icsearch inst anc
Elast icsearch
es

Field T ype Required Example Description

T he renewal
duration of the
subscription
cluster. If
pricingCycle is set
to Year, the
duration Integer Yes 1
duration is 1 to 3.
If pricingCycle is
set to Month, the
duration is 1 to 9.

T he billing cycle
of renewal. Valid
pricingCycle String Yes Year
values: Year and
Month.

Example:

{
"duration":1,
"pricingCycle":"Year"
}

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:
Result Boolean true true: renewal successfully
false: renewal failed

Examples
Sample request s

89 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/renew HTTP/1.1


Common request parameters
{
"duration":1,
"pricingCycle":"Year"
}

Sample success responses


JSON format

{
"Result": true,
"RequestId": "4FF74B95-7D01-44B4-8E0D-6E5AB515****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.1.11. ActivateZones
call Act ivat eZones, rest ore offline zone. T his operat ion is available only for mult i-zone Elast icsearch
clust ers.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request paramet ers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
POST /openapi/instances/[InstanceId]/actions/recover-zones HTTP/1.1

Request parameters

> Document Version: 20220524 90


API Reference· Elast icsearch inst anc
Elast icsearch
es

Locati Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he IDs of the added ECS instances.
c****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
In t he Request Body, you also need t o ent er t he list of available zone IDs t o be rest ored, as shown in t he
following example.
["cn-hangzhou-i","cn-hangzhou-h"]

Response parameters

Parameter T ype Example Description

5A5D8E74-565C-
RequestId String 43DC-B031- T he ID of the request.
29289FA****

Sample response:
Result Boolean true true: specifies to recovery zone success
false: recovery zone failure

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c **** /actions/recover-zones HTTP/1.1 publi


c request header ["cn-hangzhou-i","cn-hangzhou-h"]

Sample success responses

JSON format

{ "Result": true, "RequestId": "5A5D8E74-565C-43DC-B031-29289FA****" }

Error codes

91 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

HttpCode Error code Error message Description

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.1.12. DeactivateZones
Call deact ivat ezones t o offline part of t he zone when mult iple zones are available. And you need t o
migrat e t he nodes in t he offline zone t o ot her zones.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/down-zones HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
You must also specify t he IDs of t he zones in t he Request Body field. Example:
["cn-hangzhou-i","cn-hangzhou-f"]

Response parameters

> Document Version: 20220524 92


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:
Result Boolean true true: offline zone successfully
false: offline zone successfully failed

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/down-zones HTTP/1.1


Common request parameters
["cn-hangzhou-i","cn-hangzhou-f"]

Sample success responses


JSON format

{
"Result": true,
"RequestId": "5A5D8E74-565C-43DC-B031-29289FA****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.1.13. DescribeRegions
Call DescribeRegions t o obt ain t he region informat ion of an Alibaba Cloud Elast icsearch.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

93 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request syntax
GET /openapi/regions HTTPS|HTTP

Request parameters
None

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Array of
Result T he list of returned results.
regionInfo

https://elasticsearc
consoleEndpoin h-cn- T he Endpoint exposed by the console in this
String
t hangzhou.console.a region.
liyun.com

T he name of the region where a server


localName String China (Hangzhou)
resides.

elasticsearch.cn-
regionEndpoint String hangzhou.aliyuncs.c T he Endpoint of the region.
om

T he ID of the region to which the cluster


regionId String cn-hangzhou
belongs.

status String available T he availability status of the region.

Examples
Sample request s

GET /openapi/regions?RegionId=cn-hangzhou HTTP/1.1


common request header

Sample success responses

JSON Format

> Document Version: 20220524 94


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": [
{
"regionId": "cn-hangzhou",
"localName": "China (Hangzhou)",
"regionEndpoint": "elasticsearch.cn-hangzhou.aliyuncs.com",
"consoleEndpoint": "https://elasticsearch-cn-hangzhou.console.aliyun.com",
"status": "available"
}
]
}

Error code
Go t o t he Error Cent er . For more informat ion, see error codes.

7.1.14. InterruptElasticsearchTask
Call Int errupt Elast icsearchT ask t o int errupt t he Alibaba cloud elast icsearch inst ance in t he change. T his
paramet er is valid only for inst ances in t he init ializing st at e. When t he inst ance is int errupt ed, it ent ers
t he suspended st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/interrupt HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

95 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

Response parameters

Parameter T ype Example Description

InstanceStatusNotS T he error code. Only displayed if an


Code String
upportCurrentAction exception is returned.

T he cluster is
running tasks or in T he error message. Only displayed if an
Message String
an error status. T ry exception is returned.
again later.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Return results:
Result Boolean true true: interrupted change successfully
false: interrupted change failed

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/interrupt HTTP/1.1


Common request header

Sample success responses


XML format

<Result>true</Result>
<RequestId>E9908D15-13F4-4428-B08F-A3EE8E39****</RequestId>

JSON format

> Document Version: 20220524 96


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": true,
"RequestId": "E9908D15-13F4-4428-B08F-A3EE8E39****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.1.15. ResumeElasticsearchTask
Call ResumeElast icsearchT ask t o resume int errupt ed change of Elast icsearch inst ance. Aft er you resume
or int errupt a change, t he inst ance ent ers t he act ivat ing st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/resume HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

97 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:

true: resume the interrupted change


Result Boolean true successfully
false: resume the interrupted change
successfully failed

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/resume HTTP/1.1


Common request header

Sample success responses


XML format

<Result>true</Result>
<RequestId>2A83EDC0-EDB0-440D-ABD9-0E912684****</RequestId>

JSON format

{
"Result": true,
"RequestId": "2A83EDC0-EDB0-440D-ABD9-0E912684****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.1.16. ListAllNode
Queries t he informat ion of all t he nodes in an Elast icsearch clust er.

> Document Version: 20220524 98


API Reference· Elast icsearch inst anc
Elast icsearch
es

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T he Get Logs operat ion does not have operat ion-specific request headers and uses only common
request headers. For more informat ion, see Common request headers.

Request syntax
GET /openapi/instances/{InstanceId}/nodes HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes tl32cpgwa002l* T he ID of the instance.
***

Specifies whether to return the


monitoring information of the
nodes in the cluster. Default value:
no. Valid values:
Boolea
extended Query No false true (default): returns
n
false

Response parameters

Parameter T ype Example Description

0D71B597-F3FF-
RequestId String 5B56-88D7- T he ID of the request.
74F9D3F7****

Result Array of Result T he return results.

T he Java Virtual Machine (JVM) heap memory


heapPercent String 21.6%
usage of the node.

zoneId String cn-hangzhou-i T he zone ID of the node.

99 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he CPU utilization.

No t e If the ext ended request


parameter is set to t rue and the
monitoring information of the nodes in
cpuPercent String 4.2% the cluster is being synchronized, the
value of the cpuPercent parameter is
null. In this case, you need to send a
request again after 10 seconds to
obtain the value of the cpuPercent
parameter.

host String 10.15.XX.XX T he IP address of the node.

T he type of the nodes. Valid values:

MAST ER: dedicated master node


WORKER: hot node
nodeT ype String WORKER
WORKER_WARM: warm node
COORDINAT ING: client node
KIBANA: Kibana node

diskUsedPercen
String 1.0% T he disk usage.
t

T he port that is used to connect to the


port Integer 9200
node.

loadOneM String 0.12 T he 1-minute load of the node.

T he health status of the node. Valid values:


health String GREEN
GREEN, YELLOW, RED, and GRAY.

Examples
Sample request s

GET /openapi/instances/es-cn-tl32cpgwa002l****/nodes HTTP/1.1


Host:elasticsearch.aliyuncs.com
Content-Type:application/json

Sample success responses


JSON format

> Document Version: 20220524 100


API Reference· Elast icsearch inst anc
Elast icsearch
es

HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : [ {
"nodeType" : "WORKER",
"host" : "10.15.XX.XX",
"port" : 9200,
"zoneId" : "cn-hangzhou-i",
"heapPercent" : "21.6%",
"cpuPercent" : "4.2%",
"loadOneM" : "0.12",
"diskUsedPercent" : "1.0%",
"health" : "GREEN"
}, {
"nodeType" : "WORKER",
"host" : "10.15.XX.XX",
"port" : 9200,
"zoneId" : "cn-hangzhou-i",
"heapPercent" : "23.3%",
"cpuPercent" : "3.6%",
"loadOneM" : "0.04",
"diskUsedPercent" : "1.0%",
"health" : "GREEN"
}, {
"nodeType" : "WORKER",
"host" : "10.15.XX.XX",
"port" : 9200,
"zoneId" : "cn-hangzhou-i",
"heapPercent" : "18.3%",
"cpuPercent" : "2.7%",
"loadOneM" : "0.08",
"diskUsedPercent" : "1.0%",
"health" : "GREEN"
}, {
"nodeType" : "KIBANA",
"host" : "10.15.XX.XX",
"port" : 5601,
"zoneId" : "cn-hangzhou-i",
"health" : "GREEN"
} ],
"RequestId" : "0D71B597-F3FF-5B56-88D7-74F9D3F7****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

FAQ
Q: When t he List AllNode API is used, t he ret urned result s are incomplet e. In some cases, no met rics such
as diskUsedPercent , cpuPercent , and heapPercent are ret urned. What do I do?

101 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

A: Unlike t he Elast icsearch Client API, OpenAPI cannot ensure t hat t he st at us of all met rics of a clust er
can be obt ained in real t ime. For example, when t he clust er load is high or unst able, some met ric
informat ion cannot be ret urned. In t his case, you can use t he Elast icsearch Client API t o obt ain t he
met rics of t he Elast icsearch clust er it self. For more informat ion, see Access Alibaba Cloud Elast icsearch
Elast icsearch t hrough a client .

7.1.17. DescribeElasticsearchHealth
Call Describe Elast icsearch Healt h t o obt ain t he healt h st at us of t he specified Elast icsearch inst ance.

T he inst ance healt h condit ion support s t he following t hree st at es:

GREEN: T he dist ribut ion of primary and secondary shards is normal.


YELLOW: T he primary shard is normally allocat ed, but t he replica is not normally allocat ed.
RED: T he primary shard is not normally allocat ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/elasticsearch-health HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes tl325wxga000l* T he ID of the request.
***

Response parameters

Parameter T ype Example Description

Code String 200 T he HT T P status code.

Message String success T he response message.

> Document Version: 20220524 102


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

0731F217-2C8A-
RequestId String 4D42-8BCD- T he ID of the request.
5C352866E3B7

Result String GREEN T he returned instance health status.

Examples
Sample request s

GET /openapi/instances/[es-cn-tl325wxga000l ****]/elasticsearch-health HTTP/1.1 public


request header

Sample success responses

JSON format

{ "Result": "GREEN", "RequestId": "0731F217-2C8A-4D42-8BCD-5C352866E3B7" }

Error codes

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he instanceId provided does T he instance cannot be found.


404 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.1.18. ListInstanceIndices
Queries t he indexes st ored on an Elast icsearch clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample codes.

Request parameters
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request structure

103 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/instances/[InstanceId]/indices HTTP/1.1

Request parameter

Locati Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes tl329rbpc0001* T he ID of the instance.
***

Specifies whether to obtain all


indexes. Valid values:

Boolea true: returns a list of indexes


all Query No false including system indexes.
n
false (default): returns a list of
indexes other than the system
index.

name String Query No log-0001 T he name of the index.

Specifies whether to view only the


indexes in the host. Valid values:
Boolea
isManaged Query No false true: only the indexes in the
n
hosting are viewed.
false (default): View all indexes.

Specifies whether to view only the


OpenStore cold stage index. Valid
Boolea values:
isOpenstore Query No false
n true: View only the
OpenStoreCold section index.
flase (default): View all indexes.

T he page number of the returned


page Integer Query No 1 page. Minimum value: 1. Default
value: 1.

T he number of entries to return on


size Integer Query No 15 each page. Maximum value: 100.
Default value: 20.

Response parameters

> Document Version: 20220524 104


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Headers Struct T he header of the response.

X-Managed- T he total number of indexes in Cloud


Integer 15
Count Hosting.

X-Managed- T he total size of the index in Cloud Hosting.


Long 18093942932
StorageSize Unit: byte.

T he total number of OpenStore cold stage


X-OSS-Count Integer 5
indexes.

X-OSS- T he total size of the OpenStore cold stage


Long 9093942932
StorageSize index for this instance. Unit: B.

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Result Array of Result T he details of the index list.

2021-01-
createT ime String T he time when the index list was queried.
11T 05:49:41.114Z

T he running status of the index. T he


following three statuses are supported:

health String green green: healthy.


yellow: alerts.
red: an exception.

105 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

{ "indices": { ".ds-
console-2021.08.18-
000002": { "index":
".ds-console-
2021.08.18-000002",
"managed": true,
"policy": "console",
"lifecycle_date_milli
s": 1629277498775,
"age": "2.64h",
"phase": "hot",
"phase_time_millis":
1629277450334,
"action":
"complete",
"action_time_millis":
1629278605586,
ilmExplain String "step": "complete", T he full lifecycle status of the current index.
"step_time_millis":
1629278605586,
"phase_execution": {
"policy": "console",
"phase_definition": {
"min_age": "0s",
"actions": {
"rollover": {
"max_size": "1gb",
"max_age": "1d",
"max_docs": 10000
}, "set_priority": {
"priority": 1000 } } },
"version": 1,
"modified_date_in_
millis":
1629277370953 } } } }

isManaged String false T his parameter is deprecated.

T he managed status of the index. T he


following three statuses are supported:
managedStatu
String closing following: Hosting.
s
closing: T he host is being canceled.
closed: unmanaged.

.kibana_task_manag
name String T he name of the index.
er_1

> Document Version: 20220524 106


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he current storage lifecycle. Value


meaning:

warm: warm stage.


cold: the cold phase.
hot: hot phase.
phase String warm
delete: deletes a stage.

No t e If this parameter is empty,


the current index is not managed by the
lifecycle.

T he total storage space occupied by the


size Long 49298589
current index. Unit: byte.

Examples
Sample request s

GET /openapi/instances/es-cn-tl329rbpc0001****/indices HTTP/1.1

Sample success responses

JSON format

107 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC****",
"Result": [
{
"name": ".kibana_task_manager_1",
"health": "green",
"size": 4929858933232,
"createTime": "2021-01-11T05:49:41.114Z",
"managedStatus": "closing",
"phase": null,
"ilmExplain": "{\n \"indices\": {\n \".kibana_task_manager_1\": {\n
\"index\": \".kibana_task_manager_1\",\n \"managed\": false\n }\n }\n}
"
},
{
"name": ".ds-console-2021.08.18-000002",
"health": "yellow",
"size": 49298589,
"createTime": "2021-01-11T05:49:41.114Z",
"managedStatus": "following",
"phase": "warm",
"ilmExplain": "{\n \"indices\": {\n \".ds-console-2021.08.18-000002\": {\n
\"index\": \".ds-console-2021.08.18-000002\",\n \"managed\": true,\n \"policy\":
\"console\",\n \"lifecycle_date_millis\": 1629277498775,\n \"age\": \"2.64h\",\n
\"phase\": \"hot\",\n \"phase_time_millis\": 1629277450334,\n \"action\": \"compl
ete\",\n \"action_time_millis\": 1629278605586,\n \"step\": \"complete\",\n
\"step_time_millis\": 1629278605586,\n \"phase_execution\": {\n \"policy\": \"c
onsole\",\n \"phase_definition\": {\n \"min_age\": \"0s\",\n \"act
ions\": {\n \"rollover\": {\n \"max_size\": \"1gb\",\n
\"max_age\": \"1d\",\n \"max_docs\": 10000\n },\n \"set_
priority\": {\n \"priority\": 1000\n }\n }\n },\n
\"version\": 1,\n \"modified_date_in_millis\": 1629277370953\n }\n }\n }\n}
"
}
],
"Headers": {
"X-Managed-Count": 15,
"X-Managed-StorageSize": 18093942932,
"X-OSS-Count": 5,
"X-OSS-StorageSize": 9093942932
}
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.1.19. MigrateToOtherZone
Call t he Migrat eT oOt herZone t o migrat e t he nodes in t he specified zone t o t he dest inat ion zone.

If t he specificat ions in your zone are insufficient , you can upgrade your inst ance t o nodes in anot her
zone. Before calling t his int erface, you must ensure t hat :

> Document Version: 20220524 108


API Reference· Elast icsearch inst anc
Elast icsearch
es

T he error message ret urned because t he current account is in a zone t hat has sufficient resources.
Aft er migrat ing nodes wit h current specificat ions t o anot her zone, you need t o manually upgrade
clust er because t he clust er will not be upgraded during t he migrat ion process. T herefore, select a
zone wit h sufficient resources t o avoid clust er upgrade failure. We recommend t hat you choose new
zones t hat are in lower alphabet ical order. For example, for cn-hangzhou-e and cn-hangzhou-h
zones, choose cn-hangzhou-h first .
T he clust er is in t he healt hy st at e.

Can be passed GET _cat/health?v command t o view t he healt h st at us of t he clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
POST /openapi/instances/[InstanceId]/actions/migrate-zones HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

Verify whether the zone node can be


migrated. true indicates that the data
is only verified and the migration task
dryRun Boolean Yes false
is not executed. false indicates that
the migration task is executed after
the verification is successful.

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

RequestBody
T he following paramet ers must be specified in Request Body t o specify t he zone informat ion for
migrat ion.

Parameter T ype Required Example Description

T he zone where
fromZoneId String Yes cn-hangzhou-i the instance is
located.

109 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he destination
zone to which the
toZoneId String Yes cn-hangzhou-b
instance is to be
migrated.

vsw-
T he ID of the
toVswitchId String Yes bp1f7r0ma00pf9h
vSwitch.
2l****

Example:

{
"fromZoneId": "cn-hangzhou-e",
"toZoneId": "cn-hangzhou-f",
"toVswitchId": "vsw-bp16t5hpc689dgkgc****"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:
Result Boolean true true: migration succeeded
false: T he migration fails

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/migrate-zones? dryRun=false HTTP/1.


1
Common request parameters
{
"fromZoneId": "cn-hangzhou-e",
"toZoneId": "cn-hangzhou-f",
"toVswitchId": "vsw-bp16t5hpc689dgkgc****"
}

Sample success responses

XML format

> Document Version: 20220524 110


API Reference· Elast icsearch inst anc
Elast icsearch
es

<Result>true</Result>
<RequestId>24A77388-9444-49A3-A1CF-F48385E5****</RequestId>

JSON format

{
"Result": true,
"RequestId": "24A77388-9444-49A3-A1CF-F48385E5****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.1.20. MoveResourceGroup
Call t he MoveResourceGroup t o migrat e t he inst ance t o t he specified resource group.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses common request headers, but does not use special request headers. For more
informat ion, see Common paramet ers.

Request syntax
PATCH|POST|PUT /openapi/instances/[InstanceId]/resourcegroup HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

111 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

RequestBody
Ent er t he following paramet ers in Request Body t o specify t he resource group t o which t he inst ance will
be migrat ed.

Parameter T ype Required Example Description

T he ID of the
resource group.
rg-
resourceGroupId String Yes Available at
acfm2h5vbzd****
Resource Groups
Get on page.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Struct T he return results.

2020-07-
createdAt String T he time when the instance was created.
06T 10:18:48.662Z

description String es-cn-abc T he name of the instance.

dictList Array of dictList T he configuration of the IK dictionary.

fileSize Long 2782602 T he size of the Dictionary File. Unit: bytes.

name String SYST EM_MAIN.dic T he name of the dictionary file.

T he source type. Valid values:

OSS:OSS open storage (make sure the


sourceT ype String ORIGIN OSS bucket is publicly readable.)
ORIGIN: Retains dictionaries that have
been uploaded.

> Document Version: 20220524 112


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he type of the dictionary. Valid values:

ST OP: Stopwords
type String MAIN MAIN: MAIN dictionary
SYNONYMS: Synonym dictionary
ALI_WS: Alibaba dictionary

es-cn-
nif1q8auz0003****.e T he internal network endpoint of the
domain String
lasticsearch.aliyuncs instance.
.com

esVersion String 6.7.0_with_X-Pack T he version of the instance.

es-cn-
instanceId String T he ID of the instance.
n6w1o1x0w001c****

kibanaConfigur
Struct T he configuration of Kibana nodes.
ation

amount Integer 1 T he number of DRDS server nodes.

disk Integer 20 T he storage space of the node. Unit: GB.

diskT ype String cloud_ssd T he storage type of the node.

elasticsearch.n4.sm
spec String T he specification of data nodes.
all

es-cn-
nif1q8auz0003****.ki
kibanaDomain String T he public network endpoint of Kibana.
bana.elasticsearch.a
liyuncs.com

kibanaPort Integer 5601 T he public port of Kibana.

masterConfigur T he configuration of dedicated master


Struct
ation nodes.

amount Integer 3 T he number of nodes.

disk Integer 20 T he storage space of the node. Unit: GB.

113 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

diskT ype String cloud_ssd T he storage type of the node.

elasticsearch.sn2ne.l
spec String T he specification of the node.
arge

networkConfig Struct T he network configuration.

T he type of the network. Only Virtual Private


type String vpc Cloud is supported.

vpc-
vpcId String bp16k1dvzxtmagcv T he ID of the VPC.
a****

vsArea String cn-hangzhou-i T he zone where the instance is deployed.

vsw-
vswitchId String bp1k4ec6s7sjdbudw T he ID of the vSwitch.
****

nodeAmount Integer 2 T he number of data nodes.

nodeSpec Struct T he configuration of data nodes.

disk Integer 50 T he storage space of the node. Unit: GB.

diskT ype String cloud_ssd T he storage type of the node.

elasticsearch.n4.sm
spec String T he specification of data nodes.
all

T he billing method of the physical


connection. Valid values:
paymentT ype String postpaid
prepaid: subscription
postpaid: pay-as-you-go

es-cn-
n6w1o1x0w001c****
publicDomain String Public network access address.
.public.elasticsearch
.aliyuncs.com

> Document Version: 20220524 114


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

publicPort Integer 9200 T he public network port.

T he status of the cluster. Valid values:

active: normal
status String active activating: taking effect
inactive: frozen
invalid: invalid

Array of
synonymsDicts T he configuration of the synonym dictionary.
synonymsDicts

fileSize Long 2782602 T he size of the Dictionary File. Unit: bytes.

name String SYST EM_MAIN.dic T he name of the dictionary file.

T he source type. Valid values:

OSS:OSS open storage (make sure the


sourceT ype String ORIGIN OSS bucket is publicly readable.)
ORIGIN: Retains dictionaries that have
been uploaded.

T he type of the dictionary. Valid values:

ST OP: Stopwords
type String ST OP MAIN: MAIN dictionary
SYNONYMS: Synonym dictionary
ALI_WS: Alibaba dictionary

2018-07- T he time when the instance was last


updatedAt String
18T 10:10:04.484Z updated.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/resourcegroup HTTP/1.1


common request header
{
"resourceGroupId": "rg-acfm2h5vbzd****"
}

Sample success responses

115 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

XML format

<Result>
<dryRun>false</dryRun>
<id>24210</id>
<instanceId>es-cn-npk2151ww000a****</instanceId>
<version>6.7.0_with_X-Pack</version>
<description/>
<ownerId>168520994880****</ownerId>
<nodeAmount>3</nodeAmount>
<paymentType>prepaid</paymentType>
<status>inactive</status>
<privateNetworkIpWhiteList>0.0.0.0/0</privateNetworkIpWhiteList>
<enablePublic>false</enablePublic>
<nodeSpec>
<spec>elasticsearch.sn2ne.2xlarge</spec>
<disk>20</disk>
<diskType>cloud_ssd</diskType>
<diskEncryption>false</diskEncryption>
<empty>false</empty>
</nodeSpec>
<networkConfig>
<vpcId>vpc-bp12nu14urf0upaf4****</vpcId>
<vswitchId>vsw-bp1xn8mossizozn6q****</vswitchId>
<vsArea>cn-hangzhou-g</vsArea>
<type>vpc</type>
</networkConfig>
<lastPayTime>2021-03-03T16:00:58.000+0000</lastPayTime>
<createdAt>2021-02-03T12:22:14.643Z</createdAt>
<updatedAt>2021-03-04T03:46:02.358Z</updatedAt>
<commodityCode>elasticsearchpre</commodityCode>
<extendConfigs>
<configType>usageScenario</configType>
<value>general</value>
</extendConfigs>
<extendConfigs>
<configType>maintainTime</configType>
<maintainStartTime>02:00Z</maintainStartTime>
<maintainEndTime>06:00Z</maintainEndTime>
</extendConfigs>
<extendConfigs>
<configType>aliVersion</configType>
<aliVersion>ali1.3.0</aliVersion>
</extendConfigs>
<endTime>1614787200000</endTime>
<force>false</force>
<ignoreStatus>false</ignoreStatus>
<vpcInstanceId>es-cn-npk2151ww000a****-worker</vpcInstanceId>
<resourceGroupId>rg-aek2wq2jlqd****</resourceGroupId>
<zoneCount>1</zoneCount>
<protocol>HTTP</protocol>
<zoneInfos>
<zoneId>cn-hangzhou-g</zoneId>
<status>NORMAL</status>
</zoneInfos>

> Document Version: 20220524 116


API Reference· Elast icsearch inst anc
Elast icsearch
es

</zoneInfos>
<instanceType>elasticsearch</instanceType>
<inited>true</inited>
<tags>
<tagKey>acs:rm:rgId</tagKey>
<tagValue>rg-acfm2h5vbzd****</tagValue>
</tags>
<domain>es-cn-npk2151ww000a****.elasticsearch.aliyuncs.com</domain>
<port>9200</port>
<esVersion>6.7.0_with_X-Pack</esVersion>
<esConfig>
<action.destructive_requires_name>true</action.destructive_requires_name>
<xpack.security.audit.outputs>index</xpack.security.audit.outputs>
<xpack.watcher.enabled>false</xpack.watcher.enabled>
<xpack.security.audit.enabled>false</xpack.security.audit.enabled>
<action.auto_create_index>+.*,-*</action.auto_create_index>
</esConfig>
<esIPWhitelist>0.0.0.0/0</esIPWhitelist>
<kibanaProtocol>HTTPS</kibanaProtocol>
<kibanaIPWhitelist>::1</kibanaIPWhitelist>
<kibanaIPWhitelist>127.0.0.1</kibanaIPWhitelist>
<kibanaDomain>es-cn-npk2151ww000a****.kibana.elasticsearch.aliyuncs.com</kibanaDomain>
<kibanaPort>5601</kibanaPort>
<haveKibana>true</haveKibana>
<instanceCategory>x-pack</instanceCategory>
<dedicateMaster>false</dedicateMaster>
<advancedDedicateMaster>false</advancedDedicateMaster>
<masterConfiguration/>
<haveClientNode>false</haveClientNode>
<warmNode>false</warmNode>
<warmNodeConfiguration/>
<clientNodeConfiguration/>
<kibanaConfiguration>
<spec>elasticsearch.n4.small</spec>
<amount>1</amount>
<disk>0</disk>
</kibanaConfiguration>
<elasticDataNodeConfiguration/>
<haveElasticDataNode>false</haveElasticDataNode>
<dictList>
<name>SYSTEM_MAIN.dic</name>
<fileSize>2782602</fileSize>
<sourceType>ORIGIN</sourceType>
<type>MAIN</type>
</dictList>
<dictList>
<name>SYSTEM_STOPWORD.dic</name>
<fileSize>132</fileSize>
<sourceType>ORIGIN</sourceType>
<type>STOP</type>
</dictList>
<aliwsDicts>
<name>aliws_ext_dict.txt</name>
<fileSize>17</fileSize>
<sourceType>ORIGIN</sourceType>

117 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

<sourceType>ORIGIN</sourceType>
<type>ALI_WS</type>
</aliwsDicts>
<haveGrafana>false</haveGrafana>
<haveCerebro>false</haveCerebro>
<enableKibanaPublicNetwork>true</enableKibanaPublicNetwork>
<enableKibanaPrivateNetwork>false</enableKibanaPrivateNetwork>
<advancedSetting>
<gcName>CMS</gcName>
</advancedSetting>
<enableMetrics>true</enableMetrics>
<readWritePolicy>
<writeHa>false</writeHa>
</readWritePolicy>
</Result>
<RequestId>D63D226F-2B80-4BF9-8F70-DBEDCC8DC2AF</RequestId>

JSON format

{
"Result": {
"dryRun": false,
"id": "24210",
"instanceId": "es-cn-npk2151ww000a****",
"version": "6.7.0_with_X-Pack",
"description": "",
"ownerId": "168520994880****",
"nodeAmount": 3,
"paymentType": "prepaid",
"status": "inactive",
"privateNetworkIpWhiteList": [
"0.0.0.0/0"
],
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.sn2ne.2xlarge",
"disk": 20,
"diskType": "cloud_ssd",
"diskEncryption": false,
"empty": false
},
"networkConfig": {
"vpcId": "vpc-bp12nu14urf0upaf4****",
"vswitchId": "vsw-bp1xn8mossizozn6q****",
"vsArea": "cn-hangzhou-g",
"type": "vpc"
},
"lastPayTime": "2021-03-03T16:00:58.000+0000",
"createdAt": "2021-02-03T12:22:14.643Z",
"updatedAt": "2021-03-04T03:46:02.358Z",
"commodityCode": "elasticsearchpre",
"extendConfigs": [
{
"configType": "usageScenario",

> Document Version: 20220524 118


API Reference· Elast icsearch inst anc
Elast icsearch
es

"value": "general"
},
{
"configType": "maintainTime",
"maintainStartTime": "02:00Z",
"maintainEndTime": "06:00Z"
},
{
"configType": "aliVersion",
"aliVersion": "ali1.3.0"
}
],
"endTime": 1614787200000,
"force": false,
"ignoreStatus": false,
"clusterTasks": [],
"vpcInstanceId": "es-cn-npk2151ww000a****-worker",
"resourceGroupId": "rg-aek2wq2jlqd****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-g",
"status": "NORMAL"
}
],
"instanceType": "elasticsearch",
"inited": true,
"tags": [
{
"tagKey": "acs:rm:rgId",
"tagValue": "rg-acfm2h5vbzd****"
}
],
"customerLabels": [],
"domain": "es-cn-npk2151ww000a****.elasticsearch.aliyuncs.com",
"port": 9200,
"esVersion": "6.7.0_with_X-Pack",
"esConfig": {
"action.destructive_requires_name": "true",
"xpack.security.audit.outputs": "index",
"xpack.watcher.enabled": "false",
"xpack.security.audit.enabled": "false",
"action.auto_create_index": "+.*,-*"
},
"esIPWhitelist": [
"0.0.0.0/0"
],
"esIPBlacklist": [],
"kibanaProtocol": "HTTPS",
"kibanaIPWhitelist": [
"::1",
"127.0.0.1"
],
"kibanaPrivateIPWhitelist": [],

119 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

"kibanaPrivateIPWhitelist": [],
"publicIpWhitelist": [],
"kibanaDomain": "es-cn-npk2151ww000a****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort": 5601,
"haveKibana": true,
"instanceCategory": "x-pack",
"dedicateMaster": false,
"advancedDedicateMaster": false,
"masterConfiguration": {},
"haveClientNode": false,
"warmNode": false,
"warmNodeConfiguration": {},
"clientNodeConfiguration": {},
"kibanaConfiguration": {
"spec": "elasticsearch.n4.small",
"amount": 1,
"disk": 0
},
"elasticDataNodeConfiguration": {},
"haveElasticDataNode": false,
"dictList": [
{
"name": "SYSTEM_MAIN.dic",
"fileSize": 2782602,
"sourceType": "ORIGIN",
"type": "MAIN"
},
{
"name": "SYSTEM_STOPWORD.dic",
"fileSize": 132,
"sourceType": "ORIGIN",
"type": "STOP"
}
],
"synonymsDicts": [],
"ikHotDicts": [],
"aliwsDicts": [
{
"name": "aliws_ext_dict.txt",
"fileSize": 17,
"sourceType": "ORIGIN",
"type": "ALI_WS"
}
],
"haveGrafana": false,
"haveCerebro": false,
"enableKibanaPublicNetwork": true,
"enableKibanaPrivateNetwork": false,
"advancedSetting": {
"gcName": "CMS"
},
"enableMetrics": true,
"readWritePolicy": {
"writeHa": false
}

> Document Version: 20220524 120


API Reference· Elast icsearch inst anc
Elast icsearch
es

}
},
"RequestId": "D63D226F-2B80-4BF9-8F70-DBEDCC8DC2AF"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.1.21. ModifyInstanceMaintainTime
You can call t his operat ion t o change and enable t he maint enance window of an inst ance.

Not e t he following before calling t his operat ion:

Before maint enance is performed, t he syst em sends SMS messages and emails t o t he cont act s list ed
in your Alibaba Cloud account .
T o ensure smoot h maint enance, your Alibaba Cloud Elast icsearch clust er ent ers t he Init ializ ing st at e
prior t o t he maint enance window. In t his case, you can st ill access t he clust er and perform query
operat ions such as performance monit oring. However, you cannot perform modificat ion operat ions
such as rest art and configurat ion upgrades for t he clust er.
Make sure t hat you configured aut omat ic reconnect ion policies for your applicat ions because t he
clust er may experience t ransient disconnect ions wit hin t he maint enance window.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
POST /openapi/instances/[InstanceId]/actions/modify-maintaintime HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

121 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
ClientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
T he following paramet ers must be ent ered in Request Body t o specify maint enance window
informat ion.

Parameter T ype Required Example Description

T he start time of
the maintenance
window. Specify
maintainStartT ime String No 02:00Z the time in the
HH:mmZ format.
T he time must be
in UT C.

T he end time of
the maintenance
window. Specify
maintainEndT ime String No 06:00Z the time in the
HH:mmZ format.
T he time must be
in UT C.

Whether the
maintenance
window feature is
enabled. T he
openMaintainT ime boolean Yes true
value true
indicates enabled.
T he value false
indicates disabled.

Example:

> Document Version: 20220524 122


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"openMaintainTime": true,
"maintainStartTime": "03:00Z",
"maintainEndTime": "04:00Z"
}

Or

{
"openMaintainTime":false
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Indicates whether SQL audit was disabled for


Result Boolean true
the DRDS database.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/actions/modify-maintaintime HTTP/1.1


Common request parameters
{
"openMaintainTime":true,
"maintainStartTime":"03:00Z",
"maintainEndTime":"04:00Z"
}

Sample success responses

JSON format

{
"Result": true,
"RequestId": "8577468C-D13F-4980-BD71-977F9D82****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

123 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.1.22. GetRegionConfiguration
Obt ains t he open configurat ion informat ion of t he current region. T he ret urn value of t he int erface is
full dat a for reference, and t he act ual value displayed on t he console and sales page shall prevail.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/region HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

zoneId String Query No cn-hangzhou-f T he current available zone ID.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6F******

T he region configuration information


Result Struct
returned.

clientNodeAmo T he range of the number of coordinated


Struct
untRange node nodes.

T he maximum number of coordination node


maxAmount Integer 25 nodes.

T he minimum number of coordination node


minAmount Integer 2
nodes.

> Document Version: 20220524 124


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

clientNodeDiskL
Array of disk Coordinate node disk allowable values.
ist

diskT ype String cloud_efficiency T he storage type of the disk.

maxSize Integer 20 disk, allowing the maximum value

minSize Integer 20 T he minimum value allowed for a disk.

T he disk allows setting the maximum value


scaleLimit Integer 18
of consecutive values.

["elasticsearch.sn2n
e.large","elasticsear
ch.sn2ne.xlarge","el
asticsearch.sn2ne.2x
large","elasticsearch
.sn2ne.4xlarge","ela
sticsearch.sn1ne.4xl
arge","elasticsearch.
clientNodeSpec List ic5.xlarge","elasticse Coordination node specifications.
arch.ic5.2xlarge","el
asticsearch.ic5.3xlar
ge","elasticsearch.ic
5.4xlarge","elasticse
arch.r5.large","elasti
csearch.r5.xlarge","e
lasticsearch.r5.2xlar
ge"]

https://common-
buy.aliyun.com/?
createUrl String commodityCode=el Sales page entry address.
asticsearch&orderT y
pe=BUY# /buy

Array of Data node disk allowable value.


dataDiskList
dataDiskList

diskT ype String cloud_ssd T he storage type of the disk.

maxSize Integer 5120 T he maximum value allowed for a disk.

minSize Integer 20 T he minimum value allowed for a disk.

125 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he disk allows setting the maximum value


scaleLimit Integer 2048
of consecutive values.

[2560,3072,3584,409
valueLimitSet List T he discrete value allowed by the disk.
6,4608,5120]

elasticNodePro
Struct Elastic node configurations.
perties

T he value of the number of cold node


amountRange Struct
nodes.

maxAmount Integer 25 T he maximum number of nodes.

minAmount Integer 2 T he minimum number of nodes.

diskList Array of disk T he list of disk configurations.

Whether to allow disk encryption. T he


meaning of the value is as follows:
diskEncryption Boolean true
true: Encryption is allowed.
flase: Encryption is not allowed.

diskT ype String cloud_ssd T he storage type of the disk.

maxSize Integer 5120 T he maximum value allowed for a disk.

minSize Integer 500 T he minimum value allowed for a disk.

T he disk allows setting the maximum value


scaleLimit Integer 2048
of consecutive values.

[2560,3072,3584,409
valueLimitSet List T he discrete value allowed by the disk.
6,4608,5120]

> Document Version: 20220524 126


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

["elasticsearch.sn2n
e.large","elasticsear
ch.sn2ne.xlarge","el
asticsearch.sn2ne.2x
large","elasticsearch
.sn2ne.4xlarge","ela
sticsearch.sn1ne.8xl
arge","elasticsearch.
ic5.large","elasticse
spec List T he node specification.
arch.ic5.xlarge","ela
sticsearch.ic5.2xlarg
e","elasticsearch.ic5.
3xlarge","elasticsear
ch.ic5.4xlarge","elas
ticsearch.r5.large","
elasticsearch.r5.xlar
ge","elasticsearch.r5
.2xlarge"]

env String production Environmental signs.

[ "5.5.3_with_X- T he list of Elasticsearch versions allowed to


esVersions List
Pack"] be created.

Array of
esVersionsLate
esVersionsLate T he ES version is open for sale.
stList
stList

key String 5.5_with_X-Pack Supported major version numbers.

T he full name of the supported minor


value String 5.5.3_with_X-Pack
version number.

[ "WORKER",
"WORKER_WARM",
instanceSuppor T he instance node type that is open in the
List "COORDINAT ING",
tNodes region.
"KIBANA", "MAST ER",
"ELAST IC_WORKER" ]

jvmConfine Struct Jvm verifies the configuration.

T urn on the minimum memory value of the


memory Integer 32
specifications required for Jvm recycling.

127 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

["6.7.0_with_X-
supportEsVersi Pack","6.7.0_with_A- Enable the ES version information supported
List
ons Pack","7.4.0_with_X- by Jvm recycling.
Pack"]

T he list of Jvm recyclers that are allowed to


supportGcs List ["CMS","G1"]
be set.

kibanaNodePro
Struct T he configuration of Kibana nodes.
perties

the number of data nodes to be allowable


amountRange Struct
range.

the number of data nodes to be the


maxAmount Integer 20
maximum value

minAmount Integer 1 T he minimum number of nodes.

["elasticsearch.n4.s
mall","elasticsearch.
sn2ne.large","elastic
T he list of specifications that are allowed to
spec List search.sn2ne.xlarge"
be set.
,"elasticsearch.sn2n
e.2xlarge","elasticse
arch.sn1ne.large"]

masterDiskList Array of disk Exclusive master node disk allowable value.

diskT ype String cloud_ssd T he storage type of the disk.

maxSize Integer 20 T he maximum value allowed for a disk.

minSize Integer 20 T he minimum value allowed for a disk.

T he disk allows setting the maximum value


scaleLimit Integer 20
of consecutive values.

> Document Version: 20220524 128


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

["elasticsearch.sn2n
e.large","elasticsear
ch.sn2ne.xlarge","el
asticsearch.sn2ne.2x
large","elasticsearch
masterSpec List .sn2ne.4xlarge","ela T he exclusive master node specifications.
sticsearch.sn1ne.4xl
arge","elasticsearch.
r5.large","elasticsea
rch.r5.xlarge","elasti
csearch.r5.2xlarge" ]

node Struct T he node configuration.

T he maximum number of nodes allowed for


maxAmount Integer 50
a data node.

T he minimum number of nodes allowed for


minAmount Integer 2
a data node.

Array of
nodeSpecList T he list of data node specifications.
nodeSpecList

T he number of CPU cores corresponding to


cpuCount Integer 16
this specification.

the corresponding specification of the size


disk Integer 44000 of the disk.

diskT ype String local_efficiency T he storage type of the disk.

can i purchase: true (available for purchase),


enable Boolean true
flase (not available for purchase).

memorySize Integer 64 node memory size.

elasticsearch.sn2ne.l
spec String T he name of the specification.
arge

129 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he storage type, which supports the


following three types:

specGroupT ype String local_efficiency common: cloud disk type


local_efficiency: local SAT A disk.
local_ssd: the local SSD disk.

regionId String cn-hangzhou T he current region ID.

supportVersion Array of
Supported version configurations.
s CategoryEntity

T he instance category, which supports the


instanceCatego following two categories:
String x-pack
ry advanced enhanced edition.
x-pack commercial edition.

supportVersion Array of T he information of supported Elsticsearch


List VersionEntity versions.

key String 5.5 T he sale page supports optional versions.

value String 5.5.3 T he detailed version number.

warmNodeProp
Struct Cold node configuration.
erties

amountRange Struct T he node number range value.

maxAmount Integer 50 T he maximum number of nodes.

minAmount Integer 2 T he minimum number of nodes.

diskList Array of disk T he list of disk configurations.

diskEncryption Boolean true T he disk allows encryption.

diskT ype String cloud_efficiency T he storage type of the disk.

> Document Version: 20220524 130


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

maxSize Integer 5120 T he maximum value allowed for a disk.

minSize Integer 500 T he minimum value allowed for a disk.

T he disk allows setting the maximum value


scaleLimit Integer 2048
of consecutive values.

[2560,3072,3584,409
valueLimitSet List T he discrete value allowed by the disk.
6,4608,5120]

["elasticsearch.sn2n
e.large","elasticsear
ch.sn2ne.xlarge","el
asticsearch.sn2ne.2x
large","elasticsearch
.sn2ne.4xlarge","ela
sticsearch.sn1ne.8xl
arge","elasticsearch.
ic5.large","elasticse
spec List T he specifications supported by cold nodes.
arch.ic5.xlarge","ela
sticsearch.ic5.2xlarg
e","elasticsearch.ic5.
3xlarge","elasticsear
ch.ic5.4xlarge","elas
ticsearch.r5.large","
elasticsearch.r5.xlar
ge","elasticsearch.r5
.2xlarge"]

["cn-hangzhou-
zones List Supported zones.
b","cn-hangzhou-f"]

Not e T he above sample values are for reference only, subject t o t he act ual ret urn value of
t he int erface.

Examples
Sample request s

GET /openapi/region

Sample success responses

JSON format

131 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{ "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6F******", "Result": { "regionId": "cn-han


gzhou", "createUrl": "https://common-buy.aliyun.com/?commodityCode=elasticsearch&amp;orderT
ype=BUY#/buy", "env": "production", "dataDiskList": { "scaleLimit": 2048, "maxSize": 5120,
"minSize": 20, "diskType": "cloud_ssd", "valueLimitSet": "[2560,3072,3584,4096,4608,5120]"
}, "supportVersions": { "instanceCategory": "x-pack", "supportVersionList": { "value": "5.5
.3", "key": 5.5 } }, "nodeSpecList": { "disk": 44000, "memorySize": 64, "enable": true, "di
skType": "local_efficiency", "specGroupType": "local_efficiency", "spec": "elasticsearch.sn
2ne.large", "cpuCount": 16 }, "clientNodeDiskList": { "scaleLimit": 18, "maxSize": 20, "min
Size": 20, "diskType": "cloud_efficiency" }, "esVersionsLatestList": { "value": "5.5.3_with
_X-Pack", "key": "5.5_with_X-Pack" }, "masterDiskList": { "scaleLimit": 20, "maxSize": 20,
"minSize": 20, "diskType": "cloud_ssd" }, "zones": "[\"cn-hangzhou-b\",\"cn-hangzhou-f\"]",
"esVersions": "[ \"5.5.3_with_X-Pack\"]", "masterSpec": "[\"elasticsearch.sn2ne.large\",\"e
lasticsearch.sn2ne.xlarge\",\"elasticsearch.sn2ne.2xlarge\",\"elasticsearch.sn2ne.4xlarge\"
,\"elasticsearch.sn1ne.4xlarge\",\"elasticsearch.r5.large\",\"elasticsearch.r5.xlarge\",\"e
lasticsearch.r5.2xlarge\" ]", "clientNodeSpec": "[\"elasticsearch.sn2ne.large\",\"elasticse
arch.sn2ne.xlarge\",\"elasticsearch.sn2ne.2xlarge\",\"elasticsearch.sn2ne.4xlarge\",\"elast
icsearch.sn1ne.4xlarge\",\"elasticsearch.ic5.xlarge\",\"elasticsearch.ic5.2xlarge\",\"elast
icsearch.ic5.3xlarge\",\"elasticsearch.ic5.4xlarge\",\"elasticsearch.r5.large\",\"elasticse
arch.r5.xlarge\",\"elasticsearch.r5.2xlarge\"]", "instanceSupportNodes": "[ \"WORKER\", \"W
ORKER_WARM\", \"COORDINATING\", \"KIBANA\", \"MASTER\", \"ELASTIC_WORKER\" ]", "node": { "m
inAmount": 2, "maxAmount": 50 }, "jvmConfine": { "memory": 32, "supportGcs": "[\"CMS\",\"G1
\"]", "supportEsVersions": "[\"6.7.0_with_X-Pack\",\"6.7.0_with_A-Pack\",\"7.4.0_with_X-Pac
k\"]" }, "clientNodeAmountRange": { "minAmount": 2, "maxAmount": 25 }, "warmNodeProperties"
: { "diskList": { "scaleLimit": 2048, "minSize": 500, "maxSize": 5120, "diskType": "cloud_e
fficiency", "diskEncryption": true, "valueLimitSet": "[2560,3072,3584,4096,4608,5120]" }, "
spec": "[\"elasticsearch.sn2ne.large\",\"elasticsearch.sn2ne.xlarge\",\"elasticsearch.sn2ne
.2xlarge\",\"elasticsearch.sn2ne.4xlarge\",\"elasticsearch.sn1ne.8xlarge\",\"elasticsearch.
ic5.large\",\"elasticsearch.ic5.xlarge\",\"elasticsearch.ic5.2xlarge\",\"elasticsearch.ic5.
3xlarge\",\"elasticsearch.ic5.4xlarge\",\"elasticsearch.r5.large\",\"elasticsearch.r5.xlarg
e\",\"elasticsearch.r5.2xlarge\"]", "amountRange": { "minAmount": 2, "maxAmount": 50 } }, "
kibanaNodeProperties": { "spec": "[\"elasticsearch.n4.small\",\"elasticsearch.sn2ne.large\"
,\"elasticsearch.sn2ne.xlarge\",\"elasticsearch.sn2ne.2xlarge\",\"elasticsearch.sn1ne.large
\"]", "amountRange": { "minAmount": 1, "maxAmount": 20 } }, "elasticNodeProperties": { "dis
kList": { "scaleLimit": 2048, "minSize": 500, "maxSize": 5120, "diskType": "cloud_ssd", "di
skEncryption": true, "valueLimitSet": "[2560,3072,3584,4096,4608,5120]" }, "spec": "[\"elas
ticsearch.sn2ne.large\",\"elasticsearch.sn2ne.xlarge\",\"elasticsearch.sn2ne.2xlarge\",\"el
asticsearch.sn2ne.4xlarge\",\"elasticsearch.sn1ne.8xlarge\",\"elasticsearch.ic5.large\",\"e
lasticsearch.ic5.xlarge\",\"elasticsearch.ic5.2xlarge\",\"elasticsearch.ic5.3xlarge\",\"ela
sticsearch.ic5.4xlarge\",\"elasticsearch.r5.large\",\"elasticsearch.r5.xlarge\",\"elasticse
arch.r5.2xlarge\"]", "amountRange": { "minAmount": 2, "maxAmount": 25 } } } }

Error code
For a list of error codes, visit t he API Error Cent er .

7.1.23. ListShardRecoveries
You can call List ShardRecoveries t o ret urn a list of dat a progress about ongoing and complet ed part
recovery. By default , informat ion about ongoing part recovery is ret urned.

> Document Version: 20220524 132


API Reference· Elast icsearch inst anc
Elast icsearch
es

Not e Shard recovery is t he process of synchronizing from primary t o secondary shards. Aft er
t he rest orat ion is complet e, t he secondary part s are available for searching.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/cat-recovery HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes 7mz293m9a00 T he ID of the instance.
3j****

Displays the multipart data


recovery tracking. T he values are as
follows:
Boolea true: displays the data recovery
activeOnly Query No true
n trace of the sharding data in
progress.
false: displays the tracking
status of all shard data recovery.

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC47D9

T he return result of the video moderation


Result Array of Result
task.

133 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

bytesPercent String 80% T he progress of data restoration.

bytesT otal Long 12086 T he total amount of data restored.

filesPercent String 80.0% File execution progress.

filesT otal Long 79 T he total number of files.

index String my-index-000001 T he name of the index.

sourceHost String 192.168.XX.XX T he IP address of the source node.

sourceNode String 2Kni3dJ T he source node.

T he status of the data recovery phase. T he


values are as follows:

done: T he execution is completed.


finalize: cleanup.
stage String done index: reads index metadata and copies
bytes from the source to the destination.
init: T he recovery has not yet started.
start: starts the recovery.
translog: redo transaction logs.

targetHost String 192.168.XX.XX T he IP address of the destination node.

T he ID of the object to which you want to


targetNode String YVVKLmW
attach the control policy.

T he number of T ranslog operations to be


translogOps Long 12086
restored.

translogOpsPer Restore the progress of the T ranslog


String 80%
cent operation.

Examples
Sample request s

> Document Version: 20220524 134


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/instances/es-cn-7mz293m9a003j****/cat-recovery HTTP/1.1

Sample success responses

JSON format

{ "RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC47D9", "Result": [ { "index": "my-inde


x-000001", "sourceHost": "192.168.XX.XX", "sourceNode": "2Kni3dJ", "targetHost": "192.168.X
X.XX", "targetNode": "YVVKLmW", "stage": "index", "filesTotal": 79, "filesPercent": "80.0%"
, "bytesTotal": 12086, "bytesPercent": "80%", "translogOps": 12086, "translogOpsPercent": "
80%" }, { "index": "my-index-000002", "sourceHost": "192.168.XX.XX", "sourceNode": "2Kni3dJ
", "targetHost": "192.168.XX.XX", "targetNode": "YVVKLmW", "stage": "index", "filesTotal":
56, "filesPercent": "100%", "bytesTotal": 11086, "bytesPercent": "100%", "translogOps": 110
86, "translogOpsPercent": "100%" } ] }

Error code
For a list of error codes, visit t he API Error Cent er .

7.1.24. CapacityPlan
You can call Capacit yPlan t o recommend t he opt imal configurat ion informat ion for clust er capacit y
planning based on business scenarios, QPS, and log generat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample codes.

Request parameters
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
POST /openapi/assist/actions/capacity-plan HTTP/1.1

Request parameters

Locati Require
Parameter T ype Example Description
on d

body Struct Body No T he message body of the request.

135 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Locati Require
Parameter T ype Example Description
on d

{ "type": "hot",
An
"code": T he disk usage. For more
array of
dataInfo Array "totalRawData" information, see dat aInf o f ield
node
, "size": 50, dat a st ruct ure .
roles.
"unit": "T B" }

{ "type":
An "common", T he metrics such as disk usage,
array of "code": "write", search and write, and aggregate
metric Array
node "concurrent": 2, requests. For more information,
roles. "throughput": see met ric f ield dat a st ruct ure .
100 },

T he scenario. Valid values:

general: general scenarios.


analysisVisualization: data
analysis scenarios.
usageScenario String No general
dbAcceleration: database
acceleration scenarios.
search: search scenarios.
log: the log scenario.

Indicates whether there is a


requirement for complex
aggregate queries. T he values are
as follows:

true: enables callbacks for


complexQueryA Boolea recording status.
No true
vailable n
false: disables callbacks for
recording status. T his is the
default value.

dat aInf o f ield dat a st ruct ure descript ion

T he memory size
consumed by each
Field T ype Example Required core.
Automatically
allocated.

> Document Version: 20220524 136


API Reference· Elast icsearch inst anc
Elast icsearch
es

T he memory size
consumed by each
Field T ype Example Required core.
Automatically
allocated.

T he code of the
disk data metric.
Valid values:
totalRawData
(source data
information),
document (data
document
information,
estimated number
of documents),
dailyIncrement
(daily data
growth),
dailyIncrement
(daily incremental
code String totalRawData Yes documents),
retentionT ime
(data retention
period), and
replica (replica
settings).

T he value of the
size int 100 No
disk usage metric.

T he data type of
the disk. Valid
type String hot Yes
values: hot data
and warm data.

137 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

T he memory size
consumed by each
Field T ype Example Required core.
Automatically
allocated.

Data unit /time


unit. Data units:
MiB, GiB, T B, and
unit String KiB No PB. Unit of time:
DAYS, WEEKS,
MONT HS, and
YEARS.

T he total number
totalCount String 10000 No of entries
returned.

met ric f ield dat a st ruct ure descript ion

T he memory size
consumed by each
Field T ype Example Required core.
Automatically
allocated.

Search for /write


metric code. Valid
code String write values: write
Yes
(write) and search
(search).

T he number of
concurrent int 2 No concurrent
threads.

T he throughput.
throughput int 100 No
Unit: MB/S.

T he search /write
peak type. Valid
type String common Yes values: common
(regular) and peak
(peak).

peakQps int 30 No Peak QPS.

> Document Version: 20220524 138


API Reference· Elast icsearch inst anc
Elast icsearch
es

T he memory size
consumed by each
Field T ype Example Required core.
Automatically
allocated.

averageQps int 30 No Average QPS.

T he expected
average response
responseT ime int 100 No
time. Unit:
milliseconds.

Response parameters

Parameter T ype Example Description

E91B7129-A669-
RequestId String 4D9D-A743- T he RequestId of the current request.
F90A0FF1F5EF

Result Struct T he response of the request.

Array of
ExtendConfigs T he extension configuration information.
ExtendConfigs

T he type of the configuration. Set the value


to sharedDisk.

ConfigT ype String sharedDisk No t e T he extendConfigs


attribute that may occur when the
planned instance type is enhanced
(advanced).

Disk Long 2048 T he size of the disk. Unit: GiB.

139 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he type of the disk. Valid value:


CPFS_PREMIUM.

DiskT ype String CPFS_PREMIUM No t e T he extendConfigs


attribute that may occur when the
planned instance type is enhanced
(advanced).

T he version type. Valid values:

InstanceCatego advanced: enhanced edition.


String advanced
ry
x-pack: Commercial Edition.
community: the community version.

Array of
NodeConfigura
NodeConfigura T he node information.
tions
tions

Amount Long 10 T he number of cores.

Cpu Long 1 T he number of CPUs of the cloud desktop.

Disk Long 20 T he size of the disk. Unit: GiB.

T he type of the hard disk. Valid values:

cloud_essd: enhanced SSD (ESSD)


cloud_ssd: standard SSD.
DiskT ype String cloud_ssd
cloud_efficiency: ultra disk.
local_ssd: local SSD.
local_efficiency: local ultra disk.

Memory Long 2 T he memory size of the current node role.

T he type of the node. Supported types are


as follows:

WORKER: the data node.


WORKER_WARM: the cold data node.
NodeT ype String WORKER
MAST ER: dedicated master node.
KIBANA: the Kibana node.
COORDINAT ING: the coordination node.
ELAST IC_WORKER: an elastic node.

> Document Version: 20220524 140


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he result calculated based on the capacity


planning. No default value is available. T he
values are as follows:

true: indicates that the number of data


OversizedClust nodes calculated by capacity planning
Boolean true
er exceeds the threshold of 50.
false: T he number of data nodes
calculated by capacity planning is less
than 50.

Examples
Sample request s

POST /openapi/assist/actions/capacity-plan HTTP/1.1


similar to the following example:
{
"usageScenario": "general",
"disasterRecoveryAvailable": true,
"complexQueryAvailable": true,
"dataInfo": [
{
"type": "hot",
"code": "totalRawData",
"size": 50,
"unit": "TB"
},
{
"type": "hot",
"code": "document",
"totalCount": 10000,
"size": 10,
"unit": "KiB"
},
{
"type": "hot",
"code": "dailyIncrement",
"size": 10,
"unit": "TB"
},
{
"type": "hot",
"code": "dailyIncrementDocument",
"totalCount": 10000,
"size": 10,
"unit": "KiB"
},
{
"type": "hot",
"code": "retentionTime",

141 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

"code": "retentionTime",
"size": 30,
"unit": "DAYS"
},
{
"type": "hot",
"code": "replica",
"size": 1
},
{
"type": "warm",
"code": "dailyIncrement",
"size": 10,
"unit": "TB"
},
{
"type": "warm",
"code": "dailyIncrementDocument",
"totalCount": 10000,
"size": 10,
"unit": "KiB"
},
{
"type": "warm",
"code": "retentionTime",
"size": 30,
"unit": "DAYS"
},
{
"type": "warm",
"code": "replica",
"size": 1
}
],
"metric": [
{
"type": "common",
"code": "write",
"concurrent": 2,
"throughput": 100
},
{
"type": "common",
"code": "search",
"peakQps": 30,
"averageQps": 30,
"responseTime": 100
},
{
"type": "peak",
"code": "write",
"concurrent": 2,
"throughput": 100
},
{

> Document Version: 20220524 142


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"type": "peak",
"code": "search",
"peakQps": 30,
"averageQps": 30,
"responseTime": 100
}
]
}

Sample success responses

JSON format

143 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"RequestId": "E91B7129-A669-4D9D-A743-F90A0FF1F5EF",
"Result": {
"instanceCategory": "advanced",
"oversizedCluster": true,
"nodeConfigurations": [
{
"amount": 3943,
"diskType": "cloud_ssd",
"disk": 20,
"nodeType": "WORKER",
"cpu": 32,
"memory": 128
},
{
"amount": 3,
"diskType": "cloud_ssd",
"disk": 20,
"nodeType": "MASTER",
"cpu": 2,
"memory": 8
},
{
"amount": 3,
"diskType": "cloud_efficiency",
"disk": 20,
"nodeType": "COORDINATING",
"cpu": 2,
"memory": 8
},
{
"amount": 7,
"diskType": "cloud_efficiency",
"nodeType": "WORKER_WARM",
"cpu": 4,
"memory": 32
},
{
"amount": 1,
"nodeType": "KIBANA",
"cpu": 1,
"memory": 2
}
],
"extendConfigs": [
{
"configType": "sharedDisk",
"diskType": "CPFS_PREMIUM",
"disk": 3943000
}
]
}
}

> Document Version: 20220524 144


API Reference· Elast icsearch inst anc
Elast icsearch
es

Error codes
For a list of error codes, visit t he API Error Cent er.

7.2. Manage cluster tags


7.2.1. ListTags
Queries all t he visible user t ags.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/tags/all-tags HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T he number of pages of the


pageSize Integer Query No 20
returned result. Default value: 50.

T he resource type, which is fixed to


resourceT ype String Query No INST ANCE
INST ANCE.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Array of Result T he return results.

T agKey String env T he tag key of the ENI.

145 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T agValue String dev T he tag value of the resource.

Examples
Sample request s

GET /openapi/tags/all-tags?pageSize=20 HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": [ { "TagKey": "aa", "TagValue": "ddd" }, { "TagKey": "manager", "TagValue"


: "all_persion" }, { "TagKey": "dev", "TagValue": "leizhang" }, { "TagKey": "a", "TagValue"
: "b" }, { "TagKey": "zl", "TagValue": "keept" }, { "TagKey": "zl", "TagValue": "" }, { "Ta
gKey": "c", "TagValue": "d" }, { "TagKey": "tt", "TagValue": "tt" }, { "TagKey": "acs:rm:rg
Id", "TagValue": "rg-acfm2h5vbzd****" }, { "TagKey": "acs:rm:rgId", "TagValue": "rg-aek22ge
dcbf****" }, { "TagKey": "estag", "TagValue": "instance" } ], "RequestId": "5ADCBB89-6596-4
AF3-94A5-64E5393A****" }

Error code
For a list of error codes, visit t he API Error Cent er .

7.2.2. ListTagResources
Queries t he t ags t hat are added t o one or more resources.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T he Get Logs operat ion does not have operat ion-specific request headers and uses only common
request headers. For more informat ion, see t he "Common request headers" sect ion in t he "Common
HT T P headers" t opic in API Reference.

Request syntax
GET /openapi/tags HTTP/1.1

Request parameters

> Document Version: 20220524 146


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

T he number of pages in the


Page Integer Query No 1 resource relationship list. Discarded
fields.

T he number of entries on each


Size Integer Query No 10 page that is specified during a
paged query. Discard fields.

ResourceT ype String Query Yes INST ANCE T he type of the resource.

1d2db86sca438
T he token that is returned for the
NextT oken String Query No 4811e0b5e8707
next query.
e******

["es-cn-
T he list of instance IDs that you
ResourceIds String Query No aaa","es-cn-
want to query.
bbb"]

[{"key":"env","v
T he list of tags to query. It is in the
alue","dev"},
T ags String Query No form of a JSON string and contains
{"key":"dev",
a maximum of 20 subitems.
"value":"IT "}]

You must specify at least one of t he ResourceIds and T ags paramet ers. Ot herwise, an error is
ret urned.

You can only query visible t ags, not invisible t ags.

Not e Syst em t ags are t ags t hat are added t o user inst ances by cloud product s (Alibaba
Cloud services). Syst em t ags include visible t ags and invisible t ags.

Response parameters

Parameter T ype Example Description

PageSize Integer 1 T he page number of the returned page.

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6D******

147 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he header of the response. T his parameter


is empty and is for reference only. You
cannot force this parameter to be relied on
in the program.
Headers Object

No t e T his parameter is not


included in the returned example.

X-T otal-Count Integer 10 T he number of resources to query.

T agResources Object A list of resources that have tags.

Array of
T agResource T he labels of the resource.
T agResource

T agValue String dev T he value of tag N.

ALIYUN::ELAST ICSEA T he type of the resource. Set the value to


ResourceT ype String
RCH::INST ANCE ALIYUN:: Elasticsearch::INSTANCE .

es-cn-
ResourceId String T he ID of the resource.
oew1q8bev0002****

T agKey String env T he key of tag N

Examples
Sample request s

GET /openapi/tags?ResourceType=INSTANCE&NextToken=1d2db86sca4384811e0b5e8707e******&Resourc
eIds=["es-cn-aaa","es-cn-bbb"]&Tags=[{"key":"env","value","dev"},{"key":"dev", "value":"IT
"}] HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

Sample success responses

JSON format

> Document Version: 20220524 148


API Reference· Elast icsearch inst anc
Elast icsearch
es

HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "A5423B74-DBD5-4714-BF28-6725E5BE****",
"TagResources" : {
"TagResource" : [ {
"ResourceType" : "ALIYUN::ELASTICSEARCH::INSTANCE",
"ResourceId" : "es-cn-oew1q8bev0002****",
"TagKey" : "env",
"TagValue" : "dev"
} ]
}
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.2.3. TagResources
Call T agResources t o creat e a relat ionship bet ween t ag resources.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
ht t ps://elast icsearch.cn-hangzhou.aliyuncs.com/openapi/t ags

Request syntax
POST /openapi/tags HTTPS|HTTP

Request parameters
T he request paramet ers is empt y, but t he Request Body paramet er is required.

Specify t he required paramet ers in Request Body t o specify t he t arget resource and t ags.

Field T ype Required Example Description

["es-cn-aaa","es- T he ID of the
ResourceIds Array Yes
cn-bbb"] resource.

149 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Field T ype Required Example Description

T he list of newly
created tags. A
[{"key":"env","valu
T ags Array Yes maximum of 20
e":"IT "}]
child tags are
allowed.

T he type of the
resource. Set this
ResourceT ype String Yes INST ANCE
parameter to
INST ANCE.

Not e
Except t hat you must pass t his paramet er, if t he key specified in t he T ags paramet er exist s,
t hen t his value must exist and can be an empt y st ring. Ot herwise, a InvalidParamet er.T agKey
error is ret urned.
If t he input key-value pairs are t he same, t he Duplicat e.T agKey error is report ed.
If a T ag key already exist s before cust om T ags are defined, t he value of t he previous T ag
key is overwrit t en.

Example:

{
"ResourceIds":["es-cn-oew1q8bev0002****","es-cn-09k1ptccp0009****"],
"Tags": [
{
"key": "env",
"value": "IT"
}
],
"ResourceType": "INSTANCE"
}

Response parameters

Parameter T ype Example Description

3D8795D9-8FF5-
RequestId String 46B2-86E6- T he ID of the request.
E3B407*******

T he response paramet ers also include t he Result paramet er. T he value is of t he Boolean t ype. If t he
resource relat ionship is creat ed, t rue is ret urned. If t he resource relat ionship is failed, false is ret urned.

Examples

> Document Version: 20220524 150


API Reference· Elast icsearch inst anc
Elast icsearch
es

Sample request s

POST /openapi/tags HTTP/1.1


Common request parameters
{
"ResourceIds":["es-cn-oew1q8bev0002****","es-cn-09k1ptccp0009****"],
"Tags": [
{
"key": "env",
"value": "IT"
}
],
"ResourceType": "INSTANCE"
}

Sample success responses

XML format

<Result>true</Result>
<RequestId>27627E6B-E26A-406F-B6E1-0247882C****</RequestId>

JSON format

{
"Result": true,
"RequestId": "27627E6B-E26A-406F-B6E1-0247882C****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.2.4. UntagResources
Delet es a user resource t ag relat ionship.

When you call t his operat ion, t ake not e of t he following it ems:

You can only delet e user t ags.

Not e User labels are manually added t o inst ances by users. A syst em T ag is a t ag t hat
Alibaba Cloud services add t o inst ances. Syst em labels are divided int o visible labels and invisible
labels.

151 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

If you delet e a resource t ag relat ionship t hat is not associat ed wit h any resources, you must delet e
t he t ags.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
DELETE /openapi/tags HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

["es-cn-
09k1rocex0006***
T he resource list that you want to
ResourceIds String Required *","es-cn-
delete.
oew1rgiev0009**
**"]

T he type of the resource. Fixed to


ResourceT ype String Required INST ANCE
INST ANCE .

T he list of tags that you want to


["tagKey1","tagK
T agKeys String No delete. T he list can contain up to 20
ey2"]
subitems.

Specifies whether to delete all parts.


Default value: f alse . T his parameter is
All Boolean No false
valid only when T agKeys is not
specified.

All= t rue you call t his operat ion wit h when T agKeys is empt y and all resource t ag relat ionships under
t he Resource are delet ed. For resources wit hout t ags, t he int erface is not processed and success is
ret urned.
When T agKeys is null and All= f alse , t he API is not processed and success is ret urned.
T agKeys is not empt y. All is ignored when t his operat ion is called, whet her it is t rue or false.
Af t er t he T agKeys specified are are, you can call t his operat ion t o delet e t he specified t ags from
resources. If t he specified t ag does not exist on a resource, t he specified t ag is not processed.
If t he request ed resource does not exist , t he syst em ret urns InvalidResourceId.Not Found when
you call t his operat ion.

> Document Version: 20220524 152


API Reference· Elast icsearch inst anc
Elast icsearch
es

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6D******

Return results:
Result Boolean true true: deleted
false: Failed

Examples
Sample request s

DELETE /openapi/tags? ResourceType=INSTANCE&ResourceIds=%5B%22es-cn-09k1rocex0006****%22%5D


HTTP/1.1
Common request header

Sample success responses


JSON format

{
"Result":true,
"RequestId": "3D8795D9-8FF5-46B2-86E6-E3B40*******"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.3. Migrate Data


7.3.1. GetTransferableNodes
Call Get T ransferableNodes t o specify t he t ype and number of nodes t o obt ain t he nodes t hat can be
migrat ed.

Debugging

153 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/transferable-nodes HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

count Integer Yes 1 T he number of nodes to be migrated.

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

T he type of nodes.W ORKER represents


nodeT ype String Yes WORKER a hot node, W ORKER_W ARM
represents a warm node.

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Result Array of Result T he return results.

host String 192.168.**. ** T he IP address of the node.

port Integer 9200 T he access port of the node.

T he Result also cont ains t he following paramet ers.

Parameter T ype Example Description

> Document Version: 20220524 154


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he type of the node.


Valid values: MAST ER
(dedicated MAST ER
node), WORKER (hot
nodeT ype String WORKER node), WORKER_WARM
(warm node),
COORDINAT ING (client
node), and
KIBANA(Kibana node).

T he ID of the zone to
zoneId String cn-hangzhou-b which the node
belongs.

Examples
Sample request s

GET /openapi/instances/es-cn-nif1q9o8r0008****/transferable-nodes? nodeType=WORKER&count=1


HTTP/1.1
Common request header

Sample success responses

JSON format

{
"Result":[
{
"nodeType":"WORKER",
"host":"192.168. **.**",
"port":9300,
"zoneId":"cn-hangzhou-b"
}
],
"RequestId":"3760F67B-691D-4663-B4E5-6783554F****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

155 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.3.2. ValidateTransferableNodes
Call Validat eT ransferableNodes t o check whet her t he dat a on some nodes in t he specified inst ance can
be migrat ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/validate-transfer-nodes HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

T he type of nodes.W ORKER represents


nodeT ype String Yes WORKER a hot node, W ORKER_W ARM
represents a warm node.

RequestBody
You must ent er t he following paramet ers in Request Body t o specify t he IP address and port number of
t he node t o be verified:

Parameter T ype Example Description

T he IP address of the
host String 172.16.xx.xx
node.

T he access port number


port Integer 9200
of the node.

Example:

> Document Version: 20220524 156


API Reference· Elast icsearch inst anc
Elast icsearch
es

[
{
"host": "172.16.**.**",
"port": 9200
},
{
"host": "172.16.**.**",
"port": 9200
}
]

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:
Result Boolean true Yes: the data can be migrated
No: the data can not be migrated

Examples
Sample request s

POST /openapi/instances/es-cn-nif1q9o8r0008****/validate-transfer-nodes? nodeType=WORKER HT


TP/1.1
Common request parameters
[
{
"host": "172.16. **.**",
"port": 9200
},
{
"host": "172.16. **.**",
"port": 9200
}
]

Sample success responses

XML format

<Result>true</Result>
<RequestId>3760F67B-691D-4663-B4E5-6783554F****</RequestId>

JSON format

157 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result":true,
"RequestId":"3760F67B-691D-4663-B4E5-6783554F****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.3.3. TransferNode
Call T ransferNode t o run a dat a migrat ion t ask.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/transfer HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

T he type of nodes.W ORKER represents


nodeT ype String Yes WORKER a hot node, W ORKER_W ARM
represents a warm node.

> Document Version: 20220524 158


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
You must also ent er t he following paramet ers in Request Body t o specify t he IP address and port
number of t he node t o be migrat ed.

Parameter T ype Required Example Description

T he IP address of
host String Yes 192.168.xx.xx
the node.

T he access port
number of the
port Integer Yes 9200
node.

Example:

[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

159 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Return results:
Result Boolean true true: task execution successfully
false: task execution failed

Examples
Sample request s

POST /openapi/instances/es-cn-nif1q9o8r0008****/actions/transfer? nodeType=WORKER HTTP/1.1


Common request parameters
[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Sample success responses

XML format

<Result>true</Result>
<RequestId>C82758DD-282F-4D48-934F-92170A33****</RequestId>

JSON format

{
"Result": true,
"RequestId": "C82758DD-282F-4D48-934F-92170A33****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.3.4. ListDataTasks

> Document Version: 20220524 160


API Reference· Elast icsearch inst anc
Elast icsearch
es

Call List Dat aT asks t o obt ain t he informat ion of a dat a migrat ion t ask.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/data-task HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes oew1oxiro000f*** T he ID of the instance.
*

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Array of Result T he return results.

2020-07-30 T he time when the site monitoring task was


createT ime String
06:32:18 created.

sinkCluster Struct T he information of the target cluster.

dataSourceT yp T he type of the target cluster. Default value:


String 1
e elasticsearch.

http://192.168.xx.xx T he public network access address of the


endpoint String
:4101 target cluster.

index String product_info T he target index.

161 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

type String _doc T he type of the destination index.

vpc-
T he ID of the VPC to which the cluster
vpcId String 2ze55voww95g82g
belongs.
ak****

es-cn-
T he instance ID or Server Load Balancer (SLB)
vpcInstanceId String 09k1rnu3g0002****-
ID of the current cluster.
worker

vpcInstancePor
String 9200 T he access port number of the cluster.
t

sourceCluster Struct T he information about the source cluster.

dataSourceT yp T he type of the source cluster. Default


String 1
e value: elasticsearch.

index String product_info T he index whose data you want to migrate.

{\"_doc\":
{\"properties\":
{\"user\":
mapping String {\"properties\": T he Mapping configuration of the cluster.
{\"last\":
{\"type\":\"text\",...
}}}}}}

T he routing field to index the table. It is set


routing String _id
to the primary key by default.

{\n \"index\": {\n


settings String \"replication\": T he Settings of the cluster.
{\n}.....}}

type String _doc T he type of the destination index.

status String SUCCESS T he status of the task.

et_cn_mfv1233r472
taskId String T he ID of the task.
72****

Examples
Sample request s

> Document Version: 20220524 162


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/instances/es-cn-oew1oxiro000f****/data-task HTTP/1.1


Common request header

Sample success responses

JSON format

163 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": [
{
"taskId": "et_cn_mfv1233r47272****",
"sourceCluster": {
"dataSourceType": "elasticsearch",
"endpoint": "http://192.168.xx.xx:4101",
"vpcInstancePort": 9200,
"vpcId": "vpc-2ze55voww95g82gak****",
"vpcInstanceId": "es-cn-09k1rnu3g0002****-worker",
"index": "product_info",
"type": "products"
},
"sinkCluster": {
"dataSourceType": "elasticsearch",
"index": "product_info01",
"type": "_doc",
"settings": "{\n \"index\": {\n \"replication\": {\n}.....}}",
"mapping": "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{
\"type\":\"text\",...}}}}}}"
},
"status": "SUCCESS",
"createTime": "2020-08-03 08:36:19"
},
{
"taskId": "et_cn_vb9g57i4h4eyp****",
"sourceCluster": {
"dataSourceType": "elasticsearch",
"endpoint": "http://192.168.xx.xx:4096",
"vpcInstancePort": 9200,
"vpcId": "vpc-2ze55voww95g82gak****",
"vpcInstanceId": "es-cn-oew1oxiro000f****-worker",
"index": "my_index",
"type": "_doc"
},
"sinkCluster": {
"dataSourceType": "elasticsearch",
"index": "my_index003",
"type": "_doc",
"settings": "{\n \"index\": {\n \"replication\": {\n}.....}}",
"mapping": "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{
\"type\":\"text\",...}}}}}}"
},
"status": "SUCCESS",
"createTime": "2020-07-30 06:32:18"
}
],
"RequestId": "8FB71A9A-1ACE-40DA-ADC0-2B3DB44F****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 164


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.3.5. CreateDataTasks
Call t he Creat eDat aT asks t o creat e an index migrat ion t ask t o Dat a T ransport from t he select ed clust er
t o t he current clust er.

Before you call t his operat ion, not e t hat :

Current ly, t he one-click index migrat ion feat ure only support s t he China (Beijing) region.
T he source and dest inat ion Elast icsearch clust ers must meet t he following requirement s: T he source
is a user-creat ed or Alibaba Cloud Elast icsearch Elast icsearch clust er of version 6.7.0, and t he
dest inat ion is a Alibaba Cloud Elast icsearch Elast icsearch clust er of version 6.3.2 or 6.7.0.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample codes.

Request parameters
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/instances/[InstanceId]/data-task HTTP/1.1

Request parameters

Locati Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must make sure
ClientT oken String Query Yes
9D4D- that it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

es-cn-
T he ID of the destination cluster for
InstanceId String Path Yes n6w1o1x0w001
index migration.
c****

RequestBody
You must also specify t he following paramet ers in Request Body t o specify t he migrat ion informat ion.

165 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he information
sourceCluster Struts of the source
cluster.

T he type of the
source cluster.
└dataSourceT ype String Yes elasticsearch
T he default value
is Elasticsearch.

T he public domain
name of the
cluster. You can
http://yourdomai
└endpoint String No specify this
n.com
parameter if the
source cluster is
Internet-enabled.

T he port number
used to access
the cluster. T he
└vpcInstancePort Integer No 9200 source cluster
uses VPC
information to
connect.

T he ID of the VPC
where the source
cluster resides.
vpc- T he source cluster
└vpcId String No 2ze59tt67m3nzkk uses VPC
o9**** information to
connect.

T he ID of the
instance or Server
Load Balancer
(Server Load
Balancer) instance
└vpcInstanceId String No es-xxx-worker of the current
cluster. T he
source cluster
uses VPC
information to
connect.

> Document Version: 20220524 166


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he IP address of
the SLB instance in
the cluster. T he
└vpcIp String No 10.10.xx.xx source cluster
uses VPC
information for
connection

T he logon
└username String No elastic username of the
source cluster.

T he logon
└password String No xxxxx password of the
source cluster.

T he specified
└index String
Yes index_001 index of the
source cluster.

T he type of the
└type String Yes index_001
specified index.

T he information
sinkCluster Struts about the target
cluster.

T he type of the
└dataSourceT ype String Yes elasticsearch
target cluster.

T he logon
└username String Yes elastic username of the
target cluster.

T he logon
└password String Yes xxxxx password of the
target cluster.

T he specified
index of the
└index String Yes index_001
destination
cluster.

167 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of the
└type String Yes index_001
specified index.

{\n \"index\": {\n


└settings Settings
String Yes \"replication\":
configuration.
{\n \"type\": .....}

{\"doc\":
{\"properties\":
Mapping
└mapping String Yes {\"interval_ms\":
configuration.
{\"type\":\"long\"
},....}

T he index route
field. T he primary
└routing String No _id
key field is used
by default.

"sourceFilterPara Migrate
migrationConfig Struts No
ms": "index = 1" configurations.

T he filter
condition of the
index. Filter
documents with
└filterParams String No index=111
specified
conditions for
index
reconstruction.

Not e └ indicat es a child paramet er.

Public net work enabled for t he clust er: Ent er t he endpoint paramet er t o connect .
Public net work is not enabled for t he clust er (or VPC informat ion is used t o connect t o t he clust er):
Ent er t he paramet ers vpcInst ancePort , vpcId, vpcInst anceId, or vpcInst ancePort , vpcId, and vpcIp t o
connect .

Example:

Access t he clust er from t he public net work

> Document Version: 20220524 168


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"sourceCluster":{
"dataSourceType":"elasticsearch",
"endpoint" : "http://es-cn-n6w1o1x0w001c****.public.elasticsearch.aliyuncs.co
m:9200",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default"
},
"sinkCluster":{
"dataSourceType":"elasticsearch",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default",
"settings" : "#settings configuration#",
"mapping" : "#mapping configuration#",
"routing" : "_id"
},
"migrateConfig": {
"sourceFilterParams": ""
}
}

Alibaba Cloud Elast icsearch clust er

169 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"sourceCluster":{
"dataSourceType" : "elasticsearch",
"vpcInstancePort":9200,
"vpcId":"vpc-2ze55voww95g82gak****",
"vpcInstanceId":"es-cn-oew1oxiro000f****-worker",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default"
},
"sinkCluster":{
"dataSourceType":"elasticsearch",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default",
"settings" : "#settings configuration#",
"mapping" : "#mapping configuration#",
"routing" : "_id"
},
"migrateConfig": {
"sourceFilterParams": ""
}
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

T he return result of the video moderation


Result Array of Result
task.

sinkCluster Struct T he information about the target cluster.

dataSourceT yp
String elasticsearch T he type of the target cluster.
e

index String index_001 T he name of the target index.

{\"doc\":
{\"properties\":
mapping String {\"interval_ms\": Mapping configuration.
{\"type\":\"long\"},.
...}

> Document Version: 20220524 170


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

password String xxxxx T he access password of the target cluster.

T he routing field. T he primary key field is


routing String cluster_name
used by default.

{\n \"index\": {\n


settings String \"replication\": {\n Settings configuration.
\"type\": .....}

type String index_001 T he type of the target index.

username String elastic T he username of the target cluster.

T he ID of the Virtual Private Cloud where the


vpc-
cluster is located. T he cluster access address
vpcId String 2ze55voww95g82g
is a public domain name, but the private
ak****
endpoint is required.

es-cn- T he instance ID of the cluster under the


vpcInstanceId String oew1oxiro000f****- Virtual Private Cloud, or the ID of the SLB
worker instance.

vpcInstancePor
String 9200 T he access port number of the cluster.
t

sourceCluster Struct T he information of the source cluster.

dataSourceT yp T he type of the source cluster. Default


String elasticsearch
e value: Elasticsearch.

http://10.20.xx.xx:9
endpoint String T he public domain name of the cluster.
200

index String index_001 Specifies the indexes to be migrated.

password String xxxxxx T he access password of the source cluster.

type String index_001 T he type of the specified index.

username String elastic T he username of the source cluster.

171 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he ID of the Virtual Private Cloud where the


vpc-
source cluster resides (the cluster access
vpcId String 2ze55voww95g82g
address is a public domain name, but the
ak****
private endpoint is required).

es-cn- T he instance ID of the cluster under the


vpcInstanceId String oew1oxiro000f****- Virtual Private Cloud, or the ID of the SLB
worker instance.

vpcInstancePor T he access port number of the source


Integer 9200
t cluster.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/data-task HTTP/1.1


Common request headers
{
"sourceCluster":{
"dataSourceType":"elasticsearch",
"endpoint" : "http://es-cn-n6w1o1x0w001c****.public.elasticsearch.aliyuncs.com:9200
",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default"
},
"sinkCluster":{
"dataSourceType":"elasticsearch",
"username" : "elastic",
"password" : "xxxxxx",
"index" : "default",
"type" : "default",
"settings" : "{\n \"index\": {\n \"replication\": {\n \"type\": .....}",
"mapping" : "{\"doc\":{\"properties\":{\"interval_ms\":{\"type\":\"long\"},....}",
"routing" : "_id"
},
"migrateConfig":{
"sourceFilterParams": "index = 1"
}
}

Successful response examples

JSON format

> Document Version: 20220524 172


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****",
"Result": [{
"sourceCluster": {
"password": "xxxxxx",
"endpoint": "http://10.20.xx.xx:9200",
"vpcId": "vpc-2ze55voww95g82gak****",
"vpcInstancePort": 9200,
"index": "index_001",
"type": "index_001",
"vpcInstanceId": "es-cn-oew1oxiro000f****-worker",
"dataSourceType": "elasticsearch",
"username": "elastic"
},
"sinkCluster": {
"routing": "cluster_name",
"settings": "{\\n \\\"index\\\": {\\n \\\"replication\\\": {\\n \\\"ty
pe\\\": .....}",
"password": "xxxxx",
"mapping": "{\\\"doc\\\":{\\\"properties\\\":{\\\"interval_ms\\\":{\\\"type\\\"
:\\\"long\\\"},....}",
"vpcInstancePort": 9200,
"vpcId": "vpc-2ze55voww95g82gak****",
"index": "index_001",
"type": "index_001",
"vpcInstanceId": "es-cn-oew1oxiro000f****-worker",
"dataSourceType": "elasticsearch",
"username": "elastic"
}
}]
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.3.6. GetClusterDataInformation
Call Get Clust erDat aInformat ion t o obt ain t he dat a informat ion about t he clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/cluster/data-information HTTPS|HTTP

173 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request parameters
T he request paramet ers is empt y, but t he Request Body paramet er is required.

You must specify t he clust er informat ion by set t ing t he following paramet ers in Request Body:

Parameter T ype Required Example Description

T he type of the
cluster. Default
dataSourceT ype String Yes elasticsearch
value:
elasticsearch.

T he public domain
name of the
cluster. T his
parameter must
be specified when
endpoint String No http://10.01.xx.xx
the network
environment of
the source cluster
is a public
network.

T he ID of the
Elasticsearch
instance. T his
parameter is
required when the
es-cn-
network
instanceId String No 09k1rnu3g0002***
environment of
*
the source cluster
is an Alibaba
Cloud
Elasticsearch
cluster.

T he access port
number of the
cluster. T he
source cluster
network
environment is
vpcInstancePort Integer No 9200 required when the
Alibaba Cloud
Elasticsearch
cluster or Alibaba
Cloud ECS Service
User-created
cluster is used.

> Document Version: 20220524 174


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he ID of the VPC
to which the
cluster belongs.
T he source cluster
vpc- network
environment is
2ze59tt67m3nzkk
vpcId String No required when the
o9****
Alibaba Cloud
Elasticsearch
cluster or Alibaba
Cloud ECS Service
User-created
cluster is used.

T he instance ID or
Server Load
Balancer (SLB) ID
of the current
cluster. T his
parameter is
es-
required when the
vpcInstanceId String No 09k1rnu3g0002***
network
*-worker
environment of
the source cluster
is an Alibaba
Cloud
Elasticsearch
cluster.

T he username
that is used to
username String No elastic
connect to the
cluster.

T he password
that is used to
password String No xxxxxx
connect to the
cluster.

T he name of the
index String No product
destination index.

type T he type of the


String No default
destination index.

175 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Not e
If t he index is empt y, you can check whet her t he Elast icsearch clust er can be connect ed. If
t he connect ivit y is available, t he indices field in t he ret urned result s is not null.
If t he index is not empt y, you can get t he informat ion about t he set t ings and mappings
under t he current index.
If t he t ype is not empt y, you can obt ain t he rout ing field of t he current t ype.

T he paramet ers vary depending on t he net work environment of t he source clust er.

Public net work clust er: ent er one or more paramet ers, including endpoint . Example:

{
"dataSourceType": "elasticsearch",
"endpoint": "http://es-cn-npk1shyiq000d****.public.elasticsearch.aliyuncs.com:92
00",
"username": "elastic",
"password": "xxxxxx",
"index": "default",
"type": "default"
}

Alibaba Cloud ECS Service self-built clust er: Ent er t he following paramet ers: vpcInst ancePort , vpcId,
and vpcIp. For example:

{
"dataSourceType": "elasticsearch",
"vpcId":"vpc-2ze55voww95g82gak****",
"vpcInstancePort": "9200",
"vpcIp": "10.12.xx.xx",
"username" : "elastic",
"password" : "xxxxxx",
"index": "product",
"type" : "default"
}

Alibaba Cloud Elast icsearch clust er: specify t he paramet ers: vpcInst ancePort , vpcId, vpcInst anceId,
and inst anceId. T he sample code is as follows:

{
"dataSourceType" : "elasticsearch",
"vpcId":"vpc-2ze55voww95g82gak****",
"vpcInstancePort" : "9200",
"vpcInstanceId" : "es-cn-09k1rnu3g0002****-worker",
"instanceId" : "es-cn-oew1oxiro000f****",
"username" : "elastic",
"password" : "xxxxxx",
"index": "product",
"type" : "default"
}

> Document Version: 20220524 176


API Reference· Elast icsearch inst anc
Elast icsearch
es

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he return results.

connectable Boolean true Whether it is connectable.

metaInfo Struct T he metadata of the cluster.

fields List ["id","name"] T he fields in the Mapping for the index.

["index1","index2","i
indices List T he index list of the cluster.
ndex3"]

{\"_doc\":
{\"properties\":
{\"user\":
mapping String {\"properties\": T he Mapping configuration of the cluster.
{\"last\":
{\"type\":\"text\",...
}}}}}}

{\n \"index\": {\n


settings String \"replication\": T he Settings of the cluster.
{\n}.....}}

typeName List ["index1-type"] Specifies the type of the index.

Examples
Sample request s

POST /openapi/cluster/data-information HTTP/1.1


Common request parameters
{
"dataSourceType": "elasticsearch",
"endpoint": "http://es-cn-npk1shyiq000d****.public.elasticsearch.aliyuncs.com:9200",
"username": "elastic",
"password": "xxxxxx",
"index": "default",
"type": "default"
}

Sample success responses

177 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

JSON format

{
"Result": {
"connectable": true,
"metaInfo": {
"indices": ["index1","index2","index3"],
"typeName": ["index1-type"],
"settings": "{\n \"index\": {\n \"replication\": {\n}.....}}",
"mapping": "{\"_doc\":{\"properties\":{\"user\":{\"properties\":{\"last\":{\"type\":\
"text\",...}}}}}}",
"fields": ["id","name","_id"]
}
},
"RequestId" : "29AEFBA7-DD86-4B05-87A2-43F22C85****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.3.7. DeleteDataTask
You can call t his operat ion t o delet e an index migrat ion t ask.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
DELETE /openapi/instances/[InstanceId]/data-task HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
ClientT oken String Yes 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

> Document Version: 20220524 178


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes oew1oxiro000f*** T he ID of the instance.
*

et_cn_0oyg09o96
taskId String Yes T he ID of the index migration task.
ib40****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Boolean true T he returned results.

Examples
Sample request s

DELETE /openapi/instances/es-cn-oew1oxiro000f****/data-task? taskId=et_cn_0oyg09o96ib40****


&ClientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1
Common request header

Sample success responses

JSON format

{
"Result": true,
"RequestId": "3F71A6D2-7BD0-4A53-9119-386A2F0B****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.3.8. CancelTask
Call CancelT ask t o cancel a dat a migrat ion t ask.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header

179 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/cancel-task HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

T he type of the data migration task.


taskT ype String Yes MigrateData
Set the value to MigrateData.

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:

Result Boolean true true: the task was cancelled successfully


false: the task was cancelled successfully
failed

Examples
Sample request s

POST /openapi/instances/es-cn-nif1q9o8r0008****/actions/cancel-task? taskType=MigrateData H


TTP/1.1

Sample success responses

JSON format

> Document Version: 20220524 180


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": true,
"RequestId": "C82758DD-282F-4D48-934F-92170A33****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.4. Upgrade or downgrade a cluster


7.4.1. GetSuggestShrinkableNodes
Call Get Suggest ShrinkableNodes t o specify t he t ype and number of nodes t o obt ain t he nodes t hat
can be removed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/suggest-shrinkable-nodes HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

T he number of nodes that you want to


count Integer Yes 1 remove.

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

181 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of removing nodes. WORKER


nodeT ype String Yes WORKER indicates hot node and WORKER_WARM
indicates warm node.

Specifies whether to ignore the


ignoreStatus Boolean No false
instance status. Default value: false.

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Result Array of Result T he return results.

host String 192.168.**. ** T he IP address of the node.

port Integer 9200 T he access port number of the node.

T he Result also cont ains t he following paramet ers.

Parameter T ype Example Description

T he type of the node.


Valid values: MAST ER
(dedicated MAST ER
node), WORKER (hot
nodeT ype String WORKER node), WORKER_WARM
(warm node),
COORDINAT ING (client
node), and
KIBANA(Kibana node).

T he ID of the zone to
zoneId String cn-hangzhou-b which the node
belongs.

Examples
Sample request s

> Document Version: 20220524 182


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/instances/es-cn-n6w1o1x0w001c****/suggest-shrinkable-nodes? nodeType=WORKER&co


unt=1 HTTP/1.1
Common request header

Sample success responses

JSON format

{
"Result": [
{
"nodeType": "WORKER",
"host": "172.16. **.**",
"port": 9200,
"zoneId": "cn-hangzhou-i"
}
],
"RequestId": "042E33B2-6FB3-474D-BD44-DBE706A4****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.4.2. ValidateShrinkNodes
Calls Validat eShrinkNodes t o check whet her some nodes in a specified inst ance can be shrunken.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/validate-shrink-nodes HTTPS|HTTP

Request parameters

183 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

es-cn-
InstanceId String Required nif1q9o8r0008*** T he ID of the instance.
*

T he type of nodes. WORKER indicates


nodeT ype String Required WORKER hot node and WORKER_WARM indicates
warm node.

Specifies whether to ignore the health


ignoreStatus Boolean No false status of the cluster. Default value:
false.

RequestBody
You must ent er t he following paramet ers in Request Body t o specify t he IP address and port number of
t he node t o be verified:

Parameter T ype Required Example Description

T he IP address of
host String Yes 192.168.xx.xx
the node.

T he access port
port Integer Yes 9200 number of the
node.

Example:

[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Response parameters

Parameter T ype Example Description

> Document Version: 20220524 184


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:
Result Boolean true true: nodes can be shrunken
false: nodes cannot be shrunken

Examples
Sample request s

POST /openapi/instances/es-cn-nif1q9o8r0008****/validate-shrink-nodes? nodeType=WORKER HTTP


/1.1
Common request parameters
[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Sample success responses


JSON format

{
"Result":true,
"RequestId":"3760F67B-691D-4663-B4E5-6783554F****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.4.3. ShrinkNode

185 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Call ShrinkNode t o remove dat a nodes from a clust er.

Not e t he following when you call t his operat ion:


Before you remove dat a nodes, you must migrat e t he dat a st ored on t hem t o ot her nodes.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/actions/shrink HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

T he type of nodes. WORKER indicates


nodeT ype String Yes WORKER hot node and WORKER_WARM indicates
warm node.

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

Specifies whether to ignore the health


ignoreStatus Boolean No false status of the cluster. Default value:
false.

RequestBody
You must also specify t he following paramet ers in Request Body t o specify t he IP address and port
number of t he node t o be removed:

> Document Version: 20220524 186


API Reference· Elast icsearch inst anc
Elast icsearch
es

Required Example
Parameter T ype Description

T he IP address of
ho st String Yes 192.168.xx.xx
the node.

T he access port
po rt Integer Yes 9200 number of the
node.

Example:

[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Return results:
Result Boolean true true: scale-in successfully
false: scale-in failed

Examples
Sample request s

187 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/es-cn-nif1q9o8r0008****/actions/shrink? nodeType=WORKER HTTP/1.1


Common request parameters
[
{
"host": "192.168. **.**",
"port": 9200
},
{
"host": "192.168. **.**",
"port": 9200
}
]

Sample success responses

JSON format

{
"Result": true,
"RequestId": "C82758DD-282F-4D48-934F-92170A33****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.4.4. UpgradeEngineVersion
Upgrades t he version or kernel of an Elast icsearch clust er. You can upgrade Elast icsearch clust ers from
V5.5.3 t o V5.6.16, from V5.6.16 t o V6.3.2, or from V6.3.2 t o V6.7.0.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax

> Document Version: 20220524 188


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/[InstanceId]/actions/upgrade-version HTTP/1.1

Request parameters

Positi Require
Attribute T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

Whether to perform pre-upgrade


Boolea verification. true indicates
dryRun Query No false
n verification, and false indicates no
verification.

Upgraded version, optional values:


6.7, ali1.2.0. the value is 6.7, the
version String Body No 6.7 type must be a engineVersion;
value ali1.2.0, the type must be a
aliVersion.

Upgrade type, optional values:


engineVersion (version upgrade,
type String Body No engineVersion
default), aliVersion (patch
upgrade).

Response parameters

Attribute T ype Sample response Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DC*****

Result Struct T he returned results.

189 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Attribute T ype Sample response Description

Check whether it passes. Success means


status String success
pass, failed means not.

validateResult Struct Check the information.

ClusterStatusNotHe
errorCode String T he error code returned.
alth

T he cluster status is
errorMsg String T he error message returned.
not health

T he type of the error that occurred. Valid


values:

clusterStatus: cluster health status


clusterConfigYml: Cluster YML File
errorT ype String clusterStatus
clusterConfigPlugins: Cluster
Configuration File
clusterResource: cluster resources
clusterSnapshot: cluster snapshot

T he monitoring type. Valid values:

checkClusterHealth: cluster health status


checkConfigCompatible: Configure
validateT ype String checkClusterHealth Compatibility Status
checkClusterResource: resource space
status
checkClusterSnapshot: whether a
snapshot exists

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c **** /actions/upgrade-version HTTP/1.1 pub


lic request header {"version": "ali1.2.0", "type": "aliVersion" }

Sample success responses

JSON format

> Document Version: 20220524 190


API Reference· Elast icsearch inst anc
Elast icsearch
es

{ "Result":[ { "validateType":"checkClusterHealth", "status":"failed", "validateResult


":[ { "errorType":"clusterStatus", "errorCode":"ClusterStatusNotHealth", "errorMsg":"Cluste
rStatusNotHealth" } ] }, { "validateType":"checkConfigCompatible", "status":"failed", "vali
dateResult":[ { "errorType":"clusterConfigYml", "errorCode":"ClusterYamlNotCompatible", "er
rorMsg":"ClusterYamlNotCompatible" }, { "errorType":"clusterConfigPlugins", "errorCode":"Cl
usterPluginsNotSupport", "errorMsg":"ClusterPluginsNotSupport" } ] }, { "validateType":"che
ckClusterResource", "status":"failed", "validateResult":[ { "errorType":"clusterResource",
"errorCode":"ClusterResourceNotEnough", "errorMsg":"ClusterResourceNotEnough" } ] }, { "val
idateType":"checkClusterSnapshot", "status":"failed", "validateResult":[ { "errorType":"clu
sterSnapshot", "errorCode":"ClusterSnapshotNotAvaild", "errorMsg":"ClusterSnapshotNotAvaild
" } ] } ], "RequestId":"F99407AB-2FA9-489E-A259-40CF6DC****" }

Error codes

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he instanceId provided does T he instance cannot be found.


404 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.4.5. UpdateInstance
You can call t his operat ion t o change t he clust er configurat ion.

When you call t his operat ion, t ake not e of t he following limit s:
If t he inst ance is in t he Act ivat ing, Invalid, or Inact ive st at e, you cannot change t he configurat ions.
If t he indexes of your clust er do not have replica shards, t he load of t he clust er is excessively high,
and large amount s of dat a are writ t en t o or queried in your clust er, access t o t he clust er may t ime
out during a clust er configurat ion upgrade or downgrade. We recommend t hat you configure an
access ret ry mechanism for your client before you upgrade t he configurat ion of your clust er. T his
reduces t he impact on your business.
You can change t he configurat ions of only one t ype of node at a t ime (dat a node, dedicat ed mast er
node, cold dat a node, coordinat or node, Kibana node, and elast ic node).
Due t o t he healt h and st abilit y of your clust er, Alibaba Cloud Elast icsearch does not support t he
purchase of 1-core 2 GB inst ances, 2-core 2 GB inst ances for dedicat ed mast er nodes, and 7.4
inst ances since May 2021. If you have confirmed t hat t he purchased specificat ions are no longer
available for sale, you must perform t he following operat ions:
For t he 1-core 2 GB and 2-core 2 GB specificat ions, we recommend t hat you upgrade t o t he st able
sales specificat ions t hat are available on t he buy page in advance. For more informat ion about t he
sales specificat ions available on t he buy page, see Purchase page paramet ers.
If your clust er is of V7.4, purchase a V7.10 clust er and migrat e dat a from t he original clust er t o t he
V7.10 clust er.

For more informat ion, see Upgrade a clust er and Downgrade a clust er.

191 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T he Get Logs operat ion does not have operat ion-specific request headers and uses only common
request headers. For more informat ion, see Common request headers.

Request syntax
PUT /openapi/instances/{InstanceId} HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1ptcb3000 T he ID of the instance.
9****

T he client token that is used to


ensure the idempotence of the
request. You can use the client to
generate the value, but you must
5A2CFF0E-
make sure that it is unique among
5718-45B5-
clientT oken String Query No different requests. T he token can
9D4D-
contain only ASCII characters and
70B3FF****
cannot exceed 64 characters in
length.

T he type of the configuration


change. Valid values:
orderActionT yp
String Query No upgrade upgrade (default): upgrade
e
downgrade: downgrade

RequestBody
You must also specify t he following paramet ers in t he Request Body paramet er t o specify t he
informat ion of t he inst ance t o be upgraded.

> Document Version: 20220524 192


API Reference· Elast icsearch inst anc
Elast icsearch
es

Column T ype Required Example Description

T he change
method. Valid
updateT ype String No blue_green values:
blue_green and
normal.

T he number of
nodeAmount int No 3
data nodes.

T he configuration
nodeSpec Map No
of the data node.

node
specifications, the
specification
elasticsearch.sn2n information can
└spec String No
e.xlarge be viewed by
product
specifications.

T he storage space
└disk String No 20 of a single node.
Unit: GB.

T he type of the
storage. Valid
values:
cloud_ssd(SSD),
└diskT ype String No cloud_ssd cloud_essd
(Enhanced SSD),
and
cloud_efficiency
(ultra disk).

T he performance
level of the ESSD.
T his parameter is
required when the
└performanceLev storage type is
String No PL1
el cloud_essd. Valid
values: PL1, PL2,
and PL3.

193 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Column T ype Required Example Description

T he configuration
masterConfigurati
Map No of the dedicated
on
master node.

node
specifications, the
specification
elasticsearch.sn2n
└spec String No information can
e.xlarge
be viewed by
product
specifications.

T he number of
nodes. Currently,
└amount int No 3
the value is fixed
to 3.

T he size of the
storage space per
└disk int No 20 node. Currently,
only 20 GB is
supported.

T he storage type
of the node. Valid
values:
└diskT ype string No cloud_ssd
cloud_ssd(SSD)
and cloud_essd
(Enhanced SSD).

warmNodeConfigu Configure the cold


Map No
ration data node.

> Document Version: 20220524 194


API Reference· Elast icsearch inst anc
Elast icsearch
es

Column T ype Required Example Description

node
specifications, the
specification
information can
be viewed by
product
specifications. T he
openstore.i2g.4xla
elasticsearch.ic5.la
└spec string No rge specification
rge
indicates that
OpenStore
storage is enabled
(this specification
only applies to
China site
(aliyun.com)).

T he number of
└amount Integer No 2
nodes.

T he storage space
└disk Integer No 500
of a single node.

clientNodeConfigu Coordination node


Map No
ration configuration.

node
specifications, the
specification
elasticsearch.ic5.la
└spec string No information can
rge
be viewed by
product
specifications.

T he number of
└amount Integer No 2
nodes.

T he size of the
storage space per
node.
└disk Integer No 20

195 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Column T ype Required Example Description

Elastic node
elasticDataNodeC configuration (this
onfiguration Map No configuration only
applies to China
site (aliyun.com)).

node
specifications, the
specification
information can
elasticsearch.ic5.la be viewed by
└spec string No
rge product
specifications.

└amount Integer No 2 T he quantity.

T he storage type
of the node. Valid
values:
cloud_ssd(SSD),
└diskT ype string No cloud_efficiency cloud_essd
(Enhanced SSD),
and
cloud_efficiency
(ultra disk).

T he size of the
└disk Integer No 20 storage space per
node.

T he performance
level of the ESSD.
T his parameter is
└performanceLev
el required when the
String No PL1
storage type is
cloud_essd. Valid
values: PL1, PL2,
and PL3.

T he configuration
kibanaConfiguratio
Map No of the kibana
n
node.

> Document Version: 20220524 196


API Reference· Elast icsearch inst anc
Elast icsearch
es

Column T ype Required Example Description

node
specifications, the
specification
elasticsearch.n4.s
└spec String Yes information can
mall
be viewed by
product
specifications.

Specifies whether
to verify the
configurations
when you change
the configuration
dryRun boolean No true
of the instance.
Valid values: true
and false. Valid
values: true and
false.

Not e
└ indicat es a child paramet er.
For a list of support ed node specificat ions, see Alibaba Cloud Elast icsearch pricing
informat ion and product specificat ions.

An example of t he Request Body is as follows:

Upgrade

Not e You cannot reduce t he st orage space value, st orage t ype configurat ion, number of
nodes, number of CPU cores of specificat ions, or memory value when you upgrade t he
configurat ion.

Upgrade st orage space


Current ly, you can upgrade st orage space only for dat a nodes, cold dat a nodes, and elast ic dat a
nodes.

Upgrade t he st orage space of cold dat a nodes t o 1000 GiB.

{
"warmNodeConfiguration": {
"disk": 1000
}
}

Upgrade st orage t ype

197 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Current ly, you can upgrade st orage t ypes only for dat a nodes, elast ic dat a nodes, and dedicat ed
mast er nodes.

Upgrade t he st orage t ype of t he dedicat ed mast er node t o t he Enhanced SSD t ype.

{
"masterConfiguration": {
"diskType": "cloud_essd"
}
}

If t he st orage t ype of a dedicat ed mast er node is Enhanced SSD, upgrade t he node st orage
performance level t o PL3.

Aft er t he perf ormanceLevel is specified, t he diskT ype is populat ed as cloud_essd by default .


Aft er you specify t he cloud_essd , t he perf ormanceLevel default s t o PL1 .

{
"masterConfiguration": {
"performanceLevel": "PL3"
}
}

Number of Upgraded Nodes

Current ly, only dat a nodes, cold dat a nodes, elast ic dat a nodes, and coordinat or nodes are
support ed.

T he met hod of increasing t he number of nodes for a dat a node is different from t hat for ot her
nodes. For more informat ion, see t he following example.
Increase t he number of dat a nodes t o 12.

{
"nodeAmount": 12
}

Increase t he number of nodes of ot her t ypes (for example, cold dat a nodes) t o 12.

{
"warmNodeConfiguration": {
"amount": 12
}
}

Upgrade node specificat ions

Upgrade t he specificat ions of dat a nodes t o 4 cores and 32 GB.

> Document Version: 20220524 198


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
}
}

Several configurat ions of t he same node are upgraded at t he same t ime

T o upgrade several configurat ions of t he same node at t he same t ime, you must writ e t he request
body of t he upgraded resource at t he same t ime.

T he number of nodes of t he coordinat or node is increased t o 8, and t he specificat ion is increased


t o 4 cores and 8 GB.

{
"clientNodeConfiguration": {
"amount": 8,
"spec": "elasticsearch.sn1ne.xlarge"
}
}

Increase t he number of dat a nodes t o 12 and t he st orage t ype t o Enhanced SSD.

{
"nodeAmount": 12,
"nodeSpec": {
"diskType": "cloud_essd"
}
}

Enable a node

For more informat ion about how t o configure a complet e node resource, see Configure a
creat eInst ance port .

Enable t he coordinat ion node and set t he coordinat ion node configurat ion.

{
"clientNodeConfiguration": {
"amount": 5,
"disk": 20,
"spec": "elasticsearch.sn1ne.xlarge"
}
}

199 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Enable t he cold dat a node and set t he cold dat a node configurat ion.

{
"warmNodeConfiguration": {
"disk": 1000,
"amount": 3,
"spec": "elasticsearch.sn1ne.xlarge"
}
}

Specify t he change met hod


T he default change mode is int elligent change, which is specified as blue-green change
(blue_green) or in-sit u change (normal).

{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
},
"updateType": "blue_green" ## Change the value to normal.
}

Enforce changes are enabled.

{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
},
"force": true
}

Use t he dryRun int erface t o upgrade t he configurat ion precheck


Add t he dryRun field t o t he request body.

{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
},
"dryRun": true
}

Downgrade

> Document Version: 20220524 200


API Reference· Elast icsearch inst anc
Elast icsearch
es

Not e

When you downgrade t he configurat ion, you cannot upgrade t he st orage space value, st orage
t ype, number of nodes, number of CPU cores of specificat ions, or memory value.

T he Updat eInst ance int erface cannot reduce t he number of nodes. Use t he ShrinkNode int erface if
necessary.

You cannot downgrade t he st orage space of a node. Enabled nodes cannot be disabled.
You cannot select a forced change or specify a change t ype. By default , smart changes are used.

If you downgrade t he configurat ion, you must set t he orderAct ionT ype paramet er t o
Downgrade .

You can downgrade mult iple resource configurat ions at t he same t ime, or perform dryRun pre-
verificat ion.

Downgrade t he st orage t ype

When you downgrade t he configurat ion, you cannot change t he st orage t ypes of cold dat a nodes,
coordinat or nodes, and Kibana nodes.
Change t he st orage t ype of t he dedicat ed mast er node t o SSD.

{
"masterConfiguration": {
"diskType": "cloud_ssd"
}
}

Downgrade specificat ions

Downgrade t he specificat ions of dat a nodes t o 4 cores and 32 GB.

{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
}
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Object T he return results.

nodeAmount Integer 2 T he number of data nodes.

201 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

2018-07-
createdAt String T he time when the instance was created.
13T 03:58:07.253Z

T he status of the instance. Valid values:

active: normal
status String active activating: taking effect
inactive: frozen
invalid: invalid

T he billing method of the instance. Valid


values:
paymentT ype String postpaid
prepaid: subscription
postpaid: pay-as-you-go

es-cn-
domain String abc.elasticsearch.ali T he private domain name of the instance.
yuncs.com

description String test T he name of the instance.

esVersion String 5.5.3_with_X-Pack T he version of the read-only instance.

instanceId String es-cn-abc T he ID of the instance.

nodeSpec Object T he configuration of data nodes.

elasticsearch.sn2ne.
spec String T he instance type of the node.
xlarge

disk Integer 40 T he storage space of the node. Unit: GB.

T he storage type of the node. Valid values:


diskT ype String cloud_ssd cloud_ssd: standard SSD
cloud_efficiency: ultra disk

kibanaConfigur
Object T he configuration of Kibana nodes.
ation

elasticsearch.n4.sm
spec String T he instance type of the node.
all

> Document Version: 20220524 202


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

amount Integer 1 T he number of nodes.

disk Integer 20 T he size of the node storage space.

T he storage type of the node. T his


diskT ype String cloud_ssd
parameter can be ignored.

masterConfigur T he configuration of dedicated master


Object
ation nodes.

elasticsearch.sn2ne.l
spec String T he instance type of the node.
arge

amount Integer 3 T he number of nodes.

disk Integer 20 T he storage space of the node. Unit: GB.

T he storage type of the node. Only


diskT ype String cloud_ssd
cloud_ssd(SSD cloud disk) is supported.

Examples
Sample request s

PUT /openapi/instances/es-cn-n6w1ptcb30009****?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**
**&orderActionType=upgrade HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"nodeSpec": {
"spec": "elasticsearch.r5.xlarge"
}
}

Sample success responses

JSON format

203 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : {
"instanceId" : "es-cn-n6w1ptcb30009****",
"version" : "5.5.3_with_X-Pack",
"nodeAmount" : 3,
"paymentType" : "postpaid",
"status" : "active",
"nodeSpec" : {
"spec" : "elasticsearch.n4.small",
"disk" : 40,
"diskType" : "cloud_ssd",
"diskEncryption" : false
},
"createdAt" : "2020-06-28T08:25:52.895Z",
"zoneCount" : 1,
"instanceCategory" : "x-pack",
"kibanaConfiguration" : {
"spec" : "elasticsearch.n4.small",
"amount" : 1,
"disk" : 0
}
},
"RequestId" : "B5246080-9C30-4B6A-8F8A-8C705405****"
}

Descript ion of sample responses

> In the return example, this article only guarantees that the parameters in the return da
ta list are included, and the parameters not mentioned are for reference only. The program
cannot force to rely on obtaining these parameters.

Error codes
For a list of error codes, visit t he API Error Cent er.

7.5. Configure clusters


7.5.1. UpdateInstanceSettings
Call Updat eInst anceSet t ings t o updat e t he YML configurat ion of a specified inst ance.

When you call t his operat ion, t ake not e of t he following it ems:

When t he inst ance is in t he act ivat ing, invalid, or inact ive st at e, you cannot updat e t he configurat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

> Document Version: 20220524 204


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
PATCH|POST /openapi/instances/[InstanceId]/instance-settings HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
T he esConf ig paramet er needs t o be filled in t he Request Body t o specify t he YML paramet ers and
values t o be updat ed. Example:

{
"esConfig": {
"thread_pool.bulk.queue_size": 500
}
}

Response parameters

Parameter T ype Example Description

BB1C321A-211C-
RequestId String 4FD7-BD8B- T he ID of the request.
7F2FABE2****

T he ret urned dat a also includes t he Result paramet er. For more informat ion, see List Inst ance.

Examples
Sample request s

205 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

PATCH /openapi/instances/es-cn-nif1q9o8r0008****/instance-settings HTTP/1.1


Common request parameters
{
"esConfig": {
"thread_pool.bulk.queue_size": 500
}
}

Sample success responses


JSON format

{
"Result": {
"instanceId": "es-cn-nif1q9o8r0008****",
"version": "6.7.0_with_X-Pack",
"description": "es-cn-nif1q9o8r0008****",
"nodeAmount": 4,
"paymentType": "postpaid",
"status": "active",
"privateNetworkIpWhiteList": [
"0.0.0.0/0"
],
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.n4.small",
"disk": 20,
"diskType": "cloud_ssd",
"diskEncryption": false
},
"networkConfig": {
"vpcId": "vpc-bp16k1dvzxtmagcva****",
"vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
"vsArea": "cn-hangzhou-i",
"type": "vpc"
},
"createdAt": "2020-07-07T04:05:16.791Z",
"updatedAt": "2020-07-07T07:09:51.268Z",
"commodityCode": "elasticsearch",
"extendConfigs": [
{
"configType": "usageScenario",
"value": "general"
},
{
"configType": "maintainTime",
"maintainStartTime": "02:00Z",
"maintainEndTime": "06:00Z"
},
{
"configType": "aliVersion",
"aliVersion": "ali1.2.0"
}
],

> Document Version: 20220524 206


API Reference· Elast icsearch inst anc
Elast icsearch
es
],
"endTime": 4749811200000,
"clusterTasks": [
{
"type": "MigrateData",
"progress": 100,
"detail": {},
"status": "FINISHED",
"canCancelable": false,
"interruptible": false,
"subTasks": [
{
"type": "FindShrinkNodeAction",
"progress": 100,
"detail": {},
"status": "FINISHED",
"canCancelable": false,
"interruptible": false,
"subTasks": []
},
{
"type": "MigrateDataAction",
"progress": 100,
"detail": {
"doneMigrateNodeIps": [
"172.16. **.**"
],
"allMigrateNodeIps": [
"172.16. **.**"
]
},
"status": "FINISHED",
"canCancelable": false,
"interruptible": false,
"subTasks": []
}
]
}
],
"vpcInstanceId": "es-cn-nif1q9o8r0008****-worker",
"resourceGroupId": "rg-acfm2h5vbzd****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-i",
"status": "NORMAL"
}
],
"instanceType": "elasticsearch",
"inited": true,
"tags": [],
"domain": "es-cn-nif1q9o8r0008****.elasticsearch.aliyuncs.com",
"port": 9200,
"esVersion": "6.7.0_with_X-Pack",

207 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

"esConfig": {
"thread_pool.bulk.queue_size": "500",
"xpack.security.authc.realms.native.type": "native",
"xpack.security.authc.reserved_realm.enabled": "false",
"xpack.security.transport.ssl.truststore.path": "168520994880****.p12",
"xpack.security.authc.realms.native.order": "1",
"xpack.license.self_generated.type": "trial",
"xpack.security.authc.realms.file.order": "0",
"xpack.security.authc.realms.file.type": "file",
"xpack.security.enabled": "true",
"bootstrap.memory_lock": "true",
"xpack.monitoring.collection.enabled": "true",
"xpack.security.transport.ssl.keystore.path": "168520994880****.p12",
"xpack.security.transport.ssl.verification_mode": "certificate",
"xpack.security.transport.ssl.enabled": "true"
},
"esIPWhitelist": [
"0.0.0.0/0"
],
"esIPBlacklist": [],
"kibanaIPWhitelist": [
"0.0.0.0/0",
"::/0"
],
"kibanaPrivateIPWhitelist": [],
"publicIpWhitelist": [],
"kibanaDomain": "es-cn-nif1q9o8r0008****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort": 5601,
"haveKibana": true,
"instanceCategory": "x-pack",
"dedicateMaster": false,
"advancedDedicateMaster": false,
"masterConfiguration": {},
"haveClientNode": false,
"warmNode": false,
"warmNodeConfiguration": {},
"clientNodeConfiguration": {},
"kibanaConfiguration": {
"spec": "elasticsearch.n4.small",
"amount": 1,
"disk": 0
},
"dictList": [
{
"name": "SYSTEM_MAIN.dic",
"fileSize": 2782602,
"sourceType": "ORIGIN",
"type": "MAIN"
},
{
"name": "SYSTEM_STOPWORD.dic",
"fileSize": 132,
"sourceType": "ORIGIN",
"type": "STOP"

> Document Version: 20220524 208


API Reference· Elast icsearch inst anc
Elast icsearch
es

}
],
"synonymsDicts": [],
"ikHotDicts": [],
"aliwsDicts": [],
"haveGrafana": false,
"haveCerebro": false,
"enableKibanaPublicNetwork": true,
"enableKibanaPrivateNetwork": false,
"advancedSetting": {
"gcName": "CMS"
}
},
"RequestId": "C1FA70F8-B84E-4D89-B31A-BCD1E476****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.5.2. UpdateHotIkDicts
Call t he Updat eHot IkDict s t o hot updat e t he IK word segment at ion plug-ins for a Alibaba Cloud
Elast icsearch inst ance, including t he IK main word segment at ion dict ionary and IK st opword Dict ionary.

Not e t he following when calling t his int erface:

If t he dict ionary file is obt ained from OSS, make sure t hat t he OSS bucket is public-readable.
If t he ORIGIN configurat ion is not added t o an uploaded dict ionary file, t he dict ionary file is delet ed
aft er you call t his operat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
PUT /openapi/instances/[InstanceId]/ik-hot-dict HTTP/1.1

209 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes oew1q8bev000 T he ID of the instance.
2****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Ent er t he following paramet ers in Request Body.

Parameter T ype Required Example Description

T he name of the
name String Yes dic_0.dic uploaded
dictionary file.

T he description of
the open storage
file of OSS. When
ossObject Array Yes sourceT ype is set
to OSS, this
parameter is
required.

search-cloud- T he name of an
└bucketName String Yes
test-cn-**** OSS Bucket.

T he storage path
of the dictionary
└key String Yes oss/dic_0.dic
file in the OSS
Bucket.

> Document Version: 20220524 210


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of the
Dictionary File
Source. Valid
values: OSS (open
storage service
using OSS) and
ORIGIN (retaining
the dictionaries
that have been
previously
uploaded).
sourceT ype String Yes OSS No t es :

T he local file must


be uploaded to
OSS and then
referenced
through OSS.

If you do not add


an ORIGIN to the
dictionary file, it is
deleted by the
system.

T he type of the
dictionary that
you want to
update. Valid
type String Yes MAIN values: MAIN(IK
MAIN and word
dictionaries) and
ST OP(IK disabled
dictionaries).

Not e └ indicat es a child paramet er.

Example:

211 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

[
{
"name":"deploy_0.dic",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.dic"
},
"sourceType":"OSS",
"type":"MAIN"
},
{
"name":"deploy_2.dic",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_2.dic"
},
"sourceType":"OSS",
"type":"STOP"
},
{
"name":"SYSTEM_MAIN.dic",
"sourceType":"ORIGIN",
"type":"MAIN"
},
{
"name":"SYSTEM_STOPWORD.dic",
"sourceType":"ORIGIN",
"type":"STOP"
}
]

Response parameters

Parameter T ype Example Description

Result Array of DictList T he return results.

fileSize Long 6 T he size of the Dictionary File. Unit: Byte.

name String deploy_0.dic T he name of the dictionary file.

T he source type of the Dictionary File. Valid


values:
sourceT ype String OSS OSS: OSS open storage.
ORIGIN: Retains dictionaries that have
been uploaded.

> Document Version: 20220524 212


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he type of the dictionary. Valid values:


type String MAIN MAIN: IK MAIN word dictionary
ST OP: IK stopword Dictionary

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Examples
Sample request s

PUT /openapi/instances/es-cn-oew1q8bev0002 ****/ik-hot-dict HTTP/1.1


common request header
[
{
"name":"deploy_0.dic",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.dic"
},
"sourceType":"OSS",
"type":"MAIN"
},
{
"name":"deploy_2.dic",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_2.dic"
},
"sourceType":"OSS",
"type":"STOP"
},
{
"name":"SYSTEM_MAIN.dic",
"sourceType":"ORIGIN",
"type":"MAIN"
},
{
"name":"SYSTEM_STOPWORD.dic",
"sourceType":"ORIGIN",
"type":"STOP"
}
]

Sample success responses

JSON Synt ax

213 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": [
{
"name": "deploy_0.dic",
"ossObject": {
"bucketName": "search-cloud-test-cn-****",
"key": "user_dict/dict_0.dic"
},
"sourceType": "OSS",
"type": "MAIN"
},
{
"name": "deploy_2.dic",
"ossObject": {
"bucketName": "search-cloud-test-cn-****",
"key": "user_dict/dict_2.dic"
},
"sourceType": "OSS",
"type": "STOP"
},
{
"name": "SYSTEM_MAIN.dic",
"sourceType": "ORIGIN",
"type": "MAIN"
},
{
"name": "SYSTEM_STOPWORD.dic",
"sourceType": "ORIGIN",
"type": "STOP"
}
],
"RequestId": "E1F6991B-1F77-47EA-9666-593F11E3****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.5.3. UpdateSynonymsDicts
Call t he Updat eSynonymsDict s t o updat e t he Synonym Dict ionary of t he Elast icsearch inst ance.

Not e t he following when calling t his int erface:

If t he dict ionary file is obt ained from OSS, make sure t hat t he OSS bucket is public-readable.
If t he ORIGIN configurat ion is not added t o an uploaded dict ionary file, t he dict ionary file is delet ed
aft er you call t his operat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

> Document Version: 20220524 214


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request headers
T his operat ion uses only common request paramet ers, and does not involve special request headers.
For more informat ion, see t he t opic about common paramet ers.

Request syntax
PUT /openapi/instances/[InstanceId]/synonymsDict HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes nif1q9o8r0008* T he ID of the instance.
***

T his parameter 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. T he token can contain
5A2CFF0E- only ASCII characters and cannot
5718-45B5- exceed 64 characters in length.
clientT oken String Query No
9D4D-
70B3FF****

RequestBody
Ent er t he following paramet ers in Request Body.

Parameter T ype Required Example Description

T he name of the
dictionary file you
name String Yes dic_0.txt uploaded, must
be a T XT file.

215 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he description of
the open storage
file of OSS. When
sourceT ype is set
to OSS, this
ossObject Array No
parameter is
required.

search-cloud- T he name of an
└bucketName String No
test-cn-**** OSS Bucket.

T he storage path
of the dictionary
└key String No oss/dic_0.txt
file in the OSS
Bucket.

> Document Version: 20220524 216


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of the
Dictionary File
Source. Valid
values: OSS (open
storage service
using OSS) and
ORIGIN (retaining
the dictionaries
that have been
previously
uploaded).

No t e:

T he local file must


be uploaded to
sourceT ype String Yes OSS OSS and then
referenced
through OSS.

If an uploaded
dictionary is not
configured with
an ORIGIN, it is
deleted by the
system.

T he type of the
dictionary that
you want to
type String Yes SYNONYMS
update. T he value
is fixed to
SYNONYMS.

Not e └ indicat es a child paramet er.

Examples:

217 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

[
{
"name":"deploy_0.txt",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.dic"
},
"sourceType":"OSS",
"type":"MAIN"
},
{
"name":"SYSTEM_MAIN.txt",
"type":"MAIN",
"sourceType":"ORIGIN"
},
{
"name":"SYSTEM_STOPWORD.txt",
"type":"STOP",
"sourceType":"ORIGIN"
}
]

Response parameters

Parameter T ype Example Description

7C5622CC-B312-
RequestId String 426F-85AA- T he ID of the request.
B0271*******

Result Array of DictList T he return results.

fileSize Long 220 T he size of the Dictionary File. Unit: Byte.

name String deploy_0.txt T he name of the dictionary file.

T he source type of the Dictionary File. Valid


values:
sourceT ype String OSS OSS: OSS open storage.
ORIGIN: Retains dictionaries that have
been uploaded.

T he dictionary type. Valid values:


type String SYNONYMS
SYNONYMS.

Examples
Sample request s

> Document Version: 20220524 218


API Reference· Elast icsearch inst anc
Elast icsearch
es

PUT /openapi/instances/es-cn-nif1q9o8r0008****/synonymsDict HTTP/1.1


common request header
[
{
"name":"deploy_0.txt",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.dic"
},
"sourceType":"OSS",
"type":"SYNONYMS"
},
{
"name":"SYSTEM_STOPWORD.txt",
"sourceType":"ORIGIN",
"type":"SYNONYMS"
}
]

Sample success responses

JSON format

{
"Result": [
{
"name":"deploy_0.txt",
"fileSize":220,
"sourceType":"OSS",
"type":"SYNONYMS"
},
{
"name":"SYSTEM_MAIN.txt",
"fileSize":2782602,
"sourceType":"ORIGIN",
"type":"SYNONYMS"
},
{
"name":"SYSTEM_STOPWORD.txt",
"fileSize":132,
"sourceType":"ORIGIN",
"type":"SYNONYMS"
}
],
"RequestId": "1F7FE662-CCD8-474F-BA9B-A7E0792E****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.5.4. UpdateDict

219 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Call Updat eDict t o cold updat e t he IK word segment at ion plug-in of t he Alibaba Cloud Elast icsearch
inst ance, including t he IK main word segment at ion t hesaurus and t he IK st op word library.

When calling t his int erface, not e:

If t he dict ionary file comes from OSS, make sure t hat t he OSS st orage space is publicly readable.
If t he uploaded dict ionary is not configured wit h ORIGIN, t he dict ionary file will be delet ed aft er t his
int erface is called.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
PUT /openapi/instances/[InstanceId]/dict HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes nif1q9o8r0008* T he ID of the instance.
***

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
clientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
T he following paramet ers must be filled in t he Request Body.

Parameter T ype Required Example Description

> Document Version: 20220524 220


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he name of the
name String Yes dic_0.dic uploaded
dictionary file.

T he open storage
file description of
ossObject Array Yes OSS. Required
when sourceT ype
is OSS.

search-cloud- T he name of the


└bucketName String Yes
test-cn-**** OSS bucket.

T he path where
the dictionary file
└key String Yes oss/dic_0.dic
is stored in OSS
Bucket.

T he source type
of the dictionary
file. Optional
values: OSS (OSS
Open Storage)
and ORIGIN (Keep
previously
uploaded
dictionaries).

No t e:

sourceT ype String Yes OSS Local files need to


be uploaded to
OSS before being
referenced by
OSS.

If the dictionary
that has been
uploaded before
is not configured
with ORIGIN, it will
be deleted by the
system.

221 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he dictionary
type to update.
Optional values:
MAIN(IK main
type String Yes MAIN segmentation
thesaurus) or
ST OP(IK
deactivation
thesaurus).

Not e └ indicat es a child paramet er.

T he following sample st at ement s are for your reference:

[ { "name":"deploy_0.dic", "ossObject":{ "bucketName":"search-cloud-test-cn-****", "ke


y":"user_dict/dict_0.dic" }, "sourceType":"OSS", "type":"MAIN" }, { "name":"deploy_2.dic",
"ossObject":{ "bucketName":"search-cloud-test-cn-****", "key":"user_dict/dict_2.dic" }, "so
urceType":"OSS", "type":"STOP" }, { "name":"SYSTEM_MAIN.dic", "sourceType":"ORIGIN", "type"
:"MAIN" }, { "name":"SYSTEM_STOPWORD.dic", "sourceType":"ORIGIN", "type":"STOP" } ]

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Result Array of DictList T he return results.

fileSize Long 2782602 T he dictionary file size, unit: Byte.

name String SYST EM_MAIN.dic T he dictionary file name.

Dictionary file source type, supported:

sourceT ype String ORIGIN OSS:OSS Open Storage


ORIGIN: Keep dictionaries that have been
uploaded before

> Document Version: 20220524 222


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Dictionary type, supported:


type String MAIN MAIN:IK main participle thesaurus
ST OP:IK stopword library

Examples
Sample request s

PUT /openapi/instances/es-cn-oew1q8bev0002 ****/dict HTTP/1.1 public request header [


{ "name":"deploy_0.dic", "ossObject":{ "bucketName":"search-cloud-test-cn-****", "key":"use
r_dict/dict_0.dic" }, "sourceType":"OSS", "type":"MAIN" }, { "name":"deploy_2.dic", "ossObj
ect":{ "bucketName":"search-cloud-test-cn-****", "key":"user_dict/dict_2.dic" }, "sourceTyp
e":"OSS", "type":"STOP" }, { "name":"SYSTEM_MAIN.dic", "sourceType":"ORIGIN", "type":"MAIN"
}, { "name":"SYSTEM_STOPWORD.dic", "sourceType":"ORIGIN", "type":"STOP" } ]

Sample success responses

JSON format

{ "Result": [ { "name": "deploy_0.dic", "ossObject": { "bucketName": "search-cloud-tes


t-cn-****", "key": "user_dict/dict_0.dic" }, "sourceType": "OSS", "type": "MAIN" }, { "name
": "deploy_2.dic", "ossObject": { "bucketName": "search-cloud-test-cn-****", "key": "user_d
ict/dict_2.dic" }, "sourceType": "OSS", "type": "STOP" }, { "name": "SYSTEM_MAIN.dic", "sou
rceType": "ORIGIN", "type": "MAIN" }, { "name": "SYSTEM_STOPWORD.dic", "sourceType": "ORIGI
N", "type": "STOP" } ], "RequestId": "E1F6991B-1F77-47EA-9666-593F11E3****" }

Error code
For a list of error codes, visit t he API Error Cent er .

7.5.5. UpdateAliwsDict
Call t he Updat eAliwsDict t o updat e t he dict ionary file of t he AliNLP word Breaker (analysis-aliws).
Support s cust om dict ionary configurat ion.

Not e t he following when calling t his int erface:

Alibaba Cloud Elast icsearch V5.0 clust ers do not support t he analysis-aliws plug-in.
If t he dict ionary file is obt ained from OSS, make sure t hat t he OSS bucket is public-readable.
If t he ORIGIN configurat ion is not added t o an uploaded dict ionary file, t he dict ionary file is delet ed
aft er you call t his operat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

223 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request headers
T his operat ion uses only common request paramet ers, and does not involve special request headers.
For more informat ion, see t he t opic about common paramet ers.

Request syntax
PUT /openapi/instances/[InstanceId]/aliws-dict HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

T his parameter 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. T he token can contain
5A2CFF0E- only ASCII characters and cannot
5718-45B5- exceed 64 characters in length.
clientT oken String Query No
9D4D-
70B3FF****

RequestBody
Ent er t he following paramet ers in Request Body.

Parameter T ype Required Example Description

T he name of the
uploaded
name String Yes aliws_ext_dict.txt dictionary file.

> Document Version: 20220524 224


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he description of
the open storage
file of OSS. When
ossObject Array Yes sourceT ype is set
to OSS, this
parameter is
required.

search-cloud- T he name of an
└bucketName String Yes
test-cn-**** OSS Bucket.

T he storage path
oss/aliws_ext_dict of the dictionary
└key String Yes
.txt file in the OSS
Bucket.

T he type of the
Dictionary File
Source. Valid
values: OSS (open
storage service
using OSS) and
ORIGIN (retaining
the dictionaries
that have been
previously
uploaded).

No t e:

T he local file must


be uploaded to
sourceT ype String Yes OSS OSS and then
referenced
through OSS.

If a dictionary is
not configured
with an ORIGIN in
the previous
upload, it is
deleted by the
system.

225 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he type of the
dictionary. Static
field:
type String Yes ALI_WS
ALI_WS(AliNLP
word
segmentation).

Not e └ indicat es a child paramet er.

Examples:

[
{
"name":"deploy_0.txt",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.txt"
},
"sourceType":"OSS",
"type":"ALI_WS"
},
{
"name":"aliws_ext_dict.txt",
"sourceType":"ORIGIN",
"type":"ALI_WS"
}
]

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of DictList T he return results.

fileSize Long 6226 T he size of the file. Unit: Byte.

name String aliws_ext_dict.txt T he name of the uploaded file.

> Document Version: 20220524 226


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he source type of the Dictionary File. Valid


values:
sourceT ype String OSS OSS: Use OSS open storage.
ORIGIN: Retains dictionaries that have
been uploaded.

T he dictionary type. Valid values:


type String ALI_WS
ALI_WS(AliNLP word segmentation).

Examples
Sample request s

PUT /openapi/instances/es-cn-n6w1o1x0w001c****/aliws-dict HTTP/1.1


common request header
[
{
"name":"deploy_0.txt",
"ossObject":{
"bucketName":"search-cloud-test-cn-****",
"key":"user_dict/dict_0.txt"
},
"sourceType":"OSS",
"type":"ALI_WS"
},
{
"name":"aliws_ext_dict.txt",
"sourceType":"ORIGIN",
"type":"ALI_WS"
}
]

Sample success responses

XML format

<Result>
<name>aliws_ext_dict.txt</name>
<fileSize>6243</fileSize>
<sourceType>OSS</sourceType>
<type>ALI_WS</type>
</Result>
<RequestId>6A185DDB-3E87-448B-8932-8F77E35****</RequestId>

JSON format

227 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result":[
{
"name":"aliws_ext_dict.txt",
"fileSize":6243,
"sourceType":"OSS",
"type":"ALI_WS"
}
],
"RequestId":"6A185DDB-3E87-448B-8932-8F77E35****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.5.6. ListDictInformation
T he call List Dict Informat ion obt ains and verifies t he det ails of t he user OSS dict ionary file when adding
t he dict ionary file st ored by t he user OSS.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/dict/_info HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

search-cloud- T he name of the OSS bucket where


bucketName String Query Yes
test-cn-**** the dictionary file resides.

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

> Document Version: 20220524 228


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

T he path where the dictionary file


key String Query Yes oss/dic_0.dic
is stored in OSS Bucket.

T he OSS dictionary type to be


added by the user. Four types of
analyzerT ype String Query No ALIWS
IK_HOT , IK, SYNONYMS, and ALIWS
are supported. Default value: IK

Response parameters

Parameter T ype Example Description

7C4334EA-D22B-
RequestId String 48BD-AE28- T he ID of the request.
08EE68******

Result Struct T he returned results.

fileSize Long 2202301 T he dictionary file size, unit: Byte.

ossObject Struct OSS Open Storage file details.

T he name of the bucket where the OSS


bucketName String es-osstest*
storage file is located.

2ABAB5E70BBF63114 T he MD5 check code ET ag (uppercase) of the


etag String
5647F6BE533**** OSS storage file.

T he path where the dictionary file is stored


key String oss/dict_0*.dic
in OSS Bucket.

T hesaurus type, which supports the


following two types:
type String ST OP
MAIN: main participle thesaurus
ST OP: disables thesaurus

Examples
Sample request s

229 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/instances/es-cn-n6w1o1x0w001c****/dict/_info?bucketName=your-oss-bucket-n
ame&key=test/dict.dic&analyzerType=ALIWS HTTP/1.1 public request header

Sample success responses

JSON format

{ "RequestId": "7C4334EA-D22B-48BD-AE28-08EE68******", "Result": { "fileSize": 2202301


, "type": "STOP", "ossObject": { "bucketName": "es-osstest*", "etag": "2ABAB5E70BBF63114564
7F6BE533****", "key": "oss/dict_0*.dic" } } }

Error code
For a list of error codes, visit t he API Error Cent er .

7.5.7. UpdateAdvancedSetting
Call Updat eAdvancedSet t ing t o change t he garbage collect or configurat ion for t he specified inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST|PUT /openapi/instances/[InstanceId]/actions/update-advanced-setting HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes 09k1ruw79000u** T he ID of the instance.
**

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

> Document Version: 20220524 230


API Reference· Elast icsearch inst anc
Elast icsearch
es

RequestBody
T he following paramet ers must be specified in Request Body t o specify t he modified garbage collect or
configurat ion.

Parameter T ype Required Example Description

T he new name of
the garbage
gcName String Yes CMS collector.
Supported types:
CMS and G1.

Example:

{
"gcName":"CMS"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Return results:

true: garbage collector configuration


Result Boolean true changed successfully
false: garbage collector configuration
changed successfully failed

Examples
Sample request s

POST /openapi/instances/es-cn-09k1ruw79000u****/actions/update-advanced-setting HTTP/1.1


Common request parameters
{
"gcName":"CMS"
}

Sample success responses

JSON format

231 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": true,
"RequestId": "D7BA7E23-F6B7-4D57-BBE4-67EACAAB****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.5.8. ListDicts
List Dict s is called t o ret urn t he dict ionary det ails of t he specified t ype and t he public downloadable link
generat ed by t he signat ure.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/dicts HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

Dictionary type. Supported:

IK:IK cold update dictionary.

analyzerT ype String Query Yes IK IK_HOT :IK hot updates the
dictionary.
SYNONYMS: synonyms.
ALIWS: Ali dictionary.

> Document Version: 20220524 232


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes 0ju29ifnc0005** T he ID of the instance.
**

SYST EM_MAIN.d
name String Query No Filter the name of the specified file.
ic

Not e T he dict ionary name under each elast icsearchAnalyzer is unique. Even if IK's main word
bank and disabled word bank, t here will be no dict ionary file wit h t he same name.

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 1 T he total number of entries returned.

2937F832-F39E-
RequestId String 41EF-89BA- T he ID of the request.
B528342A2A3A

Result Array of Result T he returned request result.

http://test_bucket.
oss-cn-
hangzhou.aliyuncs.c
om/AliyunEs/test.di
c? Internet downloadable link. T he valid
downloadUrl String
Expires=162573****& duration is 90 seconds.
OSSAccessKeyId=LT
AI*****V9&Signature
=PNPO********BBGsJ
DO4V3VfU4sE%3D

T he number of bytes in the dictionary file.


fileSize Long 2782602
Unit: bytes.

name String SYST EM_MAIN.dic T he file name of the dictionary file.

sourceT ype String ORIGIN Static field.

233 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he type of the IK dictionary. Valid values:


type String MAIN MAIN: the main participle.
ST OP: the word library.

Examples
Sample request s

GET /openapi/instances/es-cn-0ju29ifnc0005****/dicts HTTP/1.1 common request header {


"elasticsearchAnalyzer": "IK" }

Sample success responses

JSON format

{ "Result": [ { "name": "SYSTEM_MAIN.dic", "fileSize": 2782602, "downloadUrl": "http:/


/test_bucket.oss-cn-hangzhou.aliyuncs.com/AliyunEs/test.dic?Expires=162573****&OSSAccessKey
Id=LTAI*****V9&Signature=PNPO********BBGsJDO4V3VfU4sE%3D", "sourceType": "ORIGIN", "type":
"MAIN" } ], "RequestId": "2937F832-F39E-41EF-89BA-B528342A2A3A", "Headers": { "X-Total-Coun
t": 1 } }

Error code
For a list of error codes, visit t he API Error Cent er .

7.6. Manage plug-ins


7.6.1. ListPlugins
You can call t his operat ion t o query plug-ins on a specified Elast icsearch inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request paramet ers. For more informat ion, see t he Common request
paramet ers t opic.

Request syntax
GET /openapi/instances/[InstanceId]/plugins HTTP/1.1

> Document Version: 20220524 234


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request parameters

Locati Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes nif1q9o8r0008* T he IDs of the added ECS instances.
***

name String Query No analysis-ik T he name of the plug-in.

page String Query No 1 T he number of the returned page.

T he number of entries returned on


size Integer Query No 10
each page.

source String Query No SYST EM T he plug-in source type.

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 2 T he total number of entries returned.

5A5D8E74-565C-
RequestId String 43DC-B031- T he ID of the request.
29289FA9****

Result Array of Result T he returned results.

IK analysis plug-in
description String T he description of the plug-in.
for Elasticsearch.

name String analysis-ik T he name of the plug-in.

source String SYST EM T he plug-in source type.

T he address of the plug-in description


specificationUrl String https://xxxx.html
document.

state String INST ALLED T he status of the plug-in.

235 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Examples
Sample request s

GET /openapi/instances/es-cn-nif1q9o8r0008 ****/plugins HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": [ { "name": "aliyun-qos", "state": "INSTALLED", "source": "SYSTEM", "descr


iption": "Rate limiting and throttling plug-in for Elasticsearch. It limits QPS and bulk re
quest sizes and supports rate limiting and throttling for node-level read and write operati
ons.", "specificationUrl": "https://xxxx.html" }, { "name": "aliyun-sql", "state": "INSTALL
ED", "source": "SYSTEM", "description": "SQL plug-in developed by Alibaba Cloud for Elastic
search. It provides high SQL query capabilities.", "specificationUrl": "https://xxxx.html"
}, { "name": "analysis-aliws", "state": "UNINSTALLED", "source": "SYSTEM", "description": "
Aliws analysis plug-in for Elasticsearch. It is integrated with an analyzer and a tokenizer
.", "specificationUrl": "https://xxxx.html" }, { "name": "analysis-icu", "state": "INSTALLE
D", "source": "SYSTEM", "description": "ICU analysis plug-in for Elasticsearch. It integrat
es the Lucene ICU module into Elasticsearch and adds ICU analysis components." }, { "name":
"analysis-ik", "state": "INSTALLED", "source": "SYSTEM", "description": "IK analysis plug-i
n for Elasticsearch." }, { "name": "analysis-kuromoji", "state": "INSTALLED", "source": "SY
STEM", "description": "Japanese (Kuromoji) analysis plug-in for Elasticsearch. It integrate
s the Lucene Kuromoji analysis module into Elasticsearch." }, { "name": "analysis-phonetic"
, "state": "INSTALLED", "source": "SYSTEM", "description": "Phonetic analysis plug-in for E
lasticsearch. It integrates the phonetic token filter into Elasticsearch." }, { "name": "an
alysis-pinyin", "state": "INSTALLED", "source": "SYSTEM", "description": "Pinyin analysis p
lug-in for Elasticsearch." }, { "name": "analysis-smartcn", "state": "INSTALLED", "source":
"SYSTEM", "description": "Smart Chinese analysis plug-in for Elasticsearch. It integrates t
he Lucene Smart Chinese analysis module into Elasticsearch." }, { "name": "apack", "state":
"INSTALLED", "source": "SYSTEM", "description": "Provides the general physical replication
and vector retrieval features. These features improve the write performance of a cluster an
d enable image search.", "specificationUrl": "https://xxxx.html" }, { "name": "codec-compre
ssion", "state": "INSTALLED", "source": "SYSTEM", "description": "The codec-compression plu
g-in supports lossless compression algorithms such as Brotli and zstd. This plug-in also pr
ovides a high index compression ratio and reduces index storage costs.", "specificationUrl"
: "https://xxxx.html" }, { "name": "elasticsearch-repository-oss", "state": "INSTALLED", "s
ource": "SYSTEM", "description": "Alibaba Cloud OSS is supported for storing Elasticsearch
snapshots." }, { "name": "ingest-attachment", "state": "INSTALLED", "source": "SYSTEM", "de
scription": "Ingest processor for Elasticsearch. It uses Apache Tika to extract content." }
, { "name": "kmonitor", "state": "INSTALLED", "source": "SYSTEM", "description": "aliyun el
asticsearch kmonitor plugin" }, { "name": "mapper-murmur3", "state": "INSTALLED", "source":
"SYSTEM", "description": "Computes the hashes of field values when an index is created and
stores the hashes in the index." }, { "name": "mapper-size", "state": "INSTALLED", "source"
: "SYSTEM", "description": "The Mapper Size plug-in allows documents to record their uncomp
ressed size at index time." }, { "name": "repository-hdfs", "state": "INSTALLED", "source":
"SYSTEM", "description": "The HDFS repository plug-in adds support for Hadoop Distributed F
ile System (HDFS) repositories." } ], "RequestId": "06280628-C7CB-4818-83EE-8079ACB8****",
"Headers": { "X-Total-Count": 17 } }

> Document Version: 20220524 236


API Reference· Elast icsearch inst anc
Elast icsearch
es

Error codes

HttpCode Error code Error message Description

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.6.2. InstallSystemPlugin
Call Inst allSyst emPlugin t o inst all a syst em preset plug-in.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/plugins/system/actions/install HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Ent er t he name of t he plug-in t o be inst alled in Request Body, in t he format of
["plugin_name1","plugin_name2",...,"plugin_namen"] , such as ["aliyun-sql","codec-
compression"] .

Response parameters

237 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Result List ["aliyun-sql"] T he list of plug-ins to be installed.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/plugins/system/actions/install HTTP/1.1


Common request parameters
["aliyun-sql","codec-compression"]

Sample success responses

JSON format

{
"Result": ["aliyun-sql"],
"RequestId": "5A5D8E74-565C-43DC-B031-29289FA*****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.6.3. UninstallPlugin
Call Uninst allPlugin t o uninst all t he preset plug-in.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax

> Document Version: 20220524 238


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/instances/[InstanceId]/plugins/actions/uninstall HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Ent er t he name of t he plug-in in t he Request Body. T he format is ["pluginname1","pluginname2",…,
"plugin_namen"] . Example: ["aliyun-sql","codec-compression"] .

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

T he list of plug-ins to be unloaded. If the


Result List ["aliyun-mysql"]
unloading fails, an exception is returned.

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/plugins/actions/uninstall HTTP/1.1


Common request parameters
["aliyun-sql","codec-compression"]

Sample success responses

JSON format

239 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": ["aliyun-mysql"],
"RequestId": "5A5D8E74-565C-43DC-B031-29289FA9BAD6****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.6.4. InstallUserPlugins
Call t he Inst allUserPlugins t o inst all user-defined plug-ins t hat have been uploaded t o t he Elast icsearch
console.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/plugins/user/actions/install HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes i7m27ausp001l T he ID of the instance.
****

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify a list of cust om plug-ins.

> Document Version: 20220524 240


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter Required
T ype Example Description

RequestBody Array

User-defined
plug-ins that have
└ name String Yes pluginName1.zip been uploaded to
the Elasticsearch
console.

└ indicat es a child paramet er.

For example, an error message is ret urned if you use t he following code:

[ {"name": "pluginName1.zip"}, {"name": "pluginName2.zip"} ]

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6F*****

T he list of plug-ins that are requested to be


installed. If the installation fails, the system
["pluginName1.zip",
Result List will return the corresponding error code.
"pluginName2.zip"]
Please refer to the error code to locate the
problem.

Examples
Sample request s

POST /openapi/instances/[es-cn-i7m27ausp001l ****]/plugins/user/actions/install HTTP/1


.1 public request header ''' [ {"name": "pluginName1.zip"}, {"name": "pluginName2.zip"} ]

Sample success responses

JSON format

{ "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6F*****", "Result": "[\"pluginName1.zip\",


\"pluginName2.zip\"]" }

241 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Error codes

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

7.7. Query logs


7.7.1. ListSearchLog
Queries t he logs of an Elast icsearch clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, refer t o t he document at ion of
common request paramet ers.

Request syntax
GET /openapi/instances/{InstanceId}/search-log HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

T he type of the log. Valid values:

INST ANCELOG: master logs


SEARCHSLOW: search slow logs

type String Query Yes INST ANCELOG INDEXINGSLOW: indexing slow


logs
JVMLOG: GC logs
ES_SEARCH_ACCESS_LOG: ES
access logs

> Document Version: 20220524 242


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

host:172.16.**.
T he keyword used to match log
query String Query Yes ** AND
entries.
content:netty

T he beginning of the time range to


beginT ime Long Query No 1531910852074
query. Unit: ms.

T he end of the time range to


endT ime Long Query No 1531910852074
query. Unit: ms.

T he page number of the plug-in


page Integer Query No 1 list. Pages start from page 1.
Default value: 1.

T he number of entries to return on


each page. Default value: 20,
size Integer Query No 20
minimum value: 1, maximum value:
50.

Response parameters

Parameter T ype Example Description

7F40EAA1-6F1D-
RequestId String 4DD9-8DB8- T he ID of the request.
C5F00C4E****

Headers Object T he header of the response.

X-T otal-Count Integer 1000 T he number of entries returned per page.

Result Array of Result T he list of logs returned by the request.

T he level of the log. Valid values:

warn: warning logs


info: information logs
error: error logs
level String info
trace: trace logs
debug: debug logs

Level information has been migrated to the


contentCollection field.

243 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he IP address of the node that generates


host String 192.168.**.**
the log.

[GC (Allocation
Failure) 2018-07-
19T 17:24:20.682+0
800: 7516.513:
[ParNew: 6604768K-
>81121K(7341504K),
T he content of the log entry. Migrated to
content String 0.0760606 secs]
contentCollection fields.
7226662K-
>703015K(31813056
K), 0.0762507 secs]
[T imes: user=0.52
sys=0.00, real=0.07
secs]

timestamp Long 1531985112420 T he timestamp of log generation. Unit: ms.

contentCollecti T he message of the log entry. Different log


Map
on types return different content fields.

es-cn-
instanceId String T he ID of the instance.
n6w1o1x0w001c****

T he Result .cont ent Collect ion cont ains t he following paramet ers.

Parameter T ype Example Description

2020-07- T he time when the log


time String
21T 11:12:53.057Z entry was generated.

[o.e.c.r.a.AllocationServi
ce] [MnNASM_] Cluster
health status changed
T he content of the log
content String from [YELLOW] to
entry.
[GREEN] (reason: [shards
started [[my_index][3]]
...]).

T he IP of the node
host String 192.168.**.** where the log is
generated.

> Document Version: 20220524 244


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he level of the log


entry. value includes:

warn: warning logs


info: information
level String warn
logs
error: error logs
trace: trace logs
debug: debug logs

Examples
Sample request s

GET /openapi/instances/es-cn-n6w1o1x0w001c****/search-log?type=INSTANCELOG&query=host:172.1
6.\*\*.\*\* AND content:netty&beginTime=1531910852074&endTime=1531910852074&page=1&size=20
HTTP/1.1
Common request headers

Sample success responses

JSON format

245 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : [ {
"timestamp" : 1552868172741,
"host" : "192.168.**.**",
"contentCollection" : {
"level" : "info",
"host" : "192.168.**.**",
"time" : "2019-03-18T08:16:12.741Z",
"content" : "[o.e.c.r.a.AllocationService] [MnNASM_] Cluster health status changed fr
om [YELLOW] to [GREEN] (reason: [shards started [[my_index][3]] ...])."
},
"instanceId" : "es-cn-n6w1o1x0w001c****"
}, {
"timestamp" : 1552838205462,
"host" : "192.168.**.**",
"contentCollection" : {
"level" : "info",
"host" : "192.168.**.**",
"time" : "2019-03-17T23:56:45.462Z",
"content" : "[o.e.c.r.a.AllocationService] [v4p9o7A] Cluster health status changed fr
om [GREEN] to [YELLOW] (reason: [{MnNASM_}{MnNASM_OSR-2YgySSc****}{EvJHPrAOS_u8J3-6qZ****}{
192.168.**.**}{192.168.**.**:9300}{ml.max_open_jobs=10, ml.enabled=true} transport disconne
cted])."
},
"instanceId" : "es-cn-n6w1o1x0w001c****"
} ],
"RequestId" : "121753D9-744A-4203-9EC4-F29E628A****",
"Headers" : {
"X-Total-Count" : 2
}
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.8. Backup data


7.8.1. CreateSnapshot
Call Creat eSnapshot t o manually back up a clust er snapshot .

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

> Document Version: 20220524 246


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request syntax
POST /openapi/instances/[InstanceId]/snapshots HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
ClientT oken String Yes 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

es-cn-
InstanceId String Yes nif1q9o8r0008*** T he ID of the instance.
*

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Return results:

Result Boolean true true: manual snapshot backup


successfully
false: manual snapshot backup failed

Examples
Sample request s

POST /openapi/instances/es-cn-oew1oxiro000f****/snapshots? ClientToken=5A2CFF0E-5718-45B5-9


D4D-70B3FF**** HTTP/1.1
Common request header

Sample success responses

JSON format

{
"Result": true,
"RequestId": "8EA34ABE-8015-4190-9B57-B3079AB2****"
}

247 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Error codes
For a list of error codes, visit t he API Error Cent er.

7.8.2. DescribeSnapshotSetting
Call DescribeSnapshot Set t ing t o get t he dat a backup configurat ion of t he clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/snapshot-setting HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
0pp1jxvcl000z****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Result Struct T he return results.

Enable Boolean true Whether to enable automatic backup.

Automatic backup time configuration, using


QuartzRegex String 0 0 01 ? * * *
Quartz Cron expression.

Examples
Sample request s

GET /openapi/instances/es-cn-0pp1jxvcl000z****/snapshot-setting HTTP/1.1


Common request header

> Document Version: 20220524 248


API Reference· Elast icsearch inst anc
Elast icsearch
es

Sample success responses

JSON format

{
"RequestId": "B2A05BB2-7B66-4D0F-BEDE-5033AFFE****",
"Result": {
"Enable": true,
"QuartzRegex": "0 0 01 ? * * *"
}
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he specified cluster does not
because the specified instance
404 InstanceNotFound exist. Check the cluster status
cannot be found. Check the
and try again.
instance status.

For a list of error codes, visit t he API Error Cent er.

7.8.3. UpdateSnapshotSetting
Call Updat eSnapshot Set t ing t o updat e t he dat a backup configurat ion of t he specified inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST|PUT /openapi/instances/[InstanceId]/snapshot-setting HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes oew1rgiev0009** T he ID of the instance.
**

RequestBody
T he following paramet ers must be set in Request Body t o specify t he modified backup dat a.

249 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he start time of
automatic backup.
quartzRegex String No 0 0 01 ? * * *
When enable is
true, it is required.

Specifies whether
to enable
enable Boolean Yes true
scheduled
backups.

Example:

{
"quartzRegex":"0 0 01 ? * * *",
"enable":true
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Result Struct T he return results.

Specifies whether to enable automatic


enable Boolean true
backup.

quartzRegex String 0 0 01 ? * * * T he start time of automatic backup.

Examples
Sample request s

POST /openapi/instances/es-cn-oew1rgiev0009****/snapshot-setting HTTP/1.1


Common request parameters
{
"quartzRegex":"0 0 01 ? * * *",
"enable":true
}

> Document Version: 20220524 250


API Reference· Elast icsearch inst anc
Elast icsearch
es

Sample success responses

JSON format

{
"Result": {
"quartzRegex": "0 0 01 ? * * *",
"enable": true
},
"RequestId": "77C0C894-77E3-4711-88E1-495216FA****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.8.4. ListSnapshotReposByInstanceId
Call t he List Snapshot ReposByInst anceId t o get t he cross-clust er OSS reposit ories of t he current
inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/snapshot-repos HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
0pp1jxvcl000z****

Response parameters

251 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

Result Array of repo T he return results.

es-cn-
instanceId String Reference instance ID.
6ja1ro4jt000c****

es-cn-
repoPath String T he address of the repository.
6ja1ro4jt000c****

aliyun_snapshot_fro
snapWarehous
String m_es-cn- Reference warehouse name.
e
6ja1ro4jt000c****

Reference warehouse status. available


status String available indicates that it is valid. unavailable indicates
that it is invalid.

Examples
Sample request s

GET /openapi/instances/es-cn-0pp1jxvcl000z****/snapshot-repos HTTP/1.1


Common request header

Sample success responses

JSON format

{
"Result": [
{
"instanceId": "es-cn-6ja1ro4jt000c****",
"snapWarehouse": "aliyun_snapshot_from_es-cn-6ja1ro4jt000c****",
"repoPath": "es-cn-6ja1ro4jt000c****",
"status": "available"
}
],
"RequestId": "123BB496-6EEF-41E6-92BB-3F782664****"
}

Error codes

HttpCode Error code Error message Description

> Document Version: 20220524 252


API Reference· Elast icsearch inst anc
Elast icsearch
es

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.8.5. ListAlternativeSnapshotRepos
Call List Alt ernat iveSnapshot Repos t o get t he OSS reference warehouses t hat can be added t o t he
current inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/alternative-snapshot-repos HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
0pp1jxvcl000z****

Indicates whether to return the OSS


alreadySetItems Boolean No true reference repository added. T he return
value. Valid values: true and false.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Array of repo T he return results.

253 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

es-cn-
instanceId String T he ID of the instance.
6ja1ro4jt000c****

repoPath String RepoPath T he address of the repository.

Examples
Sample request s

GET /openapi/instances/es-cn-0pp1jxvcl000z****/alternative-snapshot-repos HTTP/1.1


Common request header

Sample success responses

JSON format

{
"Result": [
{
"instanceId": "es-cn-6ja1ro4jt000c****",
"repoPath": "es-cn-6ja1ro4jt000c****"
},
{
"instanceId": "es-cn-oew1rgiev0009****",
"repoPath": "es-cn-oew1rgiev0009****"
}
],
"RequestId": "335D2540-BB16-447F-8AD4-39B7A0AE****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.8.6. AddSnapshotRepo
Call t he AddSnapshot Repo t o creat e a reference reposit ory when configuring a cross-clust er OSS
reposit ory.

Debugging

> Document Version: 20220524 254


API Reference· Elast icsearch inst anc
Elast icsearch
es

OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only.

Request syntax
POST /openapi/instances/[InstanceId]/snapshot-repos HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn- T he ID of the instance for which you


InstanceId String Yes n6w1o1x0w001c* want to access OSS repositories across
*** clusters.

RequestBody
T he following paramet ers must be set in Request Body t o specify t he cross-clust er backup informat ion.

Parameter T ype Required Example Description

255 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

T he ID of the
instance for which
you want to
restore data.
After this
parameter is
specified,
Elasticsearch
creates a
snapshot of the
instance from
which you can
restore data.

T he instance and
the source
instance must
meet the
following
es-cn-
repoPath String Yes requirements:
4591jumei000u****
Instances within
the same region
belong to the
same account,
and the version of
the source
instance is earlier
than or equal to
the version of the
destination
instance. For more
information, see
configure cross-
cluster OSS
repositories.

Example:

{
"repoPath" :"es-cn-4591jumei000u****"
}

Response parameters

> Document Version: 20220524 256


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:

Result Boolean true true: Reference warehouse created


successfully
false: Reference warehouse created failed

Examples
Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w001c****/snapshot-repos HTTP/1.1


{
"repoPath" :"es-cn-4591jumei000u****"
}

Sample success responses

JSON format

{
"Result": true,
"RequestId": "D21379E3-A54E-4C86-A64C-3717365F****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.8.7. DeleteSnapshotRepo
Call Delet eSnapshot Repo t o delet e a cross-clust er OSS reposit ory.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header

257 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
DELETE /openapi/instances/[InstanceId]/snapshot-repos HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

es-cn-
repoPath String Yes n6w1rux8i000w** Reference instance ID.
**

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:

true: reference warehouse deleted


Result Boolean true successfully
false: reference warehouse deleted
successfully failed

Examples
Sample request s

DELETE /openapi/instances/es-cn-n6w1o1x0w001c****/snapshot-repos? repoPath=es-cn-n6w1rux8i0


00w**** HTTP/1.1
Common request header

Sample success responses

> Document Version: 20220524 258


API Reference· Elast icsearch inst anc
Elast icsearch
es

JSON format

{
"Result": true,
"RequestId": "93005691-1899-4515-A5CE-FD28D347****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

7.9. Intelligent maintenance


7.9.1. OpenDiagnosis
Call OpenDiagnosis t o enable int elligent maint enance for an inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/diagnosis/instances/[InstanceId]/actions/open-diagnosis HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

259 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
ClientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

T he language configuration supports


lang String No en
multiple languages.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:

true: open the Intelligent maintenance


Result Boolean true successfully
false: open the Intelligent maintenance
successfully failed

Examples
Sample request s

POST /openapi/diagnosis/instances/es-cn-n6w1o1x0w001c****/actions/open-diagnosis HTTP/1.1

Sample success responses

JSON format

{
"Result": true,
"RequestId": "37F0EC9E-B81A-43D9-B583-9D5A8DEC****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.9.2. CloseDiagnosis

> Document Version: 20220524 260


API Reference· Elast icsearch inst anc
Elast icsearch
es

Call CloseDiagnosis t o disable t he int elligent O&M funct ion of an inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only.

Request syntax
POST /openapi/diagnosis/instances/[InstanceId]/actions/close-diagnosis HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
s9dsk3k4k****

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
generate the value, but you must
ensure that it is unique among
5A2CFF0E-5718-
different requests. T he token can only
ClientT oken String No 45B5-9D4D-
contain ASCII characters and cannot
70B3FF****
exceed 64 characters in length.

lang String No spanish Multi-language support.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Return results:
Result Boolean true true: close intelligent O&M successfully
false: close intelligent O&M failed

261 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Examples
Sample request s

POST /openapi/diagnosis/instances/es-cn-s9dsk3k4k****/actions/close-diagnosis HTTP/1.1

Sample success responses

JSON format

{
"Result": true,
"RequestId": "290ED7FB-4AA0-4F9B-86DC-95FEB016****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.9.3. DiagnoseInstance
Call t he DiagnoseInst ance t o diagnose t he inst ance immediat ely.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request paramet ers, and does not involve special request headers.
For more informat ion, see t he t opic about common paramet ers.

Request syntax
POST /openapi/diagnosis/instances/[InstanceId]/actions/diagnose HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

Language configuration. Multiple


lang String Query No en
languages are supported.

> Document Version: 20220524 262


API Reference· Elast icsearch inst anc
Elast icsearch
es

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
ClientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Ent er t he following paramet ers in Request Body t o specify t he diagnosis t ask informat ion.

Parameter T ype Required Example Description

T he type of the
diagnostic task.
Valid values:

ALL: ALL indexes


type String Yes ALL
are diagnosed.

SELECT : diagnoses
the selected
indexes.

T he list of
diagnostic
indexes. t ype is
indices List<String\> Yes ["library"]
set to ALL , indices
can be left empty
([]).

["ClusterBulkReject T he diagnostic
diagnoseItems List<String\> Yes
Diagnostic",...] item.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Struct T he return results.

263 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he timestamp when the diagnostic report


createT ime Long 1535745731000
was generated.

Array of T he list of report diagnostic item


diagnoseItems
diagnoseItems information.

T he asynchronous diagnosis task. A null


value is returned. T he return value of this
item String []
field is currently not open and can be
ignored.

es-cn-
instanceId String T he ID of the instance to be diagnosed.
n6w1o1x0w001c****

trigger__2020-08-
reportId String T he ID of the report.
17T 17:09:02

T he diagnostic status. Supported: SUCCESS,


state String RUNNING
FAILED, and RUNNING.

Examples
Sample request s

> Document Version: 20220524 264


API Reference· Elast icsearch inst anc
Elast icsearch
es

POST /openapi/diagnosis/instances/es-cn-n6w1o1x0w001c ***** /actions/diagnose HTTP/1.1


common request header
{
"indices":[],
"type":"ALL",
"diagnoseItems":[
"ClusterBulkRejectDiagnostic",
"IndexAliasUseDiagnostic",
"ClusterColorStatusDiagnostic",
"ClusterDiskResourceDiagnostic",
"IndexRecoverySlowDiagnostic",
"IndexReplicaDiagnostic",
"KibanaIndexToMuchDiagnostic",
"MasterNodeHighLoadDiagnostic",
"NodeLeftDiagnostic",
"NodeLoadDeviationDiagnostic",
"ClusterComputingResourceDiagnostic",
"NodeShardsToMuchDiagnostic",
"IndexRegexpDeleteDiagnostic",
"IndexSegmentsDiagnostic",
"IndexShardsDiagnostic",
"ClusterMinMasterDiagnostic",
"ClusterStateVersionDiagnostic",
"ErrorLogDiagnostic",
"FullGcLogDiagnostic",
"AutoSnapshotOpenDiagnostic"
]
}

Sample success responses

JSON format

{
"Result": {
"reportId": "trigger__2020-10-19T16:49:56",
"instanceId": "es-cn-n6w1o1x0w001c****",
"state": "RUNNING",
"createTime": 0,
"diagnoseItems": []
},
"RequestId": "1EE5BB1E-7ECE-4CFE-A05A-7F1EE2C4****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

7.9.4. ListDiagnoseReport
Queries t he hist orical int elligent O&M report s of an Elast icsearch clust er.

Debugging

265 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es
Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/diagnosis/instances/[InstanceId]/reports HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

endT ime Long Query Yes 1595174399999 query end timestamps.

es-cn-
InstanceId String Path Yes n6w1qu7ei000p T he ID of the instance.
****

startT ime Long Query Yes 1594569600000 the query start timestamps.

T he language of the obtained


lang String Query No spanish
report.

T he number of the returned page.


page Integer Query No 1 Default value: 1, minimum value: 1,
maximum value: 200.

the size of each report number.


size Integer Query No 20 Default value: 10, minimum value:
1, maximum value: 500.

Boolea Whether to display the details of


detail Query No true
n diagnostic items.

T he trigger method of health


diagnosis, support: SYST EM
trigger String Query No SYST EM (system automatic trigger), INNER
(internal trigger) and USER (user
manual trigger).

> Document Version: 20220524 266


API Reference· Elast icsearch inst anc
Elast icsearch
es

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 15 T he total number of entries returned.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

T he timestamp when the report was


createT ime Long 1535745731000
created.

Array of T he list of report diagnostic item


diagnoseItems
diagnoseItems information.

detail Struct Diagnostic item details.

Check whether the


number of replica
desc String shards is optimal diagnosis item description.
and easy to
maintain

Number of Replica
name String T he full name of the diagnostic item.
Shards

You may need to


adjust the numbers
of replica shards of
some indices as
follows:
result String T he diagnosis result.
[geoname08 : 0 -
&gt; 1][geoname09
: 0 -&gt; 1]
[geonametest01 : 0
-&gt; 1]

You can call the


following function
suggest String Diagnostic recommendations.
in the Elasticsearch
API....

267 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he diagnostic result type. Support: T EXT


type String ES_API (text description), CONSOLE_API (console
trigger), ES_API(API trigger).

T he health of the diagnostic item.


health String YELLOW Supported: GREEN, YELLOW, RED, and
UNKNOWN.

IndexAliasUseDiagno
item String T he diagnostic item name.
stic

T he overall health of the cluster in the


health String YELLOW report. Supported: GREEN, YELLOW, RED, and
UNKNOWN.

instanceId String es-cn-abc T he instance ID of the diagnosis.

trigger__2020-08-
reportId String T he report ID.
17T 17:09:02f

T he diagnostic status. Supported: SUCCESS,


state String SUCCESS
FAILED, and RUNNING.

T he way health diagnosis is triggered.


Support: SYST EM (system automatic
trigger String USER trigger), INNER (internal trigger), and USER
(user manual trigger).

Examples
Sample request s

diagnosis/instances/es-cn-09k1rocex0006****/reports?startTime=1600099200000&endTime=16
00185600000 public request header

Sample success responses

JSON format

> Document Version: 20220524 268


API Reference· Elast icsearch inst anc
Elast icsearch
es

{ "Result": [ { "reportId": "scheduled__2020-09-15T02:40:00", "instanceId": "es-cn-09k


1rocex0006****", "state": "SUCCESS", "trigger": "SYSTEM", "health": "YELLOW", "createTime":
1600108800000, "diagnoseItems": [ { "item": "IndexReplicaDiagnostic", "health": "YELLOW", "
detail": { "name": "Number of Replica Shards", "desc": "Check whether the number of replica
shards is optimal and easy to maintain.\nReplica shards can increase the index data reliabi
lity and improve the QPS if the resources are sufficient. However, too many replica shards
may consume large amounts of disk space and memory. This reduces the performance of write o
perations.", "type": "CONSOLE_API", "suggest": "You can call the following function in the
Elasticsearch API: \nPUT ${index}/_settings\n{\n \"settings\": {\n \"index.number_of_replic
as\": \"${num}\"\n }\n} \r\nSet the index and num parameters to the actual values.", "resul
t": "You may need to adjust the numbers of replica shards of some indices as follows: \n[ge
oname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1]" } }, { "item": "IndexShardsD
iagnostic", "health": "YELLOW", "detail": { "name": "Number and Sizes of Shards in Each Ind
ex", "desc": "Check whether the number and sizes of shards in each index are optimal.\nA sm
all number of shards may degrade the read and write performance of an index. A large number
of shards consume a lot of system resources and degrade the read and write performance of a
n index.", "type": "ES_API", "suggest": "We recommend the following solution: \nhotmovies [
size < 1 GB] [7 -> 1, 3]\ngeoname08 [2 GB] [5 -> 1, 3]\ngeoname09 [3 GB] [5 -> 1, 3]\ngeona
metest01 [2 GB] [5 -> 1, 3]\n \r\nThis solution applies to the current index sizes. Adjust
the number of shards based on the future indices and nodes.", "result": "You may need to ad
just the number of shards in some indices." } }, { "item": "NodeLeftDiagnostic", "health":
"GREEN", "detail": { "name": "Missing Nodes", "desc": "Check whether any node has not joine
d the cluster.\nMissing nodes may cause serious problems and requires immediate attention."
, "type": "TEXT", "result": "All nodes have joined the cluster." } }, { "item": "FullGcLogD
iagnostic", "health": "GREEN", "detail": { "name": "Full GC Activities", "desc": "Check whe
ther the full GC activities of the cluster are normal.", "type": "TEXT", "result": "The ful
l GC activities of the cluster are normal." } }, { "item": "ClusterMinMasterDiagnostic", "h
ealth": "GREEN", "detail": { "name": "minimum_master_nodes Configuration", "desc": "Check w
hether the discovery.zen.minimum_master_nodes configuration of the cluster is optimal.\nAn
improper zen.min.master configuration may cause cluster instability and even cluster split-
brain in the case of a high cluster load. Cluster split-brain may cause problems such as mi
ssing nodes, cluster jitter, and data exception, which require immediate attention.", "type
": "TEXT", "result": "The minMaster configuration is optimal. candidateMasterCount is set t
o 3, and discovery.zen.minimum_master_nodes is set to 2." } }, { "item": "ClusterStateVersi
onDiagnostic", "health": "GREEN", "detail": { "name": "Frequent Changes in Cluster Status",
"desc": "Check whether the cluster status changes frequently.\nFrequent changes in the clus
ter status can greatly increase the load of the master node, causing frequent GC activities
, and may even degrade the cluster performance by blocking the reading and writing of index
data.", "type": "TEXT", "result": "The cluster status changes at an optimal frequency." } }
, { "item": "ErrorLogDiagnostic", "health": "GREEN", "detail": { "name": "Exceptions Log",
"desc": "Check for exceptions logs.", "type": "TEXT", "result": "No exceptions log has been
detected." } } ] } ], "RequestId": "40962041-2864-4877-81C7-9657FDA3****", "Headers": { "X-
Total-Count": 1 } }

Error code
For a list of error codes, visit t he API Error Cent er .

7.9.5. ListDiagnoseReportIds
Queries t he IDs of t he hist orical int elligent O&M report s of an Elast icsearch clust er.

269 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/diagnosis/instances/[InstanceId]/report-ids HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

endT ime Long Query Yes 1595174399999 query end timestamps.

es-cn-
InstanceId String Path Yes n6w1qu7ei000p T he ID of the instance.
****

startT ime Long Query Yes 1595088000000 the query start timestamps.

T he language of the obtained


lang String Query No spanish
report.

T he number of the returned page.


page Integer Query No 1 Default value: 1, minimum value: 1,
maximum value: 200.

T he number of report ID per page.


size Integer Query No 15 Default value: 10, minimum value:
1, maximum value: 500.

T he trigger method of health


diagnosis, support: SYST EM
trigger String Query No SYST EM (system automatic trigger), INNER
(internal trigger) and USER (user
manual trigger).

Response parameters

> Document Version: 20220524 270


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 1 T he total number of entries returned.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

["scheduled__2020-
Result List T he return results.
09-13T 00:40:00"]

Examples
Sample request s

GET /openapi/diagnosis/instances/es-cn-09k1rocex0006****/report-ids?startTime=16000992
00000&endTime=1600185600000 HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": [ "scheduled__2020-09-15T00:40:00" ], "RequestId": "B5F822C5-03E9-4899-8D8


0-2B35515A****", "Headers": { "X-Total-Count": 1 } }

Error code
For a list of error codes, visit t he API Error Cent er .

7.9.6. ListDiagnoseIndices
Call t he List DiagnoseIndices t o obt ain t he healt h diagnosis diagnost ic index in t he specified inst ance
Int elligent O&M module.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/diagnosis/instances/[InstanceId]/indices HTTP/1.1

271 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes n6w1o1x0w001 T he ID of the instance.
c****

Language configuration. Multiple


lang String Query No en
languages are supported.

Response parameters

Parameter T ype Example Description

F05ED12E-140A-
RequestId String 4ACB-B059- T he ID of the request.
3A508A69F2E1

["my_index_aliws",
"aliyun-index-
test","filebeat-
Result List T he list of diagnostic indexes.
6.7.0-2020.11.15",
"filebeat-6.7.0-
2020.12.27"]

Examples
Sample request s

GET /openapi/diagnosis/instances/es-cn-n6w1o1x0w001c ****/indices HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": [
"my_index_aliws",
"aliyun-index-test",
"filebeat-6.7.0-2020.11.15",
"filebeat-6.7.0-2020.12.27"
],
"RequestId": "F05ED12E-140A-4ACB-B059-3A508A69F2E1"
}

Error codes
For more informat ion about error codes, see error cent er .

> Document Version: 20220524 272


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.9.7. DescribeDiagnoseReport
Call DescribeDiagnoseReport t o view t he hist orical report s of int elligent maint enance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see t he Common request
paramet ers t opic.

Request structure
GET /openapi/diagnosis/instances/[InstanceId]/reports/[ReportId] HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes mp91kzb8m0009 T he ID of an instance.
****

Report ID. Can be passed


scheduled__2020
ReportId String Yes ListDiagnoseReportIds get through the
-09-15T 00:40:00
API.

T he language in which the intelligent


diagnosis report is generated. Multiple
lang String No en
languages are supported. Default
value: en.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he return results.

T he timestamp when the report was


createT ime Long 1535745731000
created.

273 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Array of
diagnoseItems T he list of diagnostic item information.
diagnoseItems

detail Struct T he diagnostic item details.

Check whether the


number of replica
desc String shards is optimal T he description of the diagnostic item.
and easy to
maintain

Number of Replica
name String T he full name of the diagnostic item.
Shards

You may need to


adjust the numbers
of replica shards of
some indices as
result String follows: T he diagnosis result.
[geoname08 : 0 ->
1][geoname09 : 0 ->
1][geonametest01 :
0 -> 1]

You can call the


following function
suggest String Diagnostic Recommendations.
in the Elasticsearch
API....

T he type of the diagnostic result.


type String ES_API
Supported: T EXT , CONSOLE_API, and ES_API.

T he health status of the diagnostic item.


health String YELLOW Valid values: GREEN, YELLOW, RED, and
UNKNOWN.

IndexAliasUseDiagno
item String T he name of the diagnostic item.
stic

T he overall health of the cluster in the


health String YELLOW report. Valid values: GREEN, YELLOW, RED,
and UNKNOWN.

instanceId String es-cn-abc T he ID of the diagnosed instance.

trigger__2020-08-
reportId String Report ID.
17T 17:09:02

> Document Version: 20220524 274


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

T he diagnostic status. Valid values: SUCCESS,


state String SUCCESS
FAILED, and RUNNING.

T he trigger method of health diagnosis.


Valid values: SYST EM (automatically
trigger String SYST EM triggered by the SYST EM), INNER (internally
triggered), and USER (manually triggered by
the USER).

Examples
Sample request s

GET /openapi/diagnosis/instances/es-cn-09k1rocex0006****/reports/scheduled__2020-09-15T00:4
0:00? lang=en HTTP/1.1
Common request header

Sample success responses

JSON format

275 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

{
"Result": {
"reportId": "scheduled__2020-09-15T02:40:00",
"instanceId": "es-cn-09k1rocex0006****",
"state": "SUCCESS",
"trigger": "INNER",
"health": "YELLOW",
"createTime": 1600108800000,
"diagnoseItems": [
{
"item": "IndexReplicaDiagnostic",
"health": "YELLOW",
"detail": {
"name": "Number of Replica Shards",
"desc": "Check whether the number of replica shards is optimal and easy
to maintain.\nReplica shards can increase the index data reliability and improve the QPS if
the resources are sufficient. However, too many replica shards may consume large amounts of
disk space and memory. This reduces the performance of write operations.",
"type": "CONSOLE_API",
"suggest": "You can call the following function in the Elasticsearch AP
I: \nPUT ${index}/_settings\n{\n \"settings\": {\n \"index.number_of_replicas\":
\"${num}\"\n }\n} \r\nSet the index and num parameters to the actual values.",
"result": "You may need to adjust the numbers of replica shards of some
indices as follows: \n[geoname08 : 0 -> 1][geoname09 : 0 -> 1][geonametest01 : 0 -> 1]"
}
},
{
"item": "IndexShardsDiagnostic",
"health": "YELLOW",
"detail": {
"name": "Number and Sizes of Shards in Each Index",
"desc": "Check whether the number and sizes of shards in each index are
optimal.\nA small number of shards may degrade the read and write performance of an index.
A large number of shards consume a lot of system resources and degrade the read and write p
erformance of an index.",
"type": "ES_API",
"suggest": "We recommend the following solution: \nhotmovies [size < 1
GB] [7 -> 1, 3]\ngeoname08 [2 GB] [5 -> 1, 3]\ngeoname09 [3 GB] [5 -> 1, 3]\ngeonametest01
[2 GB] [5 -> 1, 3]\n \r\nThis solution applies to the current index sizes. Adjust the numbe
r of shards based on the future indices and nodes.",
"result": "You may need to adjust the number of shards in some indices.
"
}
}
]
},
"RequestId": "7BABD728-1584-432C-A300-25BEBDFC****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 276


API Reference· Elast icsearch inst anc
Elast icsearch
es

7.9.8. DescribeDiagnosisSettings
Call DescribeDiagnosisSet t ings t o obt ain t he scenario set t ings of int elligent maint enance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see t he Common request
paramet ers t opic.

Request structure
GET /openapi/diagnosis/instances/[InstanceId]/settings HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes 68n1n8b7f000a** T he ID of an instance.
**

T he language of the returned result.


lang String No en
Default value: en.

Response parameters

Parameter T ype Example Description

5E82B8A8-EED7-
T he ID of the request.
RequestId String 4557-A6E9-
D1AD3E58****

Result Struct T he return results.

scene String Business Search Scenarios of intelligent maintenance.

T he timestamp of the last update for


updateT ime Long 1588994035385
Intelligent Maintenance scenarios.

Examples
Sample request s

277 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

GET /openapi/diagnosis/instances/es-cn-45914gy290009****/settings HTTP/1.1


Common request header

Sample success responses

JSON format

{
"Result": {
"scene": "Business Search",
"updateTime": 1561969800000
},
"RequestId": "592414F7-652B-4360-91AB-85C53B32****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

7.9.9. UpdateDiagnosisSettings
Call Updat eDiagnosisSet t ings t o updat e t he inst ance of int elligent operat ion&maint enance (O&M)
scene set t ings.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
PUT /openapi/diagnosis/instances/[InstanceId]/settings HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes 45914gy290009** T he ID of the instance.
**

> Document Version: 20220524 278


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
ClientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

T he language of the response. Default


lang String No en
value: en.

RequestBody
You must also specify t he following paramet ers in Request Body t o configure int elligent maint enance.

Parameter T ype Required Example Description

T he name of the
intelligent
maintenance
scenario to be
configured. T his
function supports
scene String Yes Business Analysis
Business Search,
Data Acceleration,
Statistics,
Business Analysis,
and custom
scenarios.

Example:

{
"scene":"Business Analysis"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

279 > Document Version: 20220524


API Reference· Elast icsearch inst anc
Elast icsearch
es

Parameter T ype Example Description

Return results:
Result Boolean true true: update successfully
false: update failed

Examples
Sample request s

PUT /openapi/diagnosis/instances/es-cn-45914gy290009****/settings HTTP/1.1


Common request parameters
{
"scene":"Business Analysis"
}

Sample success responses

JSON format

{
"Result": true,
"RequestId": "5B03F520-E884-4F7B-931D-63766054****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 280


API Reference· Kibana Elast icsearch

8.Kibana
8.1. DescribeKibanaSettings
Call DescribeKibanaSet t ings t o obt ain t he Kibana configurat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/kibana-settings HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6D*****

281 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Parameter T ype Example Description

{"map.includeElastic
MapsService":
"false",
"server.ssl.cert":
"/home/admin/pack
ages/kibana/config
Return results:
/cert/client.crt",
"server.ssl.enabled" true: T he Kibana configuration obtained
Result Map : "true", successfully
"server.ssl.key": false: T he Kibana configuration obtained
"/home/admin/pack failed
ages/kibana/config
/cert/client.key",
"xpack.reporting.ca
pture.browser.chro
mium.disableSandb
ox": "true"}

Examples
Sample request s

GET /openapi/instances/es-cn-n6w1o1x0w001c****/kibana-settings HTTP/1.1


Common request header

Sample success responses

JSON format

{
"Result": {
"map.includeElasticMapsService": "false",
"server.ssl.cert": "/home/admin/packages/kibana/config/cert/client.crt",
"server.ssl.enabled": "true",
"server.ssl.key": "/home/admin/packages/kibana/config/cert/client.key",
"xpack.reporting.capture.browser.chromium.disableSandbox": "true"
},
"RequestId": "131834B6-AE89-45D4-878B-D2F46A8C****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 282


API Reference· Kibana Elast icsearch

8.2. UpdateKibanaSettings
Call Updat eKibanaSet t ings t o modify t he Kibana configurat ion. Current ly, you can only modify t he
Kibana language configurat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
PATCH|POST /openapi/instances/[InstanceId]/actions/update-kibana-settings HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w001c* T he ID of the instance.
***

T his parameter is used to ensure the


idempotence of the request. You can
5A2CFF0E-5718- use the client to generate the value,
clientT oken String No 45B5-9D4D- but you must ensure that it is unique
70B350**** among different requests. T he token
can only contain ASCII characters and
cannot exceed 64 characters in length.

RequestBody
You can also specify t he Kibana language by set t ing t he i18n.locale paramet er in Request Body
(opt ional, valid value: en by default ). Example:

{
"i18n.locale":"en"
}

Not e T he i18n.locale paramet er can only be en (English) or zh-CN (Chinese).

Response parameters

283 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DC*****

Return results:

true: T he Kibana language modified


Result Boolean true successfully
false: T he Kibana language modified
failed

Examples
Sample request s

PATCH /openapi/instances/es-cn-n6w1o1x0w001c****/actions/update-kibana-settings HTTP/1.1


Common request parameters
{
"i18n.locale":"en"
}

Sample success responses

JSON format

{
"Result": true,
"RequestId": "5A5D8E74-565C-43DC-B031-29289FA9****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

8.3. ListKibanaPlugins
Queries t he plug-ins of Kibana.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

> Document Version: 20220524 284


API Reference· Kibana Elast icsearch

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/instances/[InstanceId]/kibana-plugins HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes oew1q8bev000 T he ID of the instance.
2****

T he page number of the returned


page String Query No 1
page. Default value: 1.

T he number of entries to return on


size Integer Query No 10
each page.

Response parameters

Parameter T ype Example Description

Headers Struct T he request header.

X-T otal-Count Integer 3 T he number of returned data bars.

11234B4A-34CE-
RequestId String 473B-8E61- T he ID of the request.
AD95702E****

Array of current requests that return information


Result
PluginItem about your plug-in.

Customize DSL
description String statements to query T he description of the plug-in.
data.

bsearch_querybuilde
name String T he name of the plug-in.
r

285 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Parameter T ype Example Description

source String SYST EM T he source of the plug-in.

T he plug-in introduction address, which


specificationUrl String https://xxxx
supports null.

state String INST ALLED T he plug-in installation status.

Examples
Sample request s

GET /openapi/instances/es-cn-oew1q8bev0002****/kibana-plugins?Page=1&size=10 HTTP/1.1


public request header

Sample success responses


JSON format

{ "Result": [ { "name": "bsearch_label", "state": "UNINSTALLED", "source": "SYSTEM", "


description": "Mark data in a visual way to complete the query tasks quickly and easily.",
"specificationUrl": "https://xxx.html" }, { "name": "bsearch_querybuilder", "state": "UNINS
TALLED", "source": "SYSTEM", "description": "Customize DSL statements to query data.", "spe
cificationUrl": "https://xxx.html" }, { "name": "network_vis", "state": "UNINSTALLED", "sou
rce": "SYSTEM", "description": "This is a plugin developed for Kibana that displays a netwo
rk node that link two fields that have been previously selected." } ], "RequestId": "11234B
4A-34CE-473B-8E61-AD95702E****", "Headers": { "X-Total-Count": 3 } }

Error codes

HttpCode Error code Error message Description

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

8.4. InstallKibanaSystemPlugin
Call Inst allKibanaSyst emPlugin t o inst all t he Kibana plug-in. T he Kibana specificat ion must be 2-Core 4
GB or higher.

Debugging

> Document Version: 20220524 286


API Reference· Kibana Elast icsearch

OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/kibana-plugins/system/actions/install HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes n6w1o1x0w00*** T he ID of the instance.
***

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
generate the value, but you must
ensure that it is unique among
5A2CFF0E-5718- different requests. T he token can only
clientT oken String No 45B5-9D4D- contain ASCII characters and cannot
70B3FF**** exceed 64 characters in length.

RequestBody
You must also ent er t he name of t he plug-in in t he Request Body field. T he format is
["pluginname1","pluginname2",…, "plugin_namen"] . Example:
["bsearch_label","bsearch_querybuilder"] .

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DC****

["bsearch_querybuil
Result List T he list of plug-ins to be installed.
der"]

Examples

287 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Sample request s

POST /openapi/instances/es-cn-n6w1o1x0w00******/kibana-plugins/system/actions/install HTTP/


1.1
Common request parameters
["bsearch_label","bsearch_querybuilder"]

Sample success responses

JSON format

{
"Result": ["bsearch_querybuilder"],
"RequestId": "5A5D8E74-565C-43DC-B031-29289****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

8.5. UninstallKibanaPlugin
Call t he Uninst allKibanaPlugin t o uninst all t he Kibana plug-in.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses common request paramet ers only. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/kibana-plugins/actions/uninstall HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

es-cn-
InstanceId String Yes T he ID of the instance.
6ja1ro4jt000c****

> Document Version: 20220524 288


API Reference· Kibana Elast icsearch

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. You can use the client to
5A2CFF0E-5718-
generate the value, but you must
clientT oken String No 45B5-9D4D-
ensure that it is unique among
70B3FF****
different requests. T he token can only
contain ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Ent er t he name of t he Kibana plug-in in t he Request Body field. T he format is
["pluginname1","pluginname2",…, "plugin_namen"] . Example:
["bsearch_label","bsearch_querybuilder"] .

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D****

["bsearch_querybuil T he returned result shows a list of


Result List
der"] uninstalled plug-ins.

Not e T he ret urned dat a also cont ains Headers, which indicat es t he request header
informat ion.

Examples
Sample request s

POST /openapi/instances/es-cn-6ja1ro4jt000c****/kibana-plugins/actions/uninstall HTTP/1.1


Common request parameters
["bsearch_label","bsearch_querybuilder"]

Sample success responses

JSON format

{
"Result": [
"bsearch_querybuilder"
],
"RequestId": "D528727E-F512-4EE6-B46F-B9270D4E****",
"Headers": {}
}

289 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the specified instance
400 InstanceNotFound
not exist. cannot be found. Check the
instance status.

For a list of error codes, visit t he API Error Cent er.

8.6. UpdateKibanaWhiteIps
Updat es t he IP address whit elist for access t o t he Kibana console of a specified Elast icsearch clust er.

Usage notes
Before you call t his operat ion, make sure t hat t he inst ance is not in t he act ivat ing, invalid, or inact ive
st at e.
You can updat e t he whit elist in t wo ways: IP address whit elist list and IP address whit elist group. T he
t wo met hods cannot be used at t he same t ime. In addit ion t o Inst anceId and client T oken, t he t wo
met hods support different paramet ers, as follows:
IP address whit elist list : kibanaIPWhit elist
IP address whit elist groups: modifyMode and whit eIpGroup

Public net work access whit elist s do not support configuring privat e IP addresses. Privat e net work
access whit elist s do not support configuring public IP addresses.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, refer t o t he document at ion of
common request paramet ers.

Request syntax
PATCHPOST /openapi/instances/{InstanceId}/kibana-white-ips HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

es-cn-
InstanceId String Path Yes tl329rbpc0001* T he ID of the instance.
***

> Document Version: 20220524 290


API Reference· Kibana Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T he client token that is used to


ensure the idempotence of the
request. You can use the client to
5A2CFF0E-
generate the value, but you must
5718-45B5-
clientT oken String Query No make sure that it is unique among
9D4D-
different requests. T he token can
70B3FF****
contain only ASCII characters and
cannot exceed 64 characters in
length.

T he modification method. Valid


values:

Cover (default): overwrites the


original IP address whitelist with
the value of the ips parameter.
Append: Add the IP addresses
modifyMode String Query No Cover
entered in the ips parameter to
the original IP address whitelist.
Delete: Delete the IP addresses
entered in the ips parameter
from the original IP address
whitelist. You must retain at
least one IP address.

RequestBody
You must also specify t he following paramet ers in t he Request Body paramet er t o specify t he whit elist
t o be updat ed.

Parameter T ype Required Example Description

291 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Parameter T ype Required Example Description

T he list of IP
address
whitelists. T his
parameter is
available if
whiteIpGroup is
left empty. T he
value of this
parameter
updates the IP
address whitelist
configurations in
the Default
kibanaIPWhitelist List<String\> Yes ["110.0.XX.XX/8"]
whitelist group.

You cannot
configure both
kibanaIPWhitelist
and whiteIpGroup.

You can use a


whitelist group to
update the
configuration of a
Kibana whitelist.
You can update
only one whitelist
group.
{"groupName":
"test_group_name You cannot
whiteIpGroup Struct No
", "ips": ["0.0.0.0", configure both
"10.2.XX.XX"]} kibanaIPWhitelist
and whiteIpGroup.

> Document Version: 20220524 292


API Reference· Kibana Elast icsearch

Parameter T ype Required Example Description

T he group name
of the whitelist
group. T his
Required in parameter is
└ groupName String test_group_name
whiteIpGroup required if the
whiteIpGroup
parameter is
optional.

T he list of IP
addresses in the
whitelist group.
Required in ["0.0.0.0", T his parameter is
└ ips List<String>
whiteIpGroup "10.2.XX.XX"] required if the
whiteIpGroup
parameter is
optional.

Not ice T he addit ion and delet ion of whit elist groups are implement ed by calling
modifyMode t o Cover. Delet e and Append cannot add or delet e whit elist groups at t he same t ime.
You can only modify t he IP address list in t he whit elist group. T ake not e of t he following it ems:
If t he modifyMode paramet er is set t o Cover, t he whit elist group is delet ed if ips is empt y. If
groupName is not in t he list of exist ing whit elist group names, a whit elist group is creat ed.
If t he modifyMode paramet er is set t o Delet e, you must ret ain at least one IP address for t he
delet ed ips.
If t he modifyMode paramet er is set t o Append, make sure t hat t he whit elist group name has
been creat ed. Ot herwise, t he Not Found error message appears.

Response parameters

Parameter T ype Example Description

E5EF11F1-DBAE-
RequestId String 4020-AC24- T he ID of the request.
DFA6C4345CAE

Result Object T he results that are returned.

[
kibanaPrivateIP T he list of Kibana private network access
Array of String "192.168.XX.XX/24"
Whitelist whitelists.
]

[ "0.0.XX.XX",
kibanaIPWhiteli T he list of Kibana access whitelists.
Array of String "10.2.XX.XX",
st
"110.0.XX.XX/9" ]

293 > Document Version: 20220524


Elast icsearch API Reference· Kibana

Not e In t he following ret urn example, t his art icle only guarant ees t hat t he paramet ers in t he
ret urn dat a list are included, and t he paramet ers not ment ioned are for reference only. T he
program cannot force t o rely on obt aining t hese paramet ers.

Example
Sample request

PATCH /openapi/instances/es-cn-tl329rbpc0001****/kibana-white-ips HTTP/1.1


Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"kibanaIPWhitelist": [
"110.0.XX.XX/8"
]
}
or
{
"whiteIpGroup": {
"groupName": "test_group_name",
"ips": [
"0.0.0.0",
"10.2.XX.XX"
]
}
}

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : {
"instanceId" : "es-cn-tl329rbpc0001****",
"version" : "7.10.0_with_X-Pack",
"description" : "lrr",
"nodeAmount" : 0,
"paymentType" : "postpaid",
"status" : "active",
"privateNetworkIpWhiteList" : [ "11.22.XX.XX", "0.0.XX.XX/0" ],
"enablePublic" : false,
"nodeSpec" : { },
"dataNode" : false,
"networkConfig" : {
"vpcId" : "vpc-bp1jy348ibzulk6hn****",
"vswitchId" : "vsw-bp1a0mifpletdd1da****",
"vsArea" : "cn-hangzhou-h",
"whiteIpGroupList" : [ {
"groupName" : "default",
"ips" : [ "0.0.XX.XX/0", "11.22.XX.XX" ],
"whiteIpType" : "PRIVATE_ES"

> Document Version: 20220524 294


API Reference· Kibana Elast icsearch

}, {
"groupName" : "default",
"ips" : [ "110.0.XX.XX/9" ],
"whiteIpType" : "PUBLIC_KIBANA"
}, {
"groupName" : "default",
"ips" : [ "192.168.XX.XX/24" ],
"whiteIpType" : "PRIVATE_KIBANA"
}, {
"groupName" : "test_group_name",
"ips" : [ "0.0.XX.XX", "10.2.XX.XX" ],
"whiteIpType" : "PUBLIC_KIBANA"
} ],
"type" : "vpc"
},
"createdAt" : "2021-07-21T01:29:38.510Z",
"updatedAt" : "2021-07-21T06:12:12.370Z",
"commodityCode" : "elasticsearch",
"extendConfigs" : [ {
"configType" : "usageScenario",
"value" : "log"
}, {
"configType" : "maintainTime",
"maintainStartTime" : "02:00Z",
"maintainEndTime" : "06:00Z"
}, {
"configType" : "aliVersion",
"aliVersion" : "ali1.4.0"
}, {
"configType" : "followCube",
"followClusterEnabled" : true
} ],
"endTime" : 4782556800000,
"clusterTasks" : [ ],
"vpcInstanceId" : "es-cn-tl329rbpc0001****-worker",
"resourceGroupId" : "rg-acfmxxkk2p7****",
"zoneCount" : 1,
"protocol" : "HTTP",
"zoneInfos" : [ {
"zoneId" : "cn-hangzhou-h",
"status" : "NORMAL"
} ],
"instanceType" : "elasticsearch",
"inited" : true,
"tags" : [ {
"tagKey" : "acs:rm:rgId",
"tagValue" : "rg-acfmxxkk2p7****"
} ],
"serviceVpc" : true,
"domain" : "es-cn-tl329rbpc0001****.elasticsearch.aliyuncs.com",
"port" : 9200,
"esVersion" : "7.10.0_with_X-Pack",
"esConfig" : {
"action.destructive_requires_name" : "true",
"xpack.watcher.enabled" : "false",

295 > Document Version: 20220524


Elast icsearch API Reference· Kibana

"xpack.watcher.enabled" : "false",
"action.auto_create_index" : "+.*,-*"
},
"esIPWhitelist" : [ "11.22.XX.XX", "0.0.XX.XX/0" ],
"esIPBlacklist" : [ ],
"kibanaProtocol" : "HTTPS",
"kibanaIPWhitelist" : [ "0.0.0.0", "10.2.XX.XX", "110.0.XX.XX/9" ],
"kibanaPrivateIPWhitelist" : [ "192.168.XX.XX/24" ],
"publicIpWhitelist" : [ ],
"kibanaDomain" : "es-cn-tl329rbpc0001****.kibana.elasticsearch.aliyuncs.com",
"kibanaPort" : 5601,
"kibanaPrivateDomain" : "es-cn-tl329rbpc0001****-kibana.internal.elasticsearch.aliyuncs
.com",
"kibanaPrivatePort" : 5601,
"haveKibana" : true,
"instanceCategory" : "IS",
"dedicateMaster" : false,
"advancedDedicateMaster" : false,
"masterConfiguration" : { },
"haveClientNode" : false,
"warmNode" : true,
"warmNodeConfiguration" : {
"spec" : "elasticsearch.d1.2xlarge",
"amount" : 3
},
"clientNodeConfiguration" : { },
"kibanaConfiguration" : {
"spec" : "elasticsearch.n4.small",
"amount" : 1,
"disk" : 0
},
"elasticDataNodeConfiguration" : { },
"haveElasticDataNode" : false,
"dictList" : [ {
"name" : "SYSTEM_MAIN.dic",
"fileSize" : 2782602,
"sourceType" : "ORIGIN",
"type" : "MAIN"
}, {
"name" : "SYSTEM_STOPWORD.dic",
"fileSize" : 132,
"sourceType" : "ORIGIN",
"type" : "STOP"
} ],
"synonymsDicts" : [ ],
"ikHotDicts" : [ ],
"aliwsDicts" : [ ],
"haveGrafana" : false,
"haveCerebro" : false,
"enableKibanaPublicNetwork" : true,
"enableKibanaPrivateNetwork" : true,
"advancedSetting" : {
"gcName" : "CMS"
},
"enableMetrics" : true,

> Document Version: 20220524 296


API Reference· Kibana Elast icsearch

"enableMetrics" : true,
"readWritePolicy" : {
"writeHa" : false
}
},
"RequestId" : "E815C5C9-E82D-4B10-BDE0-D25340C2ACEF"
}

Error codes

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the instance
status.

For a list of error codes, visit t he API Error Cent er.

297 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

9.Logstash
9.1. Manage clusters
9.1.1. CreateLogstash
Creat es a Logst ash clust er.

Before you call t he API operat ion, not e t hat :

Make sure t hat you have fully underst ood t he payment met hod and price of Logst ash before you call
t his operat ion.
Before you creat e an inst ance, you must complet e real-name verificat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
POST /openapi/logst ashes

Request syntax
POST /openapi/logstashes HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T he client token that is used to


ensure the idempotence of the
request. You can use the client to
5A2CFF0E-
generate the value, but you must
5718-45B5-
clientT oken String Query No make sure that it is unique among
9D4D-
different requests. T he token can
70B3FF****
contain only ASCII characters and
cannot exceed 64 characters in
length.

Object Body No T he body of the HT T P request.

> Document Version: 20220524 298


API Reference· Logst ash Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T he billing method of the instance.


Default value: no. Valid values:
paymentT ype String Body No prepaid
prepaid: subscription
postpaid: pay-as-you-go

T he version of the read-only


instance. Default value: no. Valid
6.7.0_with_X- values:
version String Body No
Pack
6.7_with_X-Pack
7.4_with_X-Pack

T he number of nodes that the


nodeAmount Integer Body No 2
instance contains.

nodeSpec Object Body No T he configuration of data nodes.

disk Long Body No 50 T he disk size of the node.

T he disk type of the node. Default


value: no. Valid values:
diskT ype String Body No cloud_ssd
cloud_ssd
cloud_efficiency

logstash.n4.sm
spec String Body No T he instance type of the node.
all

networkConfig Object Body No T he network configurations.

T he network type. Currently, only


type String Body No vpc
Virtual Private Cloud is supported.

vpc-
vpcId String Body No bp16k1dvzxtm T he VPC ID of the instance.
agcva****

vsw-
vswitchId String Body No bp1k4ec6s7sjd T he ID of the vSwitch
budw****

vsArea String Body No cn-hangzhou-i T he zone where the cluster resides.

299 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Positi Require
Parameter T ype Example Description
on d

T he payment details of a
subscription instance. T his
paymentInfo Object Body No
parameter is required when you
create a subscription instance.

T he purchase duration. Monthly


and yearly purchases are
duration Long Body No 1
supported. Unit: 1 to September, 1
to 3 years.

T he unit of subscription. Valid


values:
pricingCycle String Body No Month
Year
Month

Indicates whether auto-renewal is


enabled. Valid values:
Boolea
isAutoRenew Body No false true: T he job files are
n
decompressed.
false: no

T he auto-renewal period. Unit:


month. T his parameter is required
autoRenewDura if the isAut o Renew parameter is
Long Body No 3
tion set to t rue . T he optional range of
parameter values is the same as
that on the Sales page.

description String Body No ls-cn-abc T he name of the instance.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE*****

Result Logstash T he returned results.

Example
Sample request s

> Document Version: 20220524 300


API Reference· Logst ash Elast icsearch

POST /openapi/logstashes?clientToken=5A2CFF0E-5718-45B5-9D4D-70B3FF**** HTTP/1.1


Host:elasticsearch.aliyuncs.com
Content-Type:application/json
{
"paymentType" : "prepaid",
"version" : "6.7.0_with_X-Pack",
"nodeAmount" : 2,
"nodeSpec" : {
"disk" : 50,
"diskType" : "cloud_ssd",
"spec" : "elasticsearch.sn2ne.large"
},
"networkConfig" : {
"type" : "vpc",
"vpcId" : "vpc-bp16k1dvzxtmagcva****",
"vswitchId" : "vsw-bp1k4ec6s7sjdbudw****",
"vsArea" : "cn-hangzhou-i"
},
"description" : "test"
}

Sample success responses


JSON format

301 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE*****",
"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" : 20,
"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" : { },
"endpointList" : [ {
"host" : "172.16.**.**",
"port" : 9600,
"zoneId" : "cn-hangzhou-i"
} ]
} ]
}

Error codes
For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 302


API Reference· Logst ash Elast icsearch

9.1.2. ListLogstash
Queries t he det ailed informat ion of all Logst ash clust ers or a specified Logst ash clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
/openapi/logst ashes

Request syntax
GET /openapi/logstashes HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T he page number of the returned


page Integer Query No 1
page. Default value: 1.

T he number of entries to return on


size Integer Query No 10
each page. Default value: 20.

T he name of the instance. You can


specify a keyword to match
multiple instances. for example, if
description String Query No ls-cn-abc
an instance named abc is queried,
all instances named abc, abcde,
xyabc, or xabcy may be returned.

ls-cn-
instanceId String Query No T he ID of the instance.
n6w1o5jq****

5.5.3_with_X-
version String Query No T he version of the instance.
Pack

rg-
resourceGroupI
String Query No acfm2h5vbzd** T he ID of the resource group.
d
**

Response parameters

303 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

Headers Struct the request header information.

T he number of instances that match the


X-T otal-Count Integer 10
query string.

AC442F2F-5068-
RequestId String 4434-AA21- T he ID of the request.
E78947A9****

Array of Detailed information about the matching


Result
Instance instances.

T ags Array of tags T he tags of the ALB instance.

T agKey String env T he tag key.

T agValue String dev T he value of the tag to be modified.

2018-07-
createdAt String T he time when the instance was created.
13T 03:58:07.253Z

description String ls-cn-abc T he name of the instance.

instanceId String ls-cn-n6w1o5jq**** T he ID of the instance.

networkConfig Struct T he network configuration.

Network type, currently only supports Virtual


type String vpc
Private Cloud (VPC).

vpcId String vpc-abc T he ID of the virtual private cloud (VPC).

vsArea String cn-hangzhou-* T he zone where the instance is deployed.

vswitchId String vsw-def T he ID of the vSwitch.

nodeAmount Integer 2 T he number of data nodes.

> Document Version: 20220524 304


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

T he configuration information of the data


nodeSpec Struct
node.

disk Integer 50 T he node disk size.

Whether to use disk encryption:


diskEncryption Boolean false true
false

diskT ype String cloud_ssd T he type of the disk.

spec String logstash.n4.small T he instance type.

T he billing mode of the instance. Support:


paymentT ype String postpaid prepaid (package year and month) and
postpaid (pay-as-you-go).

T he state of the instance. Four states are


status String active supported: active, active, inactive, and
invalid.

2018-07- T he time when the instance was last


updatedAt String
18T 10:10:04.484Z updated.

T he version of the instance. Currently, only


version String 6.7.0_with_X-Pack 6.7.0_with_X-Pack and 7.4.0_with_X-Pack are
supported.

T he following paramet ers are also included in t he ret urned dat a.

Parameter T ype Example Description

whether to enable
enablePublic Boolean false public access. the
default value is false.

elasticsearch_logstash_
commodityCode String T he service code.
post

305 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

Package year-to-month
endT ime Long 4749897600000 instance, the last
expiration time.

T he list of tasks for the


clusterT asks Array []
instance.

T he ID of the resource
resourceGroupId String rg-acfm2h5vbzd**** group to which the VPC
belongs.

zoneCount Integer 1 T he number of zones.

T he access protocol of
protocol String HT T P
the instance.

zoneInfos Array Zone information.

└zoneId String cn-hangzhou-i T he ID of the zone.

T he status of the zone.


Support: ISOLAT ION
└status String NORMAL
(offline) and NORMAL
(normal).

T he engine type of the


instanceT ype String logstash
instance.

Whether the instance


inited Boolean true has completed
initialization.

config Array [] Configure ECS instances.

endpointList Array T he node information.

T he IP address of the
└host String 172.16.xx.xx
node.

> Document Version: 20220524 306


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

T he access port number


└port Integer 9200
of the node.

T he zone ID where the


└zoneId String cn-hangzhou-i
node is located.

Not e └ indicat es a child paramet er.

Examples
Sample request s

GET /openapi/logstashes?description=abc&page=1&size=10

Sample success responses

JSON format

{ "Result": [ { "instanceId": "ls-cn-n6w1o5jq****", "version": "6.7.0_with_X-Pack", "d


escription": "test", "nodeAmount": 1, "paymentType": "postpaid", "status": "active", "enabl
ePublic": false, "nodeSpec": { "spec": "elasticsearch.sn1ne.large", "disk": 20, "diskType":
"cloud_ssd" }, "networkConfig": { "vpcId": "vpc-bp16k1dvzxtmagcva****", "vswitchId": "vsw-b
p1k4ec6s7sjdbudw****", "vsArea": "cn-hangzhou-i", "type": "vpc" }, "createdAt": "2020-05-27
T01:30:15.947Z", "updatedAt": "2020-05-27T01:40:51.333Z", "commodityCode": "elasticsearch_l
ogstash_post", "extendConfigs": [], "endTime": 4746268800000, "clusterTasks": [], "resource
GroupId": "rg-acfm2h5vbzd****", "zoneCount": 1, "protocol": "HTTP", "zoneInfos": [ { "zoneI
d": "cn-hangzhou-i", "status": "NORMAL" } ], "instanceType": "logstash", "inited": true, "t
ags": [], "config": {}, "endpointList": [ { "host": "172.16.**.**", "port": 9600, "zoneId":
"cn-hangzhou-i" } ] } ], "RequestId": "918C05D8-4689-4A79-B6D5-D2500991****", "Headers": {
"X-Total-Count": 1 } }

Error code
For a list of error codes, visit t he API Error Cent er .

9.1.3. DescribeLogstash
Call t he DescribeLogst ash t o query t he det ails of a specified inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

307 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId] HTTPS|HTTP

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
s9dsk3k4k****

Response parameters

Parameter T ype Example Description

C9334241-4837-
RequestId String 46C2-B24B- T he ID of the request.
9BDC517318DE

Result Struct Detailed information about the instance.

[{ "configT ype":
T he configuration of the cluster extension
ExtendConfigs List "aliVersion","aliVersi
parameter.
on": "ali1.3.0" }]

ResourceGroupI T he ID of the resource group to which the


String rg-aekzvowej3i****
d instance belongs.

T ags Array of tags Details about the tags.

tagKey String env T he tag key.

tagValue String dev T he tag value.

Array of
ZoneInfos Zone information.
zoneInfos

T he status of the zone. Supported:


status String NORMAL ISOLAT ION: offline
NORMAL: normal

> Document Version: 20220524 308


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

zoneId String cn-hangzhou-b T he zone ID.

{"slowlog.threshold.
warn":
"2s","slowlog.thresh
old.info":
config Map "1s","slowlog.thresh T he configurations of the instance.
old.debug":
"500ms","slowlog.t
hreshold.trace":
"100ms" }

2020-02-
createdAt String T he time when the instance was created.
06T 14:12:03.672Z

description String ls-cn-abc T he description of the instance.

Array of
endpointList T he access information of the node.
endpoint

host String 172.16. **. ** T he IP address of the node.

T he port number that is used to connect to


port String 9600
the database.

zoneId String cn-hangzhou-b T he ID of the zone where the node resides.

instanceId String ls-cn-abc T he ID of the instance.

networkConfig Struct T he network configuration.

T he type of the network. Currently, only


type String vpc
Virtual Private Cloud (VPC) is supported.

vpc-
vpcId String bp16k1dvzxtmagcv T he ID of the VPC.
a****

vsArea String cn-hangzhou-* T he zone where the instance is deployed.

vsw-
vswitchId String bp1k4ec6s7sjdbudw T he ID of the vSwitch.
****

309 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

nodeAmount Integer 2 T he number of data nodes.

nodeSpec Struct T he configuration of the node.

disk Integer 20 T he disk size of the node.

Indicates whether to use cloud disk


encryption. Valid values:
diskEncryption Boolean true
true: use
false: disuse

diskT ype String cloud_ssd T he disk type of the node.

elasticsearch.sn1ne.l
spec String T he specification of the node.
arge

T he payment mode of the instance.


paymentT ype String prepaid Supported: prepaid (subscription) and
postpaid (pay-as-you-go).

T he state of the instance. Four states are


supported: Normal (active), effective
status String active
(activating), Frozen (inactive), and ineffective
(invalid).

2020-02- T he time when the instance was last


updatedAt String
06T 14:22:36.850Z updated.

version String 7.4.0_with_X-Pack T he version of the instance.

vpc-
T he ID of the VPC to which the instance
vpcInstanceId String bp16k1dvzxtmagcv
belongs.
a****

For more informat ion about t he paramet ers, see List Logst ash .

Examples
Sample request s

GET /openapi/logstashes/ls-cn-s9dsk3k4k**** HTTP/1.1


common request header

> Document Version: 20220524 310


API Reference· Logst ash Elast icsearch

Sample success responses

JSON Synt ax

{
"Result": {
"instanceId": "ls-cn-m7r1o6cl****",
"version": "6.7.0_with_X-Pack",
"description": "ls-cn-abc",
"nodeAmount": 2,
"paymentType": "postpaid",
"status": "active",
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.sn1ne.large",
"disk": 20,
"diskType": "cloud_ssd"
},
"networkConfig": {
"vpcId": "vpc-bp16k1dvzxtmagcva****",
"vswitchId": "vsw-bp1k4ec6s7sjdbudw****",
"vsArea": "cn-hangzhou-i",
"type": "vpc"
},
"createdAt": "2020-05-27T11:53:43.104Z",
"updatedAt": "2020-05-27T11:53:43.104Z",
"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": {
"slowlog.threshold.warn": "2s",
"slowlog.threshold.info": "1s",
"slowlog.threshold.debug": "500ms",
"slowlog.threshold.trace": "100ms"
},
"endpointList": [
{
"host": "172.16.**.**",
"port": 9600,
"zoneId": "cn-hangzhou-i"
},
{

311 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

{
"host": "172.16.**.**",
"port": 9600,
"zoneId": "cn-hangzhou-i"
}
]
},
"RequestId": "C9334241-4837-46C2-B24B-9BDC517318DE"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

9.1.4. UpdateLogstash
Call t he Updat eLogst ash t o modify some informat ion about a specified inst ance, such as t he number of
nodes, quot a, name, and disk size.

When you call t his operat ion, t ake not e of t he following it ems:

You cannot modify inst ance informat ion when t he inst ance is in t he act ivat ing, invalid, or inact ive st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

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

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
n6w1o5jq****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody

> Document Version: 20220524 312


API Reference· Logst ash Elast icsearch

T he configurat ion t o be modified must be specified in Request Body, as shown in t he following


example.

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

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Boolean true T he returned results.

T he Result also cont ains t he following paramet ers.

Parameter T ype Example Description

instanceId String ls-cn-n6w1o5jq**** T he ID of the instance.

T he name of the
description String test
instance.

T he number of data
nodeAmount Integer 2
nodes.

T he billing method of
the instance.
Supported: prepaid
paymentT ype String postpaid
(subscription) and
postpaid (pay-as-you-
go).

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

313 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

T he version of the
version String 6.7.0_with_X-Pack
instance.

2018-07- T he time when the


createdAt String
13T 03:58:07.253Z instance was created.

T he time when the


2018-07-
updatedAt String instance was last
18T 10:10:04.484Z
updated.

T he configuration of
nodeSpec
the node.

T he specification of the
└spec String logstash.sn2ne.xlarge
node.

T he hard disk size of


└disk Integer 40
the node.

T he network
networkConfig
configuration.

T he type of the
network. Currently, only
└type String vpc
Virtual Private Cloud
(VPC) is supported.

vpc-
└vpcId String T he ID of the VPC.
bp16k1dvzxtmagcva****

vsw-
└vswitchId String T he ID of the vSwitch.
bp1k4ec6s7sjdbudw****

T he zone where the


vsArea String cn-hangzhou-a
cluster resides.

Not e └ indicat es a sub-paramet er. For more informat ion about t he paramet er descript ion,
see List Logst ash .

> Document Version: 20220524 314


API Reference· Logst ash Elast icsearch

Examples
Sample request s

PATCH /openapi/logstashes/ls-cn-n6w1o5jq**** HTTP/1.1


common request header
{
"nodeSpec": {
"disk": 40
}
}

Sample success responses

JSON Synt ax

{
"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": {

315 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

"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****.elas
ticsearch.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 t he API Error Cent er.

9.1.5. RenewLogstash
Call t he RenewLogst ash t o renew an inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/actions/renew HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
n6w1o5jq****

> Document Version: 20220524 316


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he following paramet ers in Request Body.

Field T ype Required Example Description

T he renewal
duration of the
subscription
cluster.

If pricingCycle is
duration Integer Yes 1
set to Year, valid
values: 1 to 3.

If pricingCycle is
Month, valid
values: 1 to 9.

T he billing cycle
of renewal. Valid
pricingCycle String Yes Year
values: Year and
Month.

Sample code:

{
"duration":1,
"pricingCycle":"Year"
}

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DC****

317 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

Returned results:
Result Boolean true true: renewal successful
false: renewal fails

Examples
Sample request s

POST /openapi/logstashes/ls-cn-n6w1o5jq****/actions/renew HTTP/1.1


common request header
{
"duration":1,
"pricingCycle":"Year"
}

Sample success responses


JSON Synt ax

{
"Result":true,
"RequestId":"3760F67B-691D-4663-B4E5-6783554****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.1.6. RestartLogstash
Call t he Rest art Logst ash t o rest art a specified inst ance. Aft er t he inst ance is rest art ed, it ent ers t he
act ivat ing st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

> Document Version: 20220524 318


API Reference· Logst ash Elast icsearch

Request syntax
POST /openapi/logstashes/[InstanceId]/actions/restart HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
v0h1kzca****

Specifies whether to forcibly restart


force Boolean No true the instance. true indicates enforcing,
and false indicates not enforcing.

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

T he ret urned dat a also includes t he Result paramet er. For more informat ion about t he paramet ers, see
List Logst ash .

Examples
Sample request s

POST /openapi/logstashes/ls-cn-v0h1kzca****/actions/restart HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": {
"instanceId": "ls-cn-v0h1kzca****",
"version": "7.4.0_with_X-Pack",
"description": "es-74-keepit",
"nodeAmount": 1,
"paymentType": "prepaid",
"status": "active",

319 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

"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 t he API Error Cent er.

9.1.7. EstimatedLogstashRestartTime

> Document Version: 20220524 320


API Reference· Logst ash Elast icsearch

Call t he Est imat edLogst ashRest art T ime t o obt ain t he est imat ed t ime period during which t he Logst ash
inst ance can be rest art ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

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

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
oew1qbgl****

Indicates whether the restart is forced.


force Boolean No false
Default value: false.

RequestBody
You can also ent er t he following paramet ers in Request Body t o specify t he rest art paramet ers.

Parameter T ype Required Example Description

T he restart type.
Valid values:
instance (restart
restartT ype String No instance
instance. default)
and nodeIp
(restart node).

Select the IP
address list of the
nodes List<String\> No ["127.0.xx.xx"]
target node when
the node restarts.

321 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Required Example Description

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

T he concurrency
of the forced
instance restart.
Default value: 1
/the total number
batch Integer No 25.0 of nodes.

batch unit. Default


batchUnit String No percent
value: percent.

T he blueGreenDep paramet er is ignored when rest art T ype is set t o inst ance.
force is set t o t rue. T he value of bat ch must be great er t han 0, and smaller t han or equal t o 100.
Ot herwise, t he syst em will prompt a Rest art Bat chValueError error.
T he value of force is false. T he default value of bat ch is 0. When anot her value is ent ered,
NormalRest art Not Support Bat ch error is report ed.

When rest art T ype is set t o nodeIp, t he bat ch paramet er is ignored.


If nodeIp is empt y, t he syst em prompt s a Paramet er error.
If blueGreenDep is set t o t rue, a blue-green change rest art is performed. If blueGreenDep is set t o
false, a normal rest art is performed.

Sample code:

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

Response parameters

> Document Version: 20220524 322


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Struct T he return results.

unit String second T he unit.

value Long 600 Estimated restart time.

Examples
Sample request s

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

Sample success responses

JSON Synt ax

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

Error codes
For a list of error codes, visit t he API Error Cent er.

9.1.8. UpdateLogstashDescription
Call t he Updat eLogst ashDescript ion t o modify t he name of a specified Logst ash inst ance.

When you call t his operat ion, t ake not e of t he following it ems:

T he inst ance name cannot be modified when t he inst ance is in t he act ivat ing, invalid, or inact ive st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header

323 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
PATCH|POST /openapi/logstashes/[InstanceId]/description HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
n6w1o5jq****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he descript ion field in t he Request Body paramet er t o specify t he modified inst ance name.
Example:

{
"description": "logstash_name"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
T he ID of the request.
RequestId String 4E89-B22B-
1ACB6FE1****

Result Struct T he return results.

description String logstash_name T he name of the instance.

T he Result also cont ains t he following paramet ers.

Parameter T ype Example Description

instanceId String ls-cn-n6w1o5jq**** T he ID of the instance.

> Document Version: 20220524 324


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

T he name of the
description String ls-cn-abc
instance.

nodeAmount T he number of data


Integer 2
nodes.

T he billing method of
the instance.
Supported: prepaid
paymentT ype String postpaid
(subscription) and
postpaid (pay-as-you-
go).

T he status of the
instance. Four instance
statuses are supported:
status String active normal (active),
effective (activating),
frozen (inactive), and
invalid (invalid).

T he version of the
esVersion String 6.7.0_with_X-Pack
instance.

2018-07- T he time when the


createdAt String
13T 03:58:07.253Z instance was created.

T he time when the


2018-07-
updatedAt String instance was last
13T 03:58:07.253Z
updated.

T he configuration of
nodeSpec
the node.

T he specification of the
└spec String logstash.n4.small
node.

T he hard disk size of


└disk Integer 40
the node.

325 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

T he network
networkConfig
configuration.

T he type of the
network. Currently, only
└type String vpc
Virtual Private Cloud
(VPC) is supported.

└vpcId String vpc-abc T he ID of the VPC.

└vswitchId String vsw-abc T he ID of the vSwitch.

vsArea String T he zone where the


cn-hangzhou-*
cluster resides.

T he domain names
domainList
returned.

ls-cn- T he private network


└domain String abc.logstash.aliyuncs.co endpoint of the
m instance.

T he port number that is


└port Integer 7001 used to connect to the
database.

Not e └ indicat es a sub-paramet er. For more informat ion about ot her paramet ers, see
List Logst ash .

Examples
Sample request s

PATCH /openapi/logstashes/ls-cn-n6w1o5jq****/description HTTP/1.1


common request header
{
"description": "logstash_name"
}

Sample success responses

JSON Synt ax

> Document Version: 20220524 326


API Reference· Logst ash Elast icsearch

{
"Result": {
"instanceId": "ls-cn-n6w1o5jq****",
"version": "6.7.0_with_X-Pack",
"description": "logstash_name",
"nodeAmount": 1,
"paymentType": "postpaid",
"status": "active",
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.sn1ne.large",
"disk": 50,
"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-07-08T02:38:47.137Z",
"commodityCode": "elasticsearch_logstash_post",
"extendConfigs": [],
"endTime": 4749897600000,
"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****.elas
ticsearch.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"

327 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

"zoneId": "cn-hangzhou-i"
}
]
},
"RequestId": "C3845099-3D0E-4D2B-9D62-F16019EE****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.1.9. UpdateLogstashChargeType
Call t he Updat eLogst ashChargeT ype t o convert a pay-as-you-go Alibaba Cloud Logst ash inst ance t o a
subscript ion inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/actions/convert-pay-type HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
n6w1o5jq****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody

> Document Version: 20220524 328


API Reference· Logst ash Elast icsearch

Ent er t he following paramet ers in Request Body.

Parameter T ype Required Example Description

T he billing
information of the
paymentInfo Array Yes
instance after
conversion.

T he subscription
period of the
image. If
pricingCycle is set
to Year, valid
└duration Integer Yes 1
values are 1 to 3.
If pricingCycle is
set to Month,
valid values are 1
to 9.

T he billing cycle
of the instance.
└pricingCycle String Yes Year
Valid values: Year
and Month.

T he current
Payment type of
the instance.
Currently, you can
only convert pay-
as-you-go
paymentT ype String Yes prepaid instances to
subscription
instances.
T herefore, the
value of this
parameter is fixed
to prepaid.

Not e └ indicat es a child paramet er.

Sample code:

329 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

{
"paymentInfo":{
"duration":1,
"pricingCycle":"Month"
},
"paymentType":"prepaid"
}

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Returned results:
Result Boolean true true: conversion successful
false: conversion failed

Examples
Sample request s

POST /openapi/logstashes/ls-cn-n6w1o5jq****/actions/convert-pay-type HTTP/1.1


common request headers
{
"paymentInfo":{
"duration":1,
"pricingCycle":"Month"
},
"paymentType":"prepaid"
}

Sample success responses

JSON Synt ax

{
"Result":true,
"RequestId":"3760F67B-691D-4663-B4E5-6783554F****"
}

Error codes

HttpCode Error code Error message Description

> Document Version: 20220524 330


API Reference· Logst ash Elast icsearch

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.1.10. DeleteLogstash
Call Delet eLogst ash t o release a specified inst ance.

Before you call an int erface, not e t he following:

Aft er an inst ance is released, t he physical resources used by t he inst ance are recycled. All relat ed dat a
is lost and cannot be recovered. T he Cloud disks at t ached t o t he inst ance nodes are also released. T he
corresponding snapshot s are delet ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
DELETE /openapi/logstashes/[InstanceId] HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
n6w1o5jq****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

Response parameters

Parameter T ype Example Description

331 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

94B03BBA-A132-
RequestId String 42C3-8367- T he ID of the request.
0A0C1C45****

T he ret urned dat a also includes t he Result paramet er. For more informat ion about t he paramet ers, see
List Logst ash .

Examples
Sample request s

DELETE /openapi/logstashes/ls-cn-n6w1o5jq**** HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"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": 50,
"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-07-08T02:39:02.190Z",
"commodityCode": "elasticsearch_logstash_post",
"extendConfigs": [],
"endTime": 4749897600000,
"clusterTasks": [],
"resourceGroupId": "rg-acfm2h5vbzd****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-i",
"status": "NORMAL"
}

> Document Version: 20220524 332


API Reference· Logst ash Elast icsearch

],
"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****.elas
ticsearch.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": "5766F858-B38C-4CFA-8044-69C7C8A5****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

9.1.11. CancelLogstashDeletion
Call CancelLogst ashDelet ion t o rest ore t he frozen Logst ash inst ance aft er it is released.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/actions/cancel-deletion HTTP/1.1

Request parameters

333 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
m7r1vsi2****

A unique token generated by the


client to guarantee the
idempotency of the request. You
5A2CFF0E-
can use the client to generate the
5718-45B5-
clientT oken String Query No value, but you must ensure that it
9D4D-
is unique among different requests.
70B3FF****
T he token can contain only ASCII
characters and cannot exceed 64
characters in length.

Response parameters

Parameter T ype Example Description

23EBF56B-2DC0-
RequestId String 4507-8BE5- T he ID of the request.
B87395DB0FEB

Indicates whether the restoration of the


instance is successful. Valid values:
Result Boolean true
true
false

Examples
Sample request s

POST /openapi/logstashes/ls-cn-m7r1vsi2****/actions/cancel-deletion HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "23EBF56B-2DC0-4507-8BE5-B87395DB0FEB"
}

Error codes

HttpCode Error code Error message Description

> Document Version: 20220524 334


API Reference· Logst ash Elast icsearch

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.2. Configure clusters


9.2.1. UpdateLogstashSettings
Updat es t he configurat ion of a specified Logst ash clust er.

When you call t his operat ion, t ake not e of t he following it ems:

If t he inst ance is in t he Act ive (act ivat ing), Invalid (invalid), and Inact ive (inact ive) st at e, t he informat ion
cannot be updat ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample codes.

Request parameters
T his operat ion uses only common request headers. For more informat ion, see Common request
paramet ers.

Request structure
PATCH|POST /openapi/logstashes/[InstanceId]/instance-settings HTTP/1.1

Request parameters

Locati Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
2r42btxr****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must make sure
clientT oken String Query No
9D4D- that it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

335 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Request Body

You must specify t he following paramet ers in Request Body t o updat e t he configurat ions of a specified
Logst ash inst ance.

Field T ype Required Example Description

Used to update
the YML
{"thread_pool.bulk
config Map No configuration
.queue_size":500}
information of an
instance.

Response parameters

Parameter T ype Example Description

71D0D1DA-B22F-
RequestId String 58CB-AF5B- T he ID of the request.
D1657A6A****

T he ret urned dat a also cont ains t he Result paramet er. For more informat ion about t he paramet er, see
List Logst ash.

Examples
Sample request s

PATCH /openapi/logstashes/ls-cn-2r42btxr****/instance-settings HTTP/1.1


Common request headers

Sample success responses

JSON format

{
"Result": {
"instanceId": "ls-cn-2r42btxr****",
"version": "7.4.0_with_X-Pack",
"description": "lrr",
"nodeAmount": 1,
"paymentType": "postpaid",
"status": "active",
"enablePublic": false,
"nodeSpec": {
"spec": "elasticsearch.sn1ne.large",
"disk": 20,
"diskType": "cloud_efficiency"
},
"dataNode": true,
"networkConfig": {
"vpcId": "vpc-bp1jy348ibzulk6hn****",
"vswitchId": "vsw-bp1a0mifpletdd1da****",

> Document Version: 20220524 336


API Reference· Logst ash Elast icsearch

"vswitchId": "vsw-bp1a0mifpletdd1da****",
"vsArea": "cn-hangzhou-h",
"whiteIpGroupList": [],
"type": "vpc"
},
"createdAt": "2021-08-30T08:28:21.976Z",
"updatedAt": "2021-08-30T08:59:06.371Z",
"commodityCode": "elasticsearch_logstash_post",
"extendConfigs": [],
"endTime": 4786012800000,
"clusterTasks": [],
"resourceGroupId": "rg-acfmxxkk2p7****",
"zoneCount": 1,
"protocol": "HTTP",
"zoneInfos": [
{
"zoneId": "cn-hangzhou-h",
"status": "NORMAL"
}
],
"instanceType": "logstash",
"inited": true,
"tags": [
{
"tagKey": "acs:rm:rgId",
"tagValue": "rg-acfmxxkk2p7****"
}
],
"serviceVpc": false,
"isNewDeployment": false,
"config": {
"xpack.monitoring.enabled": "true",
"xpack.monitoring.elasticsearch.username": "elastic",
"slowlog.threshold.debug": "500ms",
"xpack.monitoring.elasticsearch.hosts": "[\"http://es-cn-7pp2bvb75005u****.elas
ticsearch.aliyuncs.com:9200\"]",
"xpack.monitoring.elasticsearch.password": "*******",
"slowlog.threshold.warn": "2s",
"slowlog.threshold.info": "1s",
"slowlog.threshold.trace": "100ms"
},
"endpointList": [
{
"host": "172.29.XX.XX",
"port": 9600,
"zoneId": "cn-hangzhou-h"
}
]
},
"RequestId": "71D0D1DA-B22F-58CB-AF5B-D1657A6A****"
}

Error codes

337 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Check the instance status.

For a list of error codes, visit t he API Error Cent er.

9.2.2. ListExtendfiles
Call t he List Ext endfiles t o obt ain t he ext ended file configurat ions of a Logst ash inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/extendfiles HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

/ssd/1/share/ls-cn-
oew1qbgl****/logst
ash/current/config/
filePath String T he path of the extended file.
custom/mysql-
connector-java-
5.1.35.jar

> Document Version: 20220524 338


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

fileSize Long 968668 Expands the file size.

mysql-connector-
name String T he name of the extended file.
java-5.1.35.jar

sourceT ype String ORIGIN T he source of the synonym dictionary file.

Examples
Sample request s

GET /openapi/logstashes/ls-cn-oew1qbgl ****/extendfiles HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": [
{
"name": "mysql-connector-java-5.1.35.jar",
"fileSize": 968668,
"sourceType": "ORIGIN",
"filePath": "/ssd/1/share/ls-cn-oew1qbgl****/logstash/current/config/custom/mys
ql-connector-java-5.1.35.jar"
}
],
"RequestId": "741099F7-F490-4679-A52E-38601EE7****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.2.3. UpdateExtendfiles
Call t he Updat eExt endfiles t o updat e t he ext ended file configurat ions of a Logst ash inst ance.

Not e t he following when calling t his int erface:

Current ly, t his operat ion only allows you t o delet e Logst ash ext ension files t hat have been uploaded in
t he console. If you want t o add or modify an ident ifier, perform t he operat ions in t he console.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

339 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request structure
PUT /openapi/logstashes/[InstanceId]/extendfiles HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the cluster.
oew1qbgl****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
ClientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
T o specify t he updat ed ext ension file configurat ion, ent er t he following paramet ers in Request Body:

Parameter T ype Required Example Description

T he name of the
extended file. T he
file suffix must be
.jar. Chinese
mysql-connector- characters are not
name String Yes
java-6.0.2.jar supported in the
file name, and the
length cannot
exceed 100
characters.

> Document Version: 20220524 340


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

T he extended file
Source. Currently,
only ORIGIN is
supported. T hat
is, the
corresponding
extension file is
retained. T he
extension file that
does not have this
sourceT ype String Yes ORIGIN parameter
configured is
deleted. T he
function of adding
and modifying
extended files is in
development. You
can implement all
management and
control operations
in control.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

fileSize Long 1853083 T he size of the extended file. Unit: Byte.

mysql-connector-
name String T he name of the extended file.
java-6.0.2.jar

T he source of the extended file. Only the


sourceT ype String ORIGIN ORIGIN (Original Extended file retained) is
supported.

Examples
Sample request s

341 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

PUT /openapi/logstashes/ls-cn-oew1qbgl****/extendfiles HTTP/1.1 common request header


[
{
"sourceType":"ORIGIN",
"name":"mysql-connector-java-5.1.48.jar"
}
]

Sample success responses

JSON format

{
"Result": [
{
"name": "mysql-connector-java-5.1.35.jar",
"fileSize": 968668,
"sourceType": "ORIGIN"
}
],
"RequestId": "27F32ECF-0527-43BF-A116-D6260D1240BE"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.3. Manage plug-ins


9.3.1. ListLogstashPlugins
Queries t he det ailed informat ion of all plug-ins or a specified plug-in.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/plugins HTTP/1.1

Request parameters

> Document Version: 20220524 342


API Reference· Logst ash Elast icsearch

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
oew1qbgl****

logstash-filter-
name String Query No T he name of the plug-in.
clone

T he number of pages in the plug-in


list. Default value: 1, minimum
page Integer Query No 10 value: 1, maximum value: 200.

T he number of entries to return on


size Integer Query No 3 each page. Minimum value: 1,
maximum value: 200.

T he source of the plug-in. Valid


values:
source String Query No USER
USER: custom plug-ins
SYST EM: system preset plug-in

Response parameters

Parameter T ype Example Description

99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

Result Array of Result T he return results.

T he clone filter is
description String for duplicating T he description of the plug-in.
events.

logstash-filter-
name String T he name of the plug-in.
clone

source String SYST EM T he source of the plug-in.

T he description document address of the


specificationUrl String https://xxx.html
plug-in.

343 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

state String INST ALLED T he status of the plug-in.

T he following paramet ers are also included in t he ret urned dat a.

Parameter T ype Example Description

T he header of the
Headers Struct
response.

T he number of returned
└X-T otal-Count Integer 131
plug-ins.

Not e └ indicat es a child paramet er.

Examples
Sample request s

GET /openapi/logstashes/ls-cn-oew1qbgl****/plugins?name=logstash-filter-clone&page=10&
size=3 HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": [ { "name": "logstash-filter-clone", "state": "INSTALLED", "source": "SYST


EM", "description": "The clone filter is for duplicating events. A clone will be created fo
r each type in the clone list.", "specificationUrl": "https://www.elastic.co/guide/en/logst
ash/6.7/plugins-filters-clone.html" }, { "name": "logstash-filter-csv", "state": "INSTALLED
", "source": "SYSTEM", "description": "The CSV filter takes an event field containing CSV d
ata, parses it, and stores it as individual fields (can optionally specify the names). This
filter can also parse data with any separator, not just commas.", "specificationUrl": "http
s://www.elastic.co/guide/en/logstash/6.7/plugins-filters-csv.html" }, { "name": "logstash-f
ilter-date", "state": "INSTALLED", "source": "SYSTEM", "description": "The date filter is u
sed for parsing dates from fields, and then using that date or timestamp as the logstash ti
mestamp for the event.", "specificationUrl": "https://www.elastic.co/guide/en/logstash/6.7/
plugins-filters-date.html" } ], "RequestId": "40C0570B-AB40-48BA-8CAE-66EA230A****", "Heade
rs": { "X-Total-Count": 131 } }

Error codes

> Document Version: 20220524 344


API Reference· Logst ash Elast icsearch

HttpCode Error code Error message Description

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er .

9.3.2. InstallLogstashSystemPlugin
Inst alls a plug-in.

Before you call t his operat ion, not e t hat :

T he plug-ins t o be inst alled must be included in t he Syst em Default Plug-ins list of Alibaba Cloud
Logst ash. Ext ernal open-source plug-ins are not support ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T he Get Logs operat ion does not have operat ion-specific request headers and uses only common
request headers. For more informat ion, see t he "Common request headers" sect ion in t he "Common
HT T P headers" t opic in API Reference.

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

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
oew1qbgl****

T he client token that is used to


ensure the idempotence of the
request. You can use the client to
5A2CFF0E-
generate the value, but you must
5718-45B5-
clientT oken String Query No make sure that it is unique among
9D4D-
different requests. T he token can
70B3FF****
contain only ASCII characters and
cannot exceed 64 characters in
length.

RequestBody

345 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

In t he Request Body, you must also ent er t he name of t he plug-in t o be inst alled in t he
["pluginName1","pluginName2",.."pluginNamen"] format . Example:

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

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC4****

["logstash-input-
datahub",
Result Array of String T he list of successfully installed plug-ins.
"logstash-input-
maxcompute"]

T he ret urned dat a also cont ains Headers paramet ers, indicat ing t hat header informat ion is ret urned.

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/plugins/system/actions/install?clientToken=5A2C
FF0E-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

> Document Version: 20220524 346


API Reference· Logst ash Elast icsearch

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the instance
status.

For a list of error codes, visit t he API Error Cent er.

9.3.3. UninstallLogstashPlugin
Call t he Uninst allLogst ashPlugin t o uninst all t he inst alled plug-in.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/plugins/actions/uninstall HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
You must ent er t he name of t he plug-in t o be uninst alled in t he format of
["pluginName1","pluginName2",...,"pluginNamen"] , as shown in t he following example.

347 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

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

Response parameters

Parameter T ype Example Description

F99407AB-2FA9-
RequestId String 489E-A259- T he ID of the request.
40CF6DCC****

["logstash-input- Returned results:


datahub",
Result List true: uninstallation succeeded
"logstash-input-
maxcompute" ] false: uninstallation failed

T he ret urned dat a also cont ains t he Headers paramet er, indicat ing t he ret urned header informat ion.

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/plugins/actions/uninstall HTTP/1.1


common request headers
[
"logstash-input-datahub", "logstash-input-maxcompute"
]

Sample success responses

JSON Synt ax

{
"Result": [
"logstash-input-datahub",
"logstash-input-maxcompute"
],
"RequestId": "63EB9CD3-7652-4CFD-B38C-6413BCEC****",
"Headers": {}
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

> Document Version: 20220524 348


API Reference· Logst ash Elast icsearch

For a list of error codes, visit t he API Error Cent er.

9.4. Monitoring cluster


9.4.1. ListAvailableEsInstanceIds
Call t he List AvailableEsInst anceIds t o obt ain t he list of Elast icsearch inst ances(wit h t he X-Pack
monit oring capabilit y) when you set X-Pack t o monit or Logst ash inst ances.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/available-elasticsearch-for-centralized-management HTT
PS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

description String instanceName T he name of the Elasticsearch instance.

http://es-cn-
n6w1o1x0w001c**** T he public endpoint of the Elasticsearch
endpoint String
.elasticsearch.aliyun instance.
cs.com:9200

es-cn-
esInstanceId String T he ID of the Elasticsearch instance.
n6w1o1x0w001c****

349 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

https://es-cn-
n6w1o1x0w001c****
kibanaEndpoint String T he public network endpoint of Kibana.
.kibana.elasticsearch
.aliyuncs.com:5601

Examples
Sample request s

GET /openapi/logstashes/ls-cn-oew1qbgl****/available-elasticsearch-for-centralized-manageme
nt HTTP/1.1
common request header

Sample success responses

JSON Synt ax

{
"Result": [
{
"esInstanceId": "es-cn-n6w1o1x0w001c****",
"endpoint": "http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200",
"description": "pan_67_keepit",
"kibanaEndpoint": "https://es-cn-n6w1o1x0w001c****.kibana.elasticsearch.aliyunc
s.com:5601"
},
{
"esInstanceId": "es-cn-6ja1rgego0006****",
"endpoint": "http://es-cn-6ja1rgego0006****.elasticsearch.aliyuncs.com:9200",
"description": "pan_mulitzones_keepit",
"kibanaEndpoint": "https://es-cn-6ja1rgego0006****.kibana.elasticsearch.aliyunc
s.com:5601"
}
],
"RequestId": "4047A0E1-DEE0-4C6C-92A9-E52D32FD****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

9.4.2. DescribeXpackMonitorConfig
Call t he DescribeXpackMonit orConfig t o obt ain t he X-Pack monit oring configurat ions of a Logst ash
inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

> Document Version: 20220524 350


API Reference· Logst ash Elast icsearch

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/xpack-monitor-config HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he returned results.

Indicates whether to enable X-Pack


monitoring. Valid values:
enable Boolean true
true: enabled
false: disabled

["http://es-cn-
X-Pack list of access addresses for the
n6w1o1x0w001c****
endpoints List Elasticsearch instance associated with the
.elasticsearch.aliyun
monitoring.
cs.com:9200"]

es-cn- T he ID of the X-Pack instance associated


esInstanceId String
n6w1o1x0w001c**** with the Elasticsearch monitoring task.

X-Pack list of pipelines managed by the


pipelineIds List []
associated Kibana instance for monitoring.

X-Pack username that is used to access the


userName String elastic Elasticsearch instance associated with the
monitoring job.

Examples
Sample request s

351 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

GET /openapi/logstashes/ls-cn-oew1qbgl****/xpack-monitor-config HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": {
"esInstanceId": "es-cn-n6w1o1x0w001c****",
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": [],
"userName": "elastic",
"enable": true
},
"RequestId": "9EC7377A-60D7-4AB2-ADE3-983E1D0D****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

9.4.3. UpdateXpackMonitorConfig
Call t he Updat eXpackMonit orConfig t o updat e t he X-Pack monit oring alert configurat ions of a
Logst ash inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/xpack-monitor-config HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

> Document Version: 20220524 352


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he following paramet ers in Request Body t o specify t he monit oring configurat ion for X-Pack.

Parameter T ype Required Example Description

http://es-cn- T he access
n6w1o1x0w001c** address of the
endpoints List<String\> Yes
**.elasticsearch.ali Elasticsearch
yuncs.com:9200 instance.

T he ID List of
["name-1","name-
pipelineIds List<String\> Yes Logstash pipelines
2"]
to be monitored.

Specifies whether
enable Boolean Yes true to enable X-Pack
monitoring.

Username of the
userName String Yes elastic Elasticsearch
instance.

Password of the
password String Yes **** Elasticsearch
instance.

Sample code:

353 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

{
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": ["datahub_test","test"],
"enable": true,
"userName": "elastic",
"password": "xxxx",
"esInstanceId": "es-cn-n6w1o1x0w001c****"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Returned results:
Result Boolean true true: update successful
false: update failed

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/xpack-monitor-config HTTP/1.1


common request header
{
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": ["datahub_test","test"],
"enable": true,
"userName": "elastic",
"password": "xxxx",
"esInstanceId": "es-cn-n6w1o1x0w001c****"
}

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "30A59FC7-609B-4C12-B6EF-991A5CA7****"
}

Error codes

> Document Version: 20220524 354


API Reference· Logst ash Elast icsearch

For a list of error codes, visit t he API Error Cent er.

9.4.4. ValidateConnection
Call Validat eConnect ion t o verify t he connect ivit y of Elast icsearch inst ance providing x-pack monit oring
in t he monit oring alarm configurat ion of t he Logst ash inst ance.

Not e T o monit or X-Pack for Logst ash, you must configure Elast icsearch inst ance. Aft er t he
configurat ion, you can monit or t he Logst ash inst ance in Kibana of t he corresponding Elast icsearch
inst ance.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/validate-connection HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he following paramet ers in Request Body t o specify t he Elast icsearch inst ance t o be connect ed.

Parameter T ype Required Example Description

355 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Required Example Description

T he access
["http://es-cn- address of the X-
n6w1o1x0w001c** Pack instance that
endpoints List<String\> Yes
**.elasticsearch.ali the Elasticsearch
yuncs.com:9200"] provides for
monitoring.

Username of the
userName String Yes elastic Elasticsearch
instance.

Password of the
password String Yes xxx Elasticsearch
instance.

Sample code:

{
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"userName": "elastic",
"password": "xxxx"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Returned results:
Result Boolean true true: verification succeed
false: verification failed

Examples
Sample request s

> Document Version: 20220524 356


API Reference· Logst ash Elast icsearch

POST /openapi/logstashes/ls-cn-oew1qbgl****/validate-connection HTTP/1.1


common request header
{
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"userName": "elastic",
"password": "xxxx"
}

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "D5B41051-FE06-4986-9D87-3779E627****"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

9.5. Query logs


9.5.1. ListLogstashLog
Queries t he logs of a Logst ash clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only common request headers. For more informat ion, refer t o t he document at ion of
common request paramet ers.

Request syntax
GET /openapi/logstashes/{InstanceId}/search-log HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he ID of the instance.
v0h1kzca****

357 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Positi Require
Parameter T ype Example Description
on d

T he type of the log. Valid values:

LOGST ASH_INST ANCE_LOG:


master logs
SEARCHSLOW: searching slow
LOGST ASH_INS logs
type String Query Yes
T ANCE_LOG
INDEXINGSLOW: indexing slow
logs
JVMLOG: GC logs
LOGST ASH_DEBUG_LOG: debug
logs

host:10.7.xx.xx
AND level:info
T he keyword used to match log
query String Query Yes AND
entries.
content:openin
g

T he timestamp of the log start.


beginT ime Long Query No 1531910852074
Unit: ms.

T he timestamp of the end of the


endT ime Long Query No 1531910852074
log. Unit: ms.

T he page number of the returned


page Integer Query No 1 page. Default value: 1, minimum
value: 1, maximum value: 200.

T he number of entries to return on


each page. Default value: 20,
minimum value: 1, maximum value:
size Integer Query No 20 100.

Response parameters

Parameter T ype Example Description

7F40EAA1-6F1D-
RequestId String 4DD9-8DB8- T he ID of the request.
C5F00C4E****

Result Array of Result T he returned data.

> Document Version: 20220524 358


API Reference· Logst ash Elast icsearch

Parameter T ype Example Description

T he severity level of the log entry. Including


level String info trace, debug, info, warn, error, etc. (GC logs
have no level).

[logstash.outputs.fil
eextend] Opening
file
{:path=>\"/ssd/1/ls
content String T he details of the log.
-cn-
v0h1kzca****/logsta
sh/logs/debug/test
\"}

timestamp Long 1531985112420 T he timestamp of log generation. Unit: ms.

instanceId String ls-cn-v0h1kzca**** T he ID of the instance.

T he IP address of the node that generates


host String 192.168.xx.xx
the log.

T he following paramet ers are also included in t he ret urned dat a.

Parameter T ype Example Description

Result Struct T he returned data.

2020-07- T he time when the log


└time String
22T 16:58:00.506Z entry was generated.

T he header of the
Headers Struct
response.

T he number of returned
└X-T otal-Count Integer 1
logs.

Not e └ indicat es a child paramet er.

Examples
Sample request s

359 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

GET /openapi/logstashes/ls-cn-v0h1kzca****/search-log?type=LOGSTASH_INSTANCE_LOG&query=host
:10.7.xx.xx AND level:info AND content:opening&beginTime=1531910852074&endTime=153191085207
4&page=1&size=20 HTTP/1.1
Host:elasticsearch.aliyuncs.com
Content-Type:application/json

Sample success responses

JSON format

HTTP/1.1 200 OK
Content-Type:application/json
{
"Result" : [ {
"timestamp" : 1595408280506,
"host" : "10.7.**.**",
"contentCollection" : {
"level" : "info",
"host" : "10.7.**.**",
"time" : "2020-07-22T16:58:00.506Z",
"content" : "[logstash.outputs.fileextend] Opening file {:path=>\"/ssd/1/ls-cn-v0h1kz
ca****/logstash/logs/debug/test\"}"
},
"instanceId" : "ls-cn-v0h1kzca****"
} ],
"RequestId" : "DADBEFD2-570D-48EE-ABE4-0E3017D8****",
"Headers" : {
"X-Total-Count" : 1
}
}

Error code

HttpCode Error code Error message Description

T he instance is currently in
400 InstanceActivating Instance is activating.
effect.

T he instanceId provided does T he instance cannot be found.


400 InstanceNotFound
not exist. Please check the instance status.

For a list of error codes, visit t he API Error Cent er.

9.6. Manage cluster task


9.6.1. InterruptLogstashTask
Call t he Int errupt Logst ashT ask t o int errupt t he inst ance change t ask. Aft er int errupt ed, it ent ers t he
suspended st at e.

Debugging

> Document Version: 20220524 360


API Reference· Logst ash Elast icsearch

OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
/openapi/logst ashes/{inst anceId}/act ions/int errupt

Request structure
POST /openapi/logstashes/[InstanceId]/actions/interrupt HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
4591f1y6****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

Response parameters

Parameter T ype Example Description

T he error code. T his parameter is not


Code String .
returned if you call the operation normally.

T he error message. T his parameter is not


Message String .
returned if you call the operation normally.

0FA05123-745C-
RequestId String 42FD-A69B- T he ID of the request.
AFF48EF9****

Returned results:

Result Boolean true true: T he task is interrupted.


false: T he task has failed to be
interrupted.

Examples
Sample request s

361 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

POST /openapi/logstashes/ls-cn-4591f1y6 ****/actions/interrupt HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "0FA05123-745C-42FD-A69B-AFF48EF9****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.6.2. ResumeLogstashTask
Call t he ResumeLogst ashT ask t o resume t he change int errupt ion t ask for t he inst ance. Aft er
rest orat ion, t he inst ance ent ers t he act ivat ing st at e.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/actions/resume HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the instance.
4591f1y6****

> Document Version: 20220524 362


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

Response parameters

Parameter T ype Example Description

T he error code. T his parameter is not


Code String InstanceNotFound
returned if you call the operation normally.

T he specified
cluster does not
T he error message. T his parameter is not
Message String exist. Check the
returned if you call the operation normally.
cluster status and
try again.

0FA05123-745C-
RequestId String 42FD-A69B- T he ID of the request.
AFF48EF9****

Returned results:
Result Boolean true true: T he restore task is successful.
false: T he restore task failed.

Examples
Sample request s

POST /openapi/logstashes/ls-cn-4591f1y6 ****/actions/resume HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "0FA05123-745C-42FD-A69B-AFF48EF9****"
}

Error codes

363 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.7. Manage pipelines


9.7.1. CreatePipelines
Call t he Creat ePipelines t o creat e a Logst ash pipeline.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/pipelines HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

Indicates whether to deploy


trigger Boolean No false
immediately.

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
T o specify t he pipeline informat ion, you must ent er t he following paramet ers in Request Body:

> Document Version: 20220524 364


API Reference· Logst ash Elast icsearch

T ype Required Example Description


Parameter

T he ID of the
pipelineId String Yes pipeline-test
pipeline.

T he description of
description String No this is a test
the pipeline.

T he specific
input { } filter { }
config String Yes configuration of
output { }
the pipeline.

T he number of
workers Integer No 2
pipeline workers.

Pipeline batch
batchSize Integer No 125
size.

Pipeline batch
batchDelay Integer No 50
delay.

T he type of the
queue. Valid
queueT ype String No MEMORY
values: MEMORY
and PERSIST ED.

T he status of the
pipeline. Valid
values:
NOT _DEPLOYED,
RUNNING, and
DELET ED. T his
String RUNNING
pipelineStatus No parameter is
required when the
trigger parameter
is set to true.

T he maximum
queueMaxBytes Integer No 1024 number of bytes
in the queue.

365 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

T ype Required Example Description


Parameter

T he number of
queueCheckPoint
Integer No 1024 queue checkpoint
Writes
writes.

Sample code:

[{
"pipelineId":"test",
"config":"input {\n\n}\nfilter {\n\n}\noutput {\n\n}"
}]

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:
Result Boolean true true: creation succeed
false: creation failed

Examples
Sample request s

POST /openapi/logstashes/logstashes/ls-cn-oew1qbgl****/pipelines?trigger=false HTTP/1.1


common request headers
[{
"pipelineId":"test",
"config":"input {\n\n}\nfilter {\n\n}\noutput {\n\n}"
}]

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "732A60FB-1899-4466-83D2-E96DA455****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

> Document Version: 20220524 366


API Reference· Logst ash Elast icsearch

9.7.2. ListPipeline
Queries t he pipelines of a Logst ash clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/pipelines HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes T he Logstash instance ID.
oew1qbgl****

pipelineId String Query No pipeline_test T he ID of the pipeline.

T he number of pages of the


returned result. Default value: 1,
page Integer Query No 1
minimum value: 1, maximum value:
200.

T he number of pipes per page.


size Integer Query No 15 Minimum value: 1, maximum value:
200.

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 2 T he total number of entries.

367 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

gmtCreatedT im 2020-08-
String pipeline creation time.
e 05T 03:10:38.188Z

gmtUpdateT im 2020-08-
String T he pipeline update time.
e 05T 08:43:31.757Z

pipelineId String pipeline_test T he ID of the pipeline.

Pipeline status, supported: NOT _DEPLOYED,


pipelineStatus String NOT _DEPLOYED
RUNNING, and DELET ED.

Examples
Sample request s

GET /openapi/logstashes/ls-cn-oew1qbgl****/pipelines?pipelineId=test HTTP/1.1 public r


equest header

Sample success responses

JSON format

{ "Result": [ { "pipelineId": "datahub_test", "pipelineStatus": "RUNNING", "gmtCreated


Time": "2020-09-09T02:21:28.844Z", "gmtUpdateTime": "2020-09-09T06:09:43.796Z" }, { "pipeli
neId": "test", "pipelineStatus": "NOT_DEPLOYED", "gmtCreatedTime": "2020-09-16T06:35:30.139
Z", "gmtUpdateTime": "2020-09-16T07:06:24.759Z" }, { "pipelineId": "test_1", "pipelineStatu
s": "NOT_DEPLOYED", "gmtCreatedTime": "2020-09-16T06:33:05.290Z", "gmtUpdateTime": "2020-09
-16T06:33:05.290Z" } ], "RequestId": "AA6771E2-4007-4F1F-ADCB-16DAABB9****", "Headers": { "
X-Total-Count": 3 } }

Error code
For a list of error codes, visit t he API Error Cent er .

9.7.3. DescribePipeline
Call t he DescribePipeline t o obt ain t he pipeline informat ion of a Logst ash inst ance.

Debugging

> Document Version: 20220524 368


API Reference· Logst ash Elast icsearch

OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
GET /openapi/logstashes/[InstanceId]/pipelines/[PipelineId] HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

PipelineId String Yes pipeline_test T he ID of the pipeline.

Response parameters

Parameter T ype Example Description

829F38F6-E2D6-
RequestId String 4109-90A6- T he ID of the request.
888160BD1***

Result Struct T he return results.

batchDelay Integer 50 Pipeline batch delay.

batchSize Integer 125 Pipeline batch size.

input { } filter { }
config String T he specific configuration of the pipeline.
output { }

description String this is a test T he description of the pipeline.

2020-06-
gmtCreatedT im
String 20T 07:26:47.000+0 T he time when the pipeline was created.
e
000

2020-06-
gmtUpdateT im
String 20T 07:26:47.000+0 T he time when the pipeline was updated.
e
000

369 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Example Description

pipelineId String pipeline_test T he ID of the pipeline.

T he status of the pipeline. Supported:


pipelineStatus String RUNNING
NOT _DEPLOYED, RUNNING, and DELET ED.

queueCheckPoi
Integer 1024 T he number of queue checkpoint writes.
ntWrites

queueMaxBytes Integer 1024 T he maximum number of bytes in the queue.

T he type of the queue. Supported: MEMORY


queueT ype String memory
and PERSIST ED.

workers Integer 2 T he number of pipeline workers.

Examples
Sample request s

GET /openapi/logstashes/ls-cn-oew1qbgl****/pipelines/pipeline_test HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": {
"pipelineId": "test",
"config": "input {\n\n}\nfilter {\n\n}\noutput {\n\n}",
"workers": 2,
"batchSize": 100,
"batchDelay": 60,
"queueType": "MEMORY",
"pipelineStatus": "NOT_DEPLOYED",
"queueMaxBytes": 1024,
"queueCheckPointWrites": 1024,
"gmtCreatedTime": "2020-09-16T06:35:30.139Z",
"gmtUpdateTime": "2020-09-16T07:06:24.759Z"
},
"RequestId": "49AEA9F3-B946-4102-8BD7-92E71C86****"
}

> Document Version: 20220524 370


API Reference· Logst ash Elast icsearch

{ "Result": { "pipelineId": "test", "config": "input {\n\n}\nfilter {\n\n}\noutput {\n


\n}", "workers": 2, "batchSize": 100, "batchDelay": 60, "queueType": "MEMORY", "pipelineSta
tus": "NOT_DEPLOYED", "queueMaxBytes": 1024, "queueCheckPointWrites": 1024, "gmtCreatedTime
": "2020-09-16T06:35:30.139Z", "gmtUpdateTime": "2020-09-16T07:06:24.759Z" }, "RequestId":
"49AEA9F3-B946-4102-8BD7-92E71C86****" }

Sample response descript ion

Pipeline parameters that are not configured use the system default values, and are not disp
layed in the returned result.

Error code
For a list of error codes, visit t he API Error Cent er.

9.7.4. UpdatePipelines
Call t he Updat ePipelines t o updat e t he Logst ash pipeline informat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
PUT /openapi/logstashes/[InstanceId]/pipelines HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
request. T he value of this parameter is
generated by the client and is unique
5A2CFF0E-5718- among different requests. T he
clientT oken String Yes 45B5-9D4D- maximum length is 64 ASCII characters.
70B3FF****

371 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

Indicates whether to deploy


trigger Boolean No false
immediately.

RequestBody
T o specify t he updat ed pipeline informat ion, you must ent er t he following paramet ers in Request Body:

Not e T he pipeline array in JSON format must be filled in Request Body.

Parameter T ype Required Example Description

T he ID of the
pipelineId String Yes pipeline-test pipeline to
update.

T he
description String No this is a test description of
the pipeline.

T he specific
input { } filter { configuration
config String Yes
} output { } of the
pipeline.

T he number of
workers Integer No 2 pipeline
workers.

Pipeline batch
batchSize Integer No 125
size.

Pipeline batch
batchDelay Integer No 50
delay.

T he type of
the queue.
queueT ype String No MEMORY Valid values:
MEMORY and
PERSIST ED.

> Document Version: 20220524 372


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

T he status of
the pipeline.
Valid values:
NOT _DEPLOYE
D, RUNNING,
and DELET ED.
pipelineStatus String No RUNNING
T his
parameter is
required when
the trigger
parameter is
set to true.

T he maximum
queueMaxByte number of
Integer No 1024
s bytes in the
queue.

T he number of
queueCheckPoi queue
Integer No 1024
ntWrites checkpoint
writes.

Sample code:

[
{
"pipelineId": "test",
"config": "input {\n\n}\nfilter {\n\n}\noutput {\n \n}"
}
]

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:
Result Boolean true true: update succeed
false: update failed

Examples

373 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Sample request s

PUT /openapi/logstashes/ls-cn-oew1qbgl****/pipelines?clientToken=5A2CFF0E-5718-45B5-9D4D-70
B3FF****&trigger=false HTTP/1.1
common request header
[
{"pipelineId":"test", "config":"input {\n\n}\nfilter {\n\n}\noutput {\n \n}"},
{"pipelineId":"test1", "config":"input {\n\n}\nfilter {\n\n}\noutput {\n \n}"}
]

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "734F9DEC-74AC-4D6E-B97F-FFDAA90B****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.7.5. RunPipelines
Call t he RunPipelines t o immediat ely deploy a Logst ash pipeline.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/pipelines/action/run HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

> Document Version: 20220524 374


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he pipeline ID list in Request Body t o specify t he pipeline t o be deployed. Example:
["PipelineId1","PipelineId2","..."] .

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:
Result Boolean true true: deployment succeed
false: deployment failed

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/pipelines/action/run HTTP/1.1


common request header
["PipelineId1","PipelineId2","..."]

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "529AEFD2-F5FA-492F-8921-520141B9****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.7.6. StopPipelines
Call t he St opPipelines t o st op running t he Logst ash pipeline.

375 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/pipelines/action/stop HTTPS|HTTP

Request parameters

Requir
Paramet er T ype Example Descript ion
ed

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he pipeline ID list in Request Body t o specify t he pipeline t o be deployed. Example:
["PipelineId1","PipelineId2","..."] .

Response parameters

Paramet er T ype Example Descript ion

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:

Result Boolean true true: stopped successfully

false: stopped failed

> Document Version: 20220524 376


API Reference· Logst ash Elast icsearch

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/pipelines/action/stop HTTP/1.1


common request header
["PipelineId1","PipelineId2","..."]

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "57092D4B-C92E-4CF9-B73C-B4B376C9****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.7.7. UpdatePipelineManagementConfig
Call t he Updat ePipelineManagement Config t o updat e t he met hod for managing Logst ash pipelines.

Not e Pipeline management met hods are divided int o configurat ion file management and
Kibana pipeline management . Current ly, t he console no longer support s Kibana pipeline
management . You can only use t his funct ion t hrough t he API.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
POST /openapi/logstashes/[InstanceId]/pipeline-management-config HTTPS|HTTP

Request parameters

377 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

RequestBody
Ent er t he following paramet ers in Request Body t o specify t he associat ed Elast icsearch inst ance
informat ion.

Parameter T ype Required Example Description

T he ID of the
Elasticsearch
instance where
es-cn-
Kibana is located
esInstanceId String Yes n6w1o1x0w001c**
after the Kibana
**
management
pipeline is
enabled.

T he username of
userName String Yes elastic
Kibana.

T he password of
password String Yes xxxxxx
Kibana.

T he list of
["testKibanaMana pipelines
pipelineIds List<String\> Yes
gement"] managed by
Kibana.

> Document Version: 20220524 378


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

T he list of access
addresses of
Elasticsearch
["http://es-cn-
instances where
n6w1o1x0w001c**
endpoints List<String\> Yes Kibana is located
**.elasticsearch.ali
after the Kibana
yuncs.com:9200"]
management
pipeline is
enabled.

T he pipeline
management
method. Valid
values: ES(Kibana
pipelineManageme
String Yes ES pipeline
ntT ype
management) and
MULT IPLE_PIPELINE
(configuration file
management).

Sample code:

{
"pipelineManagementType": "ES",
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": [
"testKibanaManagement"
],
"userName": "elastic",
"password": "xxxx",
"esInstanceId": "es-cn-n6w1o1x0w001c****"
}

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:
Result Boolean true true: update successfully
false: update failed

379 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

Examples
Sample request s

POST /openapi/logstashes/ls-cn-oew1qbgl****/pipeline-management-config HTTP/1.1


common request header
{
"pipelineManagementType": "ES",
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": [
"testKibanaManagement"
],
"userName": "elastic",
"password": "xxxx",
"esInstanceId": "es-cn-n6w1o1x0w001c****"
}

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "135E9F19-277D-4E34-85AC-EB394AA2****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.7.8. DescribePipelineManagementConfig
Call t he DescribePipelineManagement Config t o obt ain t he Logst ash pipeline management
configurat ion.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

> Document Version: 20220524 380


API Reference· Logst ash Elast icsearch

Request syntax
GET /openapi/logstashes/[InstanceId]/pipeline-management-config HTTPS|HTTP

Request parameters

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
clientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Struct T he return results.

["http://es-cn-
T he list of access addresses of the
n6w1o1x0w001c****
endpoints String Elasticsearch instance. Format: Domains:
.elasticsearch.aliyun
port number .
cs.com:9200"]

es-cn-
esInstanceId String T he ID of the Elasticsearch instance.
n6w1o1x0w001c****

["testKibanaManage
pipelineIds List T he list of pipeline names.
ment"]

pipelineManage Pipeline management method. Supports


String MULT IPLE_PIPELINE
mentT ype Kibana and MULT IPLE_PIPELINE.

T he username that is used to access the


userName String elastic
instance.

Examples
Sample request s

381 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

GET /openapi/logstashes/ls-cn-oew1qbgl****/pipeline-management-config HTTP/1.1


common request header

Sample success responses


JSON Synt ax

{
"Result": {
"pipelineManagementType": "MULTIPLE_PIPELINE",
"esInstanceId": "es-cn-n6w1o1x0w001c****",
"endpoints": [
"http://es-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200"
],
"pipelineIds": [
"testKibanaManagement"
],
"userName": "elastic"
},
"RequestId": "6822F07C-A896-4A2C-A430-BC01D5D1****"
}

Error codes

HttpCode Error code Error message Description

T he error message returned


T he instanceId provided does because the instance cannot be
400 InstanceNotFound
not exist. found. Check the status of the
instance.

For a list of error codes, visit t he API Error Cent er.

9.7.9. DeletePipelines
Call t he Delet ePipelines t o delet e a specified Logst ash pipeline.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. You can use OpenAPI Explorer t o search for API
operat ions, call API operat ions, and dynamically generat e SDK sample code.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request syntax
DELETE /openapi/logstashes/[InstanceId]/pipelines HTTPS|HTTP

Request parameters

> Document Version: 20220524 382


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

ls-cn-
InstanceId String Yes T he ID of the Logstash instance.
oew1qbgl****

A unique token generated by the client


to guarantee the idempotency of the
5A2CFF0E-5718-
request. T he value of this parameter is
ClientT oken String No 45B5-9D4D-
generated by the client and is unique
70B3FF****
among different requests. T he
maximum length is 64 ASCII characters.

pipelineIds String No pipeline-test T he ID of the pipeline.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Returned results:
Result Boolean true true: delete successfully
false: delete failed

Examples
Sample request s

DELETE /openapi/logstashes/ls-cn-oew1qbgl****/pipelines?pipelineIds=pipeline-test HTTP/1.1


common request header

Sample success responses

JSON Synt ax

{
"Result": true,
"RequestId": "61A12DC0-CD30-46A2-A3CE-653EA0CA****"
}

Error code
For a list of error codes, visit t he API Error Cent er.

9.7.10. ListPipelineIds

383 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

When calling t he List PipelineIds t o set up Kibana pipeline management , t est t he connect ivit y bet ween
Logst ash and Kibana and obt ain t he list of pipeline IDs creat ed on t he t arget Kibana.

Not e Pipeline management is divided int o configurat ion file management and Kibana pipeline
management . Kibana pipeline management is not open in some regional consoles.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request headers
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request syntax
POST /openapi/instances/[InstanceId]/pipeline-ids HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ls-cn-
InstanceId String Path Yes 7g1umu96oit2e T he Logstash instance ID.
****

RequestBody
T he following paramet ers must be filled in t he Request Body t o verify t he Kibana informat ion of t he
management pipeline.

Parameter T ype Required Example Description

T he username
that is used to log
on to the Kibana
console. Default
userName String Yes elastic value: elastic.

> Document Version: 20220524 384


API Reference· Logst ash Elast icsearch

Parameter T ype Required Example Description

T he password
used to log on to
password String Yes xxxxxx
the Kibana
console.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Array of Result Returns a list of results.

Whether the pipeline is available or not, the


value is as follows:
available Boolean true
true: Available.
flase: unavailable.

code String OK T he pipeline is unavailable for error codes.

message String OK Pipeline unavailable error message.

testKibanaManagem
pipelineId String T he ID of the pipeline created on Kibana.
ent

Examples
Sample request s

POST /openapi/instances/ls-cn-7g1umu96oit2e ****/pipeline-ids HTTP/1.1 public request


header {"userName":"elastic", "password":"xxxxxx"}

Sample success responses

JSON format

{ "Result":[ { "pipelineId":"testKibanaManagement", "available":true, "code":"OK", "me


ssage":"OK" } ], "RequestId":"E50BC6C3-23B5-4CA0-983C-066098FB8E34" }

Error codes

385 > Document Version: 20220524


Elast icsearch API Reference· Logst ash

For a list of error codes, visit t he API Error Cent er .

> Document Version: 20220524 386


API Reference· Beat s Elast icsearch

10.Beats
10.1. CreateCollector
Call t he Creat eCollect or t o creat e a collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
clientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify t he configurat ion informat ion
of t he collect or t o be creat ed.

Parameter T ype Required Example Description

387 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Required Example Description

Whether to verify
and create a
collector is used
only when
creating or
updating a
dryRun Boolean Yes true
collector. Optional
values: true (only
check but not
update), false
(check and
update).

T he name of the
name String Yes ct-test
collector.

T he collector
type. Optional
values: fileBeat,
resT ype String Yes fileBeat metricBeat,
heartBeat, and
auditBeat.

6.8.5_with_comm T he collector
resVersion String Yes
unity version.

Virtual Private
vpc-
Cloud ID. where
vpcId Integer Yes bp12nu14urf0upaf
the collector is
*****
located

T he fileBeat
collection path.
Only when the
installation
collectorPaths List<String> No ["/var/log"]
machine of the
collector is ECS,
configuration is
required.

T he configuration
configs List Yes file information of
the collector.

> Document Version: 20220524 388


API Reference· Beat s Elast icsearch

Parameter T ype Required Example Description

T he name of the
└fileName String Yes filebeat.yml
file.

"filebeat.inputs:xx T he content of
└content String Yes
x" the remote file.

Collector
extendConfigs Array expansion
configuration.

T he type of the
configuration.
Optional values:
collectorT argetIns
tance (collector
Output),
collectorDeployMa
chine (collector's
collectorElasticsea deployment
└configT ype String Yes
rchForKibana machine),
collector
Elasticsearch
ForKibana
(Elasticsearch
instance
information
supporting Kibana
dashboard).

T he type of
machine that the
collector is
deployed.
Optional values:
ECSInstanceId(ECS)
└type String No ECSInstanceId , ACKCluster
(Container
Kubernetes).
Required when the
co nf igT ype is
co llect o rDeplo y
Machine .

389 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Required Example Description

T he instance type
specified by the
collector Output.
Optional value:
Elasticsearch ,
└instanceT ype String No elasticsearch
logstash. Required
when the
co nf igT ype is
co llect o rT arget I
nst ance .

T he instance ID
associated with
the collector.
When the
co nf igT ype is
co llect o rT arget I
nst ance , the
instance ID of
collector Output;
When the
co nf igT ype is
es-cn- co llect o rDeplo y
└instanceId String Yes
nif201ihd0012**** Machines and the
t ype is
ACKClust er , it is
ACK cluster ID.

T he list of ECS
machines
deployed by the
collector.
An array of node Required when the
└machines Array
roles. co nf igT ype is
co llect o rDeplo y
Machines and the
t ype is
ECSInst anceId .

> Document Version: 20220524 390


API Reference· Beat s Elast icsearch

Parameter T ype Required Example Description

i-
T he list of ECS
└└instanceId String Yes bp11u91xgubypcu
machine IDs.
z****

T he ID of the host
group. Required
when the
co nf igT ype is
co llect o rDeplo y
default_ct-cn-
└groupId String Machine .
5i2l75bz4776****

T he transmission
protocol needs to
be consistent with
the access
protocol of the
instance specified
by the collector
└protocol String No HT T P
Output. Optional
values: HT T P,
HT T PS. Required
when the
co nf igT ype is
co llect o rT arget I
nst ance .

Output specifies
the user name of
the instance. T he
default name is
elastic. Required
when the
└userName String No elastic
co nf igT ype is
co llect o rT arget I
nst ance or
co llect o rElast ic
searchFo rKibana
.

T he password of
└password String No ***** the corresponding
username.

391 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Required Example Description

Whether to enable
Monitoring is
required when the
co nf igT ype is
co llect o rT arget I
└enableMonitorin nst ance and the
Boolean No true
g inst anceT ype is
Elast icsearch.
Optional values:
true (enabled) and
false (not
enabled).

Collector Output
specifies the list
of access
["es-cn-
addresses of the
nif201i*****.elastic
└hosts List<String> No instance. Required
search.aliyuncs.co
when the
m:9200"]
co nf igT ype is
co llect o rT arget I
nst ance .

T he private
network access
address of Kibana
es-cn- after Kibana
nif201ihd0012****- Dashboard is
└host String No kibana.internal.ela enabled. Required
sticsearch.aliyuncs when the
.com:5601 co nf igT ype is
co llect o rElast ic
searchFo rKibana
.

> Document Version: 20220524 392


API Reference· Beat s Elast icsearch

Parameter T ype Required Example Description

T he Internet
access address of
Kibana after
Kibana Dashboard
is enabled.
https://es-cn- Required when the
nif201ihd0012****. co nf igT ype is
└kibanaHost String No kibana.elasticsear co llect o rElast ic
ch.aliyuncs.com:5 searchFo rKibana
601 .

Not e └ indicat es a child paramet er.

Special parameter description


ext endConf igs T here are t hree configT ype t ypes, namely, collect orT arget Inst ance,
collect orElast icsearchForKibana and collect orDeployMachine. T he deployment machines are different
and t he paramet ers t o be configured are different . T he specific combinat ion met hod is as follows:

collect orT arget Inst ance

ECS
configT ype, inst anceId, inst anceT ype, host s, userName, password, prot ocol, enableMonit oring

ACK
configT ype, inst anceId, inst anceT ype, userName, password, prot ocol, enableMonit oring

collect orElast icsearchForKibana

ECS
configT ype, inst anceId, host , kibanaHost , userName, password, prot ocol

ACK
configT ype

collect orDeployMachine
ECS

configT ype, t ype, machines, groupId


ACK

configT ype, t ype, inst anceId

Response parameters

393 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

8466BDFB-C513-
RequestId String 4B8D-B4E3- T he ID of the request.
5AB256AB****

Result Struct T he returned results.

ct-cn-
resId String T he ID of the successfully created collector.
4135is2tj194p****

Examples
Sample request s

POST /openapi/collectors HTTP/1.1 public request header {"dryrun": false, "name": "tes
t_mufei_1", "resType": "fileBeat", "resVersion": "6.8.5_with_community", "vpcId": "vpc-bp12
nu14urf0upaf*****", "collectorPaths": [ "/var/log" ], "extendConfigs": [ { "instanceId": "e
s-cn-nif201ihd0012****", "instanceType": "elasticsearch", "configType": "collectorTargetIns
tance", "hosts": [ "es-cn-nif201ihd0012****.elasticsearch.aliyuncs.com:9200" ], "userName":
"elastic", "password": "*****", "protocol": "HTTP" }, { "type": "ECSInstanceId", "configTyp
e": "collectorDeployMachine", "machines": [ { "instanceId": "i-bp11u91xgubypcuz****" } ] }
], "configs": [ { "fileName": "filebeat.yml", "content": "filebeat.inputs:xxx" }, { "fileNa
me": "fields.yml", "content": "- key: log\n title: Log file content\n description: >\n Cont
ains log file lines.\n ...." } ] }

Sample success responses


JSON format

{ "Result": { "resId": "ct-cn-4135is2tj194p****" }, "RequestId": "8466BDFB-C513-4B8D-B


4E3-5AB256AB****" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.2. DescribeCollector
call DescribeCollect or get collect or inst ance det ails of

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header

> Document Version: 20220524 394


API Reference· Beat s Elast icsearch

T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/collectors/[ResId] HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes rg31ahn82m0q T he collector instance ID.
d****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he returned results.

collectorPaths List ["/var/log"] Filebeat collection path.

Array of T he configuration file information of the


configs
configs collector.

content String fileBeat.inputs:xxx T he content of the remote file.

fileName String filebeat.yml T he name of the mezzanine file.

Whether to verify and create a collector.


T hen, you can perform the following
dryRun Boolean false operations:

true: only check and not create


false: Check and create

Array of
extendConfigs Collector expansion configuration.
extendConfigs

395 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he type of the configuration. T hen, you can


perform the following operations:

collectorT argetInstance: collector Output


collectorDeployMac collectorDeployMachine: Deployment
configT ype String
hine Machine of Collector
collector Elasticsearch ForKibana:
Elasticsearch instance information that
supports Kibana dashboards

Whether to enable Monitoring, when


co nf igT ype For co llect o rT arget Inst ance
enableMonitori When displayed. T hen, you can perform the
Boolean true following operations:
ng
true
false

default_ct-cn- machine group ID. When co nf igT ype For


groupId String
5i2l75bz4776**** co llect o rDeplo yMachine When displayed.

es-cn-
T he private network address of Kibana after
n6w1o1x0w001c****
Kibana Dashboard is enabled. When
-
host String co nf igT ype For
kibana.internal.elasti
co llect o rElast icsearchFo rKibana When
csearch.aliyuncs.co
displayed.
m:5601

["es-cn- Collector Output specifies the list of access


n6w1o1x*****.elastic addresses of the instance. When
hosts List
search.aliyuncs.com co nf igT ype For co llect o rT arget Inst ance
:9200"] When displayed.

T he instance ID associated with the


collector. When co nf igT ype For
co llect o rT arget Inst ance is the instance ID
instanceId String es-cn-n6w1o1**** of the collector Output; when co nf igT ype
For co llect o rDeplo yMachines , and t ype
For ACKClust er is the ACK (Container
Kubernetes) cluster ID.

T he instance type specified by the collector


Output. Support Elasticsearch , logstash.
instanceT ype String elasticsearch
When co nf igT ype For
co llect o rT arget Inst ance When displayed.

> Document Version: 20220524 396


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

T he Internet access address of Kibana after


https://es-cn-
Kibana Dashboard is enabled. When
nif1z89fz003i****.kib
kibanaHost String co nf igT ype For
ana.elasticsearch.ali
co llect o rElast icsearchFo rKibana When
yuncs.com:5601
displayed.

T he list of ECS machines deployed by the


Array of collector. When co nf igT ype For
machines
machines co llect o rDeplo yMachines , and t ype For
ECSInst anceId When displayed.

T he status of each collector on ECS. T hen,


you can perform the following operations:

heartOk: normal heartbeat


agentStatus String heartOk
heartLost: abnormal heartbeat
uninstalled: not installed
failed: installation failed

i-
instanceId String T he list of ECS machine IDs.
bp1gyhphjaj73jsr****

T he transmission protocol needs to be


consistent with the access protocol of the
instance specified by the collector Output.
protocol String HT T P
HT T P and HT T PS are supported. When
co nf igT ype For co llect o rT arget Inst ance
When displayed.

successPodsCo T he number of pod nodes that are


String 8
unt successfully collected in the ACK cluster.

T he number of all collected pod nodes of


totalPodsCount String 10
the ACK cluster.

T he type of machine deployed by the


collector, when co nf igT ype For
co llect o rDeplo yMachine When displayed.
type String ECSInstanceId T hen, you can perform the following
operations:

ECSInstanceId:ECS
ACKCluster: Container Kubernetes

397 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

Output specifies the user name of the


instance. T he default name is elastic. When
userName String elastic co nf igT ype For co llect o rT arget Inst ance
or co llect o rElast icsearchFo rKibana When
displayed.

2020-06-
gmtCreatedT im
String 20T 07:26:47.000+0 T he time when the collector was created.
e
000

2020-06-
gmtUpdateT im
String 20T 07:26:47.000+0 T he collector update time.
e
000

ct-cn-
name String T he name of the collector.
4135is2tj194p****

ownerId String 16852099488***** T he ID of the Alibaba Cloud account.

ct-cn-
resId String T he collector instance ID.
rg31ahn82m0qd****

T he collector type. FileBeat, metricBeat,


resT ype String fileBeat
heartBeat, and auditBeat are supported.

6.8.5_with_communi
resVersion String T he collector version.
ty

T he collector status. T hen, you can perform


the following operations:
status String active
activating: taking effect
active: has taken effect

vpc- Virtual Private Cloud ID. where the collector


vpcId String
bp16k1dvzxtma***** is located

ext endConf igs T here are 3 configT ype t ypes, namely collect orT arget Inst ance,
collect orElast icsearchForKibana and collect orDeployMachine. Different deployment machines have
different ret urned paramet ers. T he specific combinat ion met hod is as follows:
collect orT arget Inst ance

ECS
configT ype, inst anceId, inst anceT ype, host s, userName, password, prot ocol, enableMonit oring

ACK
configT ype, inst anceId, inst anceT ype, userName, password, prot ocol, enableMonit oring

> Document Version: 20220524 398


API Reference· Beat s Elast icsearch

collect orElast icsearchForKibana


ECS

configT ype, inst anceId, host , kibanaHost , userName, password, prot ocol
ACK

configT ype

collect orDeployMachine

ECS
configT ype, t ype, machines, groupId

ACK
configT ype, t ype, inst anceId, t ot alPodsCount , successPodsCount

Examples
Sample request s

GET /openapi/collectors/ct-cn-6z8b5eblvi706**** HTTP/1.1 Public Request Header

Sample success responses


JSON format

{ "name": "filebeats", "resVersion": "6.8.5_with_community", "resId": "ct-cn-6fy17c8z9


9c7i****", "resType": "fileBeat", "ownerId": "168520994880****", "status": "active", "vpcId
": "vpc-bp16k1dvzxtmagcva****", "dryRun": false, "gmtCreatedTime": "2020-11-05T12:42:47.000
+0000", "gmtUpdateTime": "2020-11-06T05:13:10.000+0000", "collectorPaths": "/var/log/*.log"
, "configs": { "fileName": "/conf/filebeat.yml", "content": "fileBeat.inputs:xxx" }, "exten
dConfigs": [ { "instanceId": "es-cn-n6w1o1x0w001c****", "configType": "collectorElasticsear
chForKibana", "host": "es-cn-n6w1o1x0w001c****-kibana.internal.elasticsearch.aliyuncs.com:5
601", "kibanaHost": "https://es-cn-n6w1o1x0w001c****.kibana.elasticsearch.aliyuncs.com:5601
", "userName": "elastic", "protocol": "HTTPS" }, { "instanceId": "es-cn-n6w1o1x0w001c****",
"instanceType": "elasticsearch", "configType": "collectorTargetInstance", "hosts": [ "es-cn
-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200", "es-cn-nif1z89fz003i****.elasticsearch
.aliyuncs.com:9200" ], "userName": "elastic", "protocol": "HTTPS", "enableMonitoring": true
}, { "machines": [ { "instanceId": "es-cn-n6w1o1x0w001c****", "agentStatus": "heartOk" }, {
"instanceId": "es-cn-nif1z89fz003i****", "agentStatus": "heartOk" } ], "type": "ECSInstance
Id", "configType": "collectorDeployMachine", "groupId": "default_ct-cn-6fy17c8z99c7i****" }
] }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.3. ReinstallCollector
Call t he Reinst allCollect or t o ret ry t he inst allat ion of t he collect or t hat was not successfully inst alled at
t he t ime of creat ion.

399 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors/[ResId]/actions/reinstall HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes l871nd0u73c45 T he collector ID.
****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- T he value of this parameter is
5718-45B5- generated by the client and is
ClientT oken String Query No
9D4D- unique among different requests.
70B3FF**** T he maximum length is 64 ASCII
characters.

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify t he informat ion of t he machine
t hat ret ries inst alling t he collect or.

Parameter T ype Required Example Description

T he ID of the ECS
instance to be
nodes List<String\> Yes ["ecs-cn-abc"] retried to install
the collector.

> Document Version: 20220524 400


API Reference· Beat s Elast icsearch

Parameter T ype Required Example Description

T he type of the
retry installation
collector.
Currently, only
nodeEcsId is
restartT ype String Yes nodeEcsId
supported,
indicating an ECS
instance.

Example:

{ "restartType": "nodeEcsId", "nodes":["i-bp1gyhphjaj73jsr****","i-bp10piq1mkfnyw9t***


*"] }

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Request result:
Result Boolean true true: T he installation is successful.
false: Installation failed

Examples
Sample request s

POST /openapi/collectors/ct-cn-l871nd0u73c45 **** /actions/reinstall HTTP/1.1 public r


equest header {"restartType": "nodeEcsId", "nodes": ["i-bp1gyhphjaj73jsr****","i-bp10piq1mk
fnyw9t****"] }

Sample success responses

JSON format

{ "Result": true, "RequestId": "F18CF67E-633D-41E8-9172-7DE08052****" }

Error codes

401 > Document Version: 20220524


Elast icsearch API Reference· Beat s

For a list of error codes, visit t he API Error Cent er .

10.4. ListCollectors
Call List Collect ors t o obt ain t he list informat ion of collect ors.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/collectors HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
resId String Query No 77uqof2s7rg5c T he collector ID.
****

collectorName
name String Query No T he name of the collector.
1

es-cn-
T he instance ID associated with the
instanceId String Query No nif1q8auz0003*
collector.
***

T he number of pages of the


returned result. Default value: 1,
page Integer Query No 1
minimum value: 1, maximum value:
200.

T he number of results per page.


size Integer Query No 10 Default value: 20, minimum value:
1, maximum value: 500.

> Document Version: 20220524 402


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

Specify the type of the machine


where the collector is deployed,
and return all types without filling
sourceT ype String Query No ECS in. Valid values:

ECS:ECS instances
ACK: Container Kubernetes
cluster

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 5 T he number of returned records.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Array of Result T he return results.

collectorPaths List ["/var/log"] T he acquisition path of Filebeat.

T he configuration file information of the


Array of
configs collector.
configs

- key: log\n title:


Log file content\n
content String description: >\n T he content of the remote file.
Contains log file
lines.\n ....

fileName String fields.yml T he name of the mezzanine file.

Whether to verify and create a collector.


T hen, you can perform the following
dryRun Boolean false operations:

true: only check and not create


false: Check and create

403 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

Array of
extendConfigs T he extended parameter information.
extendConfigs

T he type of the configuration. T hen, you can


perform the following operations:

collectorT argetInstance: collector Output


collectorDeployMac collectorDeployMachine: Deployment
configT ype String
hine Machine of Collector
collector Elasticsearch ForKibana:
Elasticsearch instance information that
supports Kibana dashboards

Whether to enable Monitoring, when


co nf igT ype For co llect o rT arget Inst ance
, and inst anceT ype For elast icsearch
When displayed. T hen, you can perform the
enableMonitori following operations:
Boolean true
ng true
false

default_ct-cn- machine group ID. When co nf igT ype For


groupId String
5i2l75bz4776**** co llect o rDeplo yMachine When displayed.

es-cn-
T he private network access address of
n6w1o1x0w001c****
Kibana after Kibana Dashboard is enabled.
-
host String When co nf igT ype For
kibana.internal.elasti
co llect o rElast icsearchFo rKibana When
csearch.aliyuncs.co
displayed.
m:5601

["es-cn- Collector Output specifies the list of access


n6w1o1x*****.elastic addresses of the instance. When
hosts List
search.aliyuncs.com co nf igT ype For co llect o rT arget Inst ance
:9200"] When displayed.

T he instance ID associated with the


collector. When co nf igT ype For
co llect o rT arget Inst ance is the instance ID
es-cn-
instanceId String of the collector Output; when co nf igT ype
nif1z89fz003i****
For co llect o rDeplo yMachines , and t ype
For ACKClust er is the ACK (Container
Kubernetes) cluster ID.

> Document Version: 20220524 404


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

T he instance type specified by the collector


Output. Support Elasticsearch , logstash.
instanceT ype String elasticsearch
When co nf igT ype For
co llect o rT arget Inst ance When displayed.

T he Internet access address of Kibana after


https://es-cn-
Kibana Dashboard is enabled. When
nif1z89fz003i****.kib
kibanaHost String co nf igT ype For
ana.elasticsearch.ali
co llect o rElast icsearchFo rKibana When
yuncs.com:5601
displayed.

T he list of ECS machines deployed by the


Array of collector. When co nf igT ype For
machines
machines co llect o rDeplo yMachines , and t ype For
ECSInst anceId When displayed.

T he status of each collector on ECS. T hen,


you can perform the following operations:

heartOk: normal heartbeat


agentStatus String heartOk
heartLost: abnormal heartbeat
uninstalled: not installed
failed: installation failed

i-
instanceId String bp13y63575oypr9d* T he list of ECS machine IDs.
***

T he transmission protocol needs to be


consistent with the access protocol of the
instance specified by the collector Output.
protocol String HT T P
HT T P and HT T PS are supported. When
co nf igT ype For co llect o rT arget Inst ance
When displayed.

T he number of all successfully collected pod


successPodsCo nodes of the ACK cluster. When co nf igT ype
String 8
unt For co llect o rDeplo yMachines , and t ype
For ACKClust er When displayed.

T he number of all collected pod nodes of


the ACK cluster. When co nf igT ype For
totalPodsCount String 10
co llect o rDeplo yMachines , and t ype For
ACKClust er When displayed.

405 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he type of machine deployed by the


collector, when co nf igT ype For
co llect o rDeplo yMachine When displayed.
type String ECSInstanceId T hen, you can perform the following
operations:

ECSInstanceId:ECS
ACKCluster: Container Kubernetes

Output specifies the user name of the


instance. T he default name is elastic. When
userName String elastic co nf igT ype For co llect o rT arget Inst ance
or co llect o rElast icsearchFo rKibana When
displayed.

2020-08-
gmtCreatedT im
String 18T 02:06:12.000+0 T he time when the collector was created.
e
000

2020-08-
gmtUpdateT im
String 18T 09:40:43.000+0 T he collector update time.
e
000

name String FileBeat001 T he name of the collector.

ownerId String 168520994880**** T he ID of the Alibaba Cloud account.

ct-cn-
resId String T he collector instance ID.
0v3xj86085dvq****

T he collector type. FileBeat, metricBeat,


resT ype String fileBeat
heartBeat, and auditBeat are supported.

6.8.5_with_communi
resVersion String T he collector version.
ty

T he collector status. T hen, you can perform


the following operations:
status String active
activating: taking effect
active: has taken effect

vpc- Virtual Private Cloud ID. where the collector


vpcId String
bp16k1dvzxtma***** is located

> Document Version: 20220524 406


API Reference· Beat s Elast icsearch

ext endConf igs T here are 3 configT ype t ypes, namely collect orT arget Inst ance,
collect orElast icsearchForKibana and collect orDeployMachine. Different deployment machines have
different ret urned paramet ers. T he specific combinat ion met hod is as follows:

collect orT arget Inst ance


ECS

configT ype, inst anceId, inst anceT ype, host s, userName, password, prot ocol, enableMonit oring
ACK
configT ype, inst anceId, inst anceT ype, userName, password, prot ocol, enableMonit oring

collect orElast icsearchForKibana


ECS

configT ype, inst anceId, host , kibanaHost , userName, password, prot ocol
ACK

configT ype

collect orDeployMachine

ECS
configT ype, t ype, machines, groupId

ACK
configT ype, t ype, inst anceId, t ot alPodsCount , successPodsCount

Examples
Sample request s

GET /openapi/collectors?resId=ct-cn-77uqof2s7rg5c ****&page=1&size=10&sourceType=ECS H


TTP/1.1 public request header

Sample success responses


JSON format

407 > Document Version: 20220524


Elast icsearch API Reference· Beat s

{ "Result": [ { "gmtCreatedTime": "2020-11-05T12:42:47.000+0000", "gmtUpdateTime": "20


20-11-06T06:06:20.000+0000", "name": "fileBeatOnACK", "resId": "ct-cn-6fy17c8z99c7i****", "
resVersion": "6.8.5_with_community", "vpcId": "vpc-bp16k1dvzxtmagcva****", "resType": "file
Beat", "ownerId": "168520994880****", "configs": [ { "fileName": "logCollector.yml" }, { "f
ileName": "Name of index management policy 1" }, { "fileName": "Name of Index Management Po
licy 2" } ], "status": "active", "extendConfigs": [ { "configType": "collectorTargetInstanc
e", "instanceId": "es-cn-n6w1o1x0w001c****", "instanceType": "elasticsearch", "hosts": [ "e
s-cn-n6w1o1x0w001c****.elasticsearch.aliyuncs.com:9200" ], "protocol": "HTTP", "userName":
"elastic", "enableMonitoring": false }, { "configType": "collectorDeployMachine", "type": "
ACKCluster", "instanceId": "c1b9fde5172b84f82b9928e825a7b****" }, { "configType": "collecto
rElasticsearchForKibana", "instanceId": "es-cn-n6w1o1x0w001c****", "host": "es-cn-n6w1o1x0w
001c****-kibana.internal.elasticsearch.aliyuncs.com:5601", "protocol": "HTTPS", "kibanaHost
": "https://es-cn-n6w1o1x0w001c****.kibana.elasticsearch.aliyuncs.com:5601", "userName": "e
lastic" } ], "dryRun": false }, { "gmtCreatedTime": "2020-09-25T10:27:02.000+0000", "gmtUpd
ateTime": "2020-09-25T10:27:02.000+0000", "name": "fileBeatOnECS", "resId": "ct-cn-6cro0lb0
dn66c****", "resVersion": "6.8.5_with_community", "vpcId": "vpc-bp12nu14urf0upaf4****", "re
sType": "fileBeat", "ownerId": "168520994880****", "collectorPaths": [ "/var/log/" ], "conf
igs": [ { "fileName": "fields.yml" }, { "fileName": "filebeat.yml" } ], "status": "active",
"extendConfigs": [ { "configType": "collectorTargetInstance", "instanceId": "ls-cn-v0h1kzca
****", "instanceType": "logstash", "hosts": [ "10.7.xx.xx:8007" ], "protocol": "HTTP", "ena
bleMonitoring": false }, { "configType": "collectorDeployMachine", "type": "ECSInstanceId",
"machines": [ { "instanceId": "i-bp13y63575oypr9d****", "agentStatus": "heartOk" } ], "grou
pId": "default_ct-cn-6cro0lb0dn66c****" } ], "dryRun": false } ], "RequestId": "70338AB9-23
1F-412B-A8C0-239CD32F****", "Headers": { "X-Total-Count": 2 } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.5. ListDefaultCollectorConfigurations
Call t he List Default Collect orConfigurat ions t o obt ain t he default configurat ion file of t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/beats/default-configurations HTTP/1.1

Request parameters

> Document Version: 20220524 408


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T he collector type. Valid values:

fileBeat
resT ype String Query Yes fileBeat metricBeat
heartBeat
auditBeat

T he collector version. T he type of


machine deployed by the collector
is different, and the optional
6.8.5_with_com version is also different. T he
resVersion String Query Yes
munity specific description is as follows:

ECS:6.8.5_with_community
ACK:6.8.13_with_community

Specifies the type of the collector


to deploy the machine, and returns
all if not. Valid values:
sourceT ype String Query No ECS
ECS:ECS server
ACK: Container Kubernetes
cluster

Response parameters

Parameter T ype Example Description

8BAE3C32-8E4A-
RequestId String 47D6-B4B0- T he ID of the request.
95B5DE643BF5

Result Array of Result T he return results.

- key: log\n title:


Log file content\n
description: >\n
content String T he configuration file content.
Contains log file
lines.\n fields:\n
......

fileName String fields.yml T he name of the configuration file.

Examples
Sample request s

409 > Document Version: 20220524


Elast icsearch API Reference· Beat s

GET /openapi/beats/default-configurations?ResVersion=6.8.5 _with_community&resType=fil


eBeat&sourceType=ECS HTTP/1.1 public request header

Sample success responses

JSON format

{ "Result": [ { "fileName": "fields.yml", "content": "- key: log\n title: Log file con
tent\n description: >\n Contains log file lines.\n fields:\n ......" }, { "fileName": "file
beat.yml", "content": "###################### Filebeat Configuration Example ##############
###########\n\n# This file is an example configuration file ......" } ], "RequestId": "8BAE
3C32-8E4A-47D6-B4B0-95B5DE643BF5" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.6. UpdateCollectorName
Call t he Updat eCollect orName t o modify t he name of t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors/[ResId]/actions/rename HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 77uqof2s7rg5c T he collector ID.
****

> Document Version: 20220524 410


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify t he name of t he modified
collect or.

Parameter T ype Required Example Description

T he name of the
name String Yes collectorName1 modified
collector.

Example:

{ "name": "collectorName1" }

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Result Struct T he returned results.

T he fileBeat collection path. It is displayed


collectorPaths List ["/var/log"] when the deployment machine of the
collector is ECS.

Array of T he configuration file information of the


configs
configs collector.

411 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

- key: log\n title:


Log file content\n
content String description: >\n T he content of the remote file.
Contains log file
lines.\n ....

fileName String fields.yml T he name of the file.

Whether to verify and create a collector.


T hen, you can perform the following
dryRun Boolean false operations:

true: only check and not update


false: Check and update

Array of
extendConfigs Collector expansion configuration.
extendConfigs

T he type of the configuration. T hen, you can


perform the following operations:

collectorT argetInstance: collector Output


collectorDeployMac collectorDeployMachine: Deployment
configT ype String
hine Machine of Collector
collector Elasticsearch ForKibana:
Elasticsearch instance information that
supports Kibana dashboards

Whether to enable Monitoring. When


co nf igT ype For co llect o rT arget Inst ance
, and inst anceT ype For elast icsearch
enableMonitori When displayed. T hen, you can perform the
Boolean true
ng following operations:

true
false

default_ct-cn- machine group ID. When co nf igT ype For


groupId String
5i2l75bz4776**** co llect o rDeplo yMachine When displayed.

es-cn- T he private network access address of


4591jumei000u****- Kibana after Kibana Dashboard is enabled.
host String kibana.internal.elasti When co nf igT ype For
csearch.aliyuncs.co co llect o rElast icsearchFo rKibana When
m:5601 displayed.

> Document Version: 20220524 412


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

["es-cn- Collector Output specifies the list of access


n6w1o1x*****.elastic addresses of the instance. When
hosts List
search.aliyuncs.com co nf igT ype For co llect o rT arget Inst ance
:9200"] When displayed.

T he instance ID associated with the


collector. When co nf igT ype For
co llect o rT arget Inst ance is the instance ID
instanceId String es-cn-n6w1o1****
of the collector Output; when co nf igT ype
For co llect o rDeplo yMachines , and t ype
For ACKClust er is the ACK cluster ID.

T he instance type specified by the collector


Output. Support: Elasticsearch, logstash.
instanceT ype String elasticsearch
When co nf igT ype For
co llect o rT arget Inst ance When displayed.

T he Internet access address of Kibana after


https://es-cn-
Kibana Dashboard is enabled. When
4591jumei000u****.ki
kibanaHost String co nf igT ype For
bana.elasticsearch.a
co llect o rElast icsearchFo rKibana When
liyuncs.com:5601
displayed.

T he list of ECS machines deployed by the


Array of collector. When co nf igT ype For
machines
machines co llect o rDeplo yMachines , and t ype For
ECSInst anceId When displayed.

T he status of each collector on ECS. T hen,


you can perform the following operations:
agentStatus String heartOk heart Ok (normal heartbeat), heart Lo st
(abnormal heartbeat), uninst alled (not
installed) and f ailed (Installation failed).

c1b9fde5172b84f82
instanceId String T he list of ECS machine IDs.
b9928e825a7b8988

T ransport protocol, supported HT T P ,


protocol String HT T P
HT T PS .

T he number of all successfully collected pod


successPodsCo nodes of the ACK cluster. When co nf igT ype
String 8
unt For co llect o rDeplo yMachines , and t ype
For ACKClust er When displayed.

413 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he number of all collected pod nodes of


the ACK cluster. When co nf igT ype For
totalPodsCount String 10
co llect o rDeplo yMachines , and t ype For
ACKClust er When displayed.

T he type of machine deployed by the


collector, when co nf igT ype For
co llect o rDeplo yMachine When displayed.
T hen, you can perform the following
operations:

type String ECSInstanceId ECSInstanceId:ECS instance


ACKCluster: the container Kubernetes
cluster

Output specifies the user name of the


instance. T he default name is elastic. When
userName String elastic co nf igT ype For co llect o rT arget Inst ance
or co llect o rElast icsearchFo rKibana When
displayed.

2020-06-
gmtCreatedT im
String 20T 07:26:47.000+0 T he time when the collector was created.
e
000

2020-06-
gmtUpdateT im
String 20T 07:26:47.000+0 T he collector update time.
e
000

name String ct-test T he name of the collector.

ownerId String 16852099488***** T he ID of the Alibaba Cloud account.

ct-cn-
resId String T he collector instance ID.
77uqof2s7rg5c****

T he collector type, which supports fileBeat,


resT ype String fileBeat
metricBeat, heartBeat, and audiBeat.

> Document Version: 20220524 414


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

T he collector version. T he supported


versions are related to the deployment
6.8.5_with_communi machine type of the collector, as follows:
resVersion String
ty
ECS:6.8.5_with_community
ACK:6.8.13_with_community

T he collector status. Activing (in effect) and


status String active
active (in effect) are supported.

vpc- Virtual Private Cloud ID. where the collector


vpcId String
bp16k1dvzxtma***** is located

Examples
Sample request s

POST /openapi/collectors/ct-cn-77uqof2s7rg5c **** /actions/rename HTTP/1.1 public requ


est header {"name": "collectorName1" }

Sample success responses

JSON format

{ "Result": { "gmtCreatedTime": "2021-01-14T08:54:42.000+0000", "gmtUpdateTime": "2021


-01-18T03:59:20.140+0000", "name": "API_test", "resId": "ct-cn-tfv81t7vs8608****", "resVers
ion": "6.8.5_with_community", "vpcId": "vpc-bp12nu14urf0upaf4****", "resType": "fileBeat",
"ownerId": "168520994880****", "collectorPaths": [ "/opt/test/logs/" ], "configs": [ { "fil
eName": "fields.yml", "content": "- key: log\n title: Log file content\n description: >\n C
ontains log file lines.\n fields:\n ......" }, { "fileName": "filebeat.yml", "content": "##
#################### Filebeat Configuration Example #########################\n\n# This fil
e is an example configuration file ......" } ], "status": "active", "extendConfigs": [ { "c
onfigType": "collectorTargetInstance", "instanceId": "es-cn-nif201ihd0012****", "instanceTy
pe": "elasticsearch", "hosts": [ "es-cn-nif201ihd0012****.elasticsearch.aliyuncs.com:9200"
], "protocol": "HTTP", "userName": "elastic", "enableMonitoring": false }, { "configType":
"collectorDeployMachine", "type": "ECSInstanceId", "machines": [ { "instanceId": "i-bp11u91
xgubypcuz****", "agentStatus": "heartOk" } ], "groupId": "default_ct-cn-tfv81t7vs8608****"
} ], "dryRun": false }, "RequestId": "9B2BD604-3B93-4F66-91F0-43B4D2D268FF" }

Error codes
For a list of error codes, visit t he Error Cent er .

10.7. UpdateCollector
Call t he Updat eCollect or t o updat e t he collect or inst ance informat ion.

415 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
PUT /openapi/collectors/[ResId] HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 77uqof2s7rg5c T he collector instance ID.
****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify t he configurat ion informat ion
of t he collect or t o be updat ed.

HT T P status code T ype Required Example Description

Whether to verify
and update the
collector. Optional
values: true (only
dryRun boolean Yes false
check but not
update), false
(check and
update).

> Document Version: 20220524 416


API Reference· Beat s Elast icsearch

HT T P status code T ype Required Example Description

T he name of the
name String Yes ct-test
collector.

T he collector
status. Optional
status String Yes activing values: active (in
effect) and active
(in effect).

T he collector
type. Optional
values: fileBeat,
resT ype String Yes fileBeat
metricBeat,
heartBeat,
auditBeat.

Virtual Private
vpc-
Cloud ID. where
vpcId String Yes bp16k1dvzxtma**
the collector is
***
located

6.8.5_with_comm T he collector
resVersion String Yes
unity version.

T he ID of the
ownerId String Yes 16852099488***** Alibaba Cloud
account.

2020-06- T he time when


gmtCreatedT ime Date Yes 20T 07:26:47.000+ the collector was
0000 created.

2020-06-
T he collector
gmtUpdateT ime Date Yes 20T 07:26:47.000+
update time.
0000

Filebeat collection
collectorPaths List<String> No ["/var/log"]
path.

T he configuration
configs List Yes file information of
the collector.

417 > Document Version: 20220524


Elast icsearch API Reference· Beat s

HT T P status code T ype Required Example Description

T he name of the
└fileName String Yes filebeat.yml
mezzanine file.

"filebeat.inputs:xx T he content of
└content String Yes
x" the remote file.

Collector
extendConfigs Array Yes expansion
configuration.

T he type of the
configuration.
Optional values:
collectorT argetIns
tance (collector
Output),
collectorDeployMa
chine (collector's
deployment
machine),
collector
Elasticsearch
ForKibana
(Elasticsearch
instance
information
supporting Kibana
collectorElasticsea dashboard).
└configT ype String Yes
rchForKibana

> Document Version: 20220524 418


API Reference· Beat s Elast icsearch

HT T P status code T ype Required Example Description

T he type of
machine that the
collector is
deployed.
Optional values:
ECSInstanceId(ECS)
└type String Yes ECSInstanceId , ACKCluster
(Container
Kubernetes).
Required when the
co nf igT ype is
co llect o rDeplo y
Machine .

T he list of ECS
machines
deployed by the
collector.
An array of node Required when the
└machines Array
roles. co nf igT ype is
co llect o rDeplo y
Machines and the
t ype is
ECSInst anceId .

i-
T he list of ECS
└└instanceId String No bp13y63575oypr9
machine IDs.
d****

T he status of
each collector on
ECS. Optional
values: heartOk
(normal
heartbeat),
└└agentStatus String No failed heartLost
(abnormal
heartbeat),
uninstalled (not
installed), failed
(installation
failed).

419 > Document Version: 20220524


Elast icsearch API Reference· Beat s

HT T P status code T ype Required Example Description

T he ID of the host
group. Required
default_ct-cn- when the
└groupId String
5i2l75bz4776**** co nf igT ype is
co llect o rDeplo y
Machine .

T he instance ID
associated with
the collector.
When the
co nf igT ype is
co llect o rT arget I
nst ance , the
es-cn- instance ID of
└instanceId String Yes
nif1z89fz003i**** collector Output;
When the
co nf igT ype is
co llect o rDeplo y
Machines and the
t ype is
ACKClust er , it is
ACK cluster ID.

T he transmission
protocol needs to
be consistent with
the access
protocol of the
instance specified
by the collector
└protocol String Yes HT T P
Output. Optional
values HT T P and
HT T PS. Required
when the
co nf igT ype is
co llect o rT arget I
nst ance .

> Document Version: 20220524 420


API Reference· Beat s Elast icsearch

HT T P status code T ype Required Example Description

Output specifies
the user name of
the instance. T he
default name is
elastic. Required
when the
co nf igT ype is
co llect o rT arget I
nst ance or
co llect o rElast ic
searchFo rKibana
└userName String Yes elastic
.

Whether to enable
Monitoring is
required when the
co nf igT ype is
co llect o rT arget I
└enableMonitorin nst ance and the
Boolean Yes true
g inst anceT ype is
Elast icsearch.
Optional values:
true (enabled) and
false (not
enabled).

Collector Output
specifies the list
of access
["es-cn-
addresses of the
n6w1o1x*****.elas
└hosts List<String> No instance. Required
ticsearch.aliyuncs.
when the
com:9200"]
co nf igT ype is
co llect o rT arget I
nst ance .

421 > Document Version: 20220524


Elast icsearch API Reference· Beat s

HT T P status code T ype Required Example Description

T he instance type
specified by the
collector Output.
Optional value:
Elasticsearch ,
└instanceT ype String Yes elasticsearch
logstash. Required
when the
co nf igT ype is
co llect o rT arget I
nst ance .

T he private
network access
address of Kibana
es-cn-
after Kibana
n6w1o1x0w001c**
Dashboard is
**-
└host String No enabled. Required
kibana.internal.ela
when the
sticsearch.aliyuncs
co nf igT ype is
.com:5601
co llect o rElast ic
searchFo rKibana
.

T he Internet
access address of
Kibana after
Kibana Dashboard
https://es-cn-
is enabled.
nif1z89fz003i****.
└kibanaHost String No kibana.elasticsear Required when the
ch.aliyuncs.com:5 co nf igT ype is
601 co llect o rElast ic
searchFo rKibana
.

Not e └ indicat es a child paramet er.

Special parameter description


ext endConf igs T here are t hree configT ype t ypes, namely, collect orT arget Inst ance,
collect orElast icsearchForKibana and collect orDeployMachine. T he deployment machines are different
and t he paramet ers t o be configured are different . T he specific combinat ion met hod is as follows:

collect orT arget Inst ance


ECS

configT ype, inst anceId, inst anceT ype, host s, userName, password, prot ocol, enableMonit oring

> Document Version: 20220524 422


API Reference· Beat s Elast icsearch

ACK
configT ype, inst anceId, inst anceT ype, userName, password, prot ocol, enableMonit oring

collect orElast icsearchForKibana


ECS

configT ype, inst anceId, host , kibanaHost , userName, password, prot ocol
ACK

configT ype

collect orDeployMachine
ECS

configT ype, t ype, machines, groupId


ACK

configT ype, t ype, inst anceId, t ot alPodsCount , successPodsCount

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Struct T he returned results.

collectorPaths List ["/var/log"] T he acquisition path of Filebeat.

Array of T he configuration file information of the


configs
configs collector.

content String filebeat.inputs:xxx File content

fileName String filebeat.yml File Name

Whether to verify and create a collector.


T hen, you can perform the following
dryRun Boolean false operations:

true: only check and not create


false: Check and create

Array of
extendConfigs T he extended parameter information.
extendConfigs

423 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he type of the configuration. T hen, you can


perform the following operations:

collectorT argetInstance: collector Output


collectorDeployMac collectorDeployMachine: Deployment
configT ype String
hine Machine of Collector
collector Elasticsearch ForKibana:
Elasticsearch instance information that
supports Kibana dashboards

Whether to enable Monitoring, when


co nf igT ype For co llect o rT arget Inst ance
, and inst anceT ype For elast icsearch
When displayed. T rue (enabled) and false
enableMonitori (not enabled) are supported.
Boolean true
ng

default_ct-cn- machine group ID. When co nf igT ype For


groupId String
5i2l75bz4776**** co llect o rDeplo yMachine When displayed.

T he private network access address of


es-cn- Kibana after Kibana Dashboard is enabled.
n6w1o1x0w001c**** When co nf igT ype For
- co llect o rElast icsearchFo rKibana When
host String
kibana.internal.elasti displayed.
csearch.aliyuncs.co
m:5601

["es-cn- Collector Output specifies the list of access


n6w1o1x*****.elastic addresses of the instance. When
hosts List
search.aliyuncs.com co nf igT ype For co llect o rT arget Inst ance
:9200"] When displayed.

T he instance ID associated with the


collector. When co nf igT ype For
co llect o rT arget Inst ance is the instance ID
es-cn-
instanceId String of the collector Output; when co nf igT ype
nif1z89fz003i****
For co llect o rDeplo yMachines , and t ype
For ACKClust er is the ACK (Container
Kubernetes) cluster ID.

> Document Version: 20220524 424


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

T he instance type specified by the collector


Output. Support Elasticsearch , logstash.
instanceT ype String elasticsearch
When co nf igT ype For
co llect o rT arget Inst ance When displayed.

T he Internet access address of Kibana after


https://es-cn-
Kibana Dashboard is enabled. When
nif1z89fz003i****.kib
kibanaHost String co nf igT ype For
ana.elasticsearch.ali
co llect o rElast icsearchFo rKibana When
yuncs.com:5601
displayed.

Array of collectorDeployMachine type specific:


machines
machines Deploy ECS machine /ACK cluster information

T he status of each collector on ECS. T hen,


you can perform the following operations:

heartOk: normal heartbeat


agentStatus String heartOk
heartLost: abnormal heartbeat
uninstalled: not installed
failed: installation failed

i-
instanceId String bp13y63575oypr9d* T he list of ECS machine IDs.
***

T he transmission protocol needs to be


consistent with the access protocol of the
instance specified by the collector Output.
protocol String HT T P
HT T P and HT T PS are supported. When
co nf igT ype For co llect o rT arget Inst ance
When displayed.

T he number of all successfully collected pod


successPodsCo nodes of the ACK cluster. When co nf igT ype
String 8
unt For co llect o rDeplo yMachines , and t ype
For ACKClust er When displayed.

T he number of all collected pod nodes of


the ACK cluster. When co nf igT ype For
totalPodsCount String 10
co llect o rDeplo yMachines , and t ype For
ACKClust er When displayed.

425 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he type of machine deployed by the


collector, when co nf igT ype For
co llect o rDeplo yMachine When displayed.
type String ECSInstanceId T hen, you can perform the following
operations:

ECSInstanceId: ECS
ACKCluster: Container Kubernetes

Output specifies the user name of the


instance. T he default name is elastic. When
userName String elastic co nf igT ype For co llect o rT arget Inst ance
or co llect o rElast icsearchFo rKibana When
displayed.

2020-06-
gmtCreatedT im
String 20T 07:26:47.000+0 T he time when the collector was created.
e
000

2020-06-
gmtUpdateT im
String 20T 07:26:47.000+0 T he collector update time.
e
000

name String ct-test T he name of the collector.

ownerId String 16852099488***** T he ID of the Alibaba Cloud account.

ct-cn-
resId String T he collector instance ID.
0v3xj86085dvq****

T he collector type. FileBeat, metricBeat,


resT ype String fileBeat
heartBeat, and auditBeat are supported.

6.8.5_with_communi
resVersion String T he collector version.
ty

T he collector status. T hen, you can perform


the following operations:
status String active
activating: taking effect
active: has taken effect

vpc- Virtual Private Cloud ID. where the collector


vpcId String
bp16k1dvzxtma***** is located

Examples

> Document Version: 20220524 426


API Reference· Beat s Elast icsearch

Sample request s

PUT /openapi/collectors/ct-cn-77uqof2s7rg5c**** HTTP/1.1 public request header {"dryru


n": false, "name": "fileBeat", "resVersion": "6.8.5_with_community", "extendConfigs": [ { "
instanceId": "es-cn-sfd", "configType": "collectorElasticsearchForKibana", "hosts": [ "es-c
n-abc.elasticsearch.aliyuncs.com:9200", "es-cn-abd.elasticsearch.aliyuncs.com:9200" ], "use
rName": "elastic", "password": "******", "protocol": "https" }, { "instanceId": "ec-cn-targ
", "instanceType": "elasticsearch", "configType": "collectorTargetInstance", "hosts": [ "es
-cn-abc.elasticsearch.aliyuncs.com:9200", "es-cn-abd.elasticsearch.aliyuncs.com:9200" ], "u
serName": "elastic", "password": "******", "protocol": "https" }, { "values": [ { "instance
Id": "id1" }, { "instanceId": "id2" } ], "type": "ECSInstanceId", "configType": "collectorD
eployMachine" } ], "resType": "fileBeat", "vpcId": "vpc-cn-abc", "configs": [ { "fileName":
"filebeat.yml", "content": "filebeat.inputs:xxx" } ] }

Sample success responses


JSON format

{ "RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1D***", "Result": { "configs": { "fileN


ame": "filebeat.yml", "content": "filebeat.inputs:xxx" }, "dryRun": false, "resType": "file
Beat", "ownerId": "16852099488*****", "resId": "ct-cn-0v3xj86085dvq****", "collectorPaths":
["/var/log"], "gmtUpdateTime": "2020-06-20T07:26:47.000+0000", "extendConfigs": [ { "enable
Monitoring": true, "groupId": "default_ct-cn-5i2l75bz4776****", "instanceType": "elasticsea
rch", "type": "ECSInstanceId", "userName": "elastic", "configType": "collectorDeployMachine
", "protocol": "HTTP", "instanceId": "es-cn-nif1z89fz003i****", "host": "es-cn-n6w1o1x0w001
c****-kibana.internal.elasticsearch.aliyuncs.com:5601", "kibanaHost": "https://es-cn-nif1z8
9fz003i****.kibana.elasticsearch.aliyuncs.com:5601", "totalPodsCount": 10, "successPodsCoun
t": 8 }, { "machines": { "agentStatus": "heartOk", "instanceId": "i-bp13y63575oypr9d****" }
}, { "hosts": ["es-cn-n6w1o1x*****.elasticsearch.aliyuncs.com:9200"] } ], "resVersion": "6.
8.5_with_community", "vpcId": "vpc-bp16k1dvzxtma*****", "name": "ct-test", "gmtCreatedTime"
: "2020-06-20T07:26:47.000+0000", "status": "active" } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.8. StartCollector
Call St art Collect or t o st art t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

427 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Request structure
POST /openapi/collectors/[ResId]/actions/start HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 77uqof2s7rg5c T he collector ID.
****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Indicates whether SQL audit was disabled for


Result Boolean true
the DRDS database.

Examples
Sample request s

POST /openapi/collectors/ct-cn-77uqof2s7rg5c **** /actions/start HTTP/1.1 public reque


st header

Sample success responses


JSON format

{ "Result": true, "RequestId": "75B1A9CE-F8D5-4BA2-9D24-E92137C6****" }

Error codes

> Document Version: 20220524 428


API Reference· Beat s Elast icsearch

For a list of error codes, visit t he API Error Cent er .

10.9. RestartCollector
Call t he Rest art Collect or t o rest art t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors/[ResId]/actions/restart HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 77uqof2s7rg5c T he collector instance ID.
****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

Response parameters

Parameter T ype Example Description

84B4038A-AF38-
RequestId String 4BF4-9FAD- T he ID of the request.
EA92A4FFF00A

T he returned result supports:


Result Boolean true true: T he restart is successful.
false: Restart failed

429 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Examples
Sample request s

POST /openapi/collectors/ct-cn-tfv81t7vs8608 **** /actions/restart HTTP/1.1 public req


uest header

Sample success responses

JSON format

{ "Result": true, "RequestId": "84B4038A-AF38-4BF4-9FAD-EA92A4FFF00A" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.10. StopCollector
Call St opCollect or t o st op t he running collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors/[ResId]/actions/stop HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 77uqof2s7rg5c T he collector ID.
****

> Document Version: 20220524 430


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

Indicates whether SQL audit was disabled for


Result Boolean true
the DRDS database.

Examples
Sample request s

POST /openapi/collectors/ct-cn-77uqof2s7rg5c **** /actions/stop HTTP/1.1 public reques


t header

Sample success responses


JSON format

{ "Result": true, "RequestId": "7A29449F-A241-4A5D-92B5-B1ABA4F5****" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.11. DeleteCollector
Call t he Delet eCollect or t o delet e t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

431 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
DELETE /openapi/collectors/[ResId] HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes 92z1h38882dal T he collector ID.
****

T his parameter is used to ensure


the idempotence of the request.
T he value of this parameter is
generated by the client and is
unique among different requests.
5A2CFF0E- T he maximum length is 64 ASCII
5718-45B5- characters.
ClientT oken String Query No
9D4D-
70B3FF****

Response parameters

Parameter T ype Example Description

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1****

T he following result is returned:


Result Boolean true true: Delete successfully
false: Delete failed

Examples
Sample request s

> Document Version: 20220524 432


API Reference· Beat s Elast icsearch

DELETE /openapi/collectors/ct-cn-77uqof2s7rg5c**** HTTP/1.1 public request header

Sample success responses


JSON format

{ "Result": true, "RequestId": "1A8571CF-8591-485B-AE44-131C49DC****" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.12. ECS-based deployment


10.12.1. ListEcsInstances
Call t he List EcsInst ances t o obt ain t he ECS machine list .

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/ecs HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T he number of returned result


page Integer Query No 1
pages.

T he number of results that each


size Integer Query No 10
page contains.

433 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Positi Require
Parameter T ype Example Description
on d

["i- T he ID of ECS instance N. T he value


bp13y63575oy can be a JSON array that consists of
ecsInstanceIds String Query No pr9d****","i- up to 100 instance IDs. Separate
bp1gyhphjaj73j multiple instance IDs with commas
sr****"] (,).

ecsInstanceNa
String Query No test T he ECS instance name.
me

T he ECS instance tag, which must


[{ contain:
tags String Query No "tagKey":"a","t
agValue":"b"}] tagKey: tag key
tagValue: the tag value

vpc-
T he ID of the VPC where the ECS
vpcId String Query No bp16k1dvzxtm
instance is located.
agcva****

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 11 T he number of returned records.

5FFD9ED4-C2EC-
RequestId String 4E89-B22B- T he ID of the request.
1ACB6FE1D***

Result Array of Result T he return results.

Cloud Assistant installation status, support:


cloudAssistant
String true true: Installed
Status
false: not installed

Array of T he list of collector information on the ECS


collectors
collectors instance.

collectorPaths List ["/var/log"] T he acquisition path of Filebeat.

> Document Version: 20220524 434


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

Array of T he configuration file information of the


configs
configs collector.

- key: log\n title:


Log file content\n
content String description: >\n T he content of the remote file.
Contains log file
lines.\n ....

fileName String fields.yml T he name of the mezzanine file.

Whether to verify and create a collector.


T hen, you can perform the following
dryRun Boolean false operations:

true: only check and not create


false: Check and create

Array of
extendConfigs T he extended parameter information.
extendConfigs

T he type of the configuration. T hen, you can


perform the following operations:

collectorT argetInstance: collector Output


collectorDeployMac collectorDeployMachine: Deployment
configT ype String
hine Machine of Collector
collector Elasticsearch ForKibana:
Elasticsearch instance information that
supports Kibana dashboards

Whether to enable Monitoring, when


co nf igT ype For co llect o rT arget Inst ance
, and inst anceT ype For elast icsearch
enableMonitori When displayed. T hen, you can perform the
Boolean true
ng following operations:

true
false

default_ct-cn- machine group ID. When co nf igT ype For


groupId String
5i2l75bz4776**** co llect o rDeplo yMachine When displayed.

["es-cn- Collector Output specifies the list of access


n6w1o1x*****.elastic addresses of the instance. When
hosts List
search.aliyuncs.com co nf igT ype For co llect o rT arget Inst ance
:9200"] When displayed.

435 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

T he instance ID associated with the


collector. When co nf igT ype For
co llect o rT arget Inst ance is the instance ID
es-cn-
instanceId String of the collector Output; when co nf igT ype
nif1z89fz003i****
For co llect o rDeplo yMachines , and t ype
For ACKClust er is the ACK (Container
Kubernetes) cluster ID.

T he instance type specified by the collector


Output. Support Elasticsearch, logstash.
instanceT ype String elasticsearch
When co nf igT ype For
co llect o rT arget Inst ance When displayed.

T he list of ECS machines deployed by the


Array of collector. When co nf igT ype For
machines
machines co llect o rDeplo yMachines , and t ype For
ECSInst anceId When displayed.

T he status of each collector on ECS. T hen,


you can perform the following operations:

heartOk: normal heartbeat


agentStatus String heartOk or failed
heartLost: abnormal heartbeat
uninstalled: not installed
failed: installation failed

i-
instanceId String bp13y63575oypr9d* T he list of ECS machine IDs.
***

T he transmission protocol needs to be


consistent with the access protocol of the
instance specified by the collector Output.
protocol String HT T P
HT T P and HT T PS are supported. When
co nf igT ype For co llect o rT arget Inst ance
When displayed.

T he type of machine deployed by the


collector, when co nf igT ype For
co llect o rDeplo yMachine When displayed.
type String ECSInstanceId T hen, you can perform the following
operations:

ECSInstanceId:ECS
ACKCluster: Container Kubernetes

> Document Version: 20220524 436


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

Output specifies the user name of the


instance. T he default name is elastic. When
co nf igT ype For co llect o rT arget Inst ance
userName String elastic or co llect o rElast icsearchFo rKibana When
displayed.

2020-06-
gmtCreatedT im
String 20T 07:26:47.000+0 T he time when the collector was created.
e
000

2020-06-
gmtUpdateT im
String 20T 07:26:47.000+0 T he collector update time.
e
000

name String ct-testAbc T he name of the collector.

ownerId String 16852***488***** T he ID of the Alibaba Cloud account.

ct-cn-
resId String T he collector instance ID.
0v3xj86085dvq****

T he collector type. FileBeat, metricBeat,


resT ype String fileBeat
heartBeat, and auditBeat are supported.

T he collector version. When the machine


6.8.5_with_communi
resVersion String type of the collector is ECS, it is only
ty
supported. 6.8.5_w it h_co mmunit y .

T he collector status. T hen, you can perform


the following operations:
status String activing
activating: taking effect
active: has taken effect

vpc- Virtual Private Cloud ID. where the collector


vpcId String
bp16k1dvzxtm****** is located

i-
ecsInstanceId String bp14ncqge8wy3l3d* T he ID of the instance.
***

ecsInstanceNa
String ecsT estName T he ECS instance name.
me

437 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Parameter T ype Example Description

Array of T he IP address information of the ECS


ipAddress
ipAddress instance.

host String 172.16.xx.xx T he IP address.

T he type of the IP address. T hen, you can


perform the following operations:
ipT ype String private
public: public endpoint
private: private address

T he operating system type of the ECS


instance. T hen, you can perform the
osT ype String linux following operations:

windows:Windows operating system


Linux: Linux operating system

T he status of the ECS instance. T hen, you


can perform the following operations:

running: T he cluster is running.


status String running
starting
stopping: Stopping
stopped: T he nodes are stopped.

[ { "tagKey": "a",
tags String T he tag information of the ECS instance.
"tagValue": "b" } ]

Examples
Sample request s

GET /openapi/ecs?page=1&size=10 HTTP/1.1

Sample success responses

JSON format

> Document Version: 20220524 438


API Reference· Beat s Elast icsearch

{ "Result": [ { "ecsInstanceId": "i-bp1gyhphjaj73jsr****", "ecsInstanceName": "test",


"status": "running", "ipAddress": [ { "host": "47.98.xx.xx", "ipType": "public" }, { "host"
: "172.16.xx.xx", "ipType": "private" } ], "tags": [], "collectors": [ { "gmtCreatedTime":
"2020-12-30T08:04:32.000+0000", "gmtUpdateTime": "2020-12-30T08:20:48.000+0000", "name": "u
ptime-test", "resId": "ct-cn-4135is2tj194p****", "resVersion": "6.8.5_with_community", "vpc
Id": "vpc-bp16k1dvzxtmagcva****", "resType": "heartBeat", "ownerId": "168520994880****", "c
onfigs": [ { "fileName": "fields.yml" }, { "fileName": "heartbeat.yml" } ], "status": "acti
ve", "extendConfigs": [ { "configType": "collectorTargetInstance", "instanceId": "es-cn-n6w
1o1x0w001c****", "instanceType": "elasticsearch", "hosts": [ "es-cn-n6w1o1x0w001c****.elast
icsearch.aliyuncs.com:9200" ], "protocol": "HTTP", "userName": "elastic", "enableMonitoring
": true }, { "configType": "collectorDeployMachine", "type": "ECSInstanceId", "machines": [
{ "instanceId": "i-bp1gyhphjaj73jsr****", "agentStatus": "heartOk" } ], "groupId": "default
_ct-cn-4135is2tj194p****" } ], "dryRun": false } ], "osType": "linux", "cloudAssistantStatu
s": "true" } ], "RequestId": "58E5DE98-33B0-4D9B-B5F6-E70A77C5933E", "Headers": { "X-Total-
Count": 2 } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.12.2. ModifyDeployMachine
Call t he ModifyDeployMachine t o updat e t he ECS machine inst alled by t he collect or.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/collectors/[ResId]/actions/modify-deploy-machines HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes xb1i7q79u65nk* T he collector ID.
***

439 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

RequestBody
T he following paramet ers must be filled in t he Request Body t o specify t he informat ion of t he t arget
ECS inst ance.

Parameter T ype Required Example Description

T he target ECS
machines List Yes instance
information.

i-
T he ID of the
└instanceId String Yes bp11u91xgubypcu
instance.
z****

T he type of
machine that the
collector is
deployed. Only
type String Yes ECSInstanceId
ECSInstanceId(ECS
machine
deployment) is
supported.

T he type of the
configuration.
Only
collectorDeployMa
collectorDeployMa
configT ype String Yes chine (the
chine
deployment
machine of the
collector) is
supported.

Response parameters

> Document Version: 20220524 440


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

C37CE536-6C0F-
RequestId String 4778-9B59- T he ID of the request.
6D94C7F7EB63

Whether the update succeeded:


Result Boolean true true: T he operation was successful.
false: T he operation failed.

Examples
Sample request s

POST /openapi/collectors/ct-cn-xb1i7q79u65nk **** /actions/modify-deploy-machines HTTP


/1.1 public request header {"machines":[ {"instanceId":"i-bp1ei8ysh7orb6eq ****"}, {"instan
ceId":"i-bp12plyjhrv7eobp ****"} ], "type":"ECSInstanceId", "configType":"collectorDeployMa
chine"}

Sample success responses

JSON format

{ "Result": true, "RequestId": "C37CE536-6C0F-4778-9B59-6D94C7F7EB63" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.12.3. ListNodes
Call List Nodes t o view t he st at us of t he ECS machine where t he collect or is inst alled.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/collectors/[ResId]/nodes HTTP/1.1

441 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Request parameters

Positi Require
Parameter T ype Example Description
on d

ct-cn-
ResId String Path Yes l871nd0u73c45 T he collector ID.
****

T he number of pages of the


page Integer Query No 1
returned result.

size Integer Query No 10 T he number of results per page.

i-
ecsInstanceIds String Query No bp1ei8ysh7orb T he ID of ECS instance N.
6eq****

ecsInstanceNa
String Query No test T he ECS instance name.
me

T he tag information of the ECS


[{"tagKey":"abc
instance. T he tag key (tagKey) and
tags String Query No ","tagValue":"x
tag value (tagValue) must be
yz"}]
included.

Response parameters

Parameter T ype Example Description

Headers Struct T he header of the response.

X-T otal-Count Integer 10 T he number of entries returned.

E1FD7642-7C40-
RequestId String 4FF2-9C0F- T he ID of the request.
21F1A1746F70

Result Array of Result T he return results.

T he status of each collector on ECS. T hen,


you can perform the following operations:

heartOk: normal heartbeat


agentStatus String heartOk
heartLost: abnormal heartbeat
uninstalled: not installed
failed: installation failed

> Document Version: 20220524 442


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

Whether the Cloud Assistant has been


opened. T hen, you can perform the
cloudAssistant following operations:
String true
Status
true: Open
false: not enabled

i-
ecsInstanceId String T he ID of the instance.
bp13y63575oypr****

ecsInstanceNa
String ECS_beat T he ECS instance name.
me

Array of
ipAddress T he IP information list of the ECS instance.
ipAddress

host String 192.168.xx.xx T he IP address.

T he type of the IP address. T hen, you can


perform the following operations:
ipT ype String public
public: public IP address
private: private IP address

T he operating system type of the ECS


instance. T hen, you can perform the
osT ype String linux following operations:

windows:Windows Server
linux:Linux

T he status of the ECS instance. T hen, you


can perform the following operations:

running: T he cluster is running.


status String running
starting
stopping: Stopping
stopped: T he nodes are stopped.

tags Array of tags T he tag information of the ECS instance.

tagKey String abc T he key of the tag.

tagValue String xyz T he tag value.

Examples

443 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Sample request s

GET /openapi/collectors/ct-cn-l871nd0u73c45 ****/nodes HTTP/1.1 public request header

Sample success responses


JSON format

{ "Result": [ { "ecsInstanceId": "i-bp13y63575oypr9d****", "ecsInstanceName": "zl-test


02-keepit", "status": "running", "ipAddress": [ { "host": "47.111.xx.xx", "ipType": "public
" }, { "host": "10.8.xx.xx", "ipType": "private" } ], "tags": [ { "tagKey": "a", "tagValue"
: "b" } ], "agentStatus": "failed", "osType": "linux", "cloudAssistantStatus": "true" } ],
"RequestId": "E1FD7642-7C40-4FF2-9C0F-21F1A1746F70", "Headers": { "X-Total-Count": 1 } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.13. ACK-based deployment


10.13.1. ListAckClusters
Call t he List AckClust ers t o obt ain t he list of Alibaba Cloud Cont ainer Service for Kubernet es
ACK(Cont ainer Service for Kubernet es) clust ers.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/ack-clusters HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

Set the number of pages for the


page Integer Query No 3
returned result.

> Document Version: 20220524 444


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

T he number of results that each


size Integer Query No 20
page contains.

vpc-
T he Virtual Private Cloud ID. where
vpcId String Query No bp12nu14urf0u
the ACK cluster resides
paf4****

Response parameters

Parameter T ype Example Description

F93EAA49-284F-
RequestId String 4FCE-9E67- T he ID of the request.
FA23FB4BB512

Result Array of result T he return results.

c5ea2c2d9a3cf4994
clusterId String T he ID of the cluster.
81292f60425d****

Cluster type, which supports only


clusterT ype String ManagedKubernetes ManagedKubernetes, that is, Kubernetes
clusters.

name String test T he name of the cluster.

vpc-
T he ID of the VPC where the source cluster
vpcId String bp12nu14urf0upaf4
resides.
****

T he following paramet ers are also included in t he ret urned dat a.

Parameter T ype Example Description

T he header of the
Headers Struct
response.

T he number of returned
└X-T otal-Count Integer 2
records.

Not e └ indicat es a child paramet er.

445 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Examples
Sample request s

GET /openapi/ack-clusters?Page=1&size=20 HTTP/1.1 public request header

Sample success responses


JSON format

{ "Result": [ { "clusterId": "c5ea2c2d9a3cf499481292f60425d****", "name": "test", "clu


sterType": "ManagedKubernetes", "vpcId": "vpc-bp12nu14urf0upaf4****" }, { "clusterId": "cdc
ee8be4e87a40e2a23fdbc1c24d****", "name": "cs", "clusterType": "ManagedKubernetes", "vpcId":
"vpc-bp16k1dvzxtmagcva****" } ], "RequestId": "F93EAA49-284F-4FCE-9E67-FA23FB4BB512", "Head
ers": { "X-Total-Count": 2 } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.13.2. ListAckNamespaces
Call t he List AckNamespaces t o view all namespaces of t he specified Alibaba Cloud Cont ainer Service for
Kubernet es ACK(Cont ainer Service for Kubernet es) clust er.

Not e When you creat e an ACK clust er-based collect or, you need t o specify t he namespace
of t he clust er. You can call t his int erface t o view all namespaces of t he clust er and select t he
appropriat e namespace based on t his.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/ack-clusters/[ClusterId]/namespaces HTTP/1.1

Request parameters

> Document Version: 20220524 446


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

c79acd3fbf462
T he ID of the cluster from which
ClusterId String Path Yes 423fb6450e513
you want to detach tags.
bb6****

page Integer Query No 1 Set the number of returned result


pages.

T he number of records contained


size Integer Query No 10
per page.

Response parameters

Parameter T ype Example Description

95789100-A329-
RequestId String 473B-9D14- T he ID of the request.
9E0B7DB4BD5A

Result Array of Result T he return results.

namespace String logging T he namespace of the cluster.

status String Active T he namespace status.

T he following paramet ers are also included in t he ret urned dat a.

Parameter T ype Example Description

T he header of the
Headers Struct
response.

T he number of returned
└X-T otal-Count Integer 5
records.

Not e └ indicat es a child paramet er.

Examples
Sample request s

447 > Document Version: 20220524


Elast icsearch API Reference· Beat s

GET /openapi/ack-clusters/c79acd3fbf462423fb6450e513bb6 ****/namespaces HTTP/1.1 publi


c request header

Sample success responses

JSON format

{ "Result": [ { "namespace": "arms-prom", "status": "Active" }, { "namespace": "defaul


t", "status": "Active" }, { "namespace": "kube-node-lease", "status": "Active" }, { "namesp
ace": "kube-public", "status": "Active" }, { "namespace": "kube-system", "status": "Active"
}, { "namespace": "logging", "status": "Active" } ], "RequestId": "95789100-A329-473B-9D14-
9E0B7DB4BD5A", "Headers": { "X-Total-Count": 6 } }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.13.3. DescribeAckOperator
Call t he DescribeAckOperat or t o view t he Elast icsearch Operat or informat ion inst alled on t he specified
Alibaba Cloud Cont ainer Service for Kubernet es ACK(Cont ainer Service for Kubernet es) clust er.

Not e Before inst alling t he collect or on t he ACK clust er, you can call t his int erface t o view t he
inst allat ion st at us of t he Elast icsearch Operat or on t he t arget clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
GET /openapi/ack-clusters/[ClusterId]/operator HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

c79acd3fbf462
T he ID of the cluster from which
ClusterId String Path Yes 423fb6450e513
you want to detach tags.
bb6****

> Document Version: 20220524 448


API Reference· Beat s Elast icsearch

Positi Require
Parameter T ype Example Description
on d

Response parameters

Parameter T ype Example Description

6615EE8D-FD9D-
RequestId String 4FD3-997E- T he ID of the request.
6FEA5B8D82ED

Result Struct T he returned results.

T he operator installation status. T hen, you


can perform the following operations:

deployed: installed
status String deployed
not-deploy: not installed
failed: installation failed
unknown: unknown status

version String 1 T he Operator version.

Examples
Sample request s

GET /openapi/ack-clusters/c79acd3fbf462423fb6450e513bb6 ****/operator HTTP/1.1 public


request header

Sample success responses

JSON format

{ "Result": { "version": "1", "status": "deployed" }, "RequestId": "6615EE8D-FD9D-4FD3


-997E-6FEA5B8D82ED" }

Error codes
For a list of error codes, visit t he API Error Cent er .

10.13.4. InstallAckOperator

449 > Document Version: 20220524


Elast icsearch API Reference· Beat s

Call t he Inst allAckOperat or t o inst all Elast icsearch Operat or. on t he specified Alibaba Cloud Cont ainer
Service for Kubernet es ACK(Cont ainer Service for Kubernet es) clust er

Not e Before inst alling t he collect or on t he ACK clust er, you need t o call t his int erface and
inst all t he Elast icsearch Operat or. on t he t arget clust er.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. Aft er you call an operat ion, OpenAPI Explorer
dynamically generat es t he sample code of t he operat ion for different SDKs.

Request header
T his operat ion uses only t he common request header. For more informat ion, see Common request
paramet ers.

Request structure
POST /openapi/ack-clusters/[ClusterId]/operator HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

c79acd3fbf462
T he ID of the cluster from which
ClusterId String Path Yes 423fb6450e513
you want to detach tags.
bb6****

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E-
T he value of this parameter is
5718-45B5-
ClientT oken String Query No generated by the client and is
9D4D-
unique among different requests.
70B3FF****
T he maximum length is 64 ASCII
characters.

Response parameters

Parameter T ype Example Description

EFA88951-7A6F-
RequestId String 4A8E-AB8F- T he ID of the request.
2BB7132BA751

> Document Version: 20220524 450


API Reference· Beat s Elast icsearch

Parameter T ype Example Description

Indicates whether SQL audit was disabled for


the DRDS database. T hen, you can perform
Result Boolean true the following operations:

true: T he installation is successful.


false: Installation failed

Examples
Sample request s

POST /openapi/ack-clusters/c79acd3fbf462423fb6450e513bb6 ****/operator HTTP/1.1 public


request header

Sample success responses


JSON format

{ "Result": true, "RequestId": "EFA88951-7A6F-4A8E-AB8F-2BB7132BA751" }

Error codes
For a list of error codes, visit t he API Error Cent er .

451 > Document Version: 20220524


Elast icsearch API Reference· RAM

11.RAM
11.1. InitializeOperationRole
Call t he Init ializeOperat ionRole t o creat e a service linked role.

Not e When using a collect or t o collect logs from different dat a sources or performing elast ic
clust er scaling t asks (for t he China sit e), you must first grant permissions t o creat e service linked
roles.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request structure
POST /openapi/user/slr HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
ClientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

RequestBody
Set t he following paramet ers in Request Body t o specify t he name of t he service-linked role t o be
creat ed.

Parameter T ype Required Example Description

> Document Version: 20220524 452


API Reference· RAM Elast icsearch

Parameter T ype Required Example Description

T he name of the
service linked role.
Valid values:
AliyunServiceRoleF
orElasticsearchOp
s (the role used to
perform the task
AliyunServiceRoleF
of elastic scaling
rolename String Yes orElasticsearchColl
of the cluster,
ector
only applicable to
the China site) and
AliyunServiceRoleF
orElasticsearchColl
ector (creating
and managing
Beats collectors).

Response parameters

Parameter T ype Example Description

29101430-4797-
RequestId String 4D1D-96C3- T he ID of the request.
9FCBCCA8F845

Indicates whether SQL audit was disabled for


the DRDS database. Valid values:
Result Boolean true
true: T he object is created.
false: creation failed

Examples
Sample request s

POST /openapi/user/slr HTTP/1.1


common request header
{
"rolename": "AliyunServiceRoleForElasticsearchCollector"
}

Sample success responses

JSON format

{
"Result": true,
"RequestId": "29101430-4797-4D1D-96C3-9FCBCCA8F845"
}

453 > Document Version: 20220524


Elast icsearch API Reference· RAM

Error codes
For a list of error codes, visit t he API Error Cent er.

11.2. ValidateSlrPermission
Call t he Validat eSlrPermission t o verify t hat t he service linked role has been creat ed.

Not e Before you use t he collect or t ool t o collect logs from different dat a sources, you must
be aut horized t o creat e service linked roles. You can call t his operat ion t o verify t hat it has been
creat ed.

Debugging
OpenAPI Explorer aut omat ically calculat es t he signat ure value. For your convenience, we recommend
t hat you call t his operat ion in OpenAPI Explorer. OpenAPI Explorer dynamically generat es t he sample
code of t he operat ion for different SDKs.

Request header
T his operat ion uses only common request headers. For more informat ion, see Common paramet ers.

Request structure
GET /openapi/user/servicerolepermission HTTP/1.1

Request parameters

Positi Require
Parameter T ype Example Description
on d

T he name of the service linked role.


AliyunServiceRo Valid values:
rolename String Query Yes leForElasticsear AliyunServiceRoleForElasticsearch
chCollector Collector: create and manage
Beats collectors

T his parameter is used to ensure


the idempotence of the request.
5A2CFF0E- You can use the client to generate
5718-45B5- the value, but you must ensure that
ClientT oken String Query No
9D4D- it is unique among different
70B3FF**** requests. T he token can contain
only ASCII characters and cannot
exceed 64 characters in length.

Response parameters

> Document Version: 20220524 454


API Reference· RAM Elast icsearch

Parameter T ype Example Description

BC4ED7DD-8C84-
RequestId String 49B5-8A95- T he ID of the request.
456F82E44D13

Indicates whether the service linked role was


created. Valid values:
Result Boolean true
true: Created
false: not created

Examples
Sample request s

GET /openapi/user/servicerolepermission?rolename=AliyunServiceRoleForElasticsearchCollector
HTTP/1.1
common request headers

Sample success responses


JSON format

{
"Result": true,
"RequestId": "2C77A9B5-6B2A-42D7-9DBB-0166A0D40483"
}

Error codes
For a list of error codes, visit t he API Error Cent er.

455 > Document Version: 20220524


API Reference· Common dat a st ruct
Elast icsearch
ures

12.Common data structures


Logstash
T he paramet er object .

Paramet er T ype Example Descript ion

endpointList Array T he node information.

host String 172.16.xx.xx T he IP address of the node.

T he access port number of


port Long 9200
the node.

T he ID of the zone where the


zoneId String cn-hangzhou-i
node resides.

T he status of the zone.


Allows you to perform the
status String NORMAL following operations:

ISOLAT ION: offline


NORMAL

description String ls-cn-abc T he name of the instance.

T he ID of the resource group


rg-
resourceGroupId String to which the instance
acfm2h5vbzd****
belongs.

T he last expiration time of


endT ime Long 4749897600000
the subscription instance.

ls-cn-
instanceId String T he ID of the instance.
n6w1o5jq****

config Map Configure ECS instances.

2018-07- T he time when the instance


createdAt String
13T 03:58:07.253Z was created.

> Document Version: 20220524 456


API Reference· Common dat a st ruct
Elast icsearch
ures

Paramet er T ype Example Descript ion

networkConfig Object T he network configurations.

T he network type. Currently,


type String vpc only Virtual Private Cloud
(VPC) is supported.

vpcId String vpc-abc T he VPC ID of the instance.

T he zone where the cluster


vsArea String cn-hangzhou-*
resides.

vswitchId String vsw-def T he ID of the vSwitch

T he information about the


zoneInfos Array
zones.

T he status of the zone.


Allows you to perform the
following operations:
status String NORMAL
ISOLAT ION: offline
NORMAL

T he ID of the zone to which


zoneId String cn-hangzhou-i
the container groups belong.

nodeAmount Long 2 T he number of data nodes.

2018-07- T he time when the instance


updatedAt String
18T 10:10:04.484Z was last updated.

T he version of the read-only


instance. Allows you to
perform the following
version String 6.7.0_with_X-Pack operations:

6.7.0_with_X-Pack
7.4.0_with_X-Pack

457 > Document Version: 20220524


API Reference· Common dat a st ruct
Elast icsearch
ures

Paramet er T ype Example Descript ion

Specifies whether to enable


dataNode Boolean true data nodes. T his parameter
must be set to true.

nodeSpec Object Data node configurations.

disk Long 50 T he disk size of the node.

diskT ype String cloud_ssd T he disk type of the node.

String T he instance type of the


spec logstash.n4.small
node.

T he billing method of the


instance. Allows you to
perform the following
paymentT ype String postpaid operations:

prepaid: subscription
postpaid: pay-as-you-go

T he access protocol of the


protocol String HT T P
instance.

T he tags of the instance.


tags Array
Each tag is a key-value pair.

tagKey String env T he key of the tag.

tagValue String dev T he value of the tag.

zoneCount Long 1 T he number of zones.

> Document Version: 20220524 458

You might also like