ListInstanceIndices

Updated at:

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

elasticsearch:ListInstanceIndices

get

*instances

acs:elasticsearch:{#regionId}:{#accountId}:instances/{#instancesId}

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:

  • true: Returns the list of indexes, including system indexes.

  • false: Returns the list of indexes, excluding system indexes. This is the default value.

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:

  • true: Views only managed indexes.

  • false: Views all indexes. This is the default value.

false

isOpenstore

boolean

No

Specifies whether to view only OpenStore cold-phase indexes. Valid values:

  • true: Views only OpenStore cold-phase indexes.

  • false: Views all indexes. This is the default value.

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:

  • warm: The warm phase.

  • cold: The cold phase.

  • hot: The hot phase.

  • delete: The delete phase.

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:

  • following: The index is managed.

  • closing: The index is being unmanaged.

  • closed: The index is not managed.

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: Healthy.

  • yellow: Warning.

  • red: Abnormal.

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.