stretchy-model 0.6.6 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/_sidebar.md +2 -1
- data/docs/examples/_sidebar.md +1 -1
- data/docs/examples/neural_search_with_llm.md +381 -0
- data/docs/guides/_sidebar.md +2 -1
- data/lib/elasticsearch/api/actions/connector/check_in.rb +64 -0
- data/lib/elasticsearch/api/actions/connector/delete.rb +64 -0
- data/lib/elasticsearch/api/actions/connector/get.rb +64 -0
- data/lib/elasticsearch/api/actions/connector/last_sync.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/list.rb +60 -0
- data/lib/elasticsearch/api/actions/connector/post.rb +57 -0
- data/lib/elasticsearch/api/actions/connector/put.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_api_key_id.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_configuration.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_error.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_index_name.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_name.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_native.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_service_type.rb +66 -0
- data/lib/elasticsearch/api/actions/connector/update_status.rb +66 -0
- data/lib/elasticsearch/api/namespace/connector.rb +36 -0
- data/lib/opensearch/api/actions/machine_learning/connector/delete.rb +42 -0
- data/lib/opensearch/api/actions/machine_learning/connector/get.rb +42 -0
- data/lib/opensearch/api/actions/machine_learning/connector/list.rb +38 -0
- data/lib/opensearch/api/actions/machine_learning/connector/post.rb +35 -0
- data/lib/opensearch/api/actions/machine_learning/connector/put.rb +44 -0
- data/lib/opensearch/api/actions/machine_learning/models/predict.rb +32 -0
- data/lib/opensearch/api/namespace/connector.rb +19 -0
- data/lib/stretchy/machine_learning/connector.rb +130 -0
- data/lib/stretchy/machine_learning/errors.rb +25 -0
- data/lib/stretchy/machine_learning/model.rb +162 -109
- data/lib/stretchy/machine_learning/registry.rb +19 -0
- data/lib/stretchy/open_search_compatibility.rb +2 -0
- data/lib/stretchy/pipelines/processor.rb +2 -0
- data/lib/stretchy/rails/railtie.rb +11 -0
- data/lib/stretchy/rails/tasks/connector/create.rake +32 -0
- data/lib/stretchy/rails/tasks/connector/delete.rake +27 -0
- data/lib/stretchy/rails/tasks/connector/status.rake +31 -0
- data/lib/stretchy/rails/tasks/connector/update.rake +32 -0
- data/lib/stretchy/rails/tasks/index/create.rake +28 -0
- data/lib/stretchy/rails/tasks/index/delete.rake +27 -0
- data/lib/stretchy/rails/tasks/index/status.rake +23 -0
- data/lib/stretchy/rails/tasks/ml/delete.rake +25 -0
- data/lib/stretchy/rails/tasks/ml/deploy.rake +78 -0
- data/lib/stretchy/rails/tasks/ml/status.rake +31 -0
- data/lib/stretchy/rails/tasks/pipeline/create.rake +27 -0
- data/lib/stretchy/rails/tasks/pipeline/delete.rake +26 -0
- data/lib/stretchy/rails/tasks/pipeline/status.rake +25 -0
- data/lib/stretchy/rails/tasks/status.rake +15 -0
- data/lib/stretchy/rails/tasks/stretchy.rake +42 -0
- data/lib/stretchy/version.rb +1 -1
- data/lib/stretchy.rb +7 -0
- metadata +62 -3
- data/docs/examples/semantic_search_with_llm.md +0 -83
@@ -0,0 +1,60 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Lists all connectors.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [Integer] :from Starting offset (default: 0)
|
32
|
+
# @option arguments [Integer] :size Specifies a max number of results to get (default: 100)
|
33
|
+
# @option arguments [List] :index_name A comma-separated list of connector index names to fetch connector documents for
|
34
|
+
# @option arguments [List] :connector_name A comma-separated list of connector names to fetch connector documents for
|
35
|
+
# @option arguments [List] :service_type A comma-separated list of connector service types to fetch connector documents for
|
36
|
+
# @option arguments [String] :query A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names
|
37
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
38
|
+
#
|
39
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html
|
40
|
+
#
|
41
|
+
def list(arguments = {})
|
42
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.list' }
|
43
|
+
|
44
|
+
arguments = arguments.clone
|
45
|
+
headers = arguments.delete(:headers) || {}
|
46
|
+
|
47
|
+
body = nil
|
48
|
+
|
49
|
+
method = Elasticsearch::API::HTTP_GET
|
50
|
+
path = '_connector'
|
51
|
+
params = Utils.process_params(arguments)
|
52
|
+
|
53
|
+
Elasticsearch::API::Response.new(
|
54
|
+
perform_request(method, path, params, body, headers, request_opts)
|
55
|
+
)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Creates a connector.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
32
|
+
# @option arguments [Hash] :body The connector configuration. (*Required*)
|
33
|
+
#
|
34
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html
|
35
|
+
#
|
36
|
+
def post(arguments = {})
|
37
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.post' }
|
38
|
+
|
39
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
40
|
+
|
41
|
+
arguments = arguments.clone
|
42
|
+
headers = arguments.delete(:headers) || {}
|
43
|
+
|
44
|
+
body = arguments.delete(:body)
|
45
|
+
|
46
|
+
method = Elasticsearch::API::HTTP_POST
|
47
|
+
path = '_connector'
|
48
|
+
params = {}
|
49
|
+
|
50
|
+
Elasticsearch::API::Response.new(
|
51
|
+
perform_request(method, path, params, body, headers, request_opts)
|
52
|
+
)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Creates or updates a connector.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be created or updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body The connector configuration. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html
|
36
|
+
#
|
37
|
+
def put(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.put' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the API key id and/or API key secret id fields in the connector document.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body An object containing the connector's API key id and/or Connector Secret document id for that API key. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html
|
36
|
+
#
|
37
|
+
def update_api_key_id(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_api_key_id' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_api_key_id"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the connector configuration.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body Mapping between field names to configuration. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html
|
36
|
+
#
|
37
|
+
def update_configuration(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_configuration' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_configuration"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the error field in the connector document.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body An object containing the connector's error. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html
|
36
|
+
#
|
37
|
+
def update_error(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_error' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_error"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the filtering field in the connector document.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body A list of connector filtering configurations. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html
|
36
|
+
#
|
37
|
+
def update_filtering(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_filtering' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_filtering"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the index name of the connector.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body An object containing the connector's index name. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html
|
36
|
+
#
|
37
|
+
def update_index_name(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_index_name' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_index_name"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the name and/or description fields in the connector document.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body An object containing the connector's name and/or description. (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html
|
36
|
+
#
|
37
|
+
def update_name(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_name' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_name"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Licensed to Elasticsearch B.V. under one or more contributor
|
2
|
+
# license agreements. See the NOTICE file distributed with
|
3
|
+
# this work for additional information regarding copyright
|
4
|
+
# ownership. Elasticsearch B.V. licenses this file to you under
|
5
|
+
# the Apache License, Version 2.0 (the "License"); you may
|
6
|
+
# not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing,
|
12
|
+
# software distributed under the License is distributed on an
|
13
|
+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
14
|
+
# KIND, either express or implied. See the License for the
|
15
|
+
# specific language governing permissions and limitations
|
16
|
+
# under the License.
|
17
|
+
#
|
18
|
+
# Auto generated from build hash f284cc16f4d4b4289bc679aa1529bb504190fe80
|
19
|
+
# @see https://github.com/elastic/elasticsearch/tree/main/rest-api-spec
|
20
|
+
#
|
21
|
+
module Elasticsearch
|
22
|
+
module API
|
23
|
+
module Connector
|
24
|
+
module Actions
|
25
|
+
# Updates the is_native flag of the connector.
|
26
|
+
# This functionality is Experimental and may be changed or removed
|
27
|
+
# completely in a future release. Elastic will take a best effort approach
|
28
|
+
# to fix any issues, but experimental features are not subject to the
|
29
|
+
# support SLA of official GA features.
|
30
|
+
#
|
31
|
+
# @option arguments [String] :connector_id The unique identifier of the connector to be updated.
|
32
|
+
# @option arguments [Hash] :headers Custom HTTP headers
|
33
|
+
# @option arguments [Hash] :body An object containing the connector's is_native flag (*Required*)
|
34
|
+
#
|
35
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/current/connector-apis.html
|
36
|
+
#
|
37
|
+
def update_native(arguments = {})
|
38
|
+
request_opts = { endpoint: arguments[:endpoint] || 'connector.update_native' }
|
39
|
+
|
40
|
+
defined_params = [:connector_id].each_with_object({}) do |variable, set_variables|
|
41
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
42
|
+
end
|
43
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
44
|
+
|
45
|
+
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
46
|
+
raise ArgumentError, "Required argument 'connector_id' missing" unless arguments[:connector_id]
|
47
|
+
|
48
|
+
arguments = arguments.clone
|
49
|
+
headers = arguments.delete(:headers) || {}
|
50
|
+
|
51
|
+
body = arguments.delete(:body)
|
52
|
+
|
53
|
+
_connector_id = arguments.delete(:connector_id)
|
54
|
+
|
55
|
+
method = Elasticsearch::API::HTTP_PUT
|
56
|
+
path = "_connector/#{Utils.__listify(_connector_id)}/_native"
|
57
|
+
params = {}
|
58
|
+
|
59
|
+
Elasticsearch::API::Response.new(
|
60
|
+
perform_request(method, path, params, body, headers, request_opts)
|
61
|
+
)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|