ListILMPolicies
Queries the list of index lifecycle policies that have been created for a cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:ListILMPolicies |
get |
*Instance
|
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
| Parameter | Type | Example | Required | Description |
| {key} | Struct | No | The 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). | |
| minAge | String | 30d | No | The time required for the index to reach the target phase. |
| actions | Struct | No | The 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
| Parameter | Type | Example | Required | Description |
| rollover | Struct | No | The index rollover operation in the hot phase. For more information, see the Description of the rollover field data structure below. | |
| setPriority | Struct | No | The index priority in the hot or cold phase. For more information, see the Description of the setPriority field data structure below. | |
| allocate | Struct | No | The allocation operation in the cold phase. For more information, see the Description of the allocate field data structure below. | |
| delete | Struct | {} | No | The 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
| Parameter | Type | Example | Required | Description |
| maxAge | String | 30d | No | The 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). |
| maxDocs | Integer | 10000 | No | The document count threshold required to trigger an index rollover. |
| maxSize | String | 50gb | No | The 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
| Parameter | Type | Example | Required | Description |
| priority | Integer | 100 | No | The default priority of the current node. |
Description of the allocate field data structure
| Parameter | Type | Example | Required | Description |
| numberOfReplicas | Integer | 1 | No | The 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. |
| require | Struct | No | An 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
| Parameter | Type | Example | Required | Description |
| boxType | String | warm | No | The 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.