Skip to content

Commit 1916222

Browse files
committed
Add watcher.update_settings
1 parent db9fe44 commit 1916222

File tree

9 files changed

+271
-10
lines changed

9 files changed

+271
-10
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,3 +546,13 @@ actions:
546546
examples:
547547
delegatePkiResponseExample1:
548548
$ref: "../../specification/security/delegate_pki/examples/200_response/SecurityDelegatePkiResponseExample1.yaml"
549+
## Examples for watcher
550+
- target: "$.paths['/_watcher/settings']['put']"
551+
description: "Add request example for update watcher settings"
552+
update:
553+
requestBody:
554+
content:
555+
application/json:
556+
examples:
557+
updateWatcherSettingsRequestExample1:
558+
$ref: "../../specification/watcher/update_settings/examples/request/WatcherUpdateSettingsRequestExample1.yaml"

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
@@ -437,12 +437,6 @@
437437
],
438438
"response": []
439439
},
440-
"watcher.update_settings": {
441-
"request": [
442-
"Missing request & response"
443-
],
444-
"response": []
445-
},
446440
"xpack.info": {
447441
"request": [
448442
"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
@@ -735,4 +735,5 @@ watcher-api-query-watches,https://www.elastic.co/guide/en/elasticsearch/referenc
735735
watcher-api-start,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-start.html
736736
watcher-api-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stats.html
737737
watcher-api-stop,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-stop.html
738+
watcher-api-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-update-settings.html
738739
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: 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+
}
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

0 commit comments

Comments
 (0)