API generation
This commit is contained in:
77
api/api/autoscaling.delete_autoscaling_policy.js
Normal file
77
api/api/autoscaling.delete_autoscaling_policy.js
Normal file
@ -0,0 +1,77 @@
|
||||
// Licensed to Elasticsearch B.V under one or more agreements.
|
||||
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
|
||||
// See the LICENSE file in the project root for more information
|
||||
|
||||
'use strict'
|
||||
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildAutoscalingDeleteAutoscalingPolicy (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
const acceptedQuerystring = [
|
||||
|
||||
]
|
||||
|
||||
const snakeCase = {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a autoscaling.delete_autoscaling_policy request
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-delete-autoscaling-policy.html
|
||||
*/
|
||||
return function autoscalingDeleteAutoscalingPolicy (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
options = {}
|
||||
}
|
||||
if (typeof params === 'function' || params == null) {
|
||||
callback = params
|
||||
params = {}
|
||||
options = {}
|
||||
}
|
||||
|
||||
// check required parameters
|
||||
if (params['name'] == null) {
|
||||
const err = new ConfigurationError('Missing required parameter: name')
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
// validate headers object
|
||||
if (options.headers != null && typeof options.headers !== 'object') {
|
||||
const err = new ConfigurationError(`Headers should be an object, instead got: ${typeof options.headers}`)
|
||||
return handleError(err, callback)
|
||||
}
|
||||
|
||||
var warnings = []
|
||||
var { method, body, name, ...querystring } = params
|
||||
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring, warnings)
|
||||
|
||||
var ignore = options.ignore
|
||||
if (typeof ignore === 'number') {
|
||||
options.ignore = [ignore]
|
||||
}
|
||||
|
||||
var path = ''
|
||||
|
||||
if (method == null) method = 'DELETE'
|
||||
path = '/' + '_autoscaling' + '/' + 'policy' + '/' + encodeURIComponent(name)
|
||||
|
||||
// build request object
|
||||
const request = {
|
||||
method,
|
||||
path,
|
||||
body: body || '',
|
||||
querystring
|
||||
}
|
||||
|
||||
options.warnings = warnings.length === 0 ? null : warnings
|
||||
return makeRequest(request, options, callback)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildAutoscalingDeleteAutoscalingPolicy
|
||||
@ -7,7 +7,7 @@
|
||||
/* eslint camelcase: 0 */
|
||||
/* eslint no-unused-vars: 0 */
|
||||
|
||||
function buildCatTransform (opts) {
|
||||
function buildCatTransforms (opts) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { makeRequest, ConfigurationError, handleError, snakeCaseKeys } = opts
|
||||
|
||||
@ -29,11 +29,11 @@ function buildCatTransform (opts) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Perform a cat.transform request
|
||||
* Perform a cat.transforms request
|
||||
* Gets configuration and usage information about transforms.
|
||||
* https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-transforms.html
|
||||
*/
|
||||
return function catTransform (params, options, callback) {
|
||||
return function catTransforms (params, options, callback) {
|
||||
options = options || {}
|
||||
if (typeof options === 'function') {
|
||||
callback = options
|
||||
@ -83,4 +83,4 @@ function buildCatTransform (opts) {
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = buildCatTransform
|
||||
module.exports = buildCatTransforms
|
||||
@ -27,6 +27,8 @@ function ESAPI (opts) {
|
||||
submit: lazyLoad('async_search.submit', opts)
|
||||
},
|
||||
autoscaling: {
|
||||
delete_autoscaling_policy: lazyLoad('autoscaling.delete_autoscaling_policy', opts),
|
||||
deleteAutoscalingPolicy: lazyLoad('autoscaling.delete_autoscaling_policy', opts),
|
||||
get_autoscaling_decision: lazyLoad('autoscaling.get_autoscaling_decision', opts),
|
||||
getAutoscalingDecision: lazyLoad('autoscaling.get_autoscaling_decision', opts),
|
||||
put_autoscaling_policy: lazyLoad('autoscaling.put_autoscaling_policy', opts),
|
||||
@ -64,7 +66,7 @@ function ESAPI (opts) {
|
||||
templates: lazyLoad('cat.templates', opts),
|
||||
thread_pool: lazyLoad('cat.thread_pool', opts),
|
||||
threadPool: lazyLoad('cat.thread_pool', opts),
|
||||
transform: lazyLoad('cat.transform', opts)
|
||||
transforms: lazyLoad('cat.transforms', opts)
|
||||
},
|
||||
ccr: {
|
||||
delete_auto_follow_pattern: lazyLoad('ccr.delete_auto_follow_pattern', opts),
|
||||
|
||||
6
api/requestParams.d.ts
vendored
6
api/requestParams.d.ts
vendored
@ -1430,6 +1430,10 @@ export interface AsyncSearchSubmit<T = RequestBody> extends Generic {
|
||||
body?: T;
|
||||
}
|
||||
|
||||
export interface AutoscalingDeleteAutoscalingPolicy extends Generic {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export interface AutoscalingGetAutoscalingDecision extends Generic {
|
||||
}
|
||||
|
||||
@ -1487,7 +1491,7 @@ export interface CatMlTrainedModels extends Generic {
|
||||
v?: boolean;
|
||||
}
|
||||
|
||||
export interface CatTransform extends Generic {
|
||||
export interface CatTransforms extends Generic {
|
||||
transform_id?: string;
|
||||
from?: number;
|
||||
size?: number;
|
||||
|
||||
@ -5754,6 +5754,22 @@ _Default:_ `5`
|
||||
|
||||
|===
|
||||
|
||||
=== autoscaling.deleteAutoscalingPolicy
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
----
|
||||
client.autoscaling.deleteAutoscalingPolicy({
|
||||
name: string
|
||||
})
|
||||
----
|
||||
link:{ref}/autoscaling-delete-autoscaling-policy.html[Documentation] +
|
||||
[cols=2*]
|
||||
|===
|
||||
|`name`
|
||||
|`string` - the name of the autoscaling policy
|
||||
|
||||
|===
|
||||
|
||||
=== autoscaling.getAutoscalingDecision
|
||||
*Stability:* experimental
|
||||
[source,ts]
|
||||
@ -5981,11 +5997,11 @@ _Default:_ `100`
|
||||
|
||||
|===
|
||||
|
||||
=== cat.transform
|
||||
=== cat.transforms
|
||||
|
||||
[source,ts]
|
||||
----
|
||||
client.cat.transform({
|
||||
client.cat.transforms({
|
||||
transform_id: string,
|
||||
from: number,
|
||||
size: number,
|
||||
|
||||
16
index.d.ts
vendored
16
index.d.ts
vendored
@ -141,6 +141,14 @@ declare class Client extends EventEmitter {
|
||||
submit<TRequestBody extends RequestBody, TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AsyncSearchSubmit<TRequestBody>, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
}
|
||||
autoscaling: {
|
||||
delete_autoscaling_policy<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
delete_autoscaling_policy<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
delete_autoscaling_policy<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
delete_autoscaling_policy<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
deleteAutoscalingPolicy<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.AutoscalingDeleteAutoscalingPolicy, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
deleteAutoscalingPolicy<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
deleteAutoscalingPolicy<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
deleteAutoscalingPolicy<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AutoscalingDeleteAutoscalingPolicy, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_autoscaling_decision<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.AutoscalingGetAutoscalingDecision, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
get_autoscaling_decision<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
get_autoscaling_decision<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.AutoscalingGetAutoscalingDecision, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
@ -283,10 +291,10 @@ declare class Client extends EventEmitter {
|
||||
threadPool<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
threadPool<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatThreadPool, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
threadPool<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatThreadPool, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transform<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.CatTransform, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
transform<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transform<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatTransform, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transform<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatTransform, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transforms<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.CatTransforms, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
transforms<TResponse = ResponseBody, TContext = unknown>(callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transforms<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatTransforms, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
transforms<TResponse = ResponseBody, TContext = unknown>(params: RequestParams.CatTransforms, options: TransportRequestOptions, callback: callbackFn<TResponse, TContext>): TransportRequestCallback
|
||||
}
|
||||
ccr: {
|
||||
delete_auto_follow_pattern<TResponse = ResponseBody, TContext = unknown>(params?: RequestParams.CcrDeleteAutoFollowPattern, options?: TransportRequestOptions): Promise<ApiResponse<TResponse, TContext>>
|
||||
|
||||
Reference in New Issue
Block a user