ListILMPolicies

Updated at:

Queries the list of index lifecycle policies that have been created for a cluster.

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

get

*Instance

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

None None

Request syntax

GET /openapi/instances/{InstanceId}/ilm-policies HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

InstanceId

string

Yes

The instance ID.

es-cn-m7r23wodb006n****

Request parameters

Parameter

Type

Required

Description

Example

policyName

string

No

The name of the index lifecycle policy.

policy-1

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

F99407AB-2FA9-489E-A259-40CF6DCC****

Result

array<object>

The list of index lifecycle policies returned by the request.

array<object>

name

string

The name of the index lifecycle policy.

policy-1

phases

object

The index lifecycle content.

{"hot":{"minAge":"0ms","actions":{"rollover":{"maxSize":"50gb","maxAge":"30d"},"setPriority":{"priority":100}}},"delete":{"minAge":"3d","actions":{"delete":{}}}}

Description of the phases field data structure

ParameterTypeExampleRequiredDescription
{key}StructNoThe current lifecycle phase. The following three phases are supported: hot (the hot data phase, in which the index is actively being updated and queried); cold (the cold data phase, in which the index is no longer being updated and is rarely queried. The information still needs to be searchable, but it is acceptable if queries are slower.); delete (the delete phase, in which the index is no longer needed and can be safely deleted).
minAgeString30dNoThe time required for the index to reach the target phase.
actionsStructNoThe policy settings for the current phase. For more information, see the Description of the actions field data structure below.

Description of the actions field data structure

ParameterTypeExampleRequiredDescription
rolloverStructNoThe index rollover operation in the hot phase. For more information, see the Description of the rollover field data structure below.
setPriorityStructNoThe index priority in the hot or cold phase. For more information, see the Description of the setPriority field data structure below.
allocateStructNoThe allocation operation in the cold phase. For more information, see the Description of the allocate field data structure below.
deleteStruct{}NoThe delete index operation. When the delete phase is enabled, this property is required and must be an empty object.

Description of the rollover field data structure

ParameterTypeExampleRequiredDescription
maxAgeString30dNoThe time threshold required to trigger an index rollover. At least one of maxAge, maxDocs, and maxSize must be specified. Unit: d (days) or h (hours).
maxDocsInteger10000NoThe document count threshold required to trigger an index rollover.
maxSizeString50gbNoThe index size threshold required to trigger an index rollover. At least one of maxAge, maxDocs, and maxSize must be specified. Unit: MB or GB.

Description of the setPriority field data structure

ParameterTypeExampleRequiredDescription
priorityInteger100NoThe default priority of the current node.

Description of the allocate field data structure

ParameterTypeExampleRequiredDescription
numberOfReplicasInteger1NoThe specified number of replicas to allocate. If set, the default value is 1. This parameter is used together with migrate. When automatic migration is enabled, replica allocation is performed by default.
requireStructNoAn optional setting available for hot-warm architecture clusters. For more information, see the Description of the require field data structure below.

Description of the require field data structure

ParameterTypeExampleRequiredDescription
boxTypeStringwarmNoThe custom node attribute identifier. This parameter is available for hot-warm architecture clusters and is used to migrate data to warm nodes. Valid values: warm.

Examples

Success response

JSON format

{
  "RequestId": "F99407AB-2FA9-489E-A259-40CF6DCC****",
  "Result": [
    {
      "name": "policy-1",
      "phases": {
        "hot": {
          "minAge": "0ms",
          "actions": {
            "rollover": {
              "maxSize": "50gb",
              "maxAge": "30d"
            },
            "setPriority": {
              "priority": 100
            }
          }
        },
        "delete": {
          "minAge": "3d",
          "actions": {
            "delete": {}
          }
        }
      }
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.