ListIndexTemplates
Queries the list of index templates.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:ListIndexTemplates |
get |
*Instance
|
None | None |
Request syntax
GET /openapi/instances/{InstanceId}/index-templates HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-nif24adwc0082**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| indexTemplate |
string |
No |
The index template name. |
my-template |
| page |
integer |
No |
The page number of the instance list. Minimum value: 1. Default value: 1. |
5 |
| size |
integer |
No |
The number of entries per page for a paged query. Maximum value: 100. Default value: 20. |
50 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| RequestId |
string |
The request ID. |
F99407AB-2FA9-489E-A259-40CF6DCC**** |
| Result |
array<object> |
The index template list information. |
|
|
array<object> |
The result object information. |
||
| dataStream |
boolean |
Indicates whether the data stream is enabled. Valid values:
|
true |
| indexTemplate |
string |
The index template name. |
my-template |
| ilmPolicy |
string |
The index lifecycle policy name. |
my_ilm_policy |
| priority |
integer |
The index template priority. |
100 |
| indexPatterns |
array |
The index pattern information. |
|
|
string |
The index pattern. |
console-* |
|
| template |
object |
The component template. |
|
| settings |
string |
The settings configuration. |
{\"mydata\":{}} |
| mappings |
string |
The mappings configuration. |
{\"properties\":{\"created_at\":{\"format\":\"EEE MMM dd HH:mm:ss Z yyyy\",\"type\":\"date\"},\"host_name\":{\"type\":\"keyword\"}}} |
| aliases |
string |
The aliases configuration. |
{\"index.number_of_shards\":\"1\"} |
Examples
Success response
JSON format
{
"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\\\"}"
}
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.