查询索引模板列表。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
elasticsearch:ListIndexTemplates |
get |
*Instance
|
无 | 无 |
请求语法
GET /openapi/instances/{InstanceId}/index-templates HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
实例 ID。 |
es-cn-nif24adwc0082**** |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| indexTemplate |
string |
否 |
索引模板名称。 |
my-template |
| page |
integer |
否 |
实例列表的页码。起始值:1,默认值:1。 |
5 |
| size |
integer |
否 |
分页查询时设置的每页条数。最大值:100,默认值:20。 |
50 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
返回结果对象。 |
||
| RequestId |
string |
请求 ID。 |
F99407AB-2FA9-489E-A259-40CF6DCC**** |
| Result |
array<object> |
索引模板列表信息。 |
|
|
array<object> |
返回结果对象信息。 |
||
| dataStream |
boolean |
是否开启数据流,参数取值如下:
|
true |
| indexTemplate |
string |
索引模版名称。 |
my-template |
| ilmPolicy |
string |
索引生命周期策略名称。 |
my_ilm_policy |
| priority |
integer |
索引模板优先级。 |
100 |
| indexPatterns |
array |
索引模式信息。 |
|
|
string |
索引模式。 |
console-* |
|
| template |
object |
组件模版。 |
|
| settings |
string |
settings 设置。 |
{\"mydata\":{}} |
| mappings |
string |
mappings 设置。 |
{\"properties\":{\"created_at\":{\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\",\"type\":\"date\"},\"host_name\":{\"type\":\"keyword\"}}} |
| aliases |
string |
aliases 设置。 |
{\"index.number_of_shards\":\"1\"} |
示例
正常返回示例
JSON格式
{
"RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC****",
"Result": [
{
"dataStream": true,
"indexTemplate": "my-template",
"ilmPolicy": "my_ilm_policy",
"priority": 100,
"indexPatterns": [
"console-*"
],
"template": {
"settings": "{\\\"mydata\\\":{}}",
"mappings": "{\\\"properties\\\":{\\\"created_at\\\":{\\\"format\\\":\\\"EEE MMM dd HH:mm:ss Z yyyy\\\",\\\"type\\\":\\\"date\\\"},\\\"host_name\\\":{\\\"type\\\":\\\"keyword\\\"}}}",
"aliases": "{\\\"index.number_of_shards\\\":\\\"1\\\"}"
}
}
]
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。