@@ -182,7 +182,11 @@ public function lastSync(array $params = [])
182
182
*
183
183
* @param array{
184
184
* from: int, // Starting offset (default: 0)
185
- * size: int, // specifies a max number of results to get (default: 100)
185
+ * size: int, // Specifies a max number of results to get (default: 100)
186
+ * index_name: list, // A comma-separated list of connector index names to fetch connector documents for
187
+ * connector_name: list, // A comma-separated list of connector names to fetch connector documents for
188
+ * service_type: list, // A comma-separated list of connector service types to fetch connector documents for
189
+ * query: string, // A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names
186
190
* pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
187
191
* human: boolean, // Return human readable values for statistics. (DEFAULT: true)
188
192
* error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
@@ -201,7 +205,7 @@ public function list(array $params = [])
201
205
$ url = '/_connector ' ;
202
206
$ method = 'GET ' ;
203
207
204
- $ url = $ this ->addQueryString ($ url , $ params , ['from ' ,'size ' ,'pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
208
+ $ url = $ this ->addQueryString ($ url , $ params , ['from ' ,'size ' ,'index_name ' , ' connector_name ' , ' service_type ' , ' query ' , ' pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
205
209
$ headers = [
206
210
'Accept ' => 'application/json ' ,
207
211
];
@@ -283,6 +287,44 @@ public function put(array $params = [])
283
287
}
284
288
285
289
290
+ /**
291
+ * Updates the API key id and/or API key secret id fields in the connector document.
292
+ *
293
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html
294
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
295
+ *
296
+ * @param array{
297
+ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
298
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
299
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
300
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
301
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
302
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
303
+ * body: array, // (REQUIRED) An object containing the connector's API key id and/or Connector Secret document id for that API key.
304
+ * } $params
305
+ *
306
+ * @throws MissingParameterException if a required parameter is missing
307
+ * @throws NoNodeAvailableException if all the hosts are offline
308
+ * @throws ClientResponseException if the status code of response is 4xx
309
+ * @throws ServerResponseException if the status code of response is 5xx
310
+ *
311
+ * @return Elasticsearch|Promise
312
+ */
313
+ public function updateApiKeyId (array $ params = [])
314
+ {
315
+ $ this ->checkRequiredParameters (['connector_id ' ,'body ' ], $ params );
316
+ $ url = '/_connector/ ' . $ this ->encode ($ params ['connector_id ' ]) . '/_api_key_id ' ;
317
+ $ method = 'PUT ' ;
318
+
319
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
320
+ $ headers = [
321
+ 'Accept ' => 'application/json ' ,
322
+ 'Content-Type ' => 'application/json ' ,
323
+ ];
324
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
325
+ }
326
+
327
+
286
328
/**
287
329
* Updates the connector configuration.
288
330
*
@@ -397,6 +439,44 @@ public function updateFiltering(array $params = [])
397
439
}
398
440
399
441
442
+ /**
443
+ * Updates the index name of the connector.
444
+ *
445
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html
446
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
447
+ *
448
+ * @param array{
449
+ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
450
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
451
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
452
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
453
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
454
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
455
+ * body: array, // (REQUIRED) An object containing the connector's index name.
456
+ * } $params
457
+ *
458
+ * @throws MissingParameterException if a required parameter is missing
459
+ * @throws NoNodeAvailableException if all the hosts are offline
460
+ * @throws ClientResponseException if the status code of response is 4xx
461
+ * @throws ServerResponseException if the status code of response is 5xx
462
+ *
463
+ * @return Elasticsearch|Promise
464
+ */
465
+ public function updateIndexName (array $ params = [])
466
+ {
467
+ $ this ->checkRequiredParameters (['connector_id ' ,'body ' ], $ params );
468
+ $ url = '/_connector/ ' . $ this ->encode ($ params ['connector_id ' ]) . '/_index_name ' ;
469
+ $ method = 'PUT ' ;
470
+
471
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
472
+ $ headers = [
473
+ 'Accept ' => 'application/json ' ,
474
+ 'Content-Type ' => 'application/json ' ,
475
+ ];
476
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
477
+ }
478
+
479
+
400
480
/**
401
481
* Updates the name and/or description fields in the connector document.
402
482
*
@@ -435,6 +515,44 @@ public function updateName(array $params = [])
435
515
}
436
516
437
517
518
+ /**
519
+ * Updates the is_native flag of the connector.
520
+ *
521
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html
522
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
523
+ *
524
+ * @param array{
525
+ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
526
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
527
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
528
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
529
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
530
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
531
+ * body: array, // (REQUIRED) An object containing the connector's is_native flag
532
+ * } $params
533
+ *
534
+ * @throws MissingParameterException if a required parameter is missing
535
+ * @throws NoNodeAvailableException if all the hosts are offline
536
+ * @throws ClientResponseException if the status code of response is 4xx
537
+ * @throws ServerResponseException if the status code of response is 5xx
538
+ *
539
+ * @return Elasticsearch|Promise
540
+ */
541
+ public function updateNative (array $ params = [])
542
+ {
543
+ $ this ->checkRequiredParameters (['connector_id ' ,'body ' ], $ params );
544
+ $ url = '/_connector/ ' . $ this ->encode ($ params ['connector_id ' ]) . '/_native ' ;
545
+ $ method = 'PUT ' ;
546
+
547
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
548
+ $ headers = [
549
+ 'Accept ' => 'application/json ' ,
550
+ 'Content-Type ' => 'application/json ' ,
551
+ ];
552
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
553
+ }
554
+
555
+
438
556
/**
439
557
* Updates the pipeline field in the connector document.
440
558
*
@@ -509,4 +627,80 @@ public function updateScheduling(array $params = [])
509
627
];
510
628
return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
511
629
}
630
+
631
+
632
+ /**
633
+ * Updates the service type of the connector.
634
+ *
635
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html
636
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
637
+ *
638
+ * @param array{
639
+ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
640
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
641
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
642
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
643
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
644
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
645
+ * body: array, // (REQUIRED) An object containing the connector's service type.
646
+ * } $params
647
+ *
648
+ * @throws MissingParameterException if a required parameter is missing
649
+ * @throws NoNodeAvailableException if all the hosts are offline
650
+ * @throws ClientResponseException if the status code of response is 4xx
651
+ * @throws ServerResponseException if the status code of response is 5xx
652
+ *
653
+ * @return Elasticsearch|Promise
654
+ */
655
+ public function updateServiceType (array $ params = [])
656
+ {
657
+ $ this ->checkRequiredParameters (['connector_id ' ,'body ' ], $ params );
658
+ $ url = '/_connector/ ' . $ this ->encode ($ params ['connector_id ' ]) . '/_service_type ' ;
659
+ $ method = 'PUT ' ;
660
+
661
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
662
+ $ headers = [
663
+ 'Accept ' => 'application/json ' ,
664
+ 'Content-Type ' => 'application/json ' ,
665
+ ];
666
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
667
+ }
668
+
669
+
670
+ /**
671
+ * Updates the status of the connector.
672
+ *
673
+ * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html
674
+ * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release
675
+ *
676
+ * @param array{
677
+ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated.
678
+ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false)
679
+ * human: boolean, // Return human readable values for statistics. (DEFAULT: true)
680
+ * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false)
681
+ * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests.
682
+ * filter_path: list, // A comma-separated list of filters used to reduce the response.
683
+ * body: array, // (REQUIRED) An object containing the connector's status.
684
+ * } $params
685
+ *
686
+ * @throws MissingParameterException if a required parameter is missing
687
+ * @throws NoNodeAvailableException if all the hosts are offline
688
+ * @throws ClientResponseException if the status code of response is 4xx
689
+ * @throws ServerResponseException if the status code of response is 5xx
690
+ *
691
+ * @return Elasticsearch|Promise
692
+ */
693
+ public function updateStatus (array $ params = [])
694
+ {
695
+ $ this ->checkRequiredParameters (['connector_id ' ,'body ' ], $ params );
696
+ $ url = '/_connector/ ' . $ this ->encode ($ params ['connector_id ' ]) . '/_status ' ;
697
+ $ method = 'PUT ' ;
698
+
699
+ $ url = $ this ->addQueryString ($ url , $ params , ['pretty ' ,'human ' ,'error_trace ' ,'source ' ,'filter_path ' ]);
700
+ $ headers = [
701
+ 'Accept ' => 'application/json ' ,
702
+ 'Content-Type ' => 'application/json ' ,
703
+ ];
704
+ return $ this ->client ->sendRequest ($ this ->createRequest ($ method , $ url , $ headers , $ params ['body ' ] ?? null ));
705
+ }
512
706
}
0 commit comments