opensearch-ruby 4.0.0.pre.beta.1 → 4.0.0.pre.beta.2
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/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 +4 -6
- 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 +1 -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/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/delete_policy.rb +1 -3
- data/lib/opensearch/api/actions/snapshot/delete.rb +1 -3
- data/lib/opensearch/api/actions/snapshot/delete_repository.rb +1 -3
- data/lib/opensearch/api/actions/tasks/cancel.rb +1 -1
- 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 +6 -3
- data/lib/opensearch/transport/transport/base.rb +3 -8
- data/lib/opensearch/version.rb +1 -1
- data/opensearch-ruby.gemspec +1 -0
- data/test/transport/unit/transport_base_test.rb +0 -26
- data.tar.gz.sig +0 -0
- metadata +61 -2
- metadata.gz.sig +0 -0
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Updates individual attributes of a role.
|
16
|
+
# Updates the individual attributes of a role.
|
17
17
|
#
|
18
18
|
# @option args [String] :role *Required* The name of the role to update.
|
19
19
|
# @option args [Enumerable<Hash>] :body *Required*
|
@@ -13,9 +13,9 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Updates individual attributes of a role mapping.
|
16
|
+
# Updates the individual attributes of a role mapping.
|
17
17
|
#
|
18
|
-
# @option args [String] :role *Required* The name of the role to update role
|
18
|
+
# @option args [String] :role *Required* The name of the role to update a role mapping for
|
19
19
|
# @option args [Enumerable<Hash>] :body *Required*
|
20
20
|
def patch_role_mapping(args = {})
|
21
21
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Creates or updates multiple role mappings in a single
|
16
|
+
# Creates or updates multiple role mappings in a single request.
|
17
17
|
#
|
18
18
|
# @option args [Enumerable<Hash>] :body *Required*
|
19
19
|
def patch_role_mappings(args = {})
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Adds, deletes, or modifies a single tenant.
|
17
17
|
#
|
18
18
|
# @option args [String] :tenant *Required* The name of the tenant to update.
|
19
19
|
# @option args [Enumerable<Hash>] :body *Required*
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Adds, deletes, or modifies multiple tenants in a single request.
|
17
17
|
#
|
18
18
|
# @option args [Enumerable<Hash>] :body *Required*
|
19
19
|
def patch_tenants(args = {})
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Updates individual attributes
|
16
|
+
# Updates individual attributes for an internal user.
|
17
17
|
#
|
18
18
|
# @option args [String] :username *Required* The name of the user to update.
|
19
19
|
# @option args [Enumerable<Hash>] :body *Required*
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Creates, updates, or deletes multiple internal users in a single
|
16
|
+
# Creates, updates, or deletes multiple internal users in a single request.
|
17
17
|
#
|
18
18
|
# @option args [Enumerable<Hash>] :body *Required*
|
19
19
|
def patch_users(args = {})
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Retrieves the current values for dynamic security settings for OpenSearch Dashboards.
|
17
17
|
#
|
18
18
|
def post_dashboards_info(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Reloads the HTTP communication certificates.
|
17
17
|
#
|
18
18
|
def reload_http_certificates(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Reloads the transport communication certificates.
|
17
17
|
#
|
18
18
|
def reload_transport_certificates(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Retrieves the
|
16
|
+
# Retrieves the names of current tenants. Requires super admin or `kibanaserver` permissions.
|
17
17
|
#
|
18
18
|
def tenant_info(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
#
|
16
|
+
# Updates the settings for an existing security configuration. Requires super admin or REST API permissions.
|
17
17
|
#
|
18
18
|
# @option args [Hash] :body *Required*
|
19
19
|
def update_configuration(args = {})
|
@@ -13,9 +13,9 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Adds or updates the specified distinguished names in the cluster or node
|
16
|
+
# Adds or updates the specified distinguished names in the cluster or node allowlist. Requires super admin or REST API permissions.
|
17
17
|
#
|
18
|
-
# @option args [String] :cluster_name *Required* The
|
18
|
+
# @option args [String] :cluster_name *Required* The name of the cluster containing the `nodesDn` value to create or update.
|
19
19
|
# @option args [Hash] :body
|
20
20
|
def update_distinguished_name(args = {})
|
21
21
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -15,7 +15,7 @@ module OpenSearch
|
|
15
15
|
module Actions
|
16
16
|
# Checks whether the v6 security configuration is valid and ready to be migrated to v7.
|
17
17
|
#
|
18
|
-
# @option args [Boolean] :accept_invalid
|
18
|
+
# @option args [Boolean] :accept_invalid Whether an invalid v6 configuration should be allowed.
|
19
19
|
def validate(args = {})
|
20
20
|
args = Utils.clone_and_normalize_arguments(args)
|
21
21
|
headers = args.delete('headers') || {}
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Gets the
|
16
|
+
# Gets the identity information for the user currently logged in.
|
17
17
|
#
|
18
18
|
def who_am_i(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -13,7 +13,7 @@ module OpenSearch
|
|
13
13
|
module API
|
14
14
|
module Security
|
15
15
|
module Actions
|
16
|
-
# Gets the
|
16
|
+
# Gets the identity information for the user currently logged in. To use this operation, you must have access to this endpoint when authorization at REST layer is enabled.
|
17
17
|
#
|
18
18
|
def who_am_i_protected(args = {})
|
19
19
|
args = Utils.clone_and_normalize_arguments(args)
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Deletes a snapshot management policy.
|
17
17
|
#
|
18
18
|
# @option args [String] :policy_name *Required* The name of the snapshot management policy.
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def delete_policy(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'policy_name' missing" if args['policy_name'].nil?
|
23
22
|
|
24
23
|
_policy_name = args.delete('policy_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/_sm/policies', _policy_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
|
@@ -19,7 +19,6 @@ module OpenSearch
|
|
19
19
|
# @option args [String] :snapshot *Required* A comma-separated list of snapshot names
|
20
20
|
# @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node.
|
21
21
|
# @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node
|
22
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
23
22
|
def delete(args = {})
|
24
23
|
args = Utils.clone_and_normalize_arguments(args)
|
25
24
|
raise ArgumentError, "Required argument 'repository' missing" if args['repository'].nil?
|
@@ -28,14 +27,13 @@ module OpenSearch
|
|
28
27
|
_repository = args.delete('repository')
|
29
28
|
_snapshot = args.delete('snapshot')
|
30
29
|
|
31
|
-
ignore = args.delete('ignore') || []
|
32
30
|
headers = args.delete('headers') || {}
|
33
31
|
body = args.delete('body')
|
34
32
|
method = 'DELETE'
|
35
33
|
url = Utils.build_url('_snapshot', _repository, _snapshot)
|
36
34
|
|
37
35
|
Utils.validate_query_params! args, DELETE_QUERY_PARAMS
|
38
|
-
transport.perform_delete_request method, url, args, body, headers
|
36
|
+
transport.perform_delete_request method, url, args, body, headers
|
39
37
|
end
|
40
38
|
|
41
39
|
DELETE_QUERY_PARAMS = Set.new(%w[
|
@@ -19,21 +19,19 @@ module OpenSearch
|
|
19
19
|
# @option args [String] :cluster_manager_timeout Operation timeout for connection to cluster-manager node.
|
20
20
|
# @option args [String] :master_timeout DEPRECATED Explicit operation timeout for connection to cluster-manager node
|
21
21
|
# @option args [String] :timeout Explicit operation timeout
|
22
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
23
22
|
def delete_repository(args = {})
|
24
23
|
args = Utils.clone_and_normalize_arguments(args)
|
25
24
|
raise ArgumentError, "Required argument 'repository' missing" if args['repository'].nil?
|
26
25
|
|
27
26
|
_repository = args.delete('repository')
|
28
27
|
|
29
|
-
ignore = args.delete('ignore') || []
|
30
28
|
headers = args.delete('headers') || {}
|
31
29
|
body = args.delete('body')
|
32
30
|
method = 'DELETE'
|
33
31
|
url = Utils.build_url('_snapshot', _repository)
|
34
32
|
|
35
33
|
Utils.validate_query_params! args, DELETE_REPOSITORY_QUERY_PARAMS
|
36
|
-
transport.perform_delete_request method, url, args, body, headers
|
34
|
+
transport.perform_delete_request method, url, args, body, headers
|
37
35
|
end
|
38
36
|
|
39
37
|
DELETE_REPOSITORY_QUERY_PARAMS = Set.new(%w[
|
@@ -19,7 +19,7 @@ module OpenSearch
|
|
19
19
|
# @option args [Enumerable<String>] :nodes Comma-separated list of node IDs or names used to limit the request.
|
20
20
|
# @option args [String] :parent_task_id Parent task ID used to limit the tasks.
|
21
21
|
# @option args [Boolean] :wait_for_completion Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false
|
22
|
-
# @option args [
|
22
|
+
# @option args [String] :task_id ID of the task.
|
23
23
|
def cancel(args = {})
|
24
24
|
args = Utils.clone_and_normalize_arguments(args)
|
25
25
|
_task_id = args.delete('task_id')
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Delete an index transform.
|
17
17
|
#
|
18
18
|
# @option args [String] :id *Required* Transform to delete
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def delete(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'id' missing" if args['id'].nil?
|
23
22
|
|
24
23
|
_id = args.delete('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/_transform', _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,7 +17,7 @@ module OpenSearch
|
|
17
17
|
# for example to pick up a mapping change.
|
18
18
|
#
|
19
19
|
# @option args [Enumerable<String>, String] :index *Required* Comma-separated list of data streams, indexes, and aliases to search. Supports wildcards (`*`). To search all data streams or indexes, omit this parameter or use `*` or `_all`.
|
20
|
-
# @option args [Enumerable<String
|
20
|
+
# @option args [Boolean, Enumerable<String>, String] :_source Set to `true` or `false` to return the `_source` field or not, or a list of fields to return.
|
21
21
|
# @option args [Enumerable<String>] :_source_excludes List of fields to exclude from the returned `_source` field.
|
22
22
|
# @option args [Enumerable<String>] :_source_includes List of fields to extract and return from the `_source` field.
|
23
23
|
# @option args [Boolean] :allow_no_indices If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indexes. This behavior applies even if the request targets other open indexes. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`.
|
@@ -43,7 +43,7 @@ module OpenSearch
|
|
43
43
|
# @option args [String] :search_timeout Explicit timeout for each search request.
|
44
44
|
# @option args [String] :search_type The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`.
|
45
45
|
# @option args [Integer] :size Deprecated, use `max_docs` instead.
|
46
|
-
# @option args [
|
46
|
+
# @option args [Integer, String] :slices The number of slices this task should be divided into.
|
47
47
|
# @option args [Enumerable<String>] :sort A comma-separated list of <field>:<direction> pairs.
|
48
48
|
# @option args [Enumerable<String>] :stats Specific `tag` of the request for logging and statistical purposes.
|
49
49
|
# @option args [Integer] :terminate_after Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indexes across multiple data tiers.
|
@@ -16,21 +16,19 @@ module OpenSearch
|
|
16
16
|
# Deletes the specified query group.
|
17
17
|
#
|
18
18
|
# @option args [String] :name *Required* The name of the query group.
|
19
|
-
# @option args [List] :ignore set to [404] to ignore server's NOT FOUND error for this request
|
20
19
|
def delete_query_group(args = {})
|
21
20
|
args = Utils.clone_and_normalize_arguments(args)
|
22
21
|
raise ArgumentError, "Required argument 'name' missing" if args['name'].nil?
|
23
22
|
|
24
23
|
_name = args.delete('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('_wlm/query_group', _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
|
data/lib/opensearch/api/utils.rb
CHANGED
@@ -14,7 +14,7 @@ require 'cgi'
|
|
14
14
|
module OpenSearch
|
15
15
|
module API
|
16
16
|
module Utils
|
17
|
-
NON_URL_ARGS = Set.new(%w[body headers
|
17
|
+
NON_URL_ARGS = Set.new(%w[body headers]).freeze
|
18
18
|
BULK_OPERATIONS = Set.new(%w[index create delete update]).freeze
|
19
19
|
|
20
20
|
# @return a new hash with all keys converted to strings and url param values escaped
|
@@ -101,6 +101,8 @@ module OpenSearch
|
|
101
101
|
#
|
102
102
|
# @option arguments [Boolean] :reload_on_failure Reload connections after failure (false by default)
|
103
103
|
#
|
104
|
+
# @option arguments [Boolean] :ignore_404_on_delete Whether to ignore 404/NotFound error on http DELETE (false by default)
|
105
|
+
#
|
104
106
|
# @option arguments [Integer] :request_timeout The request timeout to be passed to transport in options
|
105
107
|
#
|
106
108
|
# @option arguments [Symbol] :adapter A specific adapter for Faraday (e.g. `:patron`)
|
@@ -134,7 +136,7 @@ module OpenSearch
|
|
134
136
|
#
|
135
137
|
def initialize(arguments = {}, &block)
|
136
138
|
@options = arguments.transform_keys(&:to_sym)
|
137
|
-
@arguments = @options
|
139
|
+
@arguments = @options.clone
|
138
140
|
@arguments[:logger] ||= @arguments[:log] ? DEFAULT_LOGGER.call : nil
|
139
141
|
@arguments[:tracer] ||= @arguments[:trace] ? DEFAULT_TRACER.call : nil
|
140
142
|
@arguments[:reload_connections] ||= false
|
@@ -144,6 +146,7 @@ module OpenSearch
|
|
144
146
|
@arguments[:transport_options] ||= {}
|
145
147
|
@arguments[:http] ||= {}
|
146
148
|
@options[:http] ||= {}
|
149
|
+
@options[:ignore_404_on_delete] ||= false
|
147
150
|
|
148
151
|
set_api_key if (@api_key = @arguments[:api_key])
|
149
152
|
set_compatibility_header if ENV['ELASTIC_CLIENT_APIVERSIONING']
|
@@ -206,10 +209,10 @@ module OpenSearch
|
|
206
209
|
raise e
|
207
210
|
end
|
208
211
|
|
209
|
-
def perform_delete_request(*args
|
212
|
+
def perform_delete_request(*args)
|
210
213
|
perform_request(*args).body
|
211
214
|
rescue StandardError => e
|
212
|
-
if
|
215
|
+
if @options[:ignore_404_on_delete]
|
213
216
|
return false if e.class.to_s =~ /NotFound/
|
214
217
|
return false if e.message =~ /Not\s*Found/i
|
215
218
|
end
|
@@ -282,8 +282,6 @@ module OpenSearch
|
|
282
282
|
|
283
283
|
params = params.clone
|
284
284
|
|
285
|
-
ignore = Array(params.delete(:ignore)).compact.map(&:to_i)
|
286
|
-
|
287
285
|
begin
|
288
286
|
tries += 1
|
289
287
|
connection = get_connection or raise(Error, 'Cannot get new connection from pool.')
|
@@ -343,10 +341,9 @@ module OpenSearch
|
|
343
341
|
duration
|
344
342
|
end
|
345
343
|
|
346
|
-
#
|
347
|
-
log_fatal "[#{response.status}] #{response.body}" unless ignore.include?(response.status.to_i)
|
344
|
+
log_fatal "[#{response.status}] #{response.body}"
|
348
345
|
|
349
|
-
__raise_transport_error response
|
346
|
+
__raise_transport_error response
|
350
347
|
end
|
351
348
|
|
352
349
|
if response.body && !response.body.empty? && response.headers && response.headers['content-type'] =~ /json/
|
@@ -358,9 +355,7 @@ module OpenSearch
|
|
358
355
|
'n/a'
|
359
356
|
end
|
360
357
|
|
361
|
-
|
362
|
-
__log_response method, path, params, body, url, response, json, took, duration
|
363
|
-
end
|
358
|
+
__log_response method, path, params, body, url, response, json, took, duration
|
364
359
|
|
365
360
|
if tracer
|
366
361
|
__trace method, path, params, connection.connection.headers, body, url, response, nil, 'N/A',
|
data/lib/opensearch/version.rb
CHANGED
data/opensearch-ruby.gemspec
CHANGED
@@ -281,21 +281,6 @@ class OpenSearch::Transport::Transport::BaseTest < Minitest::Test
|
|
281
281
|
end
|
282
282
|
end
|
283
283
|
|
284
|
-
should "not raise an error when the :ignore argument has been passed" do
|
285
|
-
@transport.stubs(:get_connection).returns(stub_everything :failures => 1)
|
286
|
-
|
287
|
-
assert_raise OpenSearch::Transport::Transport::Errors::BadRequest do
|
288
|
-
@transport.perform_request 'GET', '/' do
|
289
|
-
OpenSearch::Transport::Transport::Response.new 400, 'CLIENT ERROR'
|
290
|
-
end
|
291
|
-
end
|
292
|
-
|
293
|
-
# No `BadRequest` error
|
294
|
-
@transport.perform_request 'GET', '/', :ignore => 400 do
|
295
|
-
OpenSearch::Transport::Transport::Response.new 400, 'CLIENT ERROR'
|
296
|
-
end
|
297
|
-
end
|
298
|
-
|
299
284
|
should "mark the connection as dead on failure" do
|
300
285
|
c = stub_everything :failures => 1
|
301
286
|
@transport.expects(:get_connection).returns(c)
|
@@ -467,17 +452,6 @@ class OpenSearch::Transport::Transport::BaseTest < Minitest::Test
|
|
467
452
|
end
|
468
453
|
end
|
469
454
|
|
470
|
-
should "not log a failed OpenSearch request as fatal" do
|
471
|
-
@block = Proc.new { |c, u| puts "ERROR" }
|
472
|
-
@block.expects(:call).returns(OpenSearch::Transport::Transport::Response.new 500, 'ERROR')
|
473
|
-
|
474
|
-
@transport.expects(:__log_response).once
|
475
|
-
@transport.logger.expects(:fatal).never
|
476
|
-
|
477
|
-
# No `BadRequest` error
|
478
|
-
@transport.perform_request('POST', '_search', :ignore => 500, &@block)
|
479
|
-
end
|
480
|
-
|
481
455
|
should "log and re-raise a Ruby exception" do
|
482
456
|
@block = Proc.new { |c, u| puts "ERROR" }
|
483
457
|
@block.expects(:call).raises(StandardError)
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opensearch-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.pre.beta.
|
4
|
+
version: 4.0.0.pre.beta.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
m0rB25J1sO2yjlalRdBoV5p7OKaWG4CGMr+q6vCC2za7yrtZiYOOv+KpWmheTwds
|
32
32
|
P1nbdIL2eAXGfNU3cbtYisS1sSYi7VSkS52pVk8Jgtw=
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2025-
|
34
|
+
date: 2025-03-06 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: faraday
|
@@ -53,6 +53,20 @@ dependencies:
|
|
53
53
|
- - "<"
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '3'
|
56
|
+
- !ruby/object:Gem::Dependency
|
57
|
+
name: logger
|
58
|
+
requirement: !ruby/object:Gem::Requirement
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
type: :runtime
|
64
|
+
prerelease: false
|
65
|
+
version_requirements: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
56
70
|
- !ruby/object:Gem::Dependency
|
57
71
|
name: multi_json
|
58
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -250,20 +264,65 @@ files:
|
|
250
264
|
- lib/opensearch/api/actions/list/indices.rb
|
251
265
|
- lib/opensearch/api/actions/list/shards.rb
|
252
266
|
- lib/opensearch/api/actions/mget.rb
|
267
|
+
- lib/opensearch/api/actions/ml/chunk_model.rb
|
253
268
|
- lib/opensearch/api/actions/ml/create_connector.rb
|
269
|
+
- lib/opensearch/api/actions/ml/create_controller.rb
|
270
|
+
- lib/opensearch/api/actions/ml/create_memory.rb
|
271
|
+
- lib/opensearch/api/actions/ml/create_message.rb
|
272
|
+
- lib/opensearch/api/actions/ml/create_model_meta.rb
|
254
273
|
- lib/opensearch/api/actions/ml/delete_agent.rb
|
255
274
|
- lib/opensearch/api/actions/ml/delete_connector.rb
|
275
|
+
- lib/opensearch/api/actions/ml/delete_controller.rb
|
276
|
+
- lib/opensearch/api/actions/ml/delete_memory.rb
|
256
277
|
- lib/opensearch/api/actions/ml/delete_model.rb
|
257
278
|
- lib/opensearch/api/actions/ml/delete_model_group.rb
|
258
279
|
- lib/opensearch/api/actions/ml/delete_task.rb
|
259
280
|
- lib/opensearch/api/actions/ml/deploy_model.rb
|
281
|
+
- lib/opensearch/api/actions/ml/execute_agent.rb
|
282
|
+
- lib/opensearch/api/actions/ml/execute_algorithm.rb
|
283
|
+
- lib/opensearch/api/actions/ml/get_agent.rb
|
284
|
+
- lib/opensearch/api/actions/ml/get_all_memories.rb
|
285
|
+
- lib/opensearch/api/actions/ml/get_all_messages.rb
|
286
|
+
- lib/opensearch/api/actions/ml/get_all_tools.rb
|
287
|
+
- lib/opensearch/api/actions/ml/get_connector.rb
|
288
|
+
- lib/opensearch/api/actions/ml/get_controller.rb
|
289
|
+
- lib/opensearch/api/actions/ml/get_memory.rb
|
290
|
+
- lib/opensearch/api/actions/ml/get_message.rb
|
291
|
+
- lib/opensearch/api/actions/ml/get_message_traces.rb
|
292
|
+
- lib/opensearch/api/actions/ml/get_model.rb
|
260
293
|
- lib/opensearch/api/actions/ml/get_model_group.rb
|
294
|
+
- lib/opensearch/api/actions/ml/get_profile.rb
|
295
|
+
- lib/opensearch/api/actions/ml/get_profile_models.rb
|
296
|
+
- lib/opensearch/api/actions/ml/get_profile_tasks.rb
|
297
|
+
- lib/opensearch/api/actions/ml/get_stats.rb
|
261
298
|
- lib/opensearch/api/actions/ml/get_task.rb
|
299
|
+
- lib/opensearch/api/actions/ml/get_tool.rb
|
300
|
+
- lib/opensearch/api/actions/ml/load_model.rb
|
301
|
+
- lib/opensearch/api/actions/ml/predict.rb
|
302
|
+
- lib/opensearch/api/actions/ml/predict_model.rb
|
262
303
|
- lib/opensearch/api/actions/ml/register_agents.rb
|
263
304
|
- lib/opensearch/api/actions/ml/register_model.rb
|
264
305
|
- lib/opensearch/api/actions/ml/register_model_group.rb
|
306
|
+
- lib/opensearch/api/actions/ml/register_model_meta.rb
|
307
|
+
- lib/opensearch/api/actions/ml/search_agents.rb
|
308
|
+
- lib/opensearch/api/actions/ml/search_connectors.rb
|
309
|
+
- lib/opensearch/api/actions/ml/search_memory.rb
|
310
|
+
- lib/opensearch/api/actions/ml/search_message.rb
|
311
|
+
- lib/opensearch/api/actions/ml/search_model_group.rb
|
265
312
|
- lib/opensearch/api/actions/ml/search_models.rb
|
313
|
+
- lib/opensearch/api/actions/ml/search_tasks.rb
|
314
|
+
- lib/opensearch/api/actions/ml/train.rb
|
315
|
+
- lib/opensearch/api/actions/ml/train_predict.rb
|
266
316
|
- lib/opensearch/api/actions/ml/undeploy_model.rb
|
317
|
+
- lib/opensearch/api/actions/ml/unload_model.rb
|
318
|
+
- lib/opensearch/api/actions/ml/update_connector.rb
|
319
|
+
- lib/opensearch/api/actions/ml/update_controller.rb
|
320
|
+
- lib/opensearch/api/actions/ml/update_memory.rb
|
321
|
+
- lib/opensearch/api/actions/ml/update_message.rb
|
322
|
+
- lib/opensearch/api/actions/ml/update_model.rb
|
323
|
+
- lib/opensearch/api/actions/ml/update_model_group.rb
|
324
|
+
- lib/opensearch/api/actions/ml/upload_chunk.rb
|
325
|
+
- lib/opensearch/api/actions/ml/upload_model.rb
|
267
326
|
- lib/opensearch/api/actions/msearch.rb
|
268
327
|
- lib/opensearch/api/actions/msearch_template.rb
|
269
328
|
- lib/opensearch/api/actions/mtermvectors.rb
|
metadata.gz.sig
CHANGED
Binary file
|