返回有关一个索引模板的信息。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
elasticsearch:DescribeIndexTemplate |
get |
*Instance
|
无 | 无 |
请求语法
GET /openapi/instances/{InstanceId}/index-templates/{IndexTemplate} HTTP/1.1
路径参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| InstanceId |
string |
是 |
实例 ID。 |
es-cn-n6w24n9u900am**** |
| IndexTemplate |
string |
是 |
索引模版名称。 |
data-stream-default |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
当前API无需请求参数
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
25DB38F8-82E4-4D16-82BB-FF077C7F**** |
| Result |
object |
返回索引模板详情。 |
|
| dataStream |
boolean |
是否开启数据流:
默认值:false(不开启)。 |
true |
| indexTemplate |
string |
索引模版名称。 |
data-stream-default |
| ilmPolicy |
string |
生命周期策略名称。 |
cube_default_ilm_policy |
| priority |
integer |
优先级。 |
0 |
| indexPatterns |
array |
匹配此索引模板的索引名称模式列表。 |
|
|
string |
索引匹配模式正则。 |
ds-* |
|
| template |
object |
组件模版。 |
|
| settings |
string |
settings 设置。 |
{\"index.refresh_interval\":\"1s\"} |
| mappings |
string |
mappings 设置。 |
{\"properties\":{\"created_at\":{\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\",\"type\":\"date\"},\"host_name\":{\"type\":\"keyword\"}}} |
| aliases |
string |
aliases 设置。 |
{\"mydata\":{}} |
示例
正常返回示例
JSON格式
{
"RequestId": "25DB38F8-82E4-4D16-82BB-FF077C7F****",
"Result": {
"dataStream": true,
"indexTemplate": "data-stream-default",
"ilmPolicy": "cube_default_ilm_policy",
"priority": 0,
"indexPatterns": [
"ds-*"
],
"template": {
"settings": "{\\\"index.refresh_interval\\\":\\\"1s\\\"}",
"mappings": "{\\\"properties\\\":{\\\"created_at\\\":{\\\"format\\\":\\\"EEE MMM dd HH:mm:ss Z yyyy\\\",\\\"type\\\":\\\"date\\\"},\\\"host_name\\\":{\\\"type\\\":\\\"keyword\\\"}}}",
"aliases": "{\\\"mydata\\\":{}}"
}
}
}
错误码
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。