Skip to content

Commit 16b281b

Browse files
committed
Add watcher.get_settings
1 parent 8e406f4 commit 16b281b

File tree

9 files changed

+268
-75
lines changed

9 files changed

+268
-75
lines changed

docs/overlays/elasticsearch-openapi-overlays.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -401,4 +401,14 @@ actions:
401401
examples:
402402
updateWatcherSettingsRequestExample1:
403403
$ref: "../../specification/watcher/update_settings/WatcherUpdateSettingsRequestExample1.yaml"
404+
- target: "$.paths['/_watcher/settings']['get']"
405+
description: "Add response example for get watcher settings"
406+
update:
407+
responses:
408+
200:
409+
content:
410+
application/json:
411+
examples:
412+
updateWatcherSettingsRequestExample1:
413+
$ref: "../../specification/watcher/get_settings/WatcherGetSettingsResponseExample1.yaml"
404414

output/openapi/elasticsearch-openapi.json

Lines changed: 105 additions & 65 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: 71 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
@@ -800,12 +800,6 @@
800800
"interface definition watcher._types:TriggerEventContainer - Property schedule is a single-variant and must be required"
801801
]
802802
},
803-
"watcher.get_settings": {
804-
"request": [
805-
"Missing request & response"
806-
],
807-
"response": []
808-
},
809803
"watcher.start": {
810804
"request": [
811805
"Request: missing json spec query parameter 'master_timeout'"

output/typescript/types.ts

Lines changed: 8 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
@@ -659,6 +659,7 @@ watcher-api-activate-watch,https://www.elastic.co/guide/en/elasticsearch/referen
659659
watcher-api-deactivate-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-deactivate-watch.html
660660
watcher-api-delete-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-delete-watch.html
661661
watcher-api-execute-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-execute-watch.html
662+
watcher-api-get-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-settings.html
662663
watcher-api-get-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-get-watch.html
663664
watcher-api-put-watch,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-put-watch.html
664665
watcher-api-query-watches,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/watcher-api-query-watches.html
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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 { RequestBase } from '@_types/Base'
21+
import { Duration } from '@_types/Time'
22+
23+
/**
24+
* Get Watcher index settings.
25+
* Get settings for the Watcher internal index (`.watches`).
26+
* Only a subset of settings are shown, for example `index.auto_expand_replicas` and `index.number_of_replicas`.
27+
* @rest_spec_name watcher.get_settings
28+
* @availability stack stability=stable visibility=public
29+
* @doc_id watcher-api-get-settings
30+
*/
31+
export interface Request extends RequestBase {
32+
query_parameters: {
33+
/**
34+
* The period to wait for a connection to the master node.
35+
* If no response is received before the timeout expires, the request fails and returns an error.
36+
*/
37+
master_timeout?: Duration
38+
}
39+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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 { IndexSettings } from '@indices/_types/IndexSettings'
21+
22+
export class Response {
23+
body: {
24+
index: IndexSettings
25+
}
26+
}

0 commit comments

Comments
 (0)