Skip to content

Updates #95

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ module Actions
# Cannot start with +-+, +_+, +++, or +.ds-+;
# Cannot be +.+ or +..+;
# Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster. (*Required*)
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
Expand All @@ -56,7 +58,7 @@ def create_data_stream(arguments = {})

method = ElasticsearchServerless::API::HTTP_PUT
path = "_data_stream/#{Utils.listify(_name)}"
params = {}
params = Utils.process_params(arguments)

ElasticsearchServerless::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ module Actions
# Deletes one or more data streams and their backing indices.
#
# @option arguments [String, Array<String>] :name Comma-separated list of data streams to delete. Wildcard (+*+) expressions are supported. (*Required*)
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match. Supports comma-separated values,such as +open,hidden+. Server default: open.
# @option arguments [Hash] :headers Custom HTTP headers
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module Actions
# Supports comma-separated values, such as +open,hidden+.
# Valid values are: +all+, +open+, +closed+, +hidden+, +none+. Server default: open.
# @option arguments [Boolean] :include_defaults If +true+, return all default settings in the response.
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams-get-lifecycle.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module Actions
# @option arguments [String, Array<String>] :expand_wildcards Type of data stream that wildcard patterns can match.
# Supports comma-separated values, such as +open,hidden+. Server default: open.
# @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ module Actions
# The write index for the alias becomes the write index for the stream.
#
# @option arguments [String] :name Name of the index alias to convert to a data stream. (*Required*)
# @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Time] :timeout Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
# @option arguments [Hash] :headers Custom HTTP headers
#
# @see https://www.elastic.co/guide/en/elasticsearch/reference/master/data-streams.html
Expand All @@ -59,7 +61,7 @@ def migrate_to_data_stream(arguments = {})

method = ElasticsearchServerless::API::HTTP_POST
path = "_data_stream/_migrate/#{Utils.listify(_name)}"
params = {}
params = Utils.process_params(arguments)

ElasticsearchServerless::API::Response.new(
perform_request(method, path, params, body, headers, request_opts)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Forces any buffered data to be processed by the job.
# Force buffered data to be processed.
# The flush jobs API is only applicable when sending data for analysis using
# the post data API. Depending on the content of the buffer, then it might
# additionally calculate new results. Both flush and close operations are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves information about the scheduled events in calendars.
# Get info about events in calendars.
#
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier. (*Required*)
# @option arguments [String, Time] :end Specifies to get events with timestamps earlier than this time.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves configuration information for calendars.
# Get calendar configuration info.
#
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. You can get information for multiple calendars by using a comma-separated list of ids or a wildcard expression. You can get information for all calendars by using +_all+ or +*+ or by omitting the calendar identifier.
# @option arguments [Integer] :from Skips the specified number of calendars. This parameter is supported only when you omit the calendar identifier. Server default: 0.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves configuration information for data frame analytics jobs.
# Get data frame analytics job configuration info.
# You can get information for multiple data frame analytics jobs in a single
# API request by using a comma-separated list of data frame analytics jobs or a
# wildcard expression.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves usage information for data frame analytics jobs.
# Get data frame analytics jobs usage info.
#
# @option arguments [String] :id Identifier for the data frame analytics job. If you do not specify this
# option, the API returns information for the first hundred data frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves usage information for datafeeds.
# Get datafeeds usage info.
# You can get statistics for multiple datafeeds in a single API request by
# using a comma-separated list of datafeeds or a wildcard expression. You can
# get statistics for all datafeeds by using +_all+, by specifying +*+ as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves configuration information for datafeeds.
# Get datafeeds configuration info.
# You can get information for multiple datafeeds in a single API request by
# using a comma-separated list of datafeeds or a wildcard expression. You can
# get information for all datafeeds by using +_all+, by specifying +*+ as the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves filters.
# Get filters.
# You can get a single filter or all filters.
#
# @option arguments [String, Array] :filter_id A string that uniquely identifies a filter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves usage information for anomaly detection jobs.
# Get anomaly detection jobs usage info.
#
# @option arguments [String] :job_id Identifier for the anomaly detection job. It can be a job identifier, a
# group name, a comma-separated list of jobs, or a wildcard expression. If
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves configuration information for anomaly detection jobs.
# Get anomaly detection jobs configuration info.
# You can get information for multiple anomaly detection jobs in a single API
# request by using a group name, a comma-separated list of jobs, or a wildcard
# expression. You can get information for all anomaly detection jobs by using
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves overall bucket results that summarize the bucket results of
# Get overall bucket results.
# Retrievs overall bucket results that summarize the bucket results of
# multiple anomaly detection jobs.
# The +overall_score+ is calculated by combining the scores of all the
# buckets within the overall bucket span. First, the maximum
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves configuration information for a trained model.
# Get trained model configuration info.
#
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias.You can get information for multiple trained models in a single API
# request by using a comma-separated list of model IDs or a wildcard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Retrieves usage information for trained models. You can get usage information for multiple trained
# Get trained models usage info.
# You can get usage information for multiple trained
# models in a single API request by using a comma-separated list of model IDs or a wildcard expression.
#
# @option arguments [String, Array] :model_id The unique identifier of the trained model or a model alias. It can be a
Expand Down
5 changes: 2 additions & 3 deletions lib/elasticsearch-serverless/api/machine_learning/open_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ module API
module MachineLearning
module Actions
# Open anomaly detection jobs.
# An anomaly detection job must be opened in order for it to be ready to
# receive and analyze data. It can be opened and closed multiple times
# throughout its lifecycle.
# An anomaly detection job must be opened to be ready to receive and analyze
# data. It can be opened and closed multiple times throughout its lifecycle.
# When you open a new job, it starts with an empty model.
# When you open an existing job, the most recent model state is automatically
# loaded. The job is ready to resume its analysis from where it left off, once
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Adds scheduled events to a calendar.
# Add scheduled events to the calendar.
#
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
# @option arguments [Hash] :headers Custom HTTP headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Preview features used by data frame analytics.
# Previews the extracted features used by a data frame analytics config.
#
# @option arguments [String] :id Identifier for the data frame analytics job.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Previews a datafeed.
# Preview a datafeed.
# This API returns the first "page" of search results from a datafeed.
# You can preview an existing datafeed or provide configuration details for a datafeed
# and anomaly detection job in the API. The preview shows the structure of the data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Creates a calendar.
# Create a calendar.
#
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
# @option arguments [Hash] :headers Custom HTTP headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Adds an anomaly detection job to a calendar.
# Add anomaly detection job to calendar.
#
# @option arguments [String] :calendar_id A string that uniquely identifies a calendar. (*Required*)
# @option arguments [String, Array] :job_id An identifier for the anomaly detection jobs. It can be a job identifier, a group name, or a comma-separated list of jobs or groups. (*Required*)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Instantiates a data frame analytics job.
# Create a data frame analytics job.
# This API creates a data frame analytics job that performs an analysis on the
# source indices and stores the outcome in a destination index.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Instantiates a datafeed.
# Create a datafeed.
# Datafeeds retrieve data from Elasticsearch for analysis by an anomaly detection job.
# You can associate only one datafeed with each anomaly detection job.
# The datafeed contains a query that runs at a defined interval (+frequency+).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Instantiates a filter.
# Create a filter.
# A filter contains a list of strings. It can be used by one or more anomaly detection jobs.
# Specifically, filters are referenced in the +custom_rules+ property of detector configuration objects.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Enables you to supply a trained model that is not created by data frame analytics.
# Create a trained model.
# Enable you to supply a trained model that is not created by data frame analytics.
#
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
# @option arguments [Boolean] :defer_definition_decompression If set to +true+ and a +compressed_definition+ is provided,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Creates or updates a trained model alias. A trained model alias is a logical
# name used to reference a single trained model.
# Create or update a trained model alias.
# A trained model alias is a logical name used to reference a single trained
# model.
# You can use aliases instead of trained model identifiers to make it easier to
# reference your models. For example, you can use aliases in inference
# aggregations and processors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Creates part of a trained model definition.
# Create part of a trained model definition.
#
# @option arguments [String] :model_id The unique identifier of the trained model. (*Required*)
# @option arguments [Integer] :part The definition part number. When the definition is loaded for inference the definition parts are streamed in the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Creates a trained model vocabulary.
# Create a trained model vocabulary.
# This API is supported only for natural language processing (NLP) models.
# The vocabulary is stored in the index as described in +inference_config.*.vocabulary+ of the trained model definition.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Resets an anomaly detection job.
# Reset an anomaly detection job.
# All model state and results are deleted. The job is ready to start over as if
# it had just been created.
# It is not currently possible to reset multiple jobs using wildcards or a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Starts a data frame analytics job.
# Start a data frame analytics job.
# A data frame analytics job can be started and stopped multiple times
# throughout its lifecycle.
# If the destination index does not exist, it is created automatically the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Starts one or more datafeeds.
# Start datafeeds.
# A datafeed must be started in order to retrieve data from Elasticsearch. A datafeed can be started and stopped
# multiple times throughout its lifecycle.
# Before you can start a datafeed, the anomaly detection job must be open. Otherwise, an error occurs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Starts a trained model deployment, which allocates the model to every machine learning node.
# Start a trained model deployment.
# It allocates the model to every machine learning node.
#
# @option arguments [String] :model_id The unique identifier of the trained model. Currently, only PyTorch models are supported. (*Required*)
# @option arguments [Integer, String] :cache_size The inference cache size (in memory outside the JVM heap) per node for the model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Stops one or more data frame analytics jobs.
# Stop data frame analytics jobs.
# A data frame analytics job can be started and stopped multiple times
# throughout its lifecycle.
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module ElasticsearchServerless
module API
module MachineLearning
module Actions
# Stops one or more datafeeds.
# Stop datafeeds.
# A datafeed that is stopped ceases to retrieve data from Elasticsearch. A datafeed can be started and stopped
# multiple times throughout its lifecycle.
#
Expand Down
Loading
Loading