Skip to content

Auto-generated code for main #104

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 1 commit into from
Jan 7, 2025
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
80 changes: 10 additions & 70 deletions elasticsearch_serverless/_async/client/cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ async def count(
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
v: t.Optional[bool] = None,
Expand All @@ -231,7 +230,6 @@ async def count(
:param h: List of columns to appear in the response. Supports simple wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
Expand All @@ -257,8 +255,6 @@ async def count(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
Expand All @@ -276,59 +272,15 @@ async def count(
)

@_rewrite_parameters()
async def help(
self,
*,
error_trace: t.Optional[bool] = None,
filter_path: t.Optional[t.Union[str, t.Sequence[str]]] = None,
format: t.Optional[str] = None,
h: t.Optional[t.Union[str, t.Sequence[str]]] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[t.Union[str, t.Sequence[str]]] = None,
v: t.Optional[bool] = None,
) -> TextApiResponse:
async def help(self) -> TextApiResponse:
"""
Get CAT help. Returns help for the CAT APIs.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html>`_

:param format: Specifies the format to return the columnar data in, can be set
to `text`, `json`, `cbor`, `yaml`, or `smile`.
:param h: List of columns to appear in the response. Supports simple wildcards.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: List of columns that determine how the table should be sorted. Sorting
defaults to ascending and can be changed by setting `:asc` or `:desc` as
a suffix to the column name.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str] = {}
__path = "/_cat"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
__query["error_trace"] = error_trace
if filter_path is not None:
__query["filter_path"] = filter_path
if format is not None:
__query["format"] = format
if h is not None:
__query["h"] = h
if help is not None:
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain"}
return await self.perform_request( # type: ignore[return-value]
"GET",
Expand Down Expand Up @@ -520,7 +472,6 @@ async def ml_data_frame_analytics(
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[
t.Union[
Expand Down Expand Up @@ -570,7 +521,9 @@ async def ml_data_frame_analytics(
],
]
] = None,
time: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
time: t.Optional[
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Expand All @@ -591,7 +544,6 @@ async def ml_data_frame_analytics(
:param h: Comma-separated list of column names to display.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param time: Unit used to display time values.
Expand Down Expand Up @@ -621,8 +573,6 @@ async def ml_data_frame_analytics(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
Expand Down Expand Up @@ -692,7 +642,6 @@ async def ml_datafeeds(
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[
t.Union[
Expand Down Expand Up @@ -763,7 +712,6 @@ async def ml_datafeeds(
:param h: Comma-separated list of column names to display.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param time: The unit used to display time values.
Expand Down Expand Up @@ -791,8 +739,6 @@ async def ml_datafeeds(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
Expand Down Expand Up @@ -961,7 +907,6 @@ async def ml_jobs(
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[
t.Union[
Expand Down Expand Up @@ -1129,7 +1074,6 @@ async def ml_jobs(
:param h: Comma-separated list of column names to display.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param time: The unit used to display time values.
Expand Down Expand Up @@ -1159,8 +1103,6 @@ async def ml_jobs(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
Expand Down Expand Up @@ -1240,7 +1182,6 @@ async def ml_trained_models(
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[
t.Union[
Expand Down Expand Up @@ -1287,6 +1228,9 @@ async def ml_trained_models(
]
] = None,
size: t.Optional[int] = None,
time: t.Optional[
t.Union[str, t.Literal["d", "h", "m", "micros", "ms", "nanos", "s"]]
] = None,
v: t.Optional[bool] = None,
) -> t.Union[ObjectApiResponse[t.Any], TextApiResponse]:
"""
Expand All @@ -1312,10 +1256,10 @@ async def ml_trained_models(
:param h: A comma-separated list of column names to display.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: A comma-separated list of column names or aliases used to sort the
response.
:param size: The maximum number of transforms to display.
:param time: Unit used to display time values.
:param v: When set to `true` will enable verbose output.
"""
__path_parts: t.Dict[str, str]
Expand Down Expand Up @@ -1344,14 +1288,14 @@ async def ml_trained_models(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
__query["s"] = s
if size is not None:
__query["size"] = size
if time is not None:
__query["time"] = time
if v is not None:
__query["v"] = v
__headers = {"accept": "text/plain,application/json"}
Expand Down Expand Up @@ -1460,7 +1404,6 @@ async def transforms(
] = None,
help: t.Optional[bool] = None,
human: t.Optional[bool] = None,
master_timeout: t.Optional[t.Union[str, t.Literal[-1], t.Literal[0]]] = None,
pretty: t.Optional[bool] = None,
s: t.Optional[
t.Union[
Expand Down Expand Up @@ -1574,7 +1517,6 @@ async def transforms(
:param h: Comma-separated list of column names to display.
:param help: When set to `true` will output available columns. This option can't
be combined with any other query string option.
:param master_timeout: Period to wait for a connection to the master node.
:param s: Comma-separated list of column names or column aliases used to sort
the response.
:param size: The maximum number of transforms to obtain.
Expand Down Expand Up @@ -1605,8 +1547,6 @@ async def transforms(
__query["help"] = help
if human is not None:
__query["human"] = human
if master_timeout is not None:
__query["master_timeout"] = master_timeout
if pretty is not None:
__query["pretty"] = pretty
if s is not None:
Expand Down
12 changes: 12 additions & 0 deletions elasticsearch_serverless/_async/client/eql.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ async def get_status(
@_rewrite_parameters(
body_fields=(
"query",
"allow_partial_search_results",
"allow_partial_sequence_results",
"case_sensitive",
"event_category_field",
"fetch_size",
Expand All @@ -189,6 +191,8 @@ async def search(
index: t.Union[str, t.Sequence[str]],
query: t.Optional[str] = None,
allow_no_indices: t.Optional[bool] = None,
allow_partial_search_results: t.Optional[bool] = None,
allow_partial_sequence_results: t.Optional[bool] = None,
case_sensitive: t.Optional[bool] = None,
error_trace: t.Optional[bool] = None,
event_category_field: t.Optional[str] = None,
Expand Down Expand Up @@ -234,6 +238,8 @@ async def search(
:param index: The name of the index to scope the operation
:param query: EQL query you wish to run.
:param allow_no_indices:
:param allow_partial_search_results:
:param allow_partial_sequence_results:
:param case_sensitive:
:param event_category_field: Field containing the event classification, such
as process, file, or network.
Expand Down Expand Up @@ -287,6 +293,12 @@ async def search(
if not __body:
if query is not None:
__body["query"] = query
if allow_partial_search_results is not None:
__body["allow_partial_search_results"] = allow_partial_search_results
if allow_partial_sequence_results is not None:
__body["allow_partial_sequence_results"] = (
allow_partial_sequence_results
)
if case_sensitive is not None:
__body["case_sensitive"] = case_sensitive
if event_category_field is not None:
Expand Down
16 changes: 15 additions & 1 deletion elasticsearch_serverless/_async/client/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,21 @@ async def put(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Create an inference endpoint
Create an inference endpoint. When you create an inference endpoint, the associated
machine learning model is automatically deployed if it is not already running.
After creating the endpoint, wait for the model deployment to complete before
using it. To verify the deployment status, use the get trained model statistics
API. Look for `"state": "fully_allocated"` in the response and ensure that the
`"allocation_count"` matches the `"target_allocation_count"`. Avoid creating
multiple endpoints for the same model unless required, as each endpoint consumes
significant resources. IMPORTANT: The inference APIs enable you to use certain
services, such as built-in machine learning models (ELSER, E5), models uploaded
through Eland, Cohere, OpenAI, Mistral, Azure OpenAI, Google AI Studio, Google
Vertex AI, Anthropic, Watsonx.ai, or Hugging Face. For built-in models and models
uploaded through Eland, the inference APIs offer an alternative way to use and
manage trained models. However, if you do not plan to use the inference APIs
to use these models or if you want to use non-NLP models, use the machine learning
trained model APIs.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/put-inference-api.html>`_

Expand Down
14 changes: 8 additions & 6 deletions elasticsearch_serverless/_async/client/logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ async def delete_pipeline(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Deletes a pipeline used for Logstash Central Management.
Delete a Logstash pipeline. Delete a pipeline that is used for Logstash Central
Management.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/logstash-api-delete-pipeline.html>`_

:param id: Identifier for the pipeline.
:param id: An identifier for the pipeline.
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
Expand Down Expand Up @@ -76,11 +77,11 @@ async def get_pipeline(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Retrieves pipelines used for Logstash Central Management.
Get Logstash pipelines. Get pipelines that are used for Logstash Central Management.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/logstash-api-get-pipeline.html>`_

:param id: Comma-separated list of pipeline identifiers.
:param id: A comma-separated list of pipeline identifiers.
"""
__path_parts: t.Dict[str, str]
if id not in SKIP_IN_PATH:
Expand Down Expand Up @@ -123,11 +124,12 @@ async def put_pipeline(
pretty: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Creates or updates a pipeline used for Logstash Central Management.
Create or update a Logstash pipeline. Create a pipeline that is used for Logstash
Central Management. If the specified pipeline exists, it is replaced.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/logstash-api-put-pipeline.html>`_

:param id: Identifier for the pipeline.
:param id: An identifier for the pipeline.
:param pipeline:
"""
if id in SKIP_IN_PATH:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ async def list(
size: t.Optional[int] = None,
) -> ObjectApiResponse[t.Any]:
"""
Returns the existing search applications.
Get search applications. Get information about search applications.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/list-search-applications.html>`_

Expand Down
3 changes: 1 addition & 2 deletions elasticsearch_serverless/_async/client/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@ async def get(
wait_for_completion: t.Optional[bool] = None,
) -> ObjectApiResponse[t.Any]:
"""
Get task information. Returns information about the tasks currently executing
in the cluster.
Get task information. Get information about a task currently running in the cluster.

`<https://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html>`_

Expand Down
Loading
Loading