elasticsearch-api 8.10.0 → 8.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/api-spec-testing/rspec_matchers.rb +2 -0
- data/api-spec-testing/test_file/action.rb +76 -64
- data/api-spec-testing/test_file/task_group.rb +5 -2
- data/api-spec-testing/test_file.rb +8 -3
- data/api-spec-testing/wipe_cluster.rb +9 -4
- data/elasticsearch-api.gemspec +2 -2
- data/lib/elasticsearch/api/actions/async_search/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/get.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/status.rb +10 -2
- data/lib/elasticsearch/api/actions/async_search/submit.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/delete_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_capacity.rb +4 -2
- data/lib/elasticsearch/api/actions/autoscaling/get_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/autoscaling/put_autoscaling_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/bulk.rb +11 -2
- data/lib/elasticsearch/api/actions/cat/aliases.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/allocation.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/component_templates.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/count.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/fielddata.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/health.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/help.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/indices.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/master.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/ml_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_datafeeds.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/ml_trained_models.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/nodeattrs.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/nodes.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/pending_tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/plugins.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/recovery.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/repositories.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/segments.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/shards.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/snapshots.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cat/templates.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/thread_pool.rb +10 -2
- data/lib/elasticsearch/api/actions/cat/transforms.rb +10 -2
- data/lib/elasticsearch/api/actions/clear_scroll.rb +11 -3
- data/lib/elasticsearch/api/actions/close_point_in_time.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/allocation_explain.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/delete_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/delete_voting_config_exclusions.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/exists_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/get_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/get_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/health.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/info.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/pending_tasks.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/post_voting_config_exclusions.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/put_component_template.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/put_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/remote_info.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/reroute.rb +4 -2
- data/lib/elasticsearch/api/actions/cluster/state.rb +10 -2
- data/lib/elasticsearch/api/actions/cluster/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/connector/check_in.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/delete.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/get.rb +65 -0
- data/lib/elasticsearch/api/actions/connector/last_sync.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/list.rb +56 -0
- data/lib/elasticsearch/api/actions/connector/post.rb +57 -0
- data/lib/elasticsearch/api/actions/connector/put.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_configuration.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_error.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_filtering.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_name.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_pipeline.rb +67 -0
- data/lib/elasticsearch/api/actions/connector/update_scheduling.rb +67 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/cancel.rb +66 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/check_in.rb +66 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/delete.rb +66 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/error.rb +69 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/get.rb +66 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/list.rb +58 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/post.rb +57 -0
- data/lib/elasticsearch/api/actions/connector_sync_job/update_stats.rb +69 -0
- data/lib/elasticsearch/api/actions/count.rb +10 -2
- data/lib/elasticsearch/api/actions/create.rb +9 -1
- data/lib/elasticsearch/api/actions/cross_cluster_replication/delete_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_info.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/follow_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/forget_follower.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/get_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/pause_follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/put_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_auto_follow_pattern.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/resume_follow.rb +10 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/stats.rb +4 -2
- data/lib/elasticsearch/api/actions/cross_cluster_replication/unfollow.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/delete_dangling_index.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/import_dangling_index.rb +10 -2
- data/lib/elasticsearch/api/actions/dangling_indices/list_dangling_indices.rb +4 -2
- data/lib/elasticsearch/api/actions/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/delete_by_query.rb +10 -2
- data/lib/elasticsearch/api/actions/delete_by_query_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/delete_script.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/delete_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/execute_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/get_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/put_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/enrich/stats.rb +4 -2
- data/lib/elasticsearch/api/actions/eql/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/get.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/get_status.rb +10 -2
- data/lib/elasticsearch/api/actions/eql/search.rb +10 -2
- data/lib/elasticsearch/api/actions/esql/query.rb +59 -0
- data/lib/elasticsearch/api/actions/exists.rb +10 -2
- data/lib/elasticsearch/api/actions/exists_source.rb +10 -2
- data/lib/elasticsearch/api/actions/explain.rb +10 -2
- data/lib/elasticsearch/api/actions/features/get_features.rb +4 -2
- data/lib/elasticsearch/api/actions/features/reset_features.rb +4 -2
- data/lib/elasticsearch/api/actions/field_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/fleet/delete_secret.rb +9 -1
- data/lib/elasticsearch/api/actions/fleet/get_secret.rb +9 -1
- data/lib/elasticsearch/api/actions/fleet/global_checkpoints.rb +10 -2
- data/lib/elasticsearch/api/actions/fleet/msearch.rb +9 -1
- data/lib/elasticsearch/api/actions/fleet/post_secret.rb +3 -1
- data/lib/elasticsearch/api/actions/fleet/search.rb +9 -1
- data/lib/elasticsearch/api/actions/get.rb +11 -3
- data/lib/elasticsearch/api/actions/get_script.rb +10 -2
- data/lib/elasticsearch/api/actions/get_script_context.rb +4 -2
- data/lib/elasticsearch/api/actions/get_script_languages.rb +4 -2
- data/lib/elasticsearch/api/actions/get_source.rb +10 -2
- data/lib/elasticsearch/api/actions/graph/explore.rb +10 -2
- data/lib/elasticsearch/api/actions/health_report.rb +10 -2
- data/lib/elasticsearch/api/actions/index.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/delete_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/explain_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/get_status.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/move_to_step.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/put_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/remove_policy.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/retry.rb +10 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/start.rb +4 -2
- data/lib/elasticsearch/api/actions/index_lifecycle_management/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/add_block.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/analyze.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/clear_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/clone.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/close.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/create.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/create_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/data_streams_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/indices/delete_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_data_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/delete_template.rb +11 -3
- data/lib/elasticsearch/api/actions/indices/disk_usage.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/downsample.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/exists_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/explain_data_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/field_usage_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/flush.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/forcemerge.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_data_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_field_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_settings.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/get_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/migrate_to_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/modify_data_stream.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/open.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/promote_data_stream.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_data_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/put_settings.rb +11 -2
- data/lib/elasticsearch/api/actions/indices/put_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/recovery.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/refresh.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/reload_search_analyzers.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/resolve_index.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/rollover.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/segments.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/shard_stores.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/shrink.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/simulate_index_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/simulate_template.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/split.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/unfreeze.rb +10 -2
- data/lib/elasticsearch/api/actions/indices/update_aliases.rb +4 -2
- data/lib/elasticsearch/api/actions/indices/validate_query.rb +10 -2
- data/lib/elasticsearch/api/actions/inference/delete_model.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/get_model.rb +69 -0
- data/lib/elasticsearch/api/actions/inference/inference.rb +70 -0
- data/lib/elasticsearch/api/actions/inference/put_model.rb +70 -0
- data/lib/elasticsearch/api/actions/info.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/delete_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/geo_ip_stats.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/get_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/processor_grok.rb +4 -2
- data/lib/elasticsearch/api/actions/ingest/put_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/ingest/simulate.rb +10 -2
- data/lib/elasticsearch/api/actions/knn_search.rb +10 -2
- data/lib/elasticsearch/api/actions/license/delete.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get_basic_status.rb +4 -2
- data/lib/elasticsearch/api/actions/license/get_trial_status.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post_start_basic.rb +4 -2
- data/lib/elasticsearch/api/actions/license/post_start_trial.rb +4 -2
- data/lib/elasticsearch/api/actions/logstash/delete_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/logstash/get_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/logstash/put_pipeline.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/clear_trained_model_deployment_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/close_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_event.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_calendar_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_expired_data.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_forecast.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/delete_trained_model_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/estimate_model_memory.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/evaluate_data_frame.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/explain_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/flush_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/forecast.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_buckets.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_calendar_events.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_calendars.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_categories.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_data_frame_analytics_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeed_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_datafeeds.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_filters.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_influencers.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_job_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_memory_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_model_snapshots.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_overall_buckets.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_records.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/get_trained_models_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/infer_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/info.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/open_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/post_calendar_events.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/post_data.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/preview_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/preview_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_calendar_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_alias.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/reset_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/revert_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/set_upgrade_mode.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/start_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_data_frame_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_datafeed.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_filter.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_job.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_model_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/update_trained_model_deployment.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/upgrade_job_snapshot.rb +10 -2
- data/lib/elasticsearch/api/actions/machine_learning/validate.rb +4 -2
- data/lib/elasticsearch/api/actions/machine_learning/validate_detector.rb +4 -2
- data/lib/elasticsearch/api/actions/mget.rb +10 -2
- data/lib/elasticsearch/api/actions/migration/deprecations.rb +10 -2
- data/lib/elasticsearch/api/actions/migration/get_feature_upgrade_status.rb +4 -2
- data/lib/elasticsearch/api/actions/migration/post_feature_upgrade.rb +4 -2
- data/lib/elasticsearch/api/actions/monitoring/bulk.rb +10 -2
- data/lib/elasticsearch/api/actions/msearch.rb +10 -2
- data/lib/elasticsearch/api/actions/msearch_template.rb +10 -2
- data/lib/elasticsearch/api/actions/mtermvectors.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/clear_repositories_metering_archive.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/get_repositories_metering_info.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/hot_threads.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/info.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/reload_secure_settings.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/nodes/usage.rb +10 -2
- data/lib/elasticsearch/api/actions/open_point_in_time.rb +12 -3
- data/lib/elasticsearch/api/actions/ping.rb +4 -2
- data/lib/elasticsearch/api/actions/profiling/status.rb +53 -0
- data/lib/elasticsearch/api/actions/put_script.rb +10 -2
- data/lib/elasticsearch/api/actions/query_ruleset/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/query_ruleset/get.rb +10 -2
- data/lib/elasticsearch/api/actions/query_ruleset/list.rb +4 -2
- data/lib/elasticsearch/api/actions/query_ruleset/put.rb +10 -2
- data/lib/elasticsearch/api/actions/rank_eval.rb +10 -2
- data/lib/elasticsearch/api/actions/reindex.rb +4 -2
- data/lib/elasticsearch/api/actions/reindex_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/render_search_template.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/delete_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_jobs.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_rollup_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/get_rollup_index_caps.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/put_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/rollup_search.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/start_job.rb +10 -2
- data/lib/elasticsearch/api/actions/rollup/stop_job.rb +10 -2
- data/lib/elasticsearch/api/actions/scripts_painless_execute.rb +4 -2
- data/lib/elasticsearch/api/actions/scroll.rb +10 -2
- data/lib/elasticsearch/api/actions/search.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/delete.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/delete_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/get.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/get_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/list.rb +4 -2
- data/lib/elasticsearch/api/actions/search_application/post_behavioral_analytics_event.rb +9 -1
- data/lib/elasticsearch/api/actions/search_application/put.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/put_behavioral_analytics.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/render_query.rb +10 -2
- data/lib/elasticsearch/api/actions/search_application/search.rb +10 -2
- data/lib/elasticsearch/api/actions/search_mvt.rb +10 -2
- data/lib/elasticsearch/api/actions/search_shards.rb +10 -2
- data/lib/elasticsearch/api/actions/search_template.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/cache_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/clear_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/mount.rb +10 -2
- data/lib/elasticsearch/api/actions/searchable_snapshots/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/security/activate_user_profile.rb +4 -2
- data/lib/elasticsearch/api/actions/security/authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/bulk_update_api_keys.rb +4 -2
- data/lib/elasticsearch/api/actions/security/change_password.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_api_key_cache.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_realms.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_roles.rb +10 -2
- data/lib/elasticsearch/api/actions/security/clear_cached_service_tokens.rb +10 -2
- data/lib/elasticsearch/api/actions/security/create_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/create_cross_cluster_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/create_service_token.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_role.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_service_token.rb +10 -2
- data/lib/elasticsearch/api/actions/security/delete_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/disable_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/disable_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enable_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enable_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/enroll_kibana.rb +4 -2
- data/lib/elasticsearch/api/actions/security/enroll_node.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_api_key.rb +5 -2
- data/lib/elasticsearch/api/actions/security/get_builtin_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_role.rb +11 -3
- data/lib/elasticsearch/api/actions/security/get_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_service_accounts.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_service_credentials.rb +10 -2
- data/lib/elasticsearch/api/actions/security/get_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_token.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_user.rb +11 -3
- data/lib/elasticsearch/api/actions/security/get_user_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/get_user_profile.rb +10 -2
- data/lib/elasticsearch/api/actions/security/grant_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/has_privileges.rb +10 -2
- data/lib/elasticsearch/api/actions/security/has_privileges_user_profile.rb +4 -2
- data/lib/elasticsearch/api/actions/security/invalidate_api_key.rb +4 -2
- data/lib/elasticsearch/api/actions/security/invalidate_token.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/oidc_prepare_authentication.rb +4 -2
- data/lib/elasticsearch/api/actions/security/put_privileges.rb +4 -2
- data/lib/elasticsearch/api/actions/security/put_role.rb +10 -2
- data/lib/elasticsearch/api/actions/security/put_role_mapping.rb +10 -2
- data/lib/elasticsearch/api/actions/security/put_user.rb +10 -2
- data/lib/elasticsearch/api/actions/security/query_api_keys.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_authenticate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_complete_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_invalidate.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_logout.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_prepare_authentication.rb +4 -2
- data/lib/elasticsearch/api/actions/security/saml_service_provider_metadata.rb +10 -2
- data/lib/elasticsearch/api/actions/security/suggest_user_profiles.rb +4 -2
- data/lib/elasticsearch/api/actions/security/update_api_key.rb +10 -2
- data/lib/elasticsearch/api/actions/security/update_cross_cluster_api_key.rb +10 -2
- data/lib/elasticsearch/api/actions/security/update_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/security/update_user_profile_data.rb +10 -2
- data/lib/elasticsearch/api/actions/shutdown/delete_node.rb +9 -1
- data/lib/elasticsearch/api/actions/shutdown/get_node.rb +9 -1
- data/lib/elasticsearch/api/actions/shutdown/put_node.rb +9 -1
- data/lib/elasticsearch/api/actions/simulate/ingest.rb +71 -0
- data/lib/elasticsearch/api/actions/snapshot/cleanup_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/clone.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/create.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/create_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/delete.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/delete_repository.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/get.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/get_repository.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/repository_analyze.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/restore.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot/status.rb +11 -3
- data/lib/elasticsearch/api/actions/snapshot/verify_repository.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/delete_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/execute_retention.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_stats.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/get_status.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/put_lifecycle.rb +10 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/start.rb +4 -2
- data/lib/elasticsearch/api/actions/snapshot_lifecycle_management/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/clear_cursor.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/delete_async.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/get_async.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/get_async_status.rb +10 -2
- data/lib/elasticsearch/api/actions/sql/query.rb +4 -2
- data/lib/elasticsearch/api/actions/sql/translate.rb +4 -2
- data/lib/elasticsearch/api/actions/ssl/certificates.rb +4 -2
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym.rb +10 -2
- data/lib/elasticsearch/api/actions/synonyms/delete_synonym_rule.rb +10 -2
- data/lib/elasticsearch/api/actions/synonyms/get_synonym.rb +10 -2
- data/lib/elasticsearch/api/actions/synonyms/get_synonym_rule.rb +10 -2
- data/lib/elasticsearch/api/actions/synonyms/get_synonyms_sets.rb +4 -2
- data/lib/elasticsearch/api/actions/synonyms/put_synonym.rb +10 -2
- data/lib/elasticsearch/api/actions/synonyms/put_synonym_rule.rb +10 -2
- data/lib/elasticsearch/api/actions/tasks/cancel.rb +10 -2
- data/lib/elasticsearch/api/actions/tasks/get.rb +10 -2
- data/lib/elasticsearch/api/actions/tasks/list.rb +4 -2
- data/lib/elasticsearch/api/actions/terms_enum.rb +10 -2
- data/lib/elasticsearch/api/actions/termvectors.rb +10 -2
- data/lib/elasticsearch/api/actions/text_structure/find_structure.rb +4 -2
- data/lib/elasticsearch/api/actions/transform/delete_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/get_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/get_transform_stats.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/preview_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/put_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/reset_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/schedule_now_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/start_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/stop_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/update_transform.rb +10 -2
- data/lib/elasticsearch/api/actions/transform/upgrade_transforms.rb +4 -2
- data/lib/elasticsearch/api/actions/update.rb +11 -3
- data/lib/elasticsearch/api/actions/update_by_query.rb +10 -2
- data/lib/elasticsearch/api/actions/update_by_query_rethrottle.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/ack_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/activate_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/deactivate_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/delete_watch.rb +11 -3
- data/lib/elasticsearch/api/actions/watcher/execute_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/get_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/get_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/put_watch.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/query_watches.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/start.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/stats.rb +10 -2
- data/lib/elasticsearch/api/actions/watcher/stop.rb +4 -2
- data/lib/elasticsearch/api/actions/watcher/update_settings.rb +4 -2
- data/lib/elasticsearch/api/actions/xpack/info.rb +4 -2
- data/lib/elasticsearch/api/actions/xpack/usage.rb +4 -2
- data/lib/elasticsearch/api/namespace/common.rb +2 -2
- data/lib/elasticsearch/api/namespace/{synonym_rule.rb → connector.rb} +7 -7
- data/{spec/rspec_formatter.rb → lib/elasticsearch/api/namespace/connector_sync_job.rb} +14 -9
- data/lib/elasticsearch/api/namespace/{synonyms_sets.rb → esql.rb} +7 -7
- data/lib/elasticsearch/api/namespace/inference.rb +36 -0
- data/lib/elasticsearch/api/namespace/profiling.rb +36 -0
- data/lib/elasticsearch/api/namespace/simulate.rb +36 -0
- data/lib/elasticsearch/api/version.rb +1 -1
- data/lib/elasticsearch/api.rb +6 -2
- data/spec/elasticsearch/api/actions/bulk_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/cat/aliases_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/allocation_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/component_templates_spec.rb +22 -10
- data/spec/elasticsearch/api/actions/cat/count_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/fielddata_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cat/health_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/help_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/master_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/nodeattrs_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/nodes_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/pending_tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/plugins_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/recovery_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/repositories_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/segments_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/cat/shards_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/snapshot_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/templates_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cat/thread_pool_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/clear_scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/close_point_in_time_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/allocation_explain_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/get_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/health_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/cluster/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/pending_tasks_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/put_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/remote_info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/cluster/reroute_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/state_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/cluster/stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/connector/check_in_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/{synonyms/delete_synonym_rule_spec.rb → connector/delete_spec.rb} +8 -4
- data/spec/elasticsearch/api/actions/{synonyms/delete_synonym_spec.rb → connector/get_spec.rb} +9 -5
- data/spec/elasticsearch/api/actions/connector/last_sync_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/{query_ruleset → connector}/list_spec.rb +5 -4
- data/spec/elasticsearch/api/actions/{security/update_settings_spec.rb → connector/post_spec.rb} +6 -5
- data/spec/elasticsearch/api/actions/connector/put_spec.rb +43 -0
- data/spec/elasticsearch/api/actions/connector/update_configuration_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector/update_error_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector/update_filtering_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector/update_name_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector/update_pipeline_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector/update_scheduling_spec.rb +42 -0
- data/spec/elasticsearch/api/actions/connector_sync_job/cancel_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector_sync_job/check_in_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector_sync_job/delete_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector_sync_job/error_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/connector_sync_job/get_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/{synonyms/get_synonym_rule_spec.rb → connector_sync_job/list_spec.rb} +5 -4
- data/spec/elasticsearch/api/actions/{synonyms/put_synonym_rule_spec.rb → connector_sync_job/post_spec.rb} +6 -5
- data/spec/elasticsearch/api/actions/connector_sync_job/update_stats_spec.rb +38 -0
- data/spec/elasticsearch/api/actions/count_spec.rb +6 -3
- data/spec/elasticsearch/api/actions/create_document_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/dangling_indices/delete_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/dangling_indices/import_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/dangling_indices/list_dangling_indices_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/data_frame/update_data_frame_transform_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/delete_by_query_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_document_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/delete_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/{synonyms/update_spec.rb → esql/query_spec.rb} +6 -5
- data/spec/elasticsearch/api/actions/exists_document_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/explain_document_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/features/get_features_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/features/reset_features_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/field_caps_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/global_checkpoints_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/msearch_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/fleet/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/get_document_source_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/get_document_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/get_script_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/health_report_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/index_document_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/index_lifecycle_management/migrate_to_data_tiers_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/add_block_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/analyze_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/clear_cache_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/clone_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/close_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/create_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/data_streams_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/delete_alias_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/indices/delete_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/delete_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/delete_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/disk_usage_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/exists_alias_spec.rb +26 -1
- data/spec/elasticsearch/api/actions/indices/exists_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/exists_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/explain_data_lifecycle_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/field_usage_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/flush_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/forcemerge_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/get_alias_spec.rb +25 -1
- data/spec/elasticsearch/api/actions/indices/get_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/get_field_mapping_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/get_mapping_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/indices/get_settings_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/indices/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/open_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/put_alias_spec.rb +27 -1
- data/spec/elasticsearch/api/actions/indices/put_data_lifecycle_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/put_mapping_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/indices/put_settings_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/put_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/recovery_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/refresh_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/rollover_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/segments_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/indices/shard_stores_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/shrink_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/split_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/indices/stats_spec.rb +68 -1
- data/spec/elasticsearch/api/actions/indices/unfreeze_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/indices/update_aliases_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/indices/validate_query_spec.rb +69 -1
- data/spec/elasticsearch/api/actions/inference/delete_model_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/get_model_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/inference_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/inference/put_model_spec.rb +36 -0
- data/spec/elasticsearch/api/actions/info_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/delete_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/geo_ip_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ingest/get_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/put_pipeline_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/ingest/simulate_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/json_builders_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/machine_learning/get_memory_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/machine_learning/get_model_snapshot_upgrade_stats_spec.rb +5 -1
- data/spec/elasticsearch/api/actions/machine_learning/infer_trained_model_deployment_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_definition_part_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/put_trained_model_vocabulary_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/reset_job_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/machine_learning/set_upgrade_mode_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/machine_learning/start_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/stop_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/machine_learning/update_trained_model_deployment_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/mget_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/migration/get_feature_upgrade_status_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/migration/post_feature_upgrade_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/msearch_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/msearch_template_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/mtermvectors_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/nodes/clear_repositories_metering_archive_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/nodes/get_repositories_metering_info_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/nodes/hot_threads_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/nodes/info_spec.rb +46 -1
- data/spec/elasticsearch/api/actions/nodes/reload_secure_settings_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/nodes/stats_spec.rb +35 -1
- data/spec/elasticsearch/api/actions/open_point_in_time_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/ping_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/{synonyms/get_synonym_spec.rb → profiling/status_spec.rb} +6 -4
- data/spec/elasticsearch/api/actions/put_script_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/query_ruleset/delete_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/query_ruleset/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/query_ruleset/put_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/rank_eval_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/reindex_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/render_search_template_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/scroll_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/search_application/delete_behavioral_analytics_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/delete_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/get_behavioral_analytics_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/list_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/post_behavioral_analytics_event_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/put_behavioral_analytics_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/put_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_application/render_query_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_application/search_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_mvt_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/search_shards_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/search_spec.rb +24 -1
- data/spec/elasticsearch/api/actions/search_template_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/cache_stats_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/clear_cache_spec.rb +14 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/mount_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/searchable_snapshots/stats_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/security/clear_cached_service_tokens_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/create_api_key_spec.rb +4 -2
- data/spec/elasticsearch/api/actions/security/create_cross_cluster_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/create_service_token_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/security/delete_service_token_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/disable_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/enable_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/enroll_kibana_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_builtin_privileges_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/get_service_accounts_spec.rb +26 -1
- data/spec/elasticsearch/api/actions/security/get_service_credentials_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/has_privileges_user_profile_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/invalidate_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/query_api_keys_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_authenticate_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_complete_logout_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_invalidate_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_logout_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_prepare_authentication_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/saml_service_provider_metadata_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/security/suggest_user_profiles_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/update_api_key_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/security/update_cross_cluster_api_key_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/shutdown/delete_node_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/shutdown/get_node_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/shutdown/put_node_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/{security/get_settings_spec.rb → simulate/ingest_spec.rb} +7 -6
- data/spec/elasticsearch/api/actions/snapshot/clone_spec.rb +4 -1
- data/spec/elasticsearch/api/actions/snapshot/create_repository_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/create_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_repository_spec.rb +15 -1
- data/spec/elasticsearch/api/actions/snapshot/delete_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/get_repository_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/snapshot/get_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/repository_analize_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/restore_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/snapshot/status_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/snapshot/verify_repository_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/sql/delete_async_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/sql/get_async_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/sql/get_async_stats_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/tasks/cancel_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/tasks/get_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/tasks/list_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/terms_enum_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/termvectors_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/transform/schedule_now_transform_spec.rb +3 -1
- data/spec/elasticsearch/api/actions/update_by_query_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/update_document_spec.rb +13 -1
- data/spec/elasticsearch/api/actions/watcher/get_settings_spec.rb +2 -1
- data/spec/elasticsearch/api/actions/watcher/update_settings_spec.rb +3 -2
- data/spec/elasticsearch/api/perform_request_spec.rb +86 -0
- data/spec/rest_api/rest_api_tests_helper.rb +1 -1
- data/spec/rest_api/rest_api_yaml_spec.rb +2 -0
- data/spec/rest_api/skipped_tests_free.yml +5 -3
- data/spec/rest_api/skipped_tests_platinum.yml +3 -0
- data/spec/spec_helper.rb +0 -4
- data/utils/endpoint_spec.rb +194 -0
- data/utils/{thor/generator/endpoint_specifics.rb → endpoint_specifics.rb} +4 -4
- data/utils/thor/generate_source.rb +14 -141
- data/utils/thor/templates/_body.erb +2 -2
- data/utils/thor/templates/_documentation_top.erb +22 -22
- data/utils/thor/templates/_method_setup.erb +10 -10
- data/utils/thor/templates/_perform_request.erb +11 -11
- data/utils/thor/templates/method.erb +28 -19
- metadata +99 -32
- data/spec/elasticsearch/api/actions/synonyms/get_synonyms_sets_spec.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8f3f9157a9dbe0e5f3040afc9f18eac39262287d79acc1ea08b31b29ba8e024f
|
4
|
+
data.tar.gz: f35bb20b4b8fd5e6d7c2f63938875854f6fe56caba6bf5dbd2852e394b2614c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5ffc220fc69410320d080fcdd94e7f9fe00636ab95180f39acf56dfed8e6885d80bd1d2fb8a163019e164e82c768ede72707d47e73b067361c8cc72da8ff88b
|
7
|
+
data.tar.gz: 280631daa29c9a281aa1be28c6e36e98801877e255e5c322aff466b44096e9deab823246562b57e6213f8169ee6335128c37392a398459f2134ff0005643c2d5
|
@@ -245,6 +245,8 @@ RSpec::Matchers.define :match_response do |pairs, test|
|
|
245
245
|
unless compare_string(expected_value, actual_value, test, actual_hash)
|
246
246
|
@mismatched_pairs.merge!(expected_key => expected_value)
|
247
247
|
end
|
248
|
+
when Time
|
249
|
+
compare_string(expected_value.to_s, Time.new(actual_value).to_s, test, actual_hash)
|
248
250
|
else
|
249
251
|
unless expected_value == actual_value
|
250
252
|
@mismatched_pairs.merge!(expected_key => expected_value)
|
@@ -37,6 +37,7 @@ module Elasticsearch
|
|
37
37
|
# @since 6.2.0
|
38
38
|
def initialize(definition)
|
39
39
|
@definition = definition
|
40
|
+
@retries = 0
|
40
41
|
end
|
41
42
|
|
42
43
|
# Execute the action. The method returns the client, in case the action created a new client
|
@@ -66,71 +67,9 @@ module Elasticsearch
|
|
66
67
|
shadow_client.send(method)
|
67
68
|
end
|
68
69
|
end
|
69
|
-
|
70
70
|
_method = chain[-1]
|
71
|
-
|
72
|
-
|
73
|
-
arguments = prepare_arguments(args, test)
|
74
|
-
arguments[:body].map! do |item|
|
75
|
-
if item.is_a?(Hash)
|
76
|
-
item
|
77
|
-
elsif item.is_a?(String)
|
78
|
-
symbolize_keys(JSON.parse(item))
|
79
|
-
end
|
80
|
-
end if arguments[:body].is_a? Array
|
81
|
-
@response = client.send(_method, arguments)
|
82
|
-
client
|
83
|
-
when 'headers'
|
84
|
-
headers = prepare_arguments(args, test)
|
85
|
-
host = client.transport.instance_variable_get('@hosts')
|
86
|
-
transport_options = client.transport.instance_variable_get('@options')&.dig(:transport_options) || {}
|
87
|
-
if ENV['QUIET'] == 'true'
|
88
|
-
# todo: create a method on Elasticsearch::Client that can clone the client with new options
|
89
|
-
Elasticsearch::Client.new(
|
90
|
-
host: host,
|
91
|
-
transport_options: transport_options.merge(headers: headers)
|
92
|
-
)
|
93
|
-
else
|
94
|
-
Elasticsearch::Client.new(
|
95
|
-
host: host,
|
96
|
-
tracer: Logger.new($stdout),
|
97
|
-
transport_options: transport_options.merge(headers: headers)
|
98
|
-
)
|
99
|
-
end
|
100
|
-
when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex'
|
101
|
-
client
|
102
|
-
when 'put_trained_model_alias'
|
103
|
-
args.merge!('reassign' => true) unless args['reassign'] === false
|
104
|
-
@response = client.send(_method, prepare_arguments(args, test))
|
105
|
-
client
|
106
|
-
when 'create'
|
107
|
-
begin
|
108
|
-
@response = client.send(_method, prepare_arguments(args, test))
|
109
|
-
rescue Elastic::Transport::Transport::Errors::BadRequest => e
|
110
|
-
case e.message
|
111
|
-
when /resource_already_exists_exception/
|
112
|
-
client.delete(index: args['index'])
|
113
|
-
when /failed to parse date field/
|
114
|
-
body = args['body']
|
115
|
-
time_series = body['settings']['index']['time_series']
|
116
|
-
time_series.each { |k, v| time_series[k] = v.strftime("%FT%TZ") }
|
117
|
-
args['body'] = body
|
118
|
-
else
|
119
|
-
raise e
|
120
|
-
end
|
121
|
-
@response = client.send(_method, prepare_arguments(args, test))
|
122
|
-
end
|
123
|
-
client
|
124
|
-
when 'update_user_profile_data', 'get_user_profile', 'enable_user_profile', 'disable_user_profile'
|
125
|
-
args.each do |key, value|
|
126
|
-
args[key] = value.gsub(value, test.cached_values[value.gsub('$', '')]) if value.match?(/^\$/)
|
127
|
-
end
|
128
|
-
@response = client.send(_method, prepare_arguments(args, test))
|
129
|
-
client
|
130
|
-
else
|
131
|
-
@response = client.send(_method, prepare_arguments(args, test))
|
132
|
-
client
|
133
|
-
end
|
71
|
+
|
72
|
+
perform_action(_method, args, client, test)
|
134
73
|
end
|
135
74
|
end
|
136
75
|
end
|
@@ -188,6 +127,79 @@ module Elasticsearch
|
|
188
127
|
client
|
189
128
|
end
|
190
129
|
|
130
|
+
def perform_action(_method, args, client, test)
|
131
|
+
case _method
|
132
|
+
when 'bulk'
|
133
|
+
arguments = prepare_arguments(args, test)
|
134
|
+
arguments[:body].map! do |item|
|
135
|
+
if item.is_a?(Hash)
|
136
|
+
item
|
137
|
+
elsif item.is_a?(String)
|
138
|
+
symbolize_keys(JSON.parse(item))
|
139
|
+
end
|
140
|
+
end if arguments[:body].is_a? Array
|
141
|
+
@response = client.send(_method, arguments)
|
142
|
+
client
|
143
|
+
when 'headers'
|
144
|
+
headers = prepare_arguments(args, test)
|
145
|
+
host = client.transport.instance_variable_get('@hosts')
|
146
|
+
transport_options = client.transport.instance_variable_get('@options')&.dig(:transport_options) || {}
|
147
|
+
if ENV['QUIET'] == 'true'
|
148
|
+
# todo: create a method on Elasticsearch::Client that can clone the client with new options
|
149
|
+
Elasticsearch::Client.new(
|
150
|
+
host: host,
|
151
|
+
transport_options: transport_options.merge(headers: headers)
|
152
|
+
)
|
153
|
+
else
|
154
|
+
Elasticsearch::Client.new(
|
155
|
+
host: host,
|
156
|
+
tracer: Logger.new($stdout),
|
157
|
+
transport_options: transport_options.merge(headers: headers)
|
158
|
+
)
|
159
|
+
end
|
160
|
+
when 'catch', 'warnings', 'allowed_warnings', 'allowed_warnings_regex'
|
161
|
+
client
|
162
|
+
when 'put_trained_model_alias'
|
163
|
+
args.merge!('reassign' => true) unless args['reassign'] === false
|
164
|
+
@response = client.send(_method, prepare_arguments(args, test))
|
165
|
+
client
|
166
|
+
when 'create'
|
167
|
+
begin
|
168
|
+
@response = client.send(_method, prepare_arguments(args, test))
|
169
|
+
rescue Elastic::Transport::Transport::Errors::BadRequest => e
|
170
|
+
case e.message
|
171
|
+
when /resource_already_exists_exception/
|
172
|
+
client.delete(index: args['index'])
|
173
|
+
when /failed to parse date field/
|
174
|
+
body = args['body']
|
175
|
+
time_series = body['settings']['index']['time_series']
|
176
|
+
time_series.each { |k, v| time_series[k] = v.strftime("%FT%TZ") }
|
177
|
+
args['body'] = body
|
178
|
+
else
|
179
|
+
raise e
|
180
|
+
end
|
181
|
+
@response = client.send(_method, prepare_arguments(args, test))
|
182
|
+
end
|
183
|
+
client
|
184
|
+
when 'update_user_profile_data', 'get_user_profile', 'enable_user_profile', 'disable_user_profile'
|
185
|
+
args.each do |key, value|
|
186
|
+
args[key] = value.gsub(value, test.cached_values[value.gsub('$', '')]) if value.match?(/^\$/)
|
187
|
+
end
|
188
|
+
@response = client.send(_method, prepare_arguments(args, test))
|
189
|
+
client
|
190
|
+
else
|
191
|
+
@response = client.send(_method, prepare_arguments(args, test))
|
192
|
+
client
|
193
|
+
end
|
194
|
+
rescue Elastic::Transport::Transport::Error => e
|
195
|
+
if e.message.match(/Net::ReadTimeout/) && @retries <= 5
|
196
|
+
@retries += 1
|
197
|
+
perform_action(method, args, client, test)
|
198
|
+
else
|
199
|
+
raise e
|
200
|
+
end
|
201
|
+
end
|
202
|
+
|
191
203
|
def prepare_arguments(args, test)
|
192
204
|
symbolize_keys(args).tap do |args|
|
193
205
|
if test
|
@@ -102,7 +102,7 @@ module Elasticsearch
|
|
102
102
|
def response
|
103
103
|
@response ||= begin
|
104
104
|
if do_actions.any? { |a| a.yaml_response? }
|
105
|
-
YAML.load(do_actions[-1].response)
|
105
|
+
YAML.load(do_actions[-1].response.body)
|
106
106
|
else
|
107
107
|
do_actions[-1].response
|
108
108
|
end
|
@@ -315,7 +315,10 @@ module Elasticsearch
|
|
315
315
|
set_definition['set'].each do |response_key, variable_name|
|
316
316
|
nested_key_chain = response_key.split('.').map do |key|
|
317
317
|
# If there's a variable in the set key, get the value:
|
318
|
-
|
318
|
+
if key.match?(/\$.+/)
|
319
|
+
value = @test.cached_values[key.gsub('$', '')]
|
320
|
+
key.gsub!(key, value) if value
|
321
|
+
end
|
319
322
|
|
320
323
|
(key =~ /\A[-+]?[0-9]+\z/) ? key.to_i: key
|
321
324
|
end
|
@@ -76,10 +76,9 @@ module Elasticsearch
|
|
76
76
|
def skip_version?(client, skip_definition)
|
77
77
|
return true if skip_definition.fetch('version', '').include? 'all'
|
78
78
|
|
79
|
-
range_partition = /\s*-\s*/
|
80
79
|
return unless (versions = skip_definition['version'])
|
81
80
|
|
82
|
-
low, high = __parse_versions(versions
|
81
|
+
low, high = __parse_versions(versions)
|
83
82
|
range = low..high
|
84
83
|
begin
|
85
84
|
server_version = client.info['version']['number']
|
@@ -90,7 +89,13 @@ module Elasticsearch
|
|
90
89
|
end
|
91
90
|
|
92
91
|
def __parse_versions(versions)
|
93
|
-
|
92
|
+
if versions.count('-') == 2
|
93
|
+
versions = versions.gsub(/\s/, '').gsub(/-/, '').split(',')
|
94
|
+
else
|
95
|
+
range_partition = /\s*-\s*/
|
96
|
+
versions = versions.partition(range_partition)
|
97
|
+
versions = versions.split('-') if versions.is_a? String
|
98
|
+
end
|
94
99
|
|
95
100
|
low = (['', nil].include? versions[0]) ? '0' : versions[0]
|
96
101
|
high = (['', nil].include? versions[2]) ? '9999' : versions[2]
|
@@ -41,8 +41,7 @@ module Elasticsearch
|
|
41
41
|
'synthetics', 'synthetics-settings', 'synthetics-mappings',
|
42
42
|
'.snapshot-blob-cache', '.deprecation-indexing-template',
|
43
43
|
'.deprecation-indexing-mappings', '.deprecation-indexing-settings',
|
44
|
-
'security-index-template', 'data-streams-mappings', '
|
45
|
-
'search-acl-filter'
|
44
|
+
'security-index-template', 'data-streams-mappings', 'search-acl-filter'
|
46
45
|
].freeze
|
47
46
|
|
48
47
|
# Wipe Cluster, based on PHP's implementation of ESRestTestCase.java:wipeCluster()
|
@@ -100,7 +99,7 @@ module Elasticsearch
|
|
100
99
|
|
101
100
|
def check_for_unexpectedly_recreated_objects(client)
|
102
101
|
unexpected_ilm_policies = client.index_lifecycle_management.get_lifecycle
|
103
|
-
unexpected_ilm_policies.reject! { |k, _|
|
102
|
+
unexpected_ilm_policies.reject! { |k, _| preserve_policy?(k) }
|
104
103
|
unless unexpected_ilm_policies.empty?
|
105
104
|
logger.info(
|
106
105
|
"Expected no ILM policies after deletions, but found #{unexpected_ilm_policies.keys.join(',')}"
|
@@ -254,6 +253,8 @@ module Elasticsearch
|
|
254
253
|
end
|
255
254
|
|
256
255
|
def platinum_template?(template)
|
256
|
+
return true if template.include?('@')
|
257
|
+
|
257
258
|
platinum_prefixes = [
|
258
259
|
'.monitoring', '.watch', '.triggered-watches', '.data-frame', '.ml-',
|
259
260
|
'.transform', '.deprecation', 'data-streams-mappings', '.fleet',
|
@@ -264,6 +265,10 @@ module Elasticsearch
|
|
264
265
|
PLATINUM_TEMPLATES.include? template
|
265
266
|
end
|
266
267
|
|
268
|
+
def preserve_policy?(policy)
|
269
|
+
PRESERVE_ILM_POLICY_IDS.include?(policy) || policy.include?('@')
|
270
|
+
end
|
271
|
+
|
267
272
|
def wait_for_cluster_tasks(client)
|
268
273
|
start_time = Time.now.to_i
|
269
274
|
count = 0
|
@@ -292,7 +297,7 @@ module Elasticsearch
|
|
292
297
|
def delete_all_ilm_policies(client)
|
293
298
|
policies = client.ilm.get_lifecycle
|
294
299
|
policies.each do |policy|
|
295
|
-
client.ilm.delete_lifecycle(policy: policy[0]) unless
|
300
|
+
client.ilm.delete_lifecycle(policy: policy[0]) unless preserve_policy?(policy[0])
|
296
301
|
end
|
297
302
|
end
|
298
303
|
|
data/elasticsearch-api.gemspec
CHANGED
@@ -23,8 +23,8 @@ require 'elasticsearch/api/version'
|
|
23
23
|
Gem::Specification.new do |s|
|
24
24
|
s.name = 'elasticsearch-api'
|
25
25
|
s.version = Elasticsearch::API::VERSION
|
26
|
-
s.authors = ['
|
27
|
-
s.email = ['
|
26
|
+
s.authors = ['Elastic Client Library Maintainers']
|
27
|
+
s.email = ['client-libs@elastic.co']
|
28
28
|
s.summary = 'Ruby API for Elasticsearch.'
|
29
29
|
s.homepage = 'https://www.elastic.co/guide/en/elasticsearch/client/ruby-api/current/index.html'
|
30
30
|
s.license = 'Apache-2.0'
|
@@ -27,9 +27,17 @@ module Elasticsearch
|
|
27
27
|
# @option arguments [String] :id The async search ID
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html
|
31
31
|
#
|
32
32
|
def delete(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "async_search.delete" }
|
34
|
+
|
35
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
42
|
|
35
43
|
arguments = arguments.clone
|
@@ -44,7 +52,7 @@ module Elasticsearch
|
|
44
52
|
params = {}
|
45
53
|
|
46
54
|
Elasticsearch::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
56
|
)
|
49
57
|
end
|
50
58
|
end
|
@@ -30,9 +30,17 @@ module Elasticsearch
|
|
30
30
|
# @option arguments [Boolean] :typed_keys Specify whether aggregation and suggester names should be prefixed by their respective types in the response
|
31
31
|
# @option arguments [Hash] :headers Custom HTTP headers
|
32
32
|
#
|
33
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
33
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html
|
34
34
|
#
|
35
35
|
def get(arguments = {})
|
36
|
+
request_opts = { endpoint: arguments[:endpoint] || "async_search.get" }
|
37
|
+
|
38
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
39
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
40
|
+
set_variables
|
41
|
+
end
|
42
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
43
|
+
|
36
44
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
37
45
|
|
38
46
|
arguments = arguments.clone
|
@@ -47,7 +55,7 @@ module Elasticsearch
|
|
47
55
|
params = Utils.process_params(arguments)
|
48
56
|
|
49
57
|
Elasticsearch::API::Response.new(
|
50
|
-
perform_request(method, path, params, body, headers)
|
58
|
+
perform_request(method, path, params, body, headers, request_opts)
|
51
59
|
)
|
52
60
|
end
|
53
61
|
end
|
@@ -27,9 +27,17 @@ module Elasticsearch
|
|
27
27
|
# @option arguments [String] :id The async search ID
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html
|
31
31
|
#
|
32
32
|
def status(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "async_search.status" }
|
34
|
+
|
35
|
+
defined_params = [:id].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
raise ArgumentError, "Required argument 'id' missing" unless arguments[:id]
|
34
42
|
|
35
43
|
arguments = arguments.clone
|
@@ -44,7 +52,7 @@ module Elasticsearch
|
|
44
52
|
params = {}
|
45
53
|
|
46
54
|
Elasticsearch::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
56
|
)
|
49
57
|
end
|
50
58
|
end
|
@@ -69,9 +69,17 @@ module Elasticsearch
|
|
69
69
|
# @option arguments [Hash] :headers Custom HTTP headers
|
70
70
|
# @option arguments [Hash] :body The search definition using the Query DSL
|
71
71
|
#
|
72
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
72
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/async-search.html
|
73
73
|
#
|
74
74
|
def submit(arguments = {})
|
75
|
+
request_opts = { endpoint: arguments[:endpoint] || "async_search.submit" }
|
76
|
+
|
77
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
78
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
79
|
+
set_variables
|
80
|
+
end
|
81
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
82
|
+
|
75
83
|
arguments = arguments.clone
|
76
84
|
headers = arguments.delete(:headers) || {}
|
77
85
|
|
@@ -88,7 +96,7 @@ module Elasticsearch
|
|
88
96
|
params = Utils.process_params(arguments)
|
89
97
|
|
90
98
|
Elasticsearch::API::Response.new(
|
91
|
-
perform_request(method, path, params, body, headers)
|
99
|
+
perform_request(method, path, params, body, headers, request_opts)
|
92
100
|
)
|
93
101
|
end
|
94
102
|
end
|
@@ -27,9 +27,17 @@ module Elasticsearch
|
|
27
27
|
# @option arguments [String] :name the name of the autoscaling policy
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-delete-autoscaling-policy.html
|
31
31
|
#
|
32
32
|
def delete_autoscaling_policy(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "autoscaling.delete_autoscaling_policy" }
|
34
|
+
|
35
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
34
42
|
|
35
43
|
arguments = arguments.clone
|
@@ -44,7 +52,7 @@ module Elasticsearch
|
|
44
52
|
params = {}
|
45
53
|
|
46
54
|
Elasticsearch::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
56
|
)
|
49
57
|
end
|
50
58
|
end
|
@@ -26,9 +26,11 @@ module Elasticsearch
|
|
26
26
|
#
|
27
27
|
# @option arguments [Hash] :headers Custom HTTP headers
|
28
28
|
#
|
29
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
29
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-capacity.html
|
30
30
|
#
|
31
31
|
def get_autoscaling_capacity(arguments = {})
|
32
|
+
request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_capacity" }
|
33
|
+
|
32
34
|
arguments = arguments.clone
|
33
35
|
headers = arguments.delete(:headers) || {}
|
34
36
|
|
@@ -39,7 +41,7 @@ module Elasticsearch
|
|
39
41
|
params = {}
|
40
42
|
|
41
43
|
Elasticsearch::API::Response.new(
|
42
|
-
perform_request(method, path, params, body, headers)
|
44
|
+
perform_request(method, path, params, body, headers, request_opts)
|
43
45
|
)
|
44
46
|
end
|
45
47
|
end
|
@@ -27,9 +27,17 @@ module Elasticsearch
|
|
27
27
|
# @option arguments [String] :name the name of the autoscaling policy
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
#
|
30
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
30
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-get-autoscaling-policy.html
|
31
31
|
#
|
32
32
|
def get_autoscaling_policy(arguments = {})
|
33
|
+
request_opts = { endpoint: arguments[:endpoint] || "autoscaling.get_autoscaling_policy" }
|
34
|
+
|
35
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
36
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
37
|
+
set_variables
|
38
|
+
end
|
39
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
40
|
+
|
33
41
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
34
42
|
|
35
43
|
arguments = arguments.clone
|
@@ -44,7 +52,7 @@ module Elasticsearch
|
|
44
52
|
params = {}
|
45
53
|
|
46
54
|
Elasticsearch::API::Response.new(
|
47
|
-
perform_request(method, path, params, body, headers)
|
55
|
+
perform_request(method, path, params, body, headers, request_opts)
|
48
56
|
)
|
49
57
|
end
|
50
58
|
end
|
@@ -28,9 +28,17 @@ module Elasticsearch
|
|
28
28
|
# @option arguments [Hash] :headers Custom HTTP headers
|
29
29
|
# @option arguments [Hash] :body the specification of the autoscaling policy (*Required*)
|
30
30
|
#
|
31
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
31
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/autoscaling-put-autoscaling-policy.html
|
32
32
|
#
|
33
33
|
def put_autoscaling_policy(arguments = {})
|
34
|
+
request_opts = { endpoint: arguments[:endpoint] || "autoscaling.put_autoscaling_policy" }
|
35
|
+
|
36
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
37
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
38
|
+
set_variables
|
39
|
+
end
|
40
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
41
|
+
|
34
42
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
35
43
|
raise ArgumentError, "Required argument 'name' missing" unless arguments[:name]
|
36
44
|
|
@@ -46,7 +54,7 @@ module Elasticsearch
|
|
46
54
|
params = {}
|
47
55
|
|
48
56
|
Elasticsearch::API::Response.new(
|
49
|
-
perform_request(method, path, params, body, headers)
|
57
|
+
perform_request(method, path, params, body, headers, request_opts)
|
50
58
|
)
|
51
59
|
end
|
52
60
|
end
|
@@ -34,13 +34,22 @@ module Elasticsearch
|
|
34
34
|
# @option arguments [List] :_source_includes Default list of fields to extract and return from the _source field, can be overridden on each sub-request
|
35
35
|
# @option arguments [String] :pipeline The pipeline id to preprocess incoming documents with
|
36
36
|
# @option arguments [Boolean] :require_alias Sets require_alias for all incoming documents. Defaults to unset (false)
|
37
|
+
# @option arguments [Boolean] :list_executed_pipelines Sets list_executed_pipelines for all incoming documents. Defaults to unset (false)
|
37
38
|
# @option arguments [Hash] :headers Custom HTTP headers
|
38
39
|
# @option arguments [String|Array] :body The operation definition and data (action-data pairs), separated by newlines. Array of Strings, Header/Data pairs,
|
39
40
|
# or the conveniency "combined" format can be passed, refer to Elasticsearch::API::Utils.__bulkify documentation.
|
40
41
|
#
|
41
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
42
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/docs-bulk.html
|
42
43
|
#
|
43
44
|
def bulk(arguments = {})
|
45
|
+
request_opts = { endpoint: arguments[:endpoint] || "bulk" }
|
46
|
+
|
47
|
+
defined_params = [:index].inject({}) do |set_variables, variable|
|
48
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
49
|
+
set_variables
|
50
|
+
end
|
51
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
52
|
+
|
44
53
|
raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
|
45
54
|
|
46
55
|
arguments = arguments.clone
|
@@ -66,7 +75,7 @@ module Elasticsearch
|
|
66
75
|
|
67
76
|
headers.merge!("Content-Type" => "application/x-ndjson")
|
68
77
|
Elasticsearch::API::Response.new(
|
69
|
-
perform_request(method, path, params, payload, headers)
|
78
|
+
perform_request(method, path, params, payload, headers, request_opts)
|
70
79
|
)
|
71
80
|
end
|
72
81
|
end
|
@@ -34,9 +34,17 @@ module Elasticsearch
|
|
34
34
|
# @option arguments [String] :expand_wildcards Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all)
|
35
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
36
|
#
|
37
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-alias.html
|
38
38
|
#
|
39
39
|
def aliases(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "cat.aliases" }
|
41
|
+
|
42
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
43
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
+
set_variables
|
45
|
+
end
|
46
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
+
|
40
48
|
arguments = arguments.clone
|
41
49
|
headers = arguments.delete(:headers) || {}
|
42
50
|
|
@@ -54,7 +62,7 @@ module Elasticsearch
|
|
54
62
|
params[:h] = Utils.__listify(params[:h]) if params[:h]
|
55
63
|
|
56
64
|
Elasticsearch::API::Response.new(
|
57
|
-
perform_request(method, path, params, body, headers)
|
65
|
+
perform_request(method, path, params, body, headers, request_opts)
|
58
66
|
)
|
59
67
|
end
|
60
68
|
end
|
@@ -35,9 +35,17 @@ module Elasticsearch
|
|
35
35
|
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
36
36
|
# @option arguments [Hash] :headers Custom HTTP headers
|
37
37
|
#
|
38
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
38
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-allocation.html
|
39
39
|
#
|
40
40
|
def allocation(arguments = {})
|
41
|
+
request_opts = { endpoint: arguments[:endpoint] || "cat.allocation" }
|
42
|
+
|
43
|
+
defined_params = [:node_id].inject({}) do |set_variables, variable|
|
44
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
45
|
+
set_variables
|
46
|
+
end
|
47
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
48
|
+
|
41
49
|
arguments = arguments.clone
|
42
50
|
headers = arguments.delete(:headers) || {}
|
43
51
|
|
@@ -55,7 +63,7 @@ module Elasticsearch
|
|
55
63
|
params[:h] = Utils.__listify(params[:h]) if params[:h]
|
56
64
|
|
57
65
|
Elasticsearch::API::Response.new(
|
58
|
-
perform_request(method, path, params, body, headers)
|
66
|
+
perform_request(method, path, params, body, headers, request_opts)
|
59
67
|
)
|
60
68
|
end
|
61
69
|
end
|
@@ -34,9 +34,17 @@ module Elasticsearch
|
|
34
34
|
# @option arguments [Boolean] :v Verbose mode. Display column headers
|
35
35
|
# @option arguments [Hash] :headers Custom HTTP headers
|
36
36
|
#
|
37
|
-
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.
|
37
|
+
# @see https://www.elastic.co/guide/en/elasticsearch/reference/8.12/cat-component-templates.html
|
38
38
|
#
|
39
39
|
def component_templates(arguments = {})
|
40
|
+
request_opts = { endpoint: arguments[:endpoint] || "cat.component_templates" }
|
41
|
+
|
42
|
+
defined_params = [:name].inject({}) do |set_variables, variable|
|
43
|
+
set_variables[variable] = arguments[variable] if arguments.key?(variable)
|
44
|
+
set_variables
|
45
|
+
end
|
46
|
+
request_opts[:defined_params] = defined_params unless defined_params.empty?
|
47
|
+
|
40
48
|
arguments = arguments.clone
|
41
49
|
headers = arguments.delete(:headers) || {}
|
42
50
|
|
@@ -53,7 +61,7 @@ module Elasticsearch
|
|
53
61
|
params = Utils.process_params(arguments)
|
54
62
|
|
55
63
|
Elasticsearch::API::Response.new(
|
56
|
-
perform_request(method, path, params, body, headers)
|
64
|
+
perform_request(method, path, params, body, headers, request_opts)
|
57
65
|
)
|
58
66
|
end
|
59
67
|
end
|