Skip to content

Commit 84ad9dc

Browse files
committed
Define new objects for data stream options and failure store
1 parent 3e527a8 commit 84ad9dc

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 { Duration } from '@_types/Time'
21+
22+
/**
23+
* Data stream failure store contains the configuration of the failure store for a given data stream.
24+
*/
25+
export class DataStreamFailureStore {
26+
/**
27+
* If defined, it turns the failure store on/off (`true`/`false`) for this data stream. A data stream failure store
28+
* that's disabled (enabled: `false`) will redirect no new failed indices to the failure store; however, it will
29+
* not remove any existing data from the failure store.
30+
* @server_default true
31+
*/
32+
enabled?: boolean
33+
/**
34+
* If defined, it specifies the lifecycle configuration for the failure store of this data stream.
35+
*/
36+
lifecycle?: FailureStoreLifecycle
37+
}
38+
39+
/**
40+
* The failure store lifecycle configures the data stream lifecycle configuration for failure indices.
41+
*/
42+
export class FailureStoreLifecycle {
43+
/**
44+
* If defined, every document added to this data stream will be stored at least for this time frame.
45+
* Any time after this duration the document could be deleted.
46+
* When empty, every document in this data stream will be stored indefinitely.
47+
*/
48+
data_retention?: Duration
49+
/**
50+
* If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
51+
* that's disabled (enabled: `false`) will have no effect on the data stream.
52+
* @server_default true
53+
*/
54+
enabled?: boolean
55+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
22+
/**
23+
* Data stream options contain the configuration of data stream level features for a given data stream, for example,
24+
* the failure store configuration.
25+
*/
26+
export class DataStreamOptions {
27+
/**
28+
* If defined, it specifies configuration for the failure store of this data stream.
29+
*/
30+
failure_store?: DataStreamFailureStore
31+
}

0 commit comments

Comments
 (0)