Skip to content

Commit 8757082

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add num_flex_logs_retention_days field to logs_indexes api spec (#1771)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 96d279f commit 8757082

File tree

7 files changed

+85
-24
lines changed

7 files changed

+85
-24
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-08-26 18:14:59.022582",
8-
"spec_repo_commit": "0857d88a"
7+
"regenerated": "2024-08-27 12:12:32.595463",
8+
"spec_repo_commit": "09daef2e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-26 18:14:59.040511",
13-
"spec_repo_commit": "0857d88a"
12+
"regenerated": "2024-08-27 12:12:32.613577",
13+
"spec_repo_commit": "09daef2e"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5576,11 +5576,27 @@ components:
55765576
description: The name of the index.
55775577
example: main
55785578
type: string
5579+
num_flex_logs_retention_days:
5580+
description: 'The total number of days logs are stored in Standard and Flex
5581+
Tier before being deleted from the index.
5582+
5583+
If Standard Tier is enabled on this index, logs are first retained in
5584+
Standard Tier for the number of days specified through `num_retention_days`,
5585+
5586+
and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days`
5587+
is reached.
5588+
5589+
The available values depend on retention plans specified in your organization''s
5590+
contract/subscriptions.'
5591+
example: 360
5592+
format: int64
5593+
type: integer
55795594
num_retention_days:
5580-
description: 'The number of days before logs are deleted from this index.
5581-
Available values depend on
5595+
description: 'The number of days logs are stored in Standard Tier before
5596+
aging into the Flex Tier or being deleted from the index.
55825597

5583-
retention plans specified in your organization''s contract/subscriptions.'
5598+
The available values depend on retention plans specified in your organization''s
5599+
contract/subscriptions.'
55845600
example: 15
55855601
format: int64
55865602
type: integer
@@ -5639,17 +5655,35 @@ components:
56395655
type: array
56405656
filter:
56415657
$ref: '#/components/schemas/LogsFilter'
5642-
num_retention_days:
5643-
description: 'The number of days before logs are deleted from this index.
5644-
Available values depend on
5658+
num_flex_logs_retention_days:
5659+
description: 'The total number of days logs are stored in Standard and Flex
5660+
Tier before being deleted from the index.
5661+
5662+
If Standard Tier is enabled on this index, logs are first retained in
5663+
Standard Tier for the number of days specified through `num_retention_days`,
56455664

5646-
retention plans specified in your organization''s contract/subscriptions.
5665+
and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days`
5666+
is reached.
5667+
5668+
The available values depend on retention plans specified in your organization''s
5669+
contract/subscriptions.
5670+
5671+
5672+
**Note**: Changing this value affects all logs already in this index.
5673+
It may also affect billing.'
5674+
example: 360
5675+
format: int64
5676+
type: integer
5677+
num_retention_days:
5678+
description: 'The number of days logs are stored in Standard Tier before
5679+
aging into the Flex Tier or being deleted from the index.
56475680

5681+
The available values depend on retention plans specified in your organization''s
5682+
contract/subscriptions.
56485683

5649-
**Note:** Changing the retention for an index adjusts the length of retention
5650-
for all logs
56515684

5652-
already in this index. It may also affect billing.'
5685+
**Note**: Changing this value affects all logs already in this index.
5686+
It may also affect billing.'
56535687
example: 15
56545688
format: int64
56555689
type: integer

examples/v1/logs-indexes/CreateLogsIndex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const params: v1.LogsIndexesApiCreateLogsIndexRequest = {
2828
query: "source:python",
2929
},
3030
name: "main",
31+
numFlexLogsRetentionDays: 360,
3132
numRetentionDays: 15,
3233
},
3334
};

examples/v1/logs-indexes/UpdateLogsIndex.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const params: v1.LogsIndexesApiUpdateLogsIndexRequest = {
2828
filter: {
2929
query: "source:python",
3030
},
31+
numFlexLogsRetentionDays: 360,
3132
numRetentionDays: 15,
3233
},
3334
name: "name",

features/v1/logs_indexes.feature

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Logs Indexes
1212
@generated @skip @team:DataDog/logs-backend
1313
Scenario: Create an index returns "Invalid Parameter Error" response
1414
Given new "CreateLogsIndex" request
15-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
15+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15}
1616
When the request is sent
1717
Then the response status is 400 Invalid Parameter Error
1818

1919
@generated @skip @team:DataDog/logs-backend
2020
Scenario: Create an index returns "OK" response
2121
Given new "CreateLogsIndex" request
22-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_retention_days": 15}
22+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

@@ -53,15 +53,15 @@ Feature: Logs Indexes
5353
Scenario: Update an index returns "Invalid Parameter Error" response
5454
Given new "UpdateLogsIndex" request
5555
And request contains "name" parameter from "REPLACE.ME"
56-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
56+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15}
5757
When the request is sent
5858
Then the response status is 400 Invalid Parameter Error
5959

6060
@generated @skip @team:DataDog/logs-backend
6161
Scenario: Update an index returns "OK" response
6262
Given new "UpdateLogsIndex" request
6363
And request contains "name" parameter from "REPLACE.ME"
64-
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_retention_days": 15}
64+
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15}
6565
When the request is sent
6666
Then the response status is 200 OK
6767

packages/datadog-api-client-v1/models/LogsIndex.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,15 @@ export class LogsIndex {
4545
*/
4646
"name": string;
4747
/**
48-
* The number of days before logs are deleted from this index. Available values depend on
49-
* retention plans specified in your organization's contract/subscriptions.
48+
* The total number of days logs are stored in Standard and Flex Tier before being deleted from the index.
49+
* If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`,
50+
* and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached.
51+
* The available values depend on retention plans specified in your organization's contract/subscriptions.
52+
*/
53+
"numFlexLogsRetentionDays"?: number;
54+
/**
55+
* The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index.
56+
* The available values depend on retention plans specified in your organization's contract/subscriptions.
5057
*/
5158
"numRetentionDays"?: number;
5259

@@ -98,6 +105,11 @@ export class LogsIndex {
98105
type: "string",
99106
required: true,
100107
},
108+
numFlexLogsRetentionDays: {
109+
baseName: "num_flex_logs_retention_days",
110+
type: "number",
111+
format: "int64",
112+
},
101113
numRetentionDays: {
102114
baseName: "num_retention_days",
103115
type: "number",

packages/datadog-api-client-v1/models/LogsIndexUpdateRequest.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,19 @@ export class LogsIndexUpdateRequest {
4242
*/
4343
"filter": LogsFilter;
4444
/**
45-
* The number of days before logs are deleted from this index. Available values depend on
46-
* retention plans specified in your organization's contract/subscriptions.
45+
* The total number of days logs are stored in Standard and Flex Tier before being deleted from the index.
46+
* If Standard Tier is enabled on this index, logs are first retained in Standard Tier for the number of days specified through `num_retention_days`,
47+
* and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached.
48+
* The available values depend on retention plans specified in your organization's contract/subscriptions.
4749
*
48-
* **Note:** Changing the retention for an index adjusts the length of retention for all logs
49-
* already in this index. It may also affect billing.
50+
* **Note**: Changing this value affects all logs already in this index. It may also affect billing.
51+
*/
52+
"numFlexLogsRetentionDays"?: number;
53+
/**
54+
* The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index.
55+
* The available values depend on retention plans specified in your organization's contract/subscriptions.
56+
*
57+
* **Note**: Changing this value affects all logs already in this index. It may also affect billing.
5058
*/
5159
"numRetentionDays"?: number;
5260

@@ -93,6 +101,11 @@ export class LogsIndexUpdateRequest {
93101
type: "LogsFilter",
94102
required: true,
95103
},
104+
numFlexLogsRetentionDays: {
105+
baseName: "num_flex_logs_retention_days",
106+
type: "number",
107+
format: "int64",
108+
},
96109
numRetentionDays: {
97110
baseName: "num_retention_days",
98111
type: "number",

0 commit comments

Comments
 (0)