ListInstanceIndices
Retrieves the list of indexes in a cluster.
Operation description
The ListInstanceIndices operation applies only to Elasticsearch instances that have the indexing service enabled. Query index information by using the Elasticsearch API. For more information, see cat indices API .
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:ListInstanceIndices |
get |
*instances
|
None | None |
Request syntax
GET /openapi/instances/{InstanceId}/indices HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-tl329rbpc0001**** |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| all |
boolean |
No |
Specifies whether to retrieve all indexes. Valid values:
|
false |
| name |
string |
No |
The name of the index. Fuzzy matching is supported. |
log-0001 |
| isManaged |
boolean |
No |
Specifies whether to view only managed indexes. Valid values:
|
false |
| isOpenstore |
boolean |
No |
Specifies whether to view only OpenStore cold-phase indexes. Valid values:
|
false |
| page |
integer |
No |
The page number. Pages start from 1. Default value: 1. |
1 |
| size |
integer |
No |
The number of entries to return on each page in a paging query. Maximum value: 100. Default value: 20. |
15 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
F99407AB-2FA9-489E-A259-40CF6DCC**** |
| Headers |
object |
The response headers. |
|
| X-Managed-StorageSize |
integer |
The total size of indexes in cloud-managed storage. Unit: bytes. |
18093942932 |
| X-Managed-Count |
integer |
The total number of indexes in cloud-managed storage. |
15 |
| X-OSS-StorageSize |
integer |
The total size of OpenStore cold-phase indexes for the instance. Unit: bytes. |
9093942932 |
| X-OSS-Count |
integer |
The total number of OpenStore cold-phase indexes. |
5 |
| Result |
array<object> |
The details of the index list. |
|
|
object |
|||
| phase |
string |
The current storage lifecycle phase. Valid values:
Note
If this parameter is empty, the current index is not managed by a lifecycle policy. |
warm |
| managedStatus |
string |
The managed status of the index. Valid values:
|
closing |
| ilmExplain |
string |
The full lifecycle state of the current index. |
{ "indices": { ".ds-console-2021.08.18-000002": { "index": ".ds-console-2021.08.18-000002", "managed": true, "policy": "console", "lifecycle_date_millis": 1629277498775, "age": "2.64h", "phase": "hot", "phase_time_millis": 1629277450334, "action": "complete", "action_time_millis": 1629278605586, "step": "complete", "step_time_millis": 1629278605586, "phase_execution": { "policy": "console", "phase_definition": { "min_age": "0s", "actions": { "rollover": { "max_size": "1gb", "max_age": "1d", "max_docs": 10000 }, "set_priority": { "priority": 1000 } } }, "version": 1, "modified_date_in_millis": 1629277370953 } } } } |
| size |
integer |
The total storage space occupied by the current index. Unit: bytes. |
49298589 |
| createTime |
string |
The time when the index list was queried. The time is in UTC and follows the ISO 8601 standard. |
2021-01-11T05:49:41.114Z |
| name |
string |
The name of the index. |
.kibana_task_manager_1 |
| health |
string |
The running status of the index. Valid values:
|
green |
| isManaged |
string |
[Deprecated] This parameter is deprecated and can be ignored. |
false |
Examples
Success response
JSON format
{
"RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC****",
"Headers": {
"X-Managed-StorageSize": 18093942932,
"X-Managed-Count": 15,
"X-OSS-StorageSize": 9093942932,
"X-OSS-Count": 5
},
"Result": [
{
"phase": "warm",
"managedStatus": "closing",
"ilmExplain": "{ \"indices\": { \".ds-console-2021.08.18-000002\": { \"index\": \".ds-console-2021.08.18-000002\", \"managed\": true, \"policy\": \"console\", \"lifecycle_date_millis\": 1629277498775, \"age\": \"2.64h\", \"phase\": \"hot\", \"phase_time_millis\": 1629277450334, \"action\": \"complete\", \"action_time_millis\": 1629278605586, \"step\": \"complete\", \"step_time_millis\": 1629278605586, \"phase_execution\": { \"policy\": \"console\", \"phase_definition\": { \"min_age\": \"0s\", \"actions\": { \"rollover\": { \"max_size\": \"1gb\", \"max_age\": \"1d\", \"max_docs\": 10000 }, \"set_priority\": { \"priority\": 1000 } } }, \"version\": 1, \"modified_date_in_millis\": 1629277370953 } } } }",
"size": 49298589,
"createTime": "2021-01-11T05:49:41.114Z",
"name": ".kibana_task_manager_1",
"health": "green",
"isManaged": "false"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.