ListShardRecoveries

Updated at:

Queries the data progress list of ongoing and completed shard recoveries. By default, only ongoing shard recovery information is returned.

Operation description

Note

Shard recovery is the process of synchronizing data from a primary shard to a replica shard. After recovery is complete, the replica shard is available for search.

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:ListShardRecoveries

get

*Instance

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

None None

Request syntax

GET /openapi/instances/{InstanceId}/cat-recovery HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-7mz293m9a003j****

Request parameters

Parameter

Type

Required

Description

Example

activeOnly

boolean

No

Specifies whether to display shard data recovery tracking information. Valid values:

  • true: Displays only ongoing shard data recovery tracking information.

  • false: Displays all shard data recovery tracking information.

true

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

F99407AB-2FA9-489E-A259-40CF6DCC47D9

Result

array<object>

The returned results.

object

index

string

The index name.

my-index-000001

sourceHost

string

The IP address of the source node.

192.168.XX.XX

sourceNode

string

The source node.

2Kni3dJ

filesTotal

integer

The total number of files.

79

bytesPercent

string

The data recovery progress.

80%

translogOps

integer

The number of translog operations to be recovered.

12086

translogOpsPercent

string

The progress of translog operation recovery.

80%

bytesTotal

integer

The total amount of data to be recovered.

12086

targetHost

string

The IP address of the target node.

192.168.XX.XX

targetNode

string

The target node.

YVVKLmW

filesPercent

string

The file recovery progress.

80.0%

stage

string

The stage of data recovery. Valid values:

  • done: Recovery is complete.

  • finalize: Cleanup work is in progress.

  • index: Reading index metadata and copying bytes from source to target.

  • init: Recovery has not started.

  • start: Recovery is starting.

  • translog: Replaying the transaction log.

done

Examples

Success response

JSON format

{
  "RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC47D9",
  "Result": [
    {
      "index": "my-index-000001",
      "sourceHost": "192.168.XX.XX",
      "sourceNode": "2Kni3dJ",
      "filesTotal": 79,
      "bytesPercent": "80%",
      "translogOps": 12086,
      "translogOpsPercent": "80%",
      "bytesTotal": 12086,
      "targetHost": "192.168.XX.XX",
      "targetNode": "YVVKLmW",
      "filesPercent": "80.0%",
      "stage": "done"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.