DescribeILMPolicy
Queries the details of a specified index lifecycle policy.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
elasticsearch:DescribeILMPolicy |
get |
*Instance
|
None | None |
Request syntax
GET /openapi/instances/{InstanceId}/ilm-policies/{PolicyName} HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The instance ID. |
es-cn-nif24adwc0082**** |
| PolicyName |
string |
Yes |
The name of the index lifecycle policy. |
policy-1 |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
No parameters required.
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
FF44681E-FD41-4FDE-B8DF-295DCDD6**** |
| Result |
object |
The details of the specified index lifecycle policy. |
|
| name |
string |
The name of the index lifecycle policy. |
ilm-history-ilm-policy |
| phases |
object |
The content of the index lifecycle policy. |
{"cold":{"minAge":"30d","actions":{"allocate":{"numberOfReplicas":1,"require":{"boxType":"warm"}},"setPriority":{"priority":100}}},"hot":{"minAge":"0s","actions":{"rollover":{"maxAge":"30d","maxDocs":10000,"maxSize":"50gb"},"setPriority":{"priority":1000}}},"delete":{"minAge":"30d","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 updated and is rarely queried. The information still needs to be searchable, but slower query performance is acceptable.); 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": "FF44681E-FD41-4FDE-B8DF-295DCDD6****",
"Result": {
"name": "ilm-history-ilm-policy",
"phases": {
"cold": {
"minAge": "30d",
"actions": {
"allocate": {
"numberOfReplicas": 1,
"require": {
"boxType": "warm"
}
},
"setPriority": {
"priority": 100
}
}
},
"hot": {
"minAge": "0s",
"actions": {
"rollover": {
"maxAge": "30d",
"maxDocs": 10000,
"maxSize": "50gb"
},
"setPriority": {
"priority": 1000
}
}
},
"delete": {
"minAge": "30d",
"actions": {
"delete": {}
}
}
}
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.