Skip to content

Commit 897ed67

Browse files
committed
Add new data stream options requests
1 parent 3d555c1 commit 897ed67

File tree

4 files changed

+197
-0
lines changed

4 files changed

+197
-0
lines changed
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 { DataStreamNames, ExpandWildcards } from '@_types/common'
22+
import { Duration } from '@_types/Time'
23+
24+
/**
25+
* Get data stream options.
26+
*
27+
* Get the data stream options configuration of one or more data streams.
28+
* @rest_spec_name indices.get_data_stream_options
29+
* @availability stack since=8.19.0 stability=stable
30+
* @availability serverless stability=stable visibility=public
31+
* @doc_tag data stream
32+
*/
33+
export interface Request extends RequestBase {
34+
urls: [
35+
{
36+
path: '/_data_stream/{name}/_options'
37+
methods: ['GET']
38+
}
39+
]
40+
path_parts: {
41+
/**
42+
* Comma-separated list of data streams to limit the request.
43+
* Supports wildcards (`*`).
44+
* To target all data streams, omit this parameter or use `*` or `_all`.
45+
*/
46+
name: DataStreamNames
47+
}
48+
query_parameters: {
49+
/**
50+
* Type of data stream that wildcard patterns can match.
51+
* Supports comma-separated values, such as `open,hidden`.
52+
* Valid values are: `all`, `open`, `closed`, `hidden`, `none`.
53+
* @server_default open
54+
*/
55+
expand_wildcards?: ExpandWildcards
56+
/**
57+
* Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.
58+
* @server_default 30s
59+
*/
60+
master_timeout?: Duration
61+
}
62+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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 { DataStreamOptions } from '@indices/_types/DataStreamOptions'
21+
import { DataStreamName } from '@_types/common'
22+
23+
export class Response {
24+
body: { data_streams: DataStreamWithOptions[] }
25+
}
26+
27+
class DataStreamWithOptions {
28+
name: DataStreamName
29+
options?: DataStreamOptions
30+
}
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 { DataStreamFailureStore } from '@indices/_types/DataStreamFailureStore'
21+
import { RequestBase } from '@_types/Base'
22+
import { DataStreamNames, ExpandWildcards } from '@_types/common'
23+
import { Duration } from '@_types/Time'
24+
25+
/**
26+
* Update data stream options.
27+
* Update the data stream options of the specified data streams.
28+
* @rest_spec_name indices.put_data_stream_options
29+
* @availability stack since=8.19.0 stability=stable
30+
* @availability serverless stability=stable visibility=public
31+
* @doc_tag data stream
32+
*/
33+
export interface Request extends RequestBase {
34+
urls: [
35+
{
36+
path: '/_data_stream/{name}/_options'
37+
methods: ['PUT']
38+
}
39+
]
40+
path_parts: {
41+
/**
42+
* Comma-separated list of data streams used to limit the request.
43+
* Supports wildcards (`*`).
44+
* To target all data streams use `*` or `_all`.
45+
*/
46+
name: DataStreamNames
47+
}
48+
query_parameters: {
49+
/**
50+
* Type of data stream that wildcard patterns can match.
51+
* Supports comma-separated values, such as `open,hidden`.
52+
* Valid values are: `all`, `hidden`, `open`, `closed`, `none`.
53+
* @server_default open
54+
*/
55+
expand_wildcards?: ExpandWildcards
56+
/**
57+
* Period to wait for a connection to the master node. If no response is
58+
* received before the timeout expires, the request fails and returns an
59+
* error.
60+
* @server_default 30s
61+
*/
62+
master_timeout?: Duration
63+
/**
64+
* Period to wait for a response.
65+
* If no response is received before the timeout expires, the request fails and returns an error.
66+
* @server_default 30s
67+
*/
68+
timeout?: Duration
69+
}
70+
/*
71+
* This is DataStreamOptions from @indices/_types/DataStreamOptions.ts,
72+
* but kept as a properties body to avoid a breaking change
73+
*/
74+
body: {
75+
/**
76+
* If defined, it will update the failure store configuration of every data stream resolved by the name expression.
77+
*/
78+
failure_store?: DataStreamFailureStore
79+
}
80+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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 { AcknowledgedResponseBase } from '@_types/Base'
21+
22+
export class Response {
23+
/** @codegen_name result */
24+
body: AcknowledgedResponseBase
25+
}

0 commit comments

Comments
 (0)