opensearch-ruby 4.0.0.pre.beta.1 → 4.0.0.pre.beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/USER_GUIDE.md +23 -5
- data/lib/opensearch/api/actions/asynchronous_search/delete.rb +2 -4
- data/lib/opensearch/api/actions/asynchronous_search/get.rb +1 -1
- data/lib/opensearch/api/actions/asynchronous_search/search.rb +4 -4
- data/lib/opensearch/api/actions/asynchronous_search/stats.rb +1 -1
- data/lib/opensearch/api/actions/cat/aliases.rb +8 -8
- data/lib/opensearch/api/actions/cat/all_pit_segments.rb +7 -7
- data/lib/opensearch/api/actions/cat/allocation.rb +10 -10
- data/lib/opensearch/api/actions/cat/cluster_manager.rb +8 -8
- data/lib/opensearch/api/actions/cat/count.rb +6 -6
- data/lib/opensearch/api/actions/cat/fielddata.rb +7 -7
- data/lib/opensearch/api/actions/cat/health.rb +6 -6
- data/lib/opensearch/api/actions/cat/indices.rb +16 -16
- data/lib/opensearch/api/actions/cat/master.rb +8 -8
- data/lib/opensearch/api/actions/cat/nodeattrs.rb +8 -8
- data/lib/opensearch/api/actions/cat/nodes.rb +12 -12
- data/lib/opensearch/api/actions/cat/pending_tasks.rb +10 -10
- data/lib/opensearch/api/actions/cat/pit_segments.rb +7 -7
- data/lib/opensearch/api/actions/cat/plugins.rb +9 -9
- data/lib/opensearch/api/actions/cat/recovery.rb +10 -10
- data/lib/opensearch/api/actions/cat/repositories.rb +9 -9
- data/lib/opensearch/api/actions/cat/segment_replication.rb +19 -18
- data/lib/opensearch/api/actions/cat/segments.rb +8 -8
- data/lib/opensearch/api/actions/cat/shards.rb +11 -11
- data/lib/opensearch/api/actions/cat/snapshots.rb +10 -10
- data/lib/opensearch/api/actions/cat/tasks.rb +9 -9
- data/lib/opensearch/api/actions/cat/templates.rb +9 -9
- data/lib/opensearch/api/actions/cat/thread_pool.rb +9 -9
- data/lib/opensearch/api/actions/clear_scroll.rb +1 -3
- data/lib/opensearch/api/actions/cluster/allocation_explain.rb +4 -4
- data/lib/opensearch/api/actions/cluster/delete_component_template.rb +5 -7
- data/lib/opensearch/api/actions/cluster/delete_decommission_awareness.rb +2 -4
- data/lib/opensearch/api/actions/cluster/delete_voting_config_exclusions.rb +3 -5
- data/lib/opensearch/api/actions/cluster/delete_weighted_routing.rb +1 -3
- data/lib/opensearch/api/actions/cluster/exists_component_template.rb +4 -4
- data/lib/opensearch/api/actions/cluster/get_component_template.rb +6 -4
- data/lib/opensearch/api/actions/cluster/get_decommission_awareness.rb +2 -2
- data/lib/opensearch/api/actions/cluster/get_settings.rb +5 -5
- data/lib/opensearch/api/actions/cluster/get_weighted_routing.rb +1 -1
- data/lib/opensearch/api/actions/cluster/health.rb +14 -14
- data/lib/opensearch/api/actions/cluster/pending_tasks.rb +5 -5
- data/lib/opensearch/api/actions/cluster/post_voting_config_exclusions.rb +4 -4
- data/lib/opensearch/api/actions/cluster/put_component_template.rb +6 -6
- data/lib/opensearch/api/actions/cluster/put_decommission_awareness.rb +3 -3
- data/lib/opensearch/api/actions/cluster/put_settings.rb +5 -5
- data/lib/opensearch/api/actions/cluster/put_weighted_routing.rb +1 -1
- data/lib/opensearch/api/actions/cluster/reroute.rb +6 -6
- data/lib/opensearch/api/actions/cluster/state.rb +10 -10
- data/lib/opensearch/api/actions/cluster/stats.rb +5 -5
- data/lib/opensearch/api/actions/count.rb +1 -1
- data/lib/opensearch/api/actions/dangling_indices/delete_dangling_index.rb +1 -3
- data/lib/opensearch/api/actions/delete.rb +1 -3
- data/lib/opensearch/api/actions/delete_all_pits.rb +1 -3
- data/lib/opensearch/api/actions/delete_by_query.rb +2 -2
- data/lib/opensearch/api/actions/delete_by_query_rethrottle.rb +1 -1
- data/lib/opensearch/api/actions/delete_pit.rb +1 -3
- data/lib/opensearch/api/actions/delete_script.rb +1 -3
- data/lib/opensearch/api/actions/flow_framework/delete.rb +1 -3
- data/lib/opensearch/api/actions/indices/delete.rb +1 -3
- data/lib/opensearch/api/actions/indices/delete_alias.rb +1 -3
- data/lib/opensearch/api/actions/indices/delete_data_stream.rb +1 -3
- data/lib/opensearch/api/actions/indices/delete_index_template.rb +1 -3
- data/lib/opensearch/api/actions/indices/delete_template.rb +1 -3
- data/lib/opensearch/api/actions/indices/forcemerge.rb +1 -1
- data/lib/opensearch/api/actions/indices/put_template.rb +1 -1
- data/lib/opensearch/api/actions/indices/upgrade.rb +0 -1
- data/lib/opensearch/api/actions/ingest/delete_pipeline.rb +5 -7
- data/lib/opensearch/api/actions/ingest/get_pipeline.rb +3 -3
- data/lib/opensearch/api/actions/ingest/processor_grok.rb +2 -2
- data/lib/opensearch/api/actions/ingest/put_pipeline.rb +5 -5
- data/lib/opensearch/api/actions/ingest/simulate.rb +3 -3
- data/lib/opensearch/api/actions/ism/delete_policy.rb +1 -3
- data/lib/opensearch/api/actions/knn/delete_model.rb +1 -3
- data/lib/opensearch/api/actions/ltr/stats.rb +41 -0
- data/lib/opensearch/api/actions/ml/chunk_model.rb +40 -0
- data/lib/opensearch/api/actions/ml/create_controller.rb +37 -0
- data/lib/opensearch/api/actions/ml/create_memory.rb +32 -0
- data/lib/opensearch/api/actions/ml/create_message.rb +37 -0
- data/lib/opensearch/api/actions/ml/create_model_meta.rb +32 -0
- data/lib/opensearch/api/actions/ml/delete_agent.rb +1 -3
- data/lib/opensearch/api/actions/ml/delete_connector.rb +1 -3
- data/lib/opensearch/api/actions/ml/delete_controller.rb +36 -0
- data/lib/opensearch/api/actions/ml/delete_memory.rb +36 -0
- data/lib/opensearch/api/actions/ml/delete_model.rb +1 -3
- data/lib/opensearch/api/actions/ml/delete_model_group.rb +1 -3
- data/lib/opensearch/api/actions/ml/delete_task.rb +1 -3
- data/lib/opensearch/api/actions/ml/execute_agent.rb +37 -0
- data/lib/opensearch/api/actions/ml/execute_algorithm.rb +37 -0
- data/lib/opensearch/api/actions/ml/get_agent.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_all_memories.rb +38 -0
- data/lib/opensearch/api/actions/ml/get_all_messages.rb +43 -0
- data/lib/opensearch/api/actions/ml/get_all_tools.rb +31 -0
- data/lib/opensearch/api/actions/ml/get_connector.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_controller.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_memory.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_message.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_message_traces.rb +43 -0
- data/lib/opensearch/api/actions/ml/get_model.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_profile.rb +32 -0
- data/lib/opensearch/api/actions/ml/get_profile_models.rb +35 -0
- data/lib/opensearch/api/actions/ml/get_profile_tasks.rb +35 -0
- data/lib/opensearch/api/actions/ml/get_stats.rb +36 -0
- data/lib/opensearch/api/actions/ml/get_tool.rb +36 -0
- data/lib/opensearch/api/actions/ml/load_model.rb +36 -0
- data/lib/opensearch/api/actions/ml/predict.rb +40 -0
- data/lib/opensearch/api/actions/ml/predict_model.rb +37 -0
- data/lib/opensearch/api/actions/ml/register_model_meta.rb +32 -0
- data/lib/opensearch/api/actions/ml/search_agents.rb +32 -0
- data/lib/opensearch/api/actions/ml/search_connectors.rb +32 -0
- data/lib/opensearch/api/actions/ml/search_memory.rb +32 -0
- data/lib/opensearch/api/actions/ml/search_message.rb +37 -0
- data/lib/opensearch/api/actions/ml/search_model_group.rb +32 -0
- data/lib/opensearch/api/actions/ml/search_models.rb +1 -1
- data/lib/opensearch/api/actions/ml/search_tasks.rb +32 -0
- data/lib/opensearch/api/actions/ml/train.rb +37 -0
- data/lib/opensearch/api/actions/ml/train_predict.rb +37 -0
- data/lib/opensearch/api/actions/ml/undeploy_model.rb +2 -3
- data/lib/opensearch/api/actions/ml/unload_model.rb +35 -0
- data/lib/opensearch/api/actions/ml/update_connector.rb +37 -0
- data/lib/opensearch/api/actions/ml/update_controller.rb +37 -0
- data/lib/opensearch/api/actions/ml/update_memory.rb +37 -0
- data/lib/opensearch/api/actions/ml/update_message.rb +37 -0
- data/lib/opensearch/api/actions/ml/update_model.rb +37 -0
- data/lib/opensearch/api/actions/ml/update_model_group.rb +37 -0
- data/lib/opensearch/api/actions/ml/upload_chunk.rb +40 -0
- data/lib/opensearch/api/actions/ml/upload_model.rb +32 -0
- data/lib/opensearch/api/actions/notifications/delete_config.rb +1 -3
- data/lib/opensearch/api/actions/notifications/delete_configs.rb +1 -3
- data/lib/opensearch/api/actions/observability/delete_object.rb +1 -3
- data/lib/opensearch/api/actions/observability/delete_objects.rb +1 -3
- data/lib/opensearch/api/actions/query/datasource_delete.rb +1 -3
- data/lib/opensearch/api/actions/reindex.rb +3 -1
- data/lib/opensearch/api/actions/reindex_rethrottle.rb +1 -1
- data/lib/opensearch/api/actions/replication/delete_replication_rule.rb +1 -3
- data/lib/opensearch/api/actions/rollups/delete.rb +1 -3
- data/lib/opensearch/api/actions/scroll.rb +1 -1
- data/lib/opensearch/api/actions/search_pipeline/delete.rb +1 -3
- data/lib/opensearch/api/actions/search_shards.rb +0 -1
- data/lib/opensearch/api/actions/security/authinfo.rb +3 -3
- data/lib/opensearch/api/actions/security/authtoken.rb +1 -1
- data/lib/opensearch/api/actions/security/config_upgrade_check.rb +1 -1
- data/lib/opensearch/api/actions/security/config_upgrade_perform.rb +1 -1
- data/lib/opensearch/api/actions/security/create_allowlist.rb +1 -1
- data/lib/opensearch/api/actions/security/create_role.rb +1 -1
- data/lib/opensearch/api/actions/security/create_role_mapping.rb +1 -1
- data/lib/opensearch/api/actions/security/create_tenant.rb +1 -1
- data/lib/opensearch/api/actions/security/create_update_tenancy_config.rb +1 -1
- data/lib/opensearch/api/actions/security/create_user.rb +1 -1
- data/lib/opensearch/api/actions/security/create_user_legacy.rb +1 -1
- data/lib/opensearch/api/actions/security/delete_action_group.rb +2 -4
- data/lib/opensearch/api/actions/security/delete_distinguished_name.rb +3 -5
- data/lib/opensearch/api/actions/security/delete_role.rb +2 -4
- data/lib/opensearch/api/actions/security/delete_role_mapping.rb +2 -4
- data/lib/opensearch/api/actions/security/delete_tenant.rb +2 -4
- data/lib/opensearch/api/actions/security/delete_user.rb +2 -4
- data/lib/opensearch/api/actions/security/delete_user_legacy.rb +1 -3
- data/lib/opensearch/api/actions/security/flush_cache.rb +2 -4
- data/lib/opensearch/api/actions/security/generate_obo_token.rb +1 -1
- data/lib/opensearch/api/actions/security/generate_user_token.rb +2 -2
- data/lib/opensearch/api/actions/security/generate_user_token_legacy.rb +1 -1
- data/lib/opensearch/api/actions/security/get_account_details.rb +1 -1
- data/lib/opensearch/api/actions/security/get_all_certificates.rb +2 -2
- data/lib/opensearch/api/actions/security/get_allowlist.rb +1 -1
- data/lib/opensearch/api/actions/security/get_configuration.rb +1 -1
- data/lib/opensearch/api/actions/security/get_dashboards_info.rb +1 -1
- data/lib/opensearch/api/actions/security/get_distinguished_name.rb +3 -3
- data/lib/opensearch/api/actions/security/get_distinguished_names.rb +2 -2
- data/lib/opensearch/api/actions/security/get_node_certificates.rb +4 -4
- data/lib/opensearch/api/actions/security/get_permissions_info.rb +1 -1
- data/lib/opensearch/api/actions/security/get_role.rb +1 -1
- data/lib/opensearch/api/actions/security/get_role_mapping.rb +2 -2
- data/lib/opensearch/api/actions/security/get_sslinfo.rb +2 -2
- data/lib/opensearch/api/actions/security/get_tenancy_config.rb +1 -1
- data/lib/opensearch/api/actions/security/get_tenant.rb +1 -1
- data/lib/opensearch/api/actions/security/get_user.rb +1 -1
- data/lib/opensearch/api/actions/security/health.rb +2 -2
- data/lib/opensearch/api/actions/security/migrate.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_action_group.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_action_groups.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_allowlist.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_audit_configuration.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_configuration.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_distinguished_name.rb +5 -5
- data/lib/opensearch/api/actions/security/patch_distinguished_names.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_role.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_role_mapping.rb +2 -2
- data/lib/opensearch/api/actions/security/patch_role_mappings.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_tenant.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_tenants.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_user.rb +1 -1
- data/lib/opensearch/api/actions/security/patch_users.rb +1 -1
- data/lib/opensearch/api/actions/security/post_dashboards_info.rb +1 -1
- data/lib/opensearch/api/actions/security/reload_http_certificates.rb +1 -1
- data/lib/opensearch/api/actions/security/reload_transport_certificates.rb +1 -1
- data/lib/opensearch/api/actions/security/tenant_info.rb +1 -1
- data/lib/opensearch/api/actions/security/update_configuration.rb +1 -1
- data/lib/opensearch/api/actions/security/update_distinguished_name.rb +2 -2
- data/lib/opensearch/api/actions/security/validate.rb +1 -1
- data/lib/opensearch/api/actions/security/who_am_i.rb +1 -1
- data/lib/opensearch/api/actions/security/who_am_i_protected.rb +1 -1
- data/lib/opensearch/api/actions/sm/create_policy.rb +1 -1
- data/lib/opensearch/api/actions/sm/delete_policy.rb +2 -4
- data/lib/opensearch/api/actions/sm/explain_policy.rb +1 -1
- data/lib/opensearch/api/actions/sm/get_policies.rb +5 -5
- data/lib/opensearch/api/actions/sm/get_policy.rb +1 -1
- data/lib/opensearch/api/actions/sm/start_policy.rb +1 -1
- data/lib/opensearch/api/actions/sm/stop_policy.rb +1 -1
- data/lib/opensearch/api/actions/sm/update_policy.rb +1 -1
- data/lib/opensearch/api/actions/snapshot/cleanup_repository.rb +3 -3
- data/lib/opensearch/api/actions/snapshot/clone.rb +6 -6
- data/lib/opensearch/api/actions/snapshot/create.rb +6 -6
- data/lib/opensearch/api/actions/snapshot/create_repository.rb +6 -6
- data/lib/opensearch/api/actions/snapshot/delete.rb +4 -6
- data/lib/opensearch/api/actions/snapshot/delete_repository.rb +5 -7
- data/lib/opensearch/api/actions/snapshot/get.rb +5 -5
- data/lib/opensearch/api/actions/snapshot/get_repository.rb +4 -4
- data/lib/opensearch/api/actions/snapshot/restore.rb +5 -5
- data/lib/opensearch/api/actions/snapshot/status.rb +4 -4
- data/lib/opensearch/api/actions/snapshot/verify_repository.rb +3 -3
- data/lib/opensearch/api/actions/tasks/cancel.rb +5 -5
- data/lib/opensearch/api/actions/tasks/get.rb +3 -3
- data/lib/opensearch/api/actions/tasks/list.rb +7 -7
- data/lib/opensearch/api/actions/transforms/delete.rb +1 -3
- data/lib/opensearch/api/actions/update_by_query.rb +2 -2
- data/lib/opensearch/api/actions/wlm/delete_query_group.rb +1 -3
- data/lib/opensearch/api/utils.rb +1 -1
- data/lib/opensearch/transport/client.rb +21 -6
- data/lib/opensearch/transport/transport/base.rb +3 -8
- data/lib/opensearch/version.rb +1 -1
- data/lib/opensearch.rb +4 -0
- data/opensearch-ruby.gemspec +1 -0
- data/test/transport/unit/transport_base_test.rb +0 -26
- data.tar.gz.sig +0 -0
- metadata +62 -2
- metadata.gz.sig +0 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Search messages.
|
17
|
+
#
|
18
|
+
# @option args [String] :memory_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def search_message(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil?
|
23
|
+
|
24
|
+
_memory_id = args.delete('memory_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = body ? 'POST' : 'GET'
|
29
|
+
url = Utils.build_url('_plugins/_ml/memory', _memory_id, '_search')
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Searches for model groups.
|
17
|
+
#
|
18
|
+
# @option args [Hash] :body
|
19
|
+
def search_model_group(args = {})
|
20
|
+
args = Utils.clone_and_normalize_arguments(args)
|
21
|
+
headers = args.delete('headers') || {}
|
22
|
+
body = args.delete('body')
|
23
|
+
method = body ? 'POST' : 'GET'
|
24
|
+
url = '_plugins/_ml/model_groups/_search'
|
25
|
+
|
26
|
+
Utils.validate_query_params! args
|
27
|
+
transport.perform_request(method, url, args, body, headers).body
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -20,7 +20,7 @@ module OpenSearch
|
|
20
20
|
args = Utils.clone_and_normalize_arguments(args)
|
21
21
|
headers = args.delete('headers') || {}
|
22
22
|
body = args.delete('body')
|
23
|
-
method = 'GET'
|
23
|
+
method = body ? 'POST' : 'GET'
|
24
24
|
url = '_plugins/_ml/models/_search'
|
25
25
|
|
26
26
|
Utils.validate_query_params! args
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Searches for tasks.
|
17
|
+
#
|
18
|
+
# @option args [Hash] :body
|
19
|
+
def search_tasks(args = {})
|
20
|
+
args = Utils.clone_and_normalize_arguments(args)
|
21
|
+
headers = args.delete('headers') || {}
|
22
|
+
body = args.delete('body')
|
23
|
+
method = body ? 'POST' : 'GET'
|
24
|
+
url = '_plugins/_ml/tasks/_search'
|
25
|
+
|
26
|
+
Utils.validate_query_params! args
|
27
|
+
transport.perform_request(method, url, args, body, headers).body
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Trains a model synchronously.
|
17
|
+
#
|
18
|
+
# @option args [String] :algorithm_name *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def train(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil?
|
23
|
+
|
24
|
+
_algorithm_name = args.delete('algorithm_name')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'POST'
|
29
|
+
url = Utils.build_url('_plugins/_ml/_train', _algorithm_name)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Trains a model and predicts against the same training dataset.
|
17
|
+
#
|
18
|
+
# @option args [String] :algorithm_name *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def train_predict(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'algorithm_name' missing" if args['algorithm_name'].nil?
|
23
|
+
|
24
|
+
_algorithm_name = args.delete('algorithm_name')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'POST'
|
29
|
+
url = Utils.build_url('_plugins/_ml/_train_predict', _algorithm_name)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -15,11 +15,10 @@ module OpenSearch
|
|
15
15
|
module Actions
|
16
16
|
# Undeploys a model.
|
17
17
|
#
|
18
|
-
# @option args [String] :model_id
|
18
|
+
# @option args [String] :model_id
|
19
|
+
# @option args [Hash] :body
|
19
20
|
def undeploy_model(args = {})
|
20
21
|
args = Utils.clone_and_normalize_arguments(args)
|
21
|
-
raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil?
|
22
|
-
|
23
22
|
_model_id = args.delete('model_id')
|
24
23
|
|
25
24
|
headers = args.delete('headers') || {}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Unloads a model.
|
17
|
+
#
|
18
|
+
# @option args [String] :model_id
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def unload_model(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
_model_id = args.delete('model_id')
|
23
|
+
|
24
|
+
headers = args.delete('headers') || {}
|
25
|
+
body = args.delete('body')
|
26
|
+
method = 'POST'
|
27
|
+
url = Utils.build_url('_plugins/_ml/models', _model_id, '_unload')
|
28
|
+
|
29
|
+
Utils.validate_query_params! args
|
30
|
+
transport.perform_request(method, url, args, body, headers).body
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Updates a standalone connector.
|
17
|
+
#
|
18
|
+
# @option args [String] :connector_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_connector(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'connector_id' missing" if args['connector_id'].nil?
|
23
|
+
|
24
|
+
_connector_id = args.delete('connector_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/connectors', _connector_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Updates a controller.
|
17
|
+
#
|
18
|
+
# @option args [String] :model_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_controller(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil?
|
23
|
+
|
24
|
+
_model_id = args.delete('model_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/controllers', _model_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Update a memory.
|
17
|
+
#
|
18
|
+
# @option args [String] :memory_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_memory(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'memory_id' missing" if args['memory_id'].nil?
|
23
|
+
|
24
|
+
_memory_id = args.delete('memory_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/memory', _memory_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Update a message.
|
17
|
+
#
|
18
|
+
# @option args [String] :message_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_message(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'message_id' missing" if args['message_id'].nil?
|
23
|
+
|
24
|
+
_message_id = args.delete('message_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/memory/message', _message_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Updates a model.
|
17
|
+
#
|
18
|
+
# @option args [String] :model_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_model(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil?
|
23
|
+
|
24
|
+
_model_id = args.delete('model_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/models', _model_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Updates a model group.
|
17
|
+
#
|
18
|
+
# @option args [String] :model_group_id *Required*
|
19
|
+
# @option args [Hash] :body
|
20
|
+
def update_model_group(args = {})
|
21
|
+
args = Utils.clone_and_normalize_arguments(args)
|
22
|
+
raise ArgumentError, "Required argument 'model_group_id' missing" if args['model_group_id'].nil?
|
23
|
+
|
24
|
+
_model_group_id = args.delete('model_group_id')
|
25
|
+
|
26
|
+
headers = args.delete('headers') || {}
|
27
|
+
body = args.delete('body')
|
28
|
+
method = 'PUT'
|
29
|
+
url = Utils.build_url('_plugins/_ml/model_groups', _model_group_id)
|
30
|
+
|
31
|
+
Utils.validate_query_params! args
|
32
|
+
transport.perform_request(method, url, args, body, headers).body
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Uploads model chunk.
|
17
|
+
#
|
18
|
+
# @option args [Integer] :chunk_number *Required*
|
19
|
+
# @option args [String] :model_id *Required*
|
20
|
+
# @option args [Hash] :body
|
21
|
+
def upload_chunk(args = {})
|
22
|
+
args = Utils.clone_and_normalize_arguments(args)
|
23
|
+
raise ArgumentError, "Required argument 'chunk_number' missing" if args['chunk_number'].nil?
|
24
|
+
raise ArgumentError, "Required argument 'model_id' missing" if args['model_id'].nil?
|
25
|
+
|
26
|
+
_chunk_number = args.delete('chunk_number')
|
27
|
+
_model_id = args.delete('model_id')
|
28
|
+
|
29
|
+
headers = args.delete('headers') || {}
|
30
|
+
body = args.delete('body')
|
31
|
+
method = 'POST'
|
32
|
+
url = Utils.build_url('_plugins/_ml/models', _model_id, 'upload_chunk', _chunk_number)
|
33
|
+
|
34
|
+
Utils.validate_query_params! args
|
35
|
+
transport.perform_request(method, url, args, body, headers).body
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# SPDX-License-Identifier: Apache-2.0
|
2
|
+
#
|
3
|
+
# The OpenSearch Contributors require contributions made to
|
4
|
+
# this file be licensed under the Apache-2.0 license or a
|
5
|
+
# compatible open source license.
|
6
|
+
|
7
|
+
# This file is generated from the OpenSearch REST API spec.
|
8
|
+
# Do not modify it by hand. Instead, modify the generator or the spec.
|
9
|
+
|
10
|
+
# frozen_string_literal: true
|
11
|
+
|
12
|
+
module OpenSearch
|
13
|
+
module API
|
14
|
+
module Ml
|
15
|
+
module Actions
|
16
|
+
# Registers a model.
|
17
|
+
#
|
18
|
+
# @option args [Hash] :body
|
19
|
+
def upload_model(args = {})
|
20
|
+
args = Utils.clone_and_normalize_arguments(args)
|
21
|
+
headers = args.delete('headers') || {}
|
22
|
+
body = args.delete('body')
|
23
|
+
method = 'POST'
|
24
|
+
url = '_plugins/_ml/models/_upload'
|
25
|
+
|
26
|
+
Utils.validate_query_params! args
|
27
|
+
transport.perform_request(method, url, args, body, headers).body
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Delete a channel configuration.
|
17
17
|
#
|
18
18
|
# @option args [String] :config_id *Required* The ID of the channel configuration to delete.
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def delete_config(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'config_id' missing" if args['config_id'].nil?
|
23
22
|
|
24
23
|
_config_id = args.delete('config_id')
|
25
24
|
|
26
|
-
ignore = args.delete('ignore') || []
|
27
25
|
headers = args.delete('headers') || {}
|
28
26
|
body = args.delete('body')
|
29
27
|
method = 'DELETE'
|
30
28
|
url = Utils.build_url('_plugins/_notifications/configs', _config_id)
|
31
29
|
|
32
30
|
Utils.validate_query_params! args
|
33
|
-
transport.perform_delete_request method, url, args, body, headers
|
31
|
+
transport.perform_delete_request method, url, args, body, headers
|
34
32
|
end
|
35
33
|
end
|
36
34
|
end
|
@@ -17,19 +17,17 @@ module OpenSearch
|
|
17
17
|
#
|
18
18
|
# @option args [String] :config_id *Required* The ID of the channel configuration to delete.
|
19
19
|
# @option args [String] :config_id_list A comma-separated list of channel IDs to delete.
|
20
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
21
20
|
def delete_configs(args = {})
|
22
21
|
args = Utils.clone_and_normalize_arguments(args)
|
23
22
|
raise ArgumentError, "Required argument 'config_id' missing" if args['config_id'].nil?
|
24
23
|
|
25
|
-
ignore = args.delete('ignore') || []
|
26
24
|
headers = args.delete('headers') || {}
|
27
25
|
body = args.delete('body')
|
28
26
|
method = 'DELETE'
|
29
27
|
url = '_plugins/_notifications/configs'
|
30
28
|
|
31
29
|
Utils.validate_query_params! args, DELETE_CONFIGS_QUERY_PARAMS
|
32
|
-
transport.perform_delete_request method, url, args, body, headers
|
30
|
+
transport.perform_delete_request method, url, args, body, headers
|
33
31
|
end
|
34
32
|
|
35
33
|
DELETE_CONFIGS_QUERY_PARAMS = Set.new(%w[
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Deletes specific observability object specified by ID.
|
17
17
|
#
|
18
18
|
# @option args [String] :object_id *Required* The ID of the Observability Object.
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def delete_object(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'object_id' missing" if args['object_id'].nil?
|
23
22
|
|
24
23
|
_object_id = args.delete('object_id')
|
25
24
|
|
26
|
-
ignore = args.delete('ignore') || []
|
27
25
|
headers = args.delete('headers') || {}
|
28
26
|
body = args.delete('body')
|
29
27
|
method = 'DELETE'
|
30
28
|
url = Utils.build_url('_plugins/_observability/object', _object_id)
|
31
29
|
|
32
30
|
Utils.validate_query_params! args
|
33
|
-
transport.perform_delete_request method, url, args, body, headers
|
31
|
+
transport.perform_delete_request method, url, args, body, headers
|
34
32
|
end
|
35
33
|
end
|
36
34
|
end
|
@@ -17,17 +17,15 @@ module OpenSearch
|
|
17
17
|
#
|
18
18
|
# @option args [String] :objectId The ID of a single Observability Object to delete.
|
19
19
|
# @option args [String] :objectIdList A comma-separated list of Observability Object IDs to delete.
|
20
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
21
20
|
def delete_objects(args = {})
|
22
21
|
args = Utils.clone_and_normalize_arguments(args)
|
23
|
-
ignore = args.delete('ignore') || []
|
24
22
|
headers = args.delete('headers') || {}
|
25
23
|
body = args.delete('body')
|
26
24
|
method = 'DELETE'
|
27
25
|
url = '_plugins/_observability/object'
|
28
26
|
|
29
27
|
Utils.validate_query_params! args, DELETE_OBJECTS_QUERY_PARAMS
|
30
|
-
transport.perform_delete_request method, url, args, body, headers
|
28
|
+
transport.perform_delete_request method, url, args, body, headers
|
31
29
|
end
|
32
30
|
|
33
31
|
DELETE_OBJECTS_QUERY_PARAMS = Set.new(%w[
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Deletes specific datasource specified by name.
|
17
17
|
#
|
18
18
|
# @option args [String] :datasource_name *Required* The Name of the DataSource to delete.
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def datasource_delete(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'datasource_name' missing" if args['datasource_name'].nil?
|
23
22
|
|
24
23
|
_datasource_name = args.delete('datasource_name')
|
25
24
|
|
26
|
-
ignore = args.delete('ignore') || []
|
27
25
|
headers = args.delete('headers') || {}
|
28
26
|
body = args.delete('body')
|
29
27
|
method = 'DELETE'
|
30
28
|
url = Utils.build_url('_plugins/_query/_datasources', _datasource_name)
|
31
29
|
|
32
30
|
Utils.validate_query_params! args
|
33
|
-
transport.perform_delete_request method, url, args, body, headers
|
31
|
+
transport.perform_delete_request method, url, args, body, headers
|
34
32
|
end
|
35
33
|
end
|
36
34
|
end
|