Updates the parameter configurations in the YML file of an Elasticsearch cluster.
When you call this operation, take note of the following items:
You cannot update the configurations for an Elasticsearch cluster that is in the activating, invalid, or inactive state.
Debugging
Request headers
This operation does not have operation-specific request headers and uses only common request headers. For more information, see the "Common request headers" section of the "Common parameters" topic.
Request syntax
PATCH|POST /openapi/instances/{InstanceId}/instance-settings HTTP/1.1
Request parameters
|
Parameter |
Type |
Position |
Required |
Example |
Description |
| InstanceId | String | Path | Yes | es-cn-nif1q9o8r0008**** | The ID of the cluster. |
| updateStrategy | String | Query | No | normal | The update policy of the cluster, such as the update mode for index update, cluster upgrade, or service deployment. Valid values:
|
| clientToken | String | Query | No | 5A2CFF0E-5718-45B5-9D4D-70B3FF**** | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. |
| String | Body | No | { "esConfig": { "thread_pool.write.queue_size": 500 } } | The parameter configuration that you want to update. |
RequestBody
You need to configure the esConfig parameter in RequestBody to specify the new value of the parameter that you want to update. For more information about parameters in a YML file, see Configure the YML file.
The following code shows how to adjust the size of the document write queue for an Elasticsearch V6.X, V7.X, or V8.X cluster.
{
"esConfig": {
"thread_pool.write.queue_size": 500
}
}
Response parameters
Parameter |
Type |
Example |
Description |
| RequestId | String | BB1C321A-211C-4FD7-BD8B-7F2FABE2**** | The request ID. |
The response parameters also include the Result parameter. For more information about this parameter, see ListInstance.
Examples
Sample requests
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
HTTP/1.1 200 OK
Content-Type:application/json
{
"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"
} ],
"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",
"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"
} ],
"synonymsDicts" : [ ],
"ikHotDicts" : [ ],
"aliwsDicts" : [ ],
"haveGrafana" : false,
"haveCerebro" : false,
"enableKibanaPublicNetwork" : true,
"enableKibanaPrivateNetwork" : false,
"advancedSetting" : {
"gcName" : "CMS"
}
},
"RequestId" : "C1FA70F8-B84E-4D89-B31A-BCD1E476****"
}
Error codes
For a list of error codes, see Service error codes.