File tree Expand file tree Collapse file tree 3 files changed +20
-26
lines changed Expand file tree Collapse file tree 3 files changed +20
-26
lines changed Original file line number Diff line number Diff line change @@ -26,26 +26,29 @@ import { Duration } from '@_types/Time'
26
26
* Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration.
27
27
*/
28
28
export class DataStreamLifecycle {
29
- data_retention ?: Duration
30
- downsampling ?: DataStreamLifecycleDownsampling
31
- }
32
-
33
- /**
34
- * Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions,
35
- * if asked.
36
- */
37
- export class DataStreamLifecycleWithRollover {
38
29
/**
39
30
* If defined, every document added to this data stream will be stored at least for this time frame.
40
31
* Any time after this duration the document could be deleted.
41
32
* When empty, every document in this data stream will be stored indefinitely.
42
33
*/
43
34
data_retention ?: Duration
44
-
45
35
/**
46
36
* The downsampling configuration to execute for the managed backing index after rollover.
47
37
*/
48
38
downsampling ?: DataStreamLifecycleDownsampling
39
+ /**
40
+ * If defined, it turns data stream lifecycle on/off (`true`/`false`) for this data stream. A data stream lifecycle
41
+ * that's disabled (enabled: `false`) will have no effect on the data stream.
42
+ * @server_default true
43
+ */
44
+ enabled ?: boolean
45
+ }
46
+
47
+ /**
48
+ * Data stream lifecycle with rollover can be used to display the configuration including the default rollover conditions,
49
+ * if asked.
50
+ */
51
+ export class DataStreamLifecycleWithRollover extends DataStreamLifecycle {
49
52
/**
50
53
* The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
51
54
* This property is an implementation detail and it will only be retrieved when the query param `include_defaults` is set to true.
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle'
20
+ import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle'
21
21
import { DataStreamName } from '@_types/common'
22
22
23
23
export class Response {
@@ -26,5 +26,5 @@ export class Response {
26
26
27
27
class DataStreamWithLifecycle {
28
28
name : DataStreamName
29
- lifecycle ?: DataStreamLifecycle
29
+ lifecycle ?: DataStreamLifecycleWithRollover
30
30
}
Original file line number Diff line number Diff line change 17
17
* under the License.
18
18
*/
19
19
20
- import { DataStreamLifecycleDownsampling } from '@indices/_types/DataStreamLifecycleDownsampling '
20
+ import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle '
21
21
import { RequestBase } from '@_types/Base'
22
22
import { DataStreamNames , ExpandWildcards } from '@_types/common'
23
23
import { Duration } from '@_types/Time'
@@ -61,17 +61,8 @@ export interface Request extends RequestBase {
61
61
*/
62
62
timeout ?: Duration
63
63
}
64
- body : {
65
- /**
66
- * If defined, every document added to this data stream will be stored at least for this time frame.
67
- * Any time after this duration the document could be deleted.
68
- * When empty, every document in this data stream will be stored indefinitely.
69
- */
70
- data_retention ?: Duration
71
- /**
72
- * If defined, every backing index will execute the configured downsampling configuration after the backing
73
- * index is not the data stream write index anymore.
74
- */
75
- downsampling ?: DataStreamLifecycleDownsampling
76
- }
64
+ /**
65
+ * @codegen_name lifecycle
66
+ */
67
+ body : DataStreamLifecycle
77
68
}
You can’t perform that action at this time.
0 commit comments