@opensearch-project/opensearch 3.2.0 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/OpenSearchApi.d.ts +4 -0
- package/api/_types/_common.d.ts +2 -1
- package/api/_types/_common.query_dsl.d.ts +64 -39
- package/api/_types/ml._common.d.ts +34 -0
- package/api/asynchronousSearch/search.js +3 -3
- package/api/asynchronousSearch/stats.js +1 -1
- package/api/cluster/allocationExplain.js +4 -4
- package/api/cluster/deleteComponentTemplate.js +3 -3
- package/api/cluster/deleteDecommissionAwareness.js +1 -1
- package/api/cluster/deleteVotingConfigExclusions.js +2 -2
- package/api/cluster/existsComponentTemplate.js +4 -4
- package/api/cluster/getComponentTemplate.js +4 -4
- package/api/cluster/getDecommissionAwareness.js +2 -2
- package/api/cluster/getSettings.js +5 -5
- package/api/cluster/getWeightedRouting.js +1 -1
- package/api/cluster/health.js +14 -14
- package/api/cluster/pendingTasks.js +5 -5
- package/api/cluster/postVotingConfigExclusions.js +4 -4
- package/api/cluster/putComponentTemplate.js +6 -6
- package/api/cluster/putDecommissionAwareness.js +3 -3
- package/api/cluster/putSettings.js +5 -5
- package/api/cluster/putWeightedRouting.js +1 -1
- package/api/cluster/reroute.js +6 -6
- package/api/cluster/state.js +10 -10
- package/api/cluster/stats.js +5 -5
- package/api/index.d.ts +2 -0
- package/api/indices/simulateIndexTemplate.d.ts +5 -1
- package/api/ml/_api.js +3 -0
- package/api/ml/executeAlgorithm.d.ts +45 -0
- package/api/ml/executeAlgorithm.js +50 -0
- package/package.json +1 -1
package/api/OpenSearchApi.d.ts
CHANGED
|
@@ -693,6 +693,10 @@ export default class OpenSearchAPI {
|
|
|
693
693
|
};
|
|
694
694
|
|
|
695
695
|
ml: {
|
|
696
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_ExecuteAlgorithm_Response>;
|
|
697
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
|
|
698
|
+
executeAlgorithm (params: API.Ml_ExecuteAlgorithm_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_ExecuteAlgorithm_Response>): TransportRequestCallback;
|
|
699
|
+
|
|
696
700
|
predict (params: API.Ml_Predict_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_Predict_Response>;
|
|
697
701
|
predict (params: API.Ml_Predict_Request, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
|
|
698
702
|
predict (params: API.Ml_Predict_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
|
package/api/_types/_common.d.ts
CHANGED
|
@@ -271,6 +271,7 @@ export type GetStats = {
|
|
|
271
271
|
missing_time?: Duration;
|
|
272
272
|
missing_time_in_millis: DurationValueUnitMillis;
|
|
273
273
|
missing_total: number;
|
|
274
|
+
time?: Duration;
|
|
274
275
|
time_in_millis: DurationValueUnitMillis;
|
|
275
276
|
total: number;
|
|
276
277
|
}
|
|
@@ -825,7 +826,7 @@ export type TaskFailure = {
|
|
|
825
826
|
task_id: number;
|
|
826
827
|
}
|
|
827
828
|
|
|
828
|
-
export type TaskId = string
|
|
829
|
+
export type TaskId = string
|
|
829
830
|
|
|
830
831
|
export type TermFrequencyNormalization = 'h1' | 'h2' | 'h3' | 'no' | 'z'
|
|
831
832
|
|
|
@@ -61,11 +61,14 @@ export type ConstantScoreQuery = QueryBase & {
|
|
|
61
61
|
filter: QueryContainer;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
export type
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
export type DateDecayPlacement = {
|
|
65
|
+
decay?: number;
|
|
66
|
+
offset?: Common.Duration;
|
|
67
|
+
origin?: Common.DateTime;
|
|
68
|
+
scale?: Common.Duration;
|
|
69
|
+
}
|
|
67
70
|
|
|
68
|
-
export type
|
|
71
|
+
export type DateRangeQueryParameters = {
|
|
69
72
|
format?: Common.DateFormat;
|
|
70
73
|
from?: Common.DateMath | undefined;
|
|
71
74
|
gt?: Common.DateMath;
|
|
@@ -76,30 +79,20 @@ export type DateRangeQuery = RangeQueryBase & {
|
|
|
76
79
|
to?: Common.DateMath | undefined;
|
|
77
80
|
}
|
|
78
81
|
|
|
79
|
-
export type DecayFunction =
|
|
82
|
+
export type DecayFunction = DecayFunctionBase & Record<string, DecayPlacement>
|
|
80
83
|
|
|
81
84
|
export type DecayFunctionBase = {
|
|
82
85
|
multi_value_mode?: MultiValueMode;
|
|
83
86
|
}
|
|
84
87
|
|
|
88
|
+
export type DecayPlacement = DateDecayPlacement | GeoDecayPlacement | NumericDecayPlacement
|
|
89
|
+
|
|
85
90
|
export type DisMaxQuery = QueryBase & {
|
|
86
91
|
queries: QueryContainer[];
|
|
87
92
|
tie_breaker?: number;
|
|
88
93
|
}
|
|
89
94
|
|
|
90
|
-
export type DistanceFeatureQuery =
|
|
91
|
-
|
|
92
|
-
export type DistanceFeatureQueryBaseDateMathDuration = QueryBase & {
|
|
93
|
-
field: Common.Field;
|
|
94
|
-
origin: Common.DateMath;
|
|
95
|
-
pivot: Common.Duration;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export type DistanceFeatureQueryBaseGeoLocationDistance = QueryBase & {
|
|
99
|
-
field: Common.Field;
|
|
100
|
-
origin: Common.GeoLocation;
|
|
101
|
-
pivot: Common.Distance;
|
|
102
|
-
}
|
|
95
|
+
export type DistanceFeatureQuery = QueryBase & Record<string, any>
|
|
103
96
|
|
|
104
97
|
export type ExistsQuery = QueryBase & {
|
|
105
98
|
field: Common.Field;
|
|
@@ -111,6 +104,13 @@ export type FieldAndFormat = Common.Field | {
|
|
|
111
104
|
include_unmapped?: boolean;
|
|
112
105
|
}
|
|
113
106
|
|
|
107
|
+
export type FieldLookup = {
|
|
108
|
+
id: Common.Id;
|
|
109
|
+
index?: Common.IndexName;
|
|
110
|
+
path?: Common.Field;
|
|
111
|
+
routing?: Common.Routing;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
114
|
export type FieldValueFactorModifier = 'ln' | 'ln1p' | 'ln2p' | 'log' | 'log1p' | 'log2p' | 'none' | 'reciprocal' | 'sqrt' | 'square'
|
|
115
115
|
|
|
116
116
|
export type FieldValueFactorScoreFunction = {
|
|
@@ -160,9 +160,12 @@ export type GeoBoundingBoxQuery = QueryBase & {
|
|
|
160
160
|
[key: string]: any | Common.GeoBounds;
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export type
|
|
164
|
-
|
|
165
|
-
|
|
163
|
+
export type GeoDecayPlacement = {
|
|
164
|
+
decay?: number;
|
|
165
|
+
offset?: Common.Distance;
|
|
166
|
+
origin?: Common.GeoLocation;
|
|
167
|
+
scale?: Common.Distance;
|
|
168
|
+
}
|
|
166
169
|
|
|
167
170
|
export type GeoDistanceQuery = QueryBase & {
|
|
168
171
|
distance: Common.Distance;
|
|
@@ -174,9 +177,14 @@ export type GeoDistanceQuery = QueryBase & {
|
|
|
174
177
|
|
|
175
178
|
export type GeoExecution = 'indexed' | 'memory'
|
|
176
179
|
|
|
180
|
+
export type GeoPolygonPoints = {
|
|
181
|
+
points: Common.GeoLocation[];
|
|
182
|
+
}
|
|
183
|
+
|
|
177
184
|
export type GeoPolygonQuery = QueryBase & {
|
|
178
185
|
ignore_unmapped?: IgnoreUnmapped;
|
|
179
186
|
validation_method?: GeoValidationMethod;
|
|
187
|
+
[key: string]: any | GeoPolygonPoints;
|
|
180
188
|
}
|
|
181
189
|
|
|
182
190
|
export type GeoShape = {
|
|
@@ -184,14 +192,15 @@ export type GeoShape = {
|
|
|
184
192
|
type?: string;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
|
-
export type GeoShapeField = {
|
|
188
|
-
relation?: Common.GeoShapeRelation;
|
|
189
|
-
shape: GeoShape;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
195
|
export type GeoShapeQuery = QueryBase & {
|
|
193
196
|
ignore_unmapped?: IgnoreUnmapped;
|
|
194
|
-
[key: string]: any |
|
|
197
|
+
[key: string]: any | GeoShapeQueryField;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export type GeoShapeQueryField = {
|
|
201
|
+
indexed_shape?: FieldLookup;
|
|
202
|
+
relation?: Common.GeoShapeRelation;
|
|
203
|
+
shape: GeoShape;
|
|
195
204
|
}
|
|
196
205
|
|
|
197
206
|
export type GeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict'
|
|
@@ -297,15 +306,18 @@ export type IntervalsWildcard = {
|
|
|
297
306
|
}
|
|
298
307
|
|
|
299
308
|
export type KnnQuery = QueryBase & {
|
|
300
|
-
|
|
309
|
+
expand_nested_docs?: boolean;
|
|
310
|
+
filter?: QueryContainer;
|
|
301
311
|
k?: number;
|
|
302
312
|
max_distance?: number;
|
|
303
|
-
method_parameters?: Record<string,
|
|
313
|
+
method_parameters?: Record<string, any>;
|
|
304
314
|
min_score?: number;
|
|
305
|
-
rescore?:
|
|
315
|
+
rescore?: KnnQueryRescore;
|
|
306
316
|
vector: QueryVector;
|
|
307
317
|
}
|
|
308
318
|
|
|
319
|
+
export type KnnQueryRescore = boolean | RescoreContext
|
|
320
|
+
|
|
309
321
|
export type Like = string | LikeDocument
|
|
310
322
|
|
|
311
323
|
export type LikeDocument = {
|
|
@@ -429,16 +441,21 @@ export type NeuralQuery = QueryBase & {
|
|
|
429
441
|
query_text?: string;
|
|
430
442
|
}
|
|
431
443
|
|
|
432
|
-
export type
|
|
433
|
-
from?:
|
|
444
|
+
export type NumberRangeQueryParameters = {
|
|
445
|
+
from?: number | string | undefined;
|
|
434
446
|
gt?: number;
|
|
435
447
|
gte?: number;
|
|
436
448
|
lt?: number;
|
|
437
449
|
lte?: number;
|
|
438
|
-
to?:
|
|
450
|
+
to?: number | string | undefined;
|
|
439
451
|
}
|
|
440
452
|
|
|
441
|
-
export type
|
|
453
|
+
export type NumericDecayPlacement = {
|
|
454
|
+
decay?: number;
|
|
455
|
+
offset?: number;
|
|
456
|
+
origin?: number;
|
|
457
|
+
scale?: number;
|
|
458
|
+
}
|
|
442
459
|
|
|
443
460
|
export type Operator = 'and' | 'AND' | 'or' | 'OR'
|
|
444
461
|
|
|
@@ -573,7 +590,7 @@ export type RandomScoreFunction = {
|
|
|
573
590
|
seed?: number | string;
|
|
574
591
|
}
|
|
575
592
|
|
|
576
|
-
export type RangeQuery =
|
|
593
|
+
export type RangeQuery = RangeQueryBase & Record<string, any>
|
|
577
594
|
|
|
578
595
|
export type RangeQueryBase = QueryBase & {
|
|
579
596
|
relation?: RangeRelation;
|
|
@@ -614,6 +631,10 @@ export type RegexpQuery = string | (QueryBase & {
|
|
|
614
631
|
value: string;
|
|
615
632
|
})
|
|
616
633
|
|
|
634
|
+
export type RescoreContext = {
|
|
635
|
+
oversample_factor?: number;
|
|
636
|
+
}
|
|
637
|
+
|
|
617
638
|
export type ScriptQuery = QueryBase & {
|
|
618
639
|
script: Common.Script;
|
|
619
640
|
}
|
|
@@ -757,12 +778,16 @@ export type XyShape = {
|
|
|
757
778
|
type?: string;
|
|
758
779
|
}
|
|
759
780
|
|
|
760
|
-
export type
|
|
781
|
+
export type XyShapeQuery = QueryBase & {
|
|
782
|
+
ignore_unmapped?: boolean;
|
|
783
|
+
[key: string]: any | XyShapeQueryField;
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export type XyShapeQueryField = {
|
|
787
|
+
indexed_shape?: FieldLookup;
|
|
761
788
|
relation?: Common.GeoShapeRelation;
|
|
762
789
|
shape: XyShape;
|
|
763
790
|
}
|
|
764
791
|
|
|
765
|
-
export type
|
|
766
|
-
|
|
767
|
-
export type ZeroTermsQuery = 'all' | 'none'
|
|
792
|
+
export type ZeroTermsQuery = 'all' | 'ALL' | 'none' | 'NONE'
|
|
768
793
|
|
|
@@ -31,6 +31,7 @@ export type AdditionalInfo = Record<string, any>
|
|
|
31
31
|
|
|
32
32
|
export type Aggregation = {
|
|
33
33
|
field?: string;
|
|
34
|
+
max?: Aggregation;
|
|
34
35
|
sum?: Aggregation;
|
|
35
36
|
[key: string]: any;
|
|
36
37
|
}
|
|
@@ -41,6 +42,7 @@ export type Algorithm = {
|
|
|
41
42
|
|
|
42
43
|
export type AlgorithmOperations = {
|
|
43
44
|
deploy?: ModelStats;
|
|
45
|
+
execute?: ModelStats;
|
|
44
46
|
predict?: ModelStats;
|
|
45
47
|
register?: ModelStats;
|
|
46
48
|
train?: ModelStats;
|
|
@@ -57,6 +59,13 @@ export type BoolQuery = {
|
|
|
57
59
|
should?: Filter[];
|
|
58
60
|
}
|
|
59
61
|
|
|
62
|
+
export type Buckets = {
|
|
63
|
+
end_time?: number;
|
|
64
|
+
entities?: Entity[];
|
|
65
|
+
overall_aggregate_value?: number;
|
|
66
|
+
start_time?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
60
69
|
export type ByteBuffer = {
|
|
61
70
|
array?: string;
|
|
62
71
|
order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN';
|
|
@@ -84,6 +93,26 @@ export type Credential = {
|
|
|
84
93
|
[key: string]: any;
|
|
85
94
|
}
|
|
86
95
|
|
|
96
|
+
export type Entity = {
|
|
97
|
+
base_value?: number;
|
|
98
|
+
contribution_value?: number;
|
|
99
|
+
key?: string[];
|
|
100
|
+
new_value?: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export type ExecuteAlgorithmResponse = ExecuteLocalSampleCalculatorResponse | {
|
|
104
|
+
results?: ExecuteAnomalyLocalizationResponse[];
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export type ExecuteAnomalyLocalizationResponse = {
|
|
108
|
+
name?: string;
|
|
109
|
+
result?: Result;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export type ExecuteLocalSampleCalculatorResponse = {
|
|
113
|
+
result?: number;
|
|
114
|
+
}
|
|
115
|
+
|
|
87
116
|
export type Exists = {
|
|
88
117
|
field?: Common.Field;
|
|
89
118
|
}
|
|
@@ -258,6 +287,7 @@ export type ModelGroupRegistration = {
|
|
|
258
287
|
|
|
259
288
|
export type ModelProfile = {
|
|
260
289
|
deploy?: ModelStats;
|
|
290
|
+
execute?: ModelStats;
|
|
261
291
|
memory_size_estimation_cpu?: number;
|
|
262
292
|
memory_size_estimation_gpu?: number;
|
|
263
293
|
model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
|
|
@@ -396,6 +426,10 @@ export type RateLimiter = {
|
|
|
396
426
|
unit: 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS';
|
|
397
427
|
}
|
|
398
428
|
|
|
429
|
+
export type Result = {
|
|
430
|
+
buckets?: Buckets[];
|
|
431
|
+
}
|
|
432
|
+
|
|
399
433
|
export type Rows = {
|
|
400
434
|
values?: Values[];
|
|
401
435
|
}
|
|
@@ -26,9 +26,9 @@ const { normalizeArguments } = require('../utils');
|
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
28
|
* @param {string} [params.index] - The name of the index to be searched. Can be an individual name, a comma-separated list of indexes, or a wildcard expression of index names.
|
|
29
|
-
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query
|
|
30
|
-
* @param {boolean} [params.keep_on_completion] - Whether
|
|
31
|
-
* @param {string} [params.wait_for_completion_timeout] - The amount of time
|
|
29
|
+
* @param {string} [params.keep_alive] - The amount of time that the result is saved in the cluster. For example, `2d` means that the results are stored in the cluster for 48 hours. The saved search results are deleted after this period or if the search is canceled. Note that this includes the query execution time. If the query exceeds this amount of time, the process cancels this query automatically.
|
|
30
|
+
* @param {boolean} [params.keep_on_completion] - Whether to save the results in the cluster after the search is complete. You can examine the stored results at a later time.
|
|
31
|
+
* @param {string} [params.wait_for_completion_timeout] - The amount of time to wait for the results. You can poll the remaining results based on an ID. The maximum value is 300 seconds. Default is `1s`.
|
|
32
32
|
* @param {object} [params.body] - The search definition using the Query DSL.
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Monitors any asynchronous searches that are `running`, `completed`, `persisted`.
|
|
22
|
+
* Monitors any asynchronous searches that are `running`, `completed`, or `persisted`.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/search-plugins/async/index/#monitor-stats - asynchronous_search.stats}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Asynchronous-Search
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Explains how shards are allocated in the current cluster and provides an explanation for why unassigned shards can't be allocated to a node.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ - cluster.allocation_explain}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {boolean} [params.include_disk_info=false] -
|
|
29
|
-
* @param {boolean} [params.include_yes_decisions=false] -
|
|
30
|
-
* @param {object} [params.body] - The index, shard, and primary flag to
|
|
28
|
+
* @param {boolean} [params.include_disk_info=false] - When `true`, returns information about disk usage and shard sizes.
|
|
29
|
+
* @param {boolean} [params.include_yes_decisions=false] - When `true`, returns any `YES` decisions in the allocation explanation.
|
|
30
|
+
* @param {object} [params.body] - The index, shard, and primary flag for which to generate an explanation. Leave this empty to generate an explanation for the first unassigned shard.
|
|
31
31
|
*
|
|
32
32
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
33
33
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -26,9 +26,9 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
28
|
* @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node.
|
|
29
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
30
|
-
* @param {string} [params.timeout] -
|
|
31
|
-
* @param {string} params.name -
|
|
29
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
30
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
31
|
+
* @param {string} params.name - The name of the component template to delete. Supports wildcard (*) expressions.
|
|
32
32
|
*
|
|
33
33
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
34
34
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Recommissions a decommissioned zone.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.delete_decommission_awareness}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Clears cluster voting
|
|
22
|
+
* Clears any cluster voting configuration exclusions.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.delete_voting_config_exclusions}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list.
|
|
28
|
+
* @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. When `true`, all excluded nodes are removed from the cluster before this API takes any action. When `false`, the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster.
|
|
29
29
|
*
|
|
30
30
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
31
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,10 +25,10 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
29
|
-
* @param {boolean} [params.local=false] -
|
|
30
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
31
|
-
* @param {string} params.name -
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
|
+
* @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false, information is retrieved from the cluster manager node.
|
|
30
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
31
|
+
* @param {string} params.name - The name of the component template. Wildcard (*) expressions are supported.
|
|
32
32
|
*
|
|
33
33
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
34
34
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,11 +25,11 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
29
|
* @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format.
|
|
30
|
-
* @param {boolean} [params.local=false] -
|
|
31
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
32
|
-
* @param {string} [params.name] -
|
|
30
|
+
* @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.
|
|
31
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
|
+
* @param {string} [params.name] - The name of the component template to retrieve. Wildcard (`*`) expressions are supported.
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
35
35
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Retrieves the decommission status for all zones.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-getting-zone-decommission-status - cluster.get_decommission_awareness}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} params.awareness_attribute_name -
|
|
28
|
+
* @param {string} params.awareness_attribute_name - The name of the awareness attribute.
|
|
29
29
|
*
|
|
30
30
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
31
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,11 +25,11 @@ const { normalizeArguments } = require('../utils');
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
29
|
-
* @param {boolean} [params.flat_settings=false] -
|
|
30
|
-
* @param {boolean} [params.include_defaults=false] -
|
|
31
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
32
|
-
* @param {string} [params.timeout] -
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
|
+
* @param {boolean} [params.flat_settings=false] - When `true`, returns cluster settings in a flat format.
|
|
30
|
+
* @param {boolean} [params.include_defaults=false] - When `true`, returns default cluster settings from the local node.
|
|
31
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
35
35
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} params.attribute -
|
|
28
|
+
* @param {string} params.attribute - The name of the awareness attribute.
|
|
29
29
|
*
|
|
30
30
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
31
31
|
* @param {function} [callback] - Callback that handles errors and response
|
package/api/cluster/health.js
CHANGED
|
@@ -25,20 +25,20 @@ const { normalizeArguments, parsePathParam } = require('../utils');
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {string} [params.awareness_attribute] - The awareness attribute for which the health is
|
|
29
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
30
|
-
* @param {string} [params.expand_wildcards] -
|
|
31
|
-
* @param {string} [params.level]
|
|
32
|
-
* @param {boolean} [params.local=false] -
|
|
33
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
34
|
-
* @param {string} [params.timeout] -
|
|
35
|
-
* @param {string} [params.wait_for_active_shards] -
|
|
36
|
-
* @param {string} [params.wait_for_events] -
|
|
37
|
-
* @param {boolean} [params.wait_for_no_initializing_shards] -
|
|
38
|
-
* @param {boolean} [params.wait_for_no_relocating_shards] -
|
|
39
|
-
* @param {string} [params.wait_for_nodes] -
|
|
40
|
-
* @param {string} [params.wait_for_status] -
|
|
41
|
-
* @param {string} [params.index] -
|
|
28
|
+
* @param {string} [params.awareness_attribute] - The name of the awareness attribute for which to return the cluster health status (for example, `zone`). Applicable only if `level` is set to `awareness_attributes`.
|
|
29
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
30
|
+
* @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
|
|
31
|
+
* @param {string} [params.level]
|
|
32
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
33
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
34
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
35
|
+
* @param {string} [params.wait_for_active_shards] - Waits until the specified number of shards is active before returning a response. Use `all` for all shards.
|
|
36
|
+
* @param {string} [params.wait_for_events] - Waits until all currently queued events with the given priority are processed.
|
|
37
|
+
* @param {boolean} [params.wait_for_no_initializing_shards=false] - Whether to wait until there are no initializing shards in the cluster.
|
|
38
|
+
* @param {boolean} [params.wait_for_no_relocating_shards] - Whether to wait until there are no relocating shards in the cluster.
|
|
39
|
+
* @param {string} [params.wait_for_nodes] - Waits until the specified number of nodes (`N`) is available. Accepts `>=N`, `<=N`, `>N`, and `<N`. You can also use `ge(N)`, `le(N)`, `gt(N)`, and `lt(N)` notation.
|
|
40
|
+
* @param {string} [params.wait_for_status] - Waits until the cluster health reaches the specified status or better.
|
|
41
|
+
* @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
|
|
42
42
|
*
|
|
43
43
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
44
44
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Returns a list of
|
|
23
|
-
|
|
22
|
+
* Returns a list of pending cluster-level tasks, such as index creation, mapping updates,
|
|
23
|
+
or new allocations.
|
|
24
24
|
* <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.pending_tasks}
|
|
25
25
|
*
|
|
26
26
|
* @memberOf API-Cluster
|
|
27
27
|
*
|
|
28
28
|
* @param {object} [params]
|
|
29
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
30
|
-
* @param {boolean} [params.local=false] -
|
|
31
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
29
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
30
|
+
* @param {boolean} [params.local=false] - When `true`, the request retrieves information from the local node only. When `false`, information is retrieved from the cluster manager node.
|
|
31
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
32
|
*
|
|
33
33
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
34
34
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
const { normalizeArguments } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Updates the cluster voting
|
|
22
|
+
* Updates the cluster voting configuration by excluding certain node IDs or names.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.post_voting_config_exclusions}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {string} [params.node_ids] - A comma-separated list of
|
|
29
|
-
* @param {string} [params.node_names] - A comma-separated list of
|
|
30
|
-
* @param {string} [params.timeout] - When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error.
|
|
28
|
+
* @param {string} [params.node_ids] - A comma-separated list of node IDs to exclude from the voting configuration. When using this setting, you cannot also specify `node_names`.
|
|
29
|
+
* @param {string} [params.node_names] - A comma-separated list of node names to exclude from the voting configuration. When using this setting, you cannot also specify `node_ids`.
|
|
30
|
+
* @param {string} [params.timeout] - When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning a response. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error.
|
|
31
31
|
*
|
|
32
32
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
33
33
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,12 +25,12 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
29
|
-
* @param {boolean} [params.create=false] -
|
|
30
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
31
|
-
* @param {string} [params.timeout] -
|
|
32
|
-
* @param {string} params.name -
|
|
33
|
-
* @param {object} params.body - The template definition
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
|
+
* @param {boolean} [params.create=false] - When `true`, this request cannot replace or update existing component templates.
|
|
30
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
31
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
|
+
* @param {string} params.name - The name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch uses these templates to configure backing indexes for its data streams. If you want to overwrite one of these templates, set the replacement template `version` to a higher value than the current version. If you want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the Cluster Update Settings API.
|
|
33
|
+
* @param {object} params.body - The template definition.
|
|
34
34
|
*
|
|
35
35
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
36
36
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Decommissions
|
|
22
|
+
* Decommissions a cluster zone based on awareness. This can greatly benefit multi-zone deployments, where awareness attributes can aid in applying new upgrades to a cluster in a controlled fashion.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.put_decommission_awareness}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} params.awareness_attribute_name -
|
|
29
|
-
* @param {string} params.awareness_attribute_value -
|
|
28
|
+
* @param {string} params.awareness_attribute_name - The name of the awareness attribute.
|
|
29
|
+
* @param {string} params.awareness_attribute_value - The value of the awareness attribute.
|
|
30
30
|
*
|
|
31
31
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
32
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,11 +25,11 @@ const { normalizeArguments, handleMissingParam } = require('../utils');
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
29
|
-
* @param {boolean} [params.flat_settings=false] -
|
|
30
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
31
|
-
* @param {string} [params.timeout] -
|
|
32
|
-
* @param {object} params.body - The settings to
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
|
+
* @param {boolean} [params.flat_settings=false] - Returns settings in a flat format.
|
|
30
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
31
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
|
+
* @param {object} params.body - The cluster settings to update.
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
35
35
|
* @param {function} [callback] - Callback that handles errors and response
|
|
@@ -25,7 +25,7 @@ const { normalizeArguments, parsePathParam, handleMissingParam } = require('../u
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} params
|
|
28
|
-
* @param {string} params.attribute -
|
|
28
|
+
* @param {string} params.attribute - The name of the awareness attribute.
|
|
29
29
|
* @param {string} [params.body]
|
|
30
30
|
*
|
|
31
31
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
package/api/cluster/reroute.js
CHANGED
|
@@ -25,13 +25,13 @@ const { normalizeArguments } = require('../utils');
|
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
29
|
-
* @param {boolean} [params.dry_run] -
|
|
30
|
-
* @param {boolean} [params.explain] -
|
|
31
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
28
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
29
|
+
* @param {boolean} [params.dry_run] - When `true`, the request simulates the operation and returns the resulting state.
|
|
30
|
+
* @param {boolean} [params.explain] - When `true`, the response contains an explanation of why certain commands can or cannot be executed.
|
|
31
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
32
32
|
* @param {string} [params.metric] - Limits the information returned to the specified metrics.
|
|
33
|
-
* @param {boolean} [params.retry_failed] -
|
|
34
|
-
* @param {string} [params.timeout] -
|
|
33
|
+
* @param {boolean} [params.retry_failed] - When `true`, retries shard allocation if it was blocked because of too many subsequent failures.
|
|
34
|
+
* @param {string} [params.timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
35
35
|
* @param {object} [params.body] - The definition of `commands` to perform (`move`, `cancel`, `allocate`)
|
|
36
36
|
*
|
|
37
37
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
package/api/cluster/state.js
CHANGED
|
@@ -19,23 +19,23 @@
|
|
|
19
19
|
const { normalizeArguments, parsePathParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Returns
|
|
22
|
+
* Returns comprehensive information about the state of the cluster.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest - cluster.state}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {boolean} [params.allow_no_indices] - Whether to ignore
|
|
29
|
-
* @param {string} [params.cluster_manager_timeout] -
|
|
30
|
-
* @param {string} [params.expand_wildcards] -
|
|
31
|
-
* @param {boolean} [params.flat_settings=false] -
|
|
32
|
-
* @param {boolean} [params.ignore_unavailable] - Whether specified concrete indexes should be ignored when unavailable (missing or closed)
|
|
33
|
-
* @param {boolean} [params.local=false] -
|
|
34
|
-
* @param {string} [params.master_timeout] DEPRECATED -
|
|
28
|
+
* @param {boolean} [params.allow_no_indices] - Whether to ignore a wildcard index expression that resolves into no concrete indexes. This includes the `_all` string or when no indexes have been specified.
|
|
29
|
+
* @param {string} [params.cluster_manager_timeout] - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
30
|
+
* @param {string} [params.expand_wildcards] - Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
|
|
31
|
+
* @param {boolean} [params.flat_settings=false] - Returns settings in a flat format.
|
|
32
|
+
* @param {boolean} [params.ignore_unavailable] - Whether the specified concrete indexes should be ignored when unavailable (missing or closed).
|
|
33
|
+
* @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node.
|
|
34
|
+
* @param {string} [params.master_timeout] DEPRECATED - A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and `d` (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
|
|
35
35
|
* @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version.
|
|
36
36
|
* @param {string} [params.wait_for_timeout] - The maximum time to wait for `wait_for_metadata_version` before timing out.
|
|
37
|
-
* @param {array} [params.metric] -
|
|
38
|
-
* @param {string} [params.index] - A comma-separated list of
|
|
37
|
+
* @param {array} [params.metric] - Limits the information returned to only the specified metrics.
|
|
38
|
+
* @param {string} [params.index] - A comma-separated list of data streams, indexes, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indexes, omit this parameter or use `*` or `_all`.
|
|
39
39
|
*
|
|
40
40
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
41
41
|
* @param {function} [callback] - Callback that handles errors and response
|
package/api/cluster/stats.js
CHANGED
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
const { normalizeArguments, parsePathParam } = require('../utils');
|
|
20
20
|
|
|
21
21
|
/**
|
|
22
|
-
* Returns high-level overview of cluster statistics.
|
|
22
|
+
* Returns a high-level overview of cluster statistics.
|
|
23
23
|
* <br/> See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ - cluster.stats}
|
|
24
24
|
*
|
|
25
25
|
* @memberOf API-Cluster
|
|
26
26
|
*
|
|
27
27
|
* @param {object} [params]
|
|
28
|
-
* @param {boolean} [params.flat_settings=false] -
|
|
29
|
-
* @param {string} [params.timeout] -
|
|
30
|
-
* @param {array} [params.index_metric] -
|
|
28
|
+
* @param {boolean} [params.flat_settings=false] - When `true`, returns settings in a flat format.
|
|
29
|
+
* @param {string} [params.timeout] - The amount of time to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout.
|
|
30
|
+
* @param {array} [params.index_metric] - A comma-separated list of index metric groups, for example, `docs,store`.
|
|
31
31
|
* @param {array} [params.metric] - Limit the information returned to the specified metrics.
|
|
32
|
-
* @param {string} [params.node_id] -
|
|
32
|
+
* @param {string} [params.node_id] - A comma-separated list of node IDs used to filter results. Supports [node filters](https://opensearch.org/docs/latest/api-reference/nodes-apis/index/#node-filters).
|
|
33
33
|
*
|
|
34
34
|
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
35
35
|
* @param {function} [callback] - Callback that handles errors and response
|
package/api/index.d.ts
CHANGED
|
@@ -275,6 +275,7 @@ import { Knn_TrainModel_Request, Knn_TrainModel_Response, Knn_TrainModel_Respons
|
|
|
275
275
|
import { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody } from './knn/deleteModel';
|
|
276
276
|
import { Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody } from './knn/getModel';
|
|
277
277
|
import { Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody } from './knn/warmup';
|
|
278
|
+
import { Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody } from './ml/executeAlgorithm';
|
|
278
279
|
import { Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody } from './ml/predict';
|
|
279
280
|
import { Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody } from './ml/trainPredict';
|
|
280
281
|
import { Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody } from './ml/train';
|
|
@@ -682,6 +683,7 @@ export {
|
|
|
682
683
|
Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody,
|
|
683
684
|
Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody,
|
|
684
685
|
Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody,
|
|
686
|
+
Ml_ExecuteAlgorithm_Request, Ml_ExecuteAlgorithm_RequestBody, Ml_ExecuteAlgorithm_Response, Ml_ExecuteAlgorithm_ResponseBody,
|
|
685
687
|
Ml_Predict_Request, Ml_Predict_RequestBody, Ml_Predict_Response, Ml_Predict_ResponseBody,
|
|
686
688
|
Ml_TrainPredict_Request, Ml_TrainPredict_RequestBody, Ml_TrainPredict_Response, Ml_TrainPredict_ResponseBody,
|
|
687
689
|
Ml_Train_Request, Ml_Train_RequestBody, Ml_Train_Response, Ml_Train_ResponseBody,
|
|
@@ -19,6 +19,7 @@ import * as Common from '../_types/_common'
|
|
|
19
19
|
import * as Global from '../_types/_global'
|
|
20
20
|
import * as Indices_Common from '../_types/indices._common'
|
|
21
21
|
import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template'
|
|
22
|
+
import * as Indices_SimulateTemplate from '../_types/indices.simulate_template'
|
|
22
23
|
|
|
23
24
|
export interface Indices_SimulateIndexTemplate_Request extends Global.Params {
|
|
24
25
|
body?: Indices_SimulateIndexTemplate_RequestBody;
|
|
@@ -42,5 +43,8 @@ export interface Indices_SimulateIndexTemplate_Response extends ApiResponse {
|
|
|
42
43
|
body: Indices_SimulateIndexTemplate_ResponseBody;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
export type Indices_SimulateIndexTemplate_ResponseBody =
|
|
46
|
+
export type Indices_SimulateIndexTemplate_ResponseBody = {
|
|
47
|
+
overlapping?: Indices_SimulateTemplate.Overlapping[];
|
|
48
|
+
template?: Indices_SimulateTemplate.Template;
|
|
49
|
+
}
|
|
46
50
|
|
package/api/ml/_api.js
CHANGED
|
@@ -34,6 +34,7 @@ function MlApi(bindObj) {
|
|
|
34
34
|
this.deleteTask = require('./deleteTask').bind(bindObj);
|
|
35
35
|
this.deployModel = require('./deployModel').bind(bindObj);
|
|
36
36
|
this.executeAgent = require('./executeAgent').bind(bindObj);
|
|
37
|
+
this.executeAlgorithm = require('./executeAlgorithm').bind(bindObj);
|
|
37
38
|
this.getAgent = require('./getAgent').bind(bindObj);
|
|
38
39
|
this.getAllMemories = require('./getAllMemories').bind(bindObj);
|
|
39
40
|
this.getAllMessages = require('./getAllMessages').bind(bindObj);
|
|
@@ -108,6 +109,8 @@ function MlApi(bindObj) {
|
|
|
108
109
|
this.deploy_model = require('./deployModel').bind(bindObj);
|
|
109
110
|
// Deprecated: Use executeAgent instead.
|
|
110
111
|
this.execute_agent = require('./executeAgent').bind(bindObj);
|
|
112
|
+
// Deprecated: Use executeAlgorithm instead.
|
|
113
|
+
this.execute_algorithm = require('./executeAlgorithm').bind(bindObj);
|
|
111
114
|
// Deprecated: Use getAgent instead.
|
|
112
115
|
this.get_agent = require('./getAgent').bind(bindObj);
|
|
113
116
|
// Deprecated: Use getAllMemories instead.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
import { ApiResponse } from '../../lib/Transport'
|
|
18
|
+
import * as Global from '../_types/_global'
|
|
19
|
+
import * as Ml_Common from '../_types/ml._common'
|
|
20
|
+
|
|
21
|
+
export interface Ml_ExecuteAlgorithm_Request extends Global.Params {
|
|
22
|
+
algorithm_name: 'anomaly_localization' | 'local_sample_calculator';
|
|
23
|
+
body?: Ml_ExecuteAlgorithm_RequestBody;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type Ml_ExecuteAlgorithm_RequestBody = {
|
|
27
|
+
aggregations?: Ml_Common.Aggregation[];
|
|
28
|
+
attribute_field_names?: string[];
|
|
29
|
+
end_time?: number;
|
|
30
|
+
index_name?: string;
|
|
31
|
+
input_data?: number[];
|
|
32
|
+
metrics?: number[][];
|
|
33
|
+
min_time_interval?: number;
|
|
34
|
+
num_outputs?: number;
|
|
35
|
+
operation?: 'max' | 'min' | 'sum';
|
|
36
|
+
start_time?: number;
|
|
37
|
+
time_field_name?: string;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface Ml_ExecuteAlgorithm_Response extends ApiResponse {
|
|
41
|
+
body: Ml_ExecuteAlgorithm_ResponseBody;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export type Ml_ExecuteAlgorithm_ResponseBody = Ml_Common.ExecuteAlgorithmResponse
|
|
45
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright OpenSearch Contributors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*
|
|
5
|
+
* The OpenSearch Contributors require contributions made to
|
|
6
|
+
* this file be licensed under the Apache-2.0 license or a
|
|
7
|
+
* compatible open source license.
|
|
8
|
+
*
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
* This file was generated from the OpenSearch API Spec. Do NOT edit it
|
|
13
|
+
* manually. If you want to make changes, either update the spec or
|
|
14
|
+
* modify the API generator.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
'use strict';
|
|
18
|
+
|
|
19
|
+
const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils');
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Execute an algorithm.
|
|
23
|
+
* <br/> See Also: {@link undefined - ml.execute_algorithm}
|
|
24
|
+
*
|
|
25
|
+
* @memberOf API-Ml
|
|
26
|
+
*
|
|
27
|
+
* @param {object} params
|
|
28
|
+
* @param {string} params.algorithm_name
|
|
29
|
+
* @param {object} [params.body]
|
|
30
|
+
*
|
|
31
|
+
* @param {TransportRequestOptions} [options] - Options for {@link Transport#request}
|
|
32
|
+
* @param {function} [callback] - Callback that handles errors and response
|
|
33
|
+
*
|
|
34
|
+
* @returns {{abort: function(), then: function(), catch: function()}|Promise<never>|*}
|
|
35
|
+
*/
|
|
36
|
+
function executeAlgorithmFunc(params, options, callback) {
|
|
37
|
+
[params, options, callback] = normalizeArguments(params, options, callback);
|
|
38
|
+
if (params.algorithm_name == null) return handleMissingParam('algorithm_name', this, callback);
|
|
39
|
+
|
|
40
|
+
let { body, algorithm_name, ...querystring } = params;
|
|
41
|
+
algorithm_name = parsePathParam(algorithm_name);
|
|
42
|
+
|
|
43
|
+
const path = '/_plugins/_ml/_execute/' + algorithm_name;
|
|
44
|
+
const method = 'POST';
|
|
45
|
+
body = body || '';
|
|
46
|
+
|
|
47
|
+
return this.transport.request({ method, path, querystring, body }, options, callback);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
module.exports = executeAlgorithmFunc;
|