Files
elasticsearch-js/docs/reference/autoscaling.asciidoc
2024-12-05 14:47:50 -06:00

193 lines
7.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[[reference-autoscaling]]
== client.autoscaling
////////
===========================================================================================================================
|| ||
|| ||
|| ||
|| ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ ||
|| ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ ||
|| ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ ||
|| ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ||
|| ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ ||
|| ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ||
|| ||
|| ||
|| This file is autogenerated, DO NOT send pull requests that changes this file directly. ||
|| You should update the script that does the generation, which can be found in: ||
|| https://github.com/elastic/elastic-client-generator-js ||
|| ||
|| You can run the script with the following command: ||
|| npm run elasticsearch -- --version <version> ||
|| ||
|| ||
|| ||
===========================================================================================================================
////////
++++
<style>
.lang-ts a.xref {
text-decoration: underline !important;
}
</style>
++++
[discrete]
[[client.autoscaling.deleteAutoscalingPolicy]]
== `client.autoscaling.deleteAutoscalingPolicy()`
Delete an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-delete-autoscaling-policy.html[{es} documentation]
[discrete]
=== Function signature
[source,ts]
----
(request: AutoscalingDeleteAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<AutoscalingDeleteAutoscalingPolicyResponse>
----
[discrete]
=== Request
[source,ts,subs=+macros]
----
interface AutoscalingDeleteAutoscalingPolicyRequest extends <<RequestBase>> {
name: <<Name>>
master_timeout?: <<Duration>>
timeout?: <<Duration>>
}
----
[discrete]
=== Response
[source,ts,subs=+macros]
----
type AutoscalingDeleteAutoscalingPolicyResponse = <<AcknowledgedResponseBase>>
----
[discrete]
[[client.autoscaling.getAutoscalingCapacity]]
== `client.autoscaling.getAutoscalingCapacity()`
Get the autoscaling capacity. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported. This API gets the current autoscaling capacity based on the configured autoscaling policy. It will return information to size the cluster appropriately to the current workload. The `required_capacity` is calculated as the maximum of the `required_capacity` result of all individual deciders that are enabled for the policy. The operator should verify that the `current_nodes` match the operators knowledge of the cluster to avoid making autoscaling decisions based on stale or incomplete information. The response contains decider-specific information you can use to diagnose how and why autoscaling determined a certain capacity was required. This information is provided for diagnosis only. Do not use this information to make autoscaling decisions.
{ref}/autoscaling-get-autoscaling-capacity.html[{es} documentation]
[discrete]
=== Function signature
[source,ts]
----
(request: AutoscalingGetAutoscalingCapacityRequest, options?: TransportRequestOptions) => Promise<AutoscalingGetAutoscalingCapacityResponse>
----
[discrete]
=== Request
[source,ts,subs=+macros]
----
interface AutoscalingGetAutoscalingCapacityRequest extends <<RequestBase>> {
master_timeout?: <<Duration>>
}
----
[discrete]
=== Response
[source,ts,subs=+macros]
----
interface AutoscalingGetAutoscalingCapacityResponse {
policies: Record<string, AutoscalingGetAutoscalingCapacityAutoscalingDeciders>
}
----
[discrete]
[[client.autoscaling.getAutoscalingPolicy]]
== `client.autoscaling.getAutoscalingPolicy()`
Get an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-get-autoscaling-capacity.html[{es} documentation]
[discrete]
=== Function signature
[source,ts]
----
(request: AutoscalingGetAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<AutoscalingGetAutoscalingPolicyResponse>
----
[discrete]
=== Request
[source,ts,subs=+macros]
----
interface AutoscalingGetAutoscalingPolicyRequest extends <<RequestBase>> {
name: <<Name>>
master_timeout?: <<Duration>>
}
----
[discrete]
=== Response
[source,ts,subs=+macros]
----
type AutoscalingGetAutoscalingPolicyResponse = <<AutoscalingAutoscalingPolicy>>
----
[discrete]
[[client.autoscaling.putAutoscalingPolicy]]
== `client.autoscaling.putAutoscalingPolicy()`
Create or update an autoscaling policy. NOTE: This feature is designed for indirect use by Elasticsearch Service, Elastic Cloud Enterprise, and Elastic Cloud on Kubernetes. Direct use is not supported.
{ref}/autoscaling-put-autoscaling-policy.html[{es} documentation]
[discrete]
=== Function signature
[source,ts]
----
(request: AutoscalingPutAutoscalingPolicyRequest, options?: TransportRequestOptions) => Promise<AutoscalingPutAutoscalingPolicyResponse>
----
[discrete]
=== Request
[source,ts,subs=+macros]
----
interface AutoscalingPutAutoscalingPolicyRequest extends <<RequestBase>> {
name: <<Name>>
master_timeout?: <<Duration>>
timeout?: <<Duration>>
policy?: <<AutoscalingAutoscalingPolicy>>
}
----
[discrete]
=== Response
[source,ts,subs=+macros]
----
type AutoscalingPutAutoscalingPolicyResponse = <<AcknowledgedResponseBase>>
----