Skip to content

Commit 8e406f4

Browse files
committed
Add watcher.update_settings
1 parent 2efcd2c commit 8e406f4

File tree

9 files changed

+272
-11
lines changed

9 files changed

+272
-11
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,4 +391,14 @@ actions:
391391
application/json:
392392
examples:
393393
indicesLegacyPutTemplateRequestExample1:
394-
$ref: "../../specification/indices/put_template/indicesPutTemplateRequestExample1.yaml"
394+
$ref: "../../specification/indices/put_template/indicesPutTemplateRequestExample1.yaml"
395+
- target: "$.paths['/_watcher/settings']['put']"
396+
description: "Add request example for update watcher settings"
397+
update:
398+
requestBody:
399+
content:
400+
application/json:
401+
examples:
402+
updateWatcherSettingsRequestExample1:
403+
$ref: "../../specification/watcher/update_settings/WatcherUpdateSettingsRequestExample1.yaml"
404+

output/openapi/elasticsearch-openapi.json

Lines changed: 65 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 107 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/validation-errors.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -818,12 +818,6 @@
818818
],
819819
"response": []
820820
},
821-
"watcher.update_settings": {
822-
"request": [
823-
"Missing request & response"
824-
],
825-
"response": []
826-
},
827821
"xpack.info": {
828822
"request": [
829823
"Request: query parameter 'human' does not exist in the json spec",

output/typescript/types.ts

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -665,4 +665,5 @@ watcher-api-query-watches,https://www.elastic.co/guide/en/elasticsearch/referenc
665665
watcher-api-start,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-start.html
666666
watcher-api-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stats.html
667667
watcher-api-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stop.html
668+
watcher-api-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-update-settings.html
668669
xpack-rollup,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/xpack-rollup.html
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { Dictionary } from '@spec_utils/Dictionary'
21+
import { RequestBase } from '@_types/Base'
22+
import { Duration } from '@_types/Time'
23+
24+
/**
25+
* Update Watcher index settings.
26+
* Update settings for the Watcher internal index (`.watches`).
27+
* Only a subset of settings can be modified, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
28+
* @rest_spec_name watcher.update_settings
29+
* @availability stack stability=stable visibility=public
30+
* @cluster_privileges manage_watcher
31+
* @doc_id watcher-api-update-settings
32+
*/
33+
export interface Request extends RequestBase {
34+
query_parameters: {
35+
/**
36+
* The period to wait for a connection to the master node.
37+
* If no response is received before the timeout expires, the request fails and returns an error.
38+
*/
39+
master_timeout?: Duration
40+
/**
41+
* The period to wait for a response.
42+
* If no response is received before the timeout expires, the request fails and returns an error.
43+
*/
44+
timeout?: Duration
45+
}
46+
/** @codegen_name watcher_index_settings */
47+
body: Dictionary<string, string>
48+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# summary:
2+
# description:
3+
# type: request
4+
# method_request: PUT /_watcher/settings
5+
value:
6+
index.auto_expand_replicas: 0-4
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Licensed to Elasticsearch B.V. under one or more contributor
3+
* license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright
5+
* ownership. Elasticsearch B.V. licenses this file to you under
6+
* the Apache License, Version 2.0 (the "License"); you may
7+
* not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
export class Response {
21+
body: {
22+
acknowledged: boolean
23+
}
24+
}

0 commit comments

Comments
 (0)