@@ -424,6 +424,45 @@ public function deleteAlias(array $params = [])
424
424
}
425
425
426
426
427
+ /**
428
+ * Deletes the data lifecycle of the selected data streams.
429
+ *
430
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/dlm-delete-lifecycle.html
431
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
432
+ *
433
+ * @param array{
434
+ * name: list, // (REQUIRED) A comma-separated list of data streams of which the data lifecycle will be deleted; use `*` to get all data streams
435
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
436
+ * timeout: time, // Explicit timestamp for the document
437
+ * master_timeout: time, // Specify timeout for connection to master
438
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
439
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
440
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
441
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
442
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
443
+ * } $params
444
+ *
445
+ * @throws MissingParameterException if a required parameter is missing
446
+ * @throws NoNodeAvailableException if all the hosts are offline
447
+ * @throws ClientResponseException if the status code of response is 4xx
448
+ * @throws ServerResponseException if the status code of response is 5xx
449
+ *
450
+ * @return Elasticsearch|Promise
451
+ */
452
+ public function deleteDataLifecycle (array $ params = [])
453
+ {
454
+ $ this ->checkRequiredParameters (['name ' ], $ params );
455
+ $ url = '/_data_stream/ ' . $ this ->encode ($ params ['name ' ]) . '/_lifecycle ' ;
456
+ $ method = 'DELETE ' ;
457
+
458
+ $ url = $ this ->addQueryString ($ url , $ params , ['expand_wildcards ' ,'timeout ' ,'master_timeout ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
459
+ $ headers = [
460
+ 'Accept ' => 'application/json ' ,
461
+ ];
462
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
463
+ }
464
+
465
+
427
466
/**
428
467
* Deletes a data stream.
429
468
*
@@ -775,6 +814,44 @@ public function existsTemplate(array $params = [])
775
814
}
776
815
777
816
817
+ /**
818
+ * Retrieves information about the index's current DLM lifecycle, such as any potential encountered error, time since creation etc.
819
+ *
820
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/current/dlm-explain-lifecycle.html
821
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
822
+ *
823
+ * @param array{
824
+ * index: string, // (REQUIRED) The name of the index to explain
825
+ * include_defaults: boolean, // indicates if the API should return the default values the system uses for the index's lifecycle
826
+ * master_timeout: time, // Specify timeout for connection to master
827
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
828
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
829
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
830
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
831
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
832
+ * } $params
833
+ *
834
+ * @throws MissingParameterException if a required parameter is missing
835
+ * @throws NoNodeAvailableException if all the hosts are offline
836
+ * @throws ClientResponseException if the status code of response is 4xx
837
+ * @throws ServerResponseException if the status code of response is 5xx
838
+ *
839
+ * @return Elasticsearch|Promise
840
+ */
841
+ public function explainDataLifecycle (array $ params = [])
842
+ {
843
+ $ this ->checkRequiredParameters (['index ' ], $ params );
844
+ $ url = '/ ' . $ this ->encode ($ params ['index ' ]) . '/_lifecycle/explain ' ;
845
+ $ method = 'GET ' ;
846
+
847
+ $ url = $ this ->addQueryString ($ url , $ params , ['include_defaults ' ,'master_timeout ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
848
+ $ headers = [
849
+ 'Accept ' => 'application/json ' ,
850
+ ];
851
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
852
+ }
853
+
854
+
778
855
/**
779
856
* Returns the field usage stats for each field of an index
780
857
*
@@ -992,6 +1069,44 @@ public function getAlias(array $params = [])
992
1069
}
993
1070
994
1071
1072
+ /**
1073
+ * Returns the data lifecycle of the selected data streams.
1074
+ *
1075
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/dlm-get-lifecycle.html
1076
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1077
+ *
1078
+ * @param array{
1079
+ * name: list, // (REQUIRED) A comma-separated list of data streams to get; use `*` to get all data streams
1080
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1081
+ * include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1082
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1083
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1084
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1085
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1086
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
1087
+ * } $params
1088
+ *
1089
+ * @throws MissingParameterException if a required parameter is missing
1090
+ * @throws NoNodeAvailableException if all the hosts are offline
1091
+ * @throws ClientResponseException if the status code of response is 4xx
1092
+ * @throws ServerResponseException if the status code of response is 5xx
1093
+ *
1094
+ * @return Elasticsearch|Promise
1095
+ */
1096
+ public function getDataLifecycle (array $ params = [])
1097
+ {
1098
+ $ this ->checkRequiredParameters (['name ' ], $ params );
1099
+ $ url = '/_data_stream/ ' . $ this ->encode ($ params ['name ' ]) . '/_lifecycle ' ;
1100
+ $ method = 'GET ' ;
1101
+
1102
+ $ url = $ this ->addQueryString ($ url , $ params , ['expand_wildcards ' ,'include_defaults ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1103
+ $ headers = [
1104
+ 'Accept ' => 'application/json ' ,
1105
+ ];
1106
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
1107
+ }
1108
+
1109
+
995
1110
/**
996
1111
* Returns data streams.
997
1112
*
@@ -1000,6 +1115,7 @@ public function getAlias(array $params = [])
1000
1115
* @param array{
1001
1116
* name: list, // A comma-separated list of data streams to get; use `*` to get all data streams
1002
1117
* expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1118
+ * include_defaults: boolean, // Return all relevant default configurations for the data stream (default: false)
1003
1119
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1004
1120
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1005
1121
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1022,7 +1138,7 @@ public function getDataStream(array $params = [])
1022
1138
$ url = '/_data_stream ' ;
1023
1139
$ method = 'GET ' ;
1024
1140
}
1025
- $ url = $ this ->addQueryString ($ url , $ params , ['expand_wildcards ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1141
+ $ url = $ this ->addQueryString ($ url , $ params , ['expand_wildcards ' ,'include_defaults ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1026
1142
$ headers = [
1027
1143
'Accept ' => 'application/json ' ,
1028
1144
];
@@ -1085,6 +1201,7 @@ public function getFieldMapping(array $params = [])
1085
1201
* flat_settings: boolean, // Return settings in flat format (default: false)
1086
1202
* master_timeout: time, // Explicit operation timeout for connection to master node
1087
1203
* local: boolean, // Return local information, do not retrieve the state from master node (default: false)
1204
+ * include_defaults: boolean, // Return all relevant default configurations for the index template (default: false)
1088
1205
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1089
1206
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1090
1207
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1107,7 +1224,7 @@ public function getIndexTemplate(array $params = [])
1107
1224
$ url = '/_index_template ' ;
1108
1225
$ method = 'GET ' ;
1109
1226
}
1110
- $ url = $ this ->addQueryString ($ url , $ params , ['flat_settings ' ,'master_timeout ' ,'local ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1227
+ $ url = $ this ->addQueryString ($ url , $ params , ['flat_settings ' ,'master_timeout ' ,'local ' ,'include_defaults ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1111
1228
$ headers = [
1112
1229
'Accept ' => 'application/json ' ,
1113
1230
];
@@ -1434,6 +1551,46 @@ public function putAlias(array $params = [])
1434
1551
}
1435
1552
1436
1553
1554
+ /**
1555
+ * Updates the data lifecycle of the selected data streams.
1556
+ *
1557
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/dlm-put-lifecycle.html
1558
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
1559
+ *
1560
+ * @param array{
1561
+ * name: list, // (REQUIRED) A comma-separated list of data streams whose lifecycle will be updated; use `*` to set the lifecycle to all data streams
1562
+ * expand_wildcards: enum, // Whether wildcard expressions should get expanded to open or closed indices (default: open)
1563
+ * timeout: time, // Explicit timestamp for the document
1564
+ * master_timeout: time, // Specify timeout for connection to master
1565
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1566
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1567
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
1568
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1569
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
1570
+ * body: array, // The data lifecycle configuration that consist of the data retention
1571
+ * } $params
1572
+ *
1573
+ * @throws MissingParameterException if a required parameter is missing
1574
+ * @throws NoNodeAvailableException if all the hosts are offline
1575
+ * @throws ClientResponseException if the status code of response is 4xx
1576
+ * @throws ServerResponseException if the status code of response is 5xx
1577
+ *
1578
+ * @return Elasticsearch|Promise
1579
+ */
1580
+ public function putDataLifecycle (array $ params = [])
1581
+ {
1582
+ $ this ->checkRequiredParameters (['name ' ], $ params );
1583
+ $ url = '/_data_stream/ ' . $ this ->encode ($ params ['name ' ]) . '/_lifecycle ' ;
1584
+ $ method = 'PUT ' ;
1585
+
1586
+ $ url = $ this ->addQueryString ($ url , $ params , ['expand_wildcards ' ,'timeout ' ,'master_timeout ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1587
+ $ headers = [
1588
+ 'Accept ' => 'application/json ' ,
1589
+ ];
1590
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
1591
+ }
1592
+
1593
+
1437
1594
/**
1438
1595
* Creates or updates an index template.
1439
1596
*
@@ -1937,6 +2094,7 @@ public function shrink(array $params = [])
1937
2094
* create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
1938
2095
* cause: string, // User defined reason for dry-run creating the new template for simulation purposes
1939
2096
* master_timeout: time, // Specify timeout for connection to master
2097
+ * include_defaults: boolean, // Return all relevant default configurations for this index template simulation (default: false)
1940
2098
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1941
2099
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1942
2100
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1958,7 +2116,7 @@ public function simulateIndexTemplate(array $params = [])
1958
2116
$ url = '/_index_template/_simulate_index/ ' . $ this ->encode ($ params ['name ' ]);
1959
2117
$ method = 'POST ' ;
1960
2118
1961
- $ url = $ this ->addQueryString ($ url , $ params , ['create ' ,'cause ' ,'master_timeout ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2119
+ $ url = $ this ->addQueryString ($ url , $ params , ['create ' ,'cause ' ,'master_timeout ' ,'include_defaults ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
1962
2120
$ headers = [
1963
2121
'Accept ' => 'application/json ' ,
1964
2122
'Content-Type ' => 'application/json ' ,
@@ -1977,6 +2135,7 @@ public function simulateIndexTemplate(array $params = [])
1977
2135
* create: boolean, // Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one
1978
2136
* cause: string, // User defined reason for dry-run creating the new template for simulation purposes
1979
2137
* master_timeout: time, // Specify timeout for connection to master
2138
+ * include_defaults: boolean, // Return all relevant default configurations for this template simulation (default: false)
1980
2139
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
1981
2140
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
1982
2141
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -2000,7 +2159,7 @@ public function simulateTemplate(array $params = [])
2000
2159
$ url = '/_index_template/_simulate ' ;
2001
2160
$ method = 'POST ' ;
2002
2161
}
2003
- $ url = $ this ->addQueryString ($ url , $ params , ['create ' ,'cause ' ,'master_timeout ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2162
+ $ url = $ this ->addQueryString ($ url , $ params , ['create ' ,'cause ' ,'master_timeout ' ,'include_defaults ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
2004
2163
$ headers = [
2005
2164
'Accept ' => 'application/json ' ,
2006
2165
'Content-Type ' => 'application/json ' ,
0 commit comments