Query parameters
-
Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1
or0
. -
Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.
Values are
-1
or0
.
GET /_ilm/policy/{policy}
Console
GET _ilm/policy/my_policy
resp = client.ilm.get_lifecycle( name="my_policy", )
const response = await client.ilm.getLifecycle({ name: "my_policy", });
response = client.ilm.get_lifecycle( policy: "my_policy" )
$resp = $client->ilm()->getLifecycle([ "policy" => "my_policy", ]);
curl -X GET -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/_ilm/policy/my_policy"
client.ilm().getLifecycle(g -> g .name("my_policy") );
Response examples (200)
A successful response when retrieving a lifecycle policy.
{ "my_policy": { "version": 1, "modified_date": 82392349, "policy": { "phases": { "warm": { "min_age": "10d", "actions": { "forcemerge": { "max_num_segments": 1 } } }, "delete": { "min_age": "30d", "actions": { "delete": { "delete_searchable_snapshot": true } } } } }, "in_use_by" : { "indices" : [], "data_streams" : [], "composable_templates" : [] } } }