修改集群的场景化模板配置内容。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
elasticsearch:UpdateTemplate |
update |
*全部资源
|
无 | 无 |
请求语法
POST /openapi/instances/{InstanceId}/templates/{TemplateName} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
实例 ID。 |
es-cn-n6w1o1x0w001c**** |
| TemplateName |
string |
是 |
模板名称。可选值:
|
dynamicSettings |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| ClientToken |
string |
否 |
用于保证请求的幂等性。由客户端生成该参数值,要保证在不同请求间唯一,最大不超过 64 个 ASCII 字符。 |
5A2CFF0E-5718-45B5-9D4D-70B3FF**** |
| body |
string |
否 |
指定模板配置内容,详细信息请参见下文的 RequestBody 章节。 |
{ "content": "{\n\t\"persistent\":{\n\t\t\"search\":{\n\t\t\t\"max_buckets\":\"10000\"\n\t\t}\n\t}\n}" } |
RequestBody
RequestBody 中还需填入以下参数,用来指定模板配置内容。 | 名称 | 类型 | 是否必选 | 示例值 | 描述 | | ---- | ---- | ---- | ---- | | content| String | 是 | {\n\t"persistent":{\n\t\t"search":{\n\t\t\t"max_buckets":"10000"\n\t\t}\n\t}\n} |模板配置内容。|
示例如下。
{
"content": "{\n\t\"persistent\":{\n\t\t\"search\":{\n\t\t\t\"max_buckets\":\"10000\"\n\t\t}\n\t}\n}"
}
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| Result |
boolean |
场景化模板配置是否修改成功:
|
true |
| RequestId |
string |
请求 ID。 |
5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1**** |
示例
正常返回示例
JSON格式
{
"Result": true,
"RequestId": "5FFD9ED4-C2EC-4E89-B22B-1ACB6FE1****"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | ComponentCodeValueError | component value is disable | |
| 401 | UserNotOpen | Aliyun account is not open elasticsearch | |
| 401 | StsRoleAccountNoPermission | Role account has no permission or expired | |
| 401 | SubAccountNoPermission | Aliyun sub account has no permission, please authorize your sub account in Aliyun RAM | |
| 401 | UserUnauthorized | Authentication required |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。