File manager - Edit - /var/www/payraty/helpdesk/vendor/elasticsearch/elasticsearch/src/Endpoints/Connector.php
Back
<?php /** * Elasticsearch PHP Client * * @link https://github.com/elastic/elasticsearch-php * @copyright Copyright (c) Elasticsearch B.V (https://www.elastic.co) * @license https://opensource.org/licenses/MIT MIT License * * Licensed to Elasticsearch B.V under one or more agreements. * Elasticsearch B.V licenses this file to you under the MIT License. * See the LICENSE file in the project root for more information. */ declare(strict_types=1); namespace Elastic\Elasticsearch\Endpoints; use Elastic\Elasticsearch\Exception\ClientResponseException; use Elastic\Elasticsearch\Exception\MissingParameterException; use Elastic\Elasticsearch\Exception\ServerResponseException; use Elastic\Elasticsearch\Response\Elasticsearch; use Elastic\Transport\Exception\NoNodeAvailableException; use Http\Promise\Promise; /** * @generated This file is generated, please do not edit */ class Connector extends AbstractEndpoint { /** * Updates the last_seen timestamp in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function checkIn(array $params = []) { $this->checkRequiredParameters(['connector_id'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_check_in'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.check_in'); return $this->client->sendRequest($request); } /** * Deletes a connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be deleted. * delete_sync_jobs: boolean, // Determines whether associated sync jobs are also deleted. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function delete(array $params = []) { $this->checkRequiredParameters(['connector_id'], $params); $url = '/_connector/' . $this->encode($params['connector_id']); $method = 'DELETE'; $url = $this->addQueryString($url, $params, ['delete_sync_jobs','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.delete'); return $this->client->sendRequest($request); } /** * Returns the details about a connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be returned. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function get(array $params = []) { $this->checkRequiredParameters(['connector_id'], $params); $url = '/_connector/' . $this->encode($params['connector_id']); $method = 'GET'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.get'); return $this->client->sendRequest($request); } /** * Updates the stats of last sync in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) Object with stats related to the last connector sync run. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function lastSync(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_last_sync'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.last_sync'); return $this->client->sendRequest($request); } /** * Lists all connectors. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * from: int, // Starting offset (default: 0) * size: int, // Specifies a max number of results to get (default: 100) * index_name: list, // A comma-separated list of connector index names to fetch connector documents for * connector_name: list, // A comma-separated list of connector names to fetch connector documents for * service_type: list, // A comma-separated list of connector service types to fetch connector documents for * query: string, // A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function list(array $params = []) { $url = '/_connector'; $method = 'GET'; $url = $this->addQueryString($url, $params, ['from','size','index_name','connector_name','service_type','query','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'connector.list'); return $this->client->sendRequest($request); } /** * Creates a connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // The connector configuration. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function post(array $params = []) { $url = '/_connector'; $method = 'POST'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'connector.post'); return $this->client->sendRequest($request); } /** * Creates or updates a connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // The unique identifier of the connector to be created or updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // The connector configuration. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function put(array $params = []) { if (isset($params['connector_id'])) { $url = '/_connector/' . $this->encode($params['connector_id']); $method = 'PUT'; } else { $url = '/_connector'; $method = 'PUT'; } $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.put'); return $this->client->sendRequest($request); } /** * Cancels a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/cancel-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be canceled * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobCancel(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_cancel'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_cancel'); return $this->client->sendRequest($request); } /** * Checks in a connector sync job (refreshes 'last_seen'). * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be checked in * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobCheckIn(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_check_in'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_check_in'); return $this->client->sendRequest($request); } /** * Claims a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/claim-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be claimed. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) Data to claim a sync job. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobClaim(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id','body'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_claim'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_claim'); return $this->client->sendRequest($request); } /** * Deletes a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be deleted. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobDelete(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']); $method = 'DELETE'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_delete'); return $this->client->sendRequest($request); } /** * Sets an error for a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-error-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to set an error for. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The error to set in the connector sync job. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobError(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id','body'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_error'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_error'); return $this->client->sendRequest($request); } /** * Returns the details about a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be returned. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobGet(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']); $method = 'GET'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_get'); return $this->client->sendRequest($request); } /** * Lists all connector sync jobs. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-sync-jobs-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * from: int, // Starting offset (default: 0) * size: int, // specifies a max number of results to get (default: 100) * status: string, // Sync job status, which sync jobs are fetched for * connector_id: string, // Id of the connector to fetch the sync jobs for * job_type: list, // A comma-separated list of job types * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobList(array $params = []) { $url = '/_connector/_sync_job'; $method = 'GET'; $url = $this->addQueryString($url, $params, ['from','size','status','connector_id','job_type','pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_list'); return $this->client->sendRequest($request); } /** * Creates a connector sync job. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-sync-job-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The connector sync job data. * } $params * * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobPost(array $params = []) { $this->checkRequiredParameters(['body'], $params); $url = '/_connector/_sync_job'; $method = 'POST'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, [], $request, 'connector.sync_job_post'); return $this->client->sendRequest($request); } /** * Updates the stats fields in the connector sync job document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/set-connector-sync-job-stats-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_sync_job_id: string, // (REQUIRED) The unique identifier of the connector sync job to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) The stats to update for the connector sync job. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function syncJobUpdateStats(array $params = []) { $this->checkRequiredParameters(['connector_sync_job_id','body'], $params); $url = '/_connector/_sync_job/' . $this->encode($params['connector_sync_job_id']) . '/_stats'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_sync_job_id'], $request, 'connector.sync_job_update_stats'); return $this->client->sendRequest($request); } /** * Activates the draft filtering rules if they are in a validated state. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateActiveFiltering(array $params = []) { $this->checkRequiredParameters(['connector_id'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_activate'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_active_filtering'); return $this->client->sendRequest($request); } /** * Updates the API key id and/or API key secret id fields in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's API key id and/or Connector Secret document id for that API key. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateApiKeyId(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_api_key_id'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_api_key_id'); return $this->client->sendRequest($request); } /** * Updates the connector configuration. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) Mapping between field names to configuration. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateConfiguration(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_configuration'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_configuration'); return $this->client->sendRequest($request); } /** * Updates the error field in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's error. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateError(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_error'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_error'); return $this->client->sendRequest($request); } /** * Updates the connector features in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-features-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's features definition. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateFeatures(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_features'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_features'); return $this->client->sendRequest($request); } /** * Updates the filtering field in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) A list of connector filtering configurations. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateFiltering(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering'); return $this->client->sendRequest($request); } /** * Updates the validation info of the draft filtering rules. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) Validation info for the draft filtering rules * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateFilteringValidation(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_filtering/_validation'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_filtering_validation'); return $this->client->sendRequest($request); } /** * Updates the index name of the connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's index name. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateIndexName(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_index_name'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_index_name'); return $this->client->sendRequest($request); } /** * Updates the name and/or description fields in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's name and/or description. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateName(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_name'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_name'); return $this->client->sendRequest($request); } /** * Updates the is_native flag of the connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's is_native flag * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateNative(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_native'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_native'); return $this->client->sendRequest($request); } /** * Updates the pipeline field in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object with connector ingest pipeline configuration. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updatePipeline(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_pipeline'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_pipeline'); return $this->client->sendRequest($request); } /** * Updates the scheduling field in the connector document. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's scheduling configuration. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateScheduling(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_scheduling'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_scheduling'); return $this->client->sendRequest($request); } /** * Updates the service type of the connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's service type. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateServiceType(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_service_type'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_service_type'); return $this->client->sendRequest($request); } /** * Updates the status of the connector. * * @see https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html * @internal This API is EXPERIMENTAL and may be changed or removed completely in a future release * * @param array{ * connector_id: string, // (REQUIRED) The unique identifier of the connector to be updated. * pretty: boolean, // Pretty format the returned JSON response. (DEFAULT: false) * human: boolean, // Return human readable values for statistics. (DEFAULT: true) * error_trace: boolean, // Include the stack trace of returned errors. (DEFAULT: false) * source: string, // The URL-encoded request definition. Useful for libraries that do not accept a request body for non-POST requests. * filter_path: list, // A comma-separated list of filters used to reduce the response. * body: array, // (REQUIRED) An object containing the connector's status. * } $params * * @throws MissingParameterException if a required parameter is missing * @throws NoNodeAvailableException if all the hosts are offline * @throws ClientResponseException if the status code of response is 4xx * @throws ServerResponseException if the status code of response is 5xx * * @return Elasticsearch|Promise */ public function updateStatus(array $params = []) { $this->checkRequiredParameters(['connector_id','body'], $params); $url = '/_connector/' . $this->encode($params['connector_id']) . '/_status'; $method = 'PUT'; $url = $this->addQueryString($url, $params, ['pretty','human','error_trace','source','filter_path']); $headers = [ 'Accept' => 'application/json', 'Content-Type' => 'application/json', ]; $request = $this->createRequest($method, $url, $headers, $params['body'] ?? null); $request = $this->addOtelAttributes($params, ['connector_id'], $request, 'connector.update_status'); return $this->client->sendRequest($request); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.30 | Generation time: 0 |
proxy
|
phpinfo
|
Settings