Skip to content

Commit a1d202a

Browse files
Auto-generated API code
1 parent ec3ba66 commit a1d202a

6 files changed

Lines changed: 134 additions & 20 deletions

File tree

src/Endpoints/Esql.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class Esql extends AbstractEndpoint
4343
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
4444
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
4545
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
46-
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer.. If body is a string must be a valid JSON.
46+
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer. Use the `settings` object to supply per-query settings (e.g. `time_zone`) — the request-body equivalent of in-query `SET`.. If body is a string must be a valid JSON.
4747
* } $params
4848
*
4949
* @throws NoNodeAvailableException if all the hosts are offline
@@ -570,7 +570,7 @@ public function putDataSource(?array $params = null)
570570
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
571571
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
572572
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
573-
* body: string|array<mixed>, // (REQUIRED) Dataset definition: parent data_source name, resource path, optional description, and type-specific settings.. If body is a string must be a valid JSON.
573+
* body: string|array<mixed>, // (REQUIRED) Dataset definition: parent data_source name, resource path, optional description, type-specific settings, and an optional mappings block (column types, path renames, format, _id).. If body is a string must be a valid JSON.
574574
* } $params
575575
*
576576
* @throws MissingParameterException if a required parameter is missing
@@ -656,7 +656,7 @@ public function putView(?array $params = null)
656656
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
657657
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
658658
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
659-
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer.. If body is a string must be a valid JSON.
659+
* body: string|array<mixed>, // (REQUIRED) Use the `query` element to start a query. Use `columnar` to format the answer. Use the `settings` object to supply per-query settings (e.g. `time_zone`) — the request-body equivalent of in-query `SET`.. If body is a string must be a valid JSON.
660660
* } $params
661661
*
662662
* @throws NoNodeAvailableException if all the hosts are offline

src/Endpoints/Indices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,7 @@ public function putAlias(?array $params = null)
20672067
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
20682068
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
20692069
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
2070-
* body: string|array<mixed>, // (REQUIRED) The data stream lifecycle configuration that consist of the data retention. If body is a string must be a valid JSON.
2070+
* body: string|array<mixed>, // (REQUIRED) The data stream lifecycle configuration, supporting fields: 'enabled', 'data_retention', 'downsampling', and 'frozen_after'. If body is a string must be a valid JSON.
20712071
* } $params
20722072
*
20732073
* @throws MissingParameterException if a required parameter is missing

src/Endpoints/Inference.php

Lines changed: 112 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,41 @@ public function delete(?array $params = null)
158158
}
159159

160160

161+
/**
162+
* Delete the inference region policy
163+
*
164+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete-region-policy
165+
*
166+
* @param array{
167+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
168+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
169+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
170+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
171+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
172+
* } $params
173+
*
174+
* @throws NoNodeAvailableException if all the hosts are offline
175+
* @throws ClientResponseException if the status code of response is 4xx
176+
* @throws ServerResponseException if the status code of response is 5xx
177+
*
178+
* @return Elasticsearch|Promise
179+
*/
180+
public function deleteRegionPolicy(?array $params = null)
181+
{
182+
$params = $params ?? [];
183+
$url = '/_inference/_region_policy';
184+
$method = 'DELETE';
185+
186+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
187+
$headers = [
188+
'Accept' => 'application/json',
189+
];
190+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
191+
$request = $this->addOtelAttributes($params, [], $request, 'inference.delete_region_policy');
192+
return $this->client->sendRequest($request);
193+
}
194+
195+
161196
/**
162197
* Perform embedding inference on the service
163198
*
@@ -246,6 +281,41 @@ public function get(?array $params = null)
246281
}
247282

248283

284+
/**
285+
* Get the inference region policy
286+
*
287+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get-region-policy
288+
*
289+
* @param array{
290+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
291+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
292+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
293+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
294+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
295+
* } $params
296+
*
297+
* @throws NoNodeAvailableException if all the hosts are offline
298+
* @throws ClientResponseException if the status code of response is 4xx
299+
* @throws ServerResponseException if the status code of response is 5xx
300+
*
301+
* @return Elasticsearch|Promise
302+
*/
303+
public function getRegionPolicy(?array $params = null)
304+
{
305+
$params = $params ?? [];
306+
$url = '/_inference/_region_policy';
307+
$method = 'GET';
308+
309+
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
310+
$headers = [
311+
'Accept' => 'application/json',
312+
];
313+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
314+
$request = $this->addOtelAttributes($params, [], $request, 'inference.get_region_policy');
315+
return $this->client->sendRequest($request);
316+
}
317+
318+
249319
/**
250320
* Perform inference on the service
251321
*
@@ -302,7 +372,7 @@ public function inference(?array $params = null)
302372
* @param array{
303373
* inference_id: string, // (REQUIRED) The inference Id
304374
* task_type?: string, // The task type
305-
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. (DEFAULT: 30s)
375+
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be created. The default depends on the task type: 120s for `completion` and `chat_completion`, and 30s for all other task types. (DEFAULT: 30s)
306376
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
307377
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
308378
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1371,6 +1441,45 @@ public function putOpenshiftAi(?array $params = null)
13711441
}
13721442

13731443

1444+
/**
1445+
* Create or update the inference region policy
1446+
*
1447+
* @link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-region-policy
1448+
*
1449+
* @param array{
1450+
* force?: bool, // If true, the region policy will be applied even if it would deny access to inference endpoints that are currently in use by ingest pipelines or semantic text fields.
1451+
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
1452+
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
1453+
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
1454+
* source?: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
1455+
* filter_path?: string|array<string>, // A comma-separated list of filters used to reduce the response.
1456+
* body: string|array<mixed>, // (REQUIRED) The region policy configuration. If body is a string must be a valid JSON.
1457+
* } $params
1458+
*
1459+
* @throws NoNodeAvailableException if all the hosts are offline
1460+
* @throws ClientResponseException if the status code of response is 4xx
1461+
* @throws ServerResponseException if the status code of response is 5xx
1462+
*
1463+
* @return Elasticsearch|Promise
1464+
*/
1465+
public function putRegionPolicy(?array $params = null)
1466+
{
1467+
$params = $params ?? [];
1468+
$this->checkRequiredParameters(['body'], $params);
1469+
$url = '/_inference/_region_policy';
1470+
$method = 'PUT';
1471+
1472+
$url = $this->addQueryString($url, $params, ['force','pretty','human','error_trace','source','filter_path']);
1473+
$headers = [
1474+
'Accept' => 'application/json',
1475+
'Content-Type' => 'application/json',
1476+
];
1477+
$request = $this->createRequest($method, $url, $headers, $params['body'] ?? null);
1478+
$request = $this->addOtelAttributes($params, [], $request, 'inference.put_region_policy');
1479+
return $this->client->sendRequest($request);
1480+
}
1481+
1482+
13741483
/**
13751484
* Create a VoyageAI inference endpoint
13761485
*
@@ -1634,6 +1743,7 @@ public function textEmbedding(?array $params = null)
16341743
* @param array{
16351744
* inference_id: string, // (REQUIRED) The inference Id
16361745
* task_type?: string, // The task type
1746+
* timeout?: int|string, // Specifies the amount of time to wait for the inference endpoint to be updated. The default depends on the task type: 120s for `completion` and `chat_completion`, and 30s for all other task types.
16371747
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
16381748
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
16391749
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -1660,7 +1770,7 @@ public function update(?array $params = null)
16601770
$url = '/_inference/' . $this->encode($params['inference_id']) . '/_update';
16611771
$method = 'PUT';
16621772
}
1663-
$url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']);
1773+
$url = $this->addQueryString($url, $params, ['timeout','pretty','human','error_trace','source','filter_path']);
16641774
$headers = [
16651775
'Accept' => 'application/json',
16661776
'Content-Type' => 'application/json',

src/Endpoints/Ingest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ public function deletePipeline(?array $params = null)
152152
/**
153153
* Get GeoIP statistics
154154
*
155-
* @link https://www.elastic.co/docs/reference/enrich-processor/geoip-processor
155+
* @link https://www.elastic.co/docs/reference/ingest-processor/geoip-processor
156156
*
157157
* @param array{
158158
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
@@ -310,7 +310,7 @@ public function getPipeline(?array $params = null)
310310
/**
311311
* Run a grok processor
312312
*
313-
* @link https://www.elastic.co/docs/reference/enrich-processor/grok-processor
313+
* @link https://www.elastic.co/docs/reference/ingest-processor/grok-processor
314314
* @group serverless
315315
*
316316
* @param array{

src/Endpoints/Synonyms.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ public function deleteSynonymRule(?array $params = null)
117117
*
118118
* @param array{
119119
* id: string, // (REQUIRED) The name of the synonyms set to be retrieved
120-
* from?: int, // The starting offset for query rules to retrieve.
121-
* size?: int, // The max number of query rules to retrieve. (DEFAULT: 10)
122-
* search_after?: string, // The rule ID of the last result from the previous page, for cursor-based pagination
120+
* from?: int, // The starting offset for synonym rules to retrieve.
121+
* size?: int, // The max number of synonym rules to retrieve. (DEFAULT: 10)
122+
* search_after?: string, // The synonym rule ID to use as a cursor for pagination. The next page of results will start after this rule ID. This parameter cannot be used with `from`.
123123
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
124124
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
125125
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -239,6 +239,7 @@ public function getSynonymsSets(?array $params = null)
239239
* @param array{
240240
* id: string, // (REQUIRED) The id of the synonyms set to be created or updated
241241
* refresh?: bool, // If `true`, the request will refresh the analyzers with the new synonyms set and wait for the new synonyms to be available before returning. If `false`, analyzers will not be reloaded with the new synonym set (DEFAULT: 1)
242+
* append?: bool, // If `true`, the provided synonym rules are appended to the existing set, with matching IDs overwriting existing rules. If `false`, the entire synonyms set is replaced with the new synonym rules definitions.
242243
* pretty?: bool, // Pretty format the returned JSON response. (DEFAULT: false)
243244
* human?: bool, // Return human readable values for statistics. (DEFAULT: true)
244245
* error_trace?: bool, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -261,7 +262,7 @@ public function putSynonym(?array $params = null)
261262
$url = '/_synonyms/' . $this->encode($params['id']);
262263
$method = 'PUT';
263264

264-
$url = $this->addQueryString($url, $params, ['refresh','pretty','human','error_trace','source','filter_path']);
265+
$url = $this->addQueryString($url, $params, ['refresh','append','pretty','human','error_trace','source','filter_path']);
265266
$headers = [
266267
'Accept' => 'application/json',
267268
'Content-Type' => 'application/json',

0 commit comments

Comments
 (0)