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'
2626 * Data stream lifecycle denotes that a data stream is managed by the data stream lifecycle and contains the configuration.
2727 */
2828export 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 {
3829 /**
3930 * If defined, every document added to this data stream will be stored at least for this time frame.
4031 * Any time after this duration the document could be deleted.
4132 * When empty, every document in this data stream will be stored indefinitely.
4233 */
4334 data_retention ?: Duration
44-
4535 /**
4636 * The downsampling configuration to execute for the managed backing index after rollover.
4737 */
4838 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 {
4952 /**
5053 * The conditions which will trigger the rollover of a backing index as configured by the cluster setting `cluster.lifecycle.default.rollover`.
5154 * 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 1717 * under the License.
1818 */
1919
20- import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle'
20+ import { DataStreamLifecycleWithRollover } from '@indices/_types/DataStreamLifecycle'
2121import { DataStreamName } from '@_types/common'
2222
2323export class Response {
@@ -26,5 +26,5 @@ export class Response {
2626
2727class DataStreamWithLifecycle {
2828 name : DataStreamName
29- lifecycle ?: DataStreamLifecycle
29+ lifecycle ?: DataStreamLifecycleWithRollover
3030}
Original file line number Diff line number Diff line change 1717 * under the License.
1818 */
1919
20- import { DataStreamLifecycleDownsampling } from '@indices/_types/DataStreamLifecycleDownsampling '
20+ import { DataStreamLifecycle } from '@indices/_types/DataStreamLifecycle '
2121import { RequestBase } from '@_types/Base'
2222import { DataStreamNames , ExpandWildcards } from '@_types/common'
2323import { Duration } from '@_types/Time'
@@ -61,17 +61,8 @@ export interface Request extends RequestBase {
6161 */
6262 timeout ?: Duration
6363 }
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
7768}
You can’t perform that action at this time.
0 commit comments