Skip to content

Commit 291178e

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 09daef2e of spec repo
1 parent 82108a5 commit 291178e

File tree

7 files changed

+142
-29
lines changed

7 files changed

+142
-29
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:54.086270",
8-
"spec_repo_commit": "0857d88a"
7+
"regenerated": "2024-08-27 12:12:27.114116",
8+
"spec_repo_commit": "09daef2e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-08-26 18:14:54.105234",
13-
"spec_repo_commit": "0857d88a"
12+
"regenerated": "2024-08-27 12:12:27.132612",
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

api/datadogV1/model_logs_index.go

Lines changed: 41 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,13 @@ type LogsIndex struct {
2929
IsRateLimited *bool `json:"is_rate_limited,omitempty"`
3030
// The name of the index.
3131
Name string `json:"name"`
32-
// The number of days before logs are deleted from this index. Available values depend on
33-
// retention plans specified in your organization's contract/subscriptions.
32+
// The total number of days logs are stored in Standard and Flex Tier before being deleted from the index.
33+
// 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`,
34+
// and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached.
35+
// The available values depend on retention plans specified in your organization's contract/subscriptions.
36+
NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"`
37+
// The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index.
38+
// The available values depend on retention plans specified in your organization's contract/subscriptions.
3439
NumRetentionDays *int64 `json:"num_retention_days,omitempty"`
3540
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3641
UnparsedObject map[string]interface{} `json:"-"`
@@ -242,6 +247,34 @@ func (o *LogsIndex) SetName(v string) {
242247
o.Name = v
243248
}
244249

250+
// GetNumFlexLogsRetentionDays returns the NumFlexLogsRetentionDays field value if set, zero value otherwise.
251+
func (o *LogsIndex) GetNumFlexLogsRetentionDays() int64 {
252+
if o == nil || o.NumFlexLogsRetentionDays == nil {
253+
var ret int64
254+
return ret
255+
}
256+
return *o.NumFlexLogsRetentionDays
257+
}
258+
259+
// GetNumFlexLogsRetentionDaysOk returns a tuple with the NumFlexLogsRetentionDays field value if set, nil otherwise
260+
// and a boolean to check if the value has been set.
261+
func (o *LogsIndex) GetNumFlexLogsRetentionDaysOk() (*int64, bool) {
262+
if o == nil || o.NumFlexLogsRetentionDays == nil {
263+
return nil, false
264+
}
265+
return o.NumFlexLogsRetentionDays, true
266+
}
267+
268+
// HasNumFlexLogsRetentionDays returns a boolean if a field has been set.
269+
func (o *LogsIndex) HasNumFlexLogsRetentionDays() bool {
270+
return o != nil && o.NumFlexLogsRetentionDays != nil
271+
}
272+
273+
// SetNumFlexLogsRetentionDays gets a reference to the given int64 and assigns it to the NumFlexLogsRetentionDays field.
274+
func (o *LogsIndex) SetNumFlexLogsRetentionDays(v int64) {
275+
o.NumFlexLogsRetentionDays = &v
276+
}
277+
245278
// GetNumRetentionDays returns the NumRetentionDays field value if set, zero value otherwise.
246279
func (o *LogsIndex) GetNumRetentionDays() int64 {
247280
if o == nil || o.NumRetentionDays == nil {
@@ -293,6 +326,9 @@ func (o LogsIndex) MarshalJSON() ([]byte, error) {
293326
toSerialize["is_rate_limited"] = o.IsRateLimited
294327
}
295328
toSerialize["name"] = o.Name
329+
if o.NumFlexLogsRetentionDays != nil {
330+
toSerialize["num_flex_logs_retention_days"] = o.NumFlexLogsRetentionDays
331+
}
296332
if o.NumRetentionDays != nil {
297333
toSerialize["num_retention_days"] = o.NumRetentionDays
298334
}
@@ -313,6 +349,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) {
313349
Filter *LogsFilter `json:"filter"`
314350
IsRateLimited *bool `json:"is_rate_limited,omitempty"`
315351
Name *string `json:"name"`
352+
NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"`
316353
NumRetentionDays *int64 `json:"num_retention_days,omitempty"`
317354
}{}
318355
if err = datadog.Unmarshal(bytes, &all); err != nil {
@@ -326,7 +363,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) {
326363
}
327364
additionalProperties := make(map[string]interface{})
328365
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
329-
datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "exclusion_filters", "filter", "is_rate_limited", "name", "num_retention_days"})
366+
datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "exclusion_filters", "filter", "is_rate_limited", "name", "num_flex_logs_retention_days", "num_retention_days"})
330367
} else {
331368
return err
332369
}
@@ -345,6 +382,7 @@ func (o *LogsIndex) UnmarshalJSON(bytes []byte) (err error) {
345382
o.Filter = *all.Filter
346383
o.IsRateLimited = all.IsRateLimited
347384
o.Name = *all.Name
385+
o.NumFlexLogsRetentionDays = all.NumFlexLogsRetentionDays
348386
o.NumRetentionDays = all.NumRetentionDays
349387

350388
if len(additionalProperties) > 0 {

api/datadogV1/model_logs_index_update_request.go

Lines changed: 44 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,17 @@ type LogsIndexUpdateRequest struct {
2828
ExclusionFilters []LogsExclusion `json:"exclusion_filters,omitempty"`
2929
// Filter for logs.
3030
Filter LogsFilter `json:"filter"`
31-
// The number of days before logs are deleted from this index. Available values depend on
32-
// retention plans specified in your organization's contract/subscriptions.
31+
// The total number of days logs are stored in Standard and Flex Tier before being deleted from the index.
32+
// 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`,
33+
// and then stored in Flex Tier until the number of days specified in `num_flex_logs_retention_days` is reached.
34+
// The available values depend on retention plans specified in your organization's contract/subscriptions.
3335
//
34-
// **Note:** Changing the retention for an index adjusts the length of retention for all logs
35-
// already in this index. It may also affect billing.
36+
// **Note**: Changing this value affects all logs already in this index. It may also affect billing.
37+
NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"`
38+
// The number of days logs are stored in Standard Tier before aging into the Flex Tier or being deleted from the index.
39+
// The available values depend on retention plans specified in your organization's contract/subscriptions.
40+
//
41+
// **Note**: Changing this value affects all logs already in this index. It may also affect billing.
3642
NumRetentionDays *int64 `json:"num_retention_days,omitempty"`
3743
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3844
UnparsedObject map[string]interface{} `json:"-"`
@@ -220,6 +226,34 @@ func (o *LogsIndexUpdateRequest) SetFilter(v LogsFilter) {
220226
o.Filter = v
221227
}
222228

229+
// GetNumFlexLogsRetentionDays returns the NumFlexLogsRetentionDays field value if set, zero value otherwise.
230+
func (o *LogsIndexUpdateRequest) GetNumFlexLogsRetentionDays() int64 {
231+
if o == nil || o.NumFlexLogsRetentionDays == nil {
232+
var ret int64
233+
return ret
234+
}
235+
return *o.NumFlexLogsRetentionDays
236+
}
237+
238+
// GetNumFlexLogsRetentionDaysOk returns a tuple with the NumFlexLogsRetentionDays field value if set, nil otherwise
239+
// and a boolean to check if the value has been set.
240+
func (o *LogsIndexUpdateRequest) GetNumFlexLogsRetentionDaysOk() (*int64, bool) {
241+
if o == nil || o.NumFlexLogsRetentionDays == nil {
242+
return nil, false
243+
}
244+
return o.NumFlexLogsRetentionDays, true
245+
}
246+
247+
// HasNumFlexLogsRetentionDays returns a boolean if a field has been set.
248+
func (o *LogsIndexUpdateRequest) HasNumFlexLogsRetentionDays() bool {
249+
return o != nil && o.NumFlexLogsRetentionDays != nil
250+
}
251+
252+
// SetNumFlexLogsRetentionDays gets a reference to the given int64 and assigns it to the NumFlexLogsRetentionDays field.
253+
func (o *LogsIndexUpdateRequest) SetNumFlexLogsRetentionDays(v int64) {
254+
o.NumFlexLogsRetentionDays = &v
255+
}
256+
223257
// GetNumRetentionDays returns the NumRetentionDays field value if set, zero value otherwise.
224258
func (o *LogsIndexUpdateRequest) GetNumRetentionDays() int64 {
225259
if o == nil || o.NumRetentionDays == nil {
@@ -270,6 +304,9 @@ func (o LogsIndexUpdateRequest) MarshalJSON() ([]byte, error) {
270304
toSerialize["exclusion_filters"] = o.ExclusionFilters
271305
}
272306
toSerialize["filter"] = o.Filter
307+
if o.NumFlexLogsRetentionDays != nil {
308+
toSerialize["num_flex_logs_retention_days"] = o.NumFlexLogsRetentionDays
309+
}
273310
if o.NumRetentionDays != nil {
274311
toSerialize["num_retention_days"] = o.NumRetentionDays
275312
}
@@ -289,6 +326,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) {
289326
DisableDailyLimit *bool `json:"disable_daily_limit,omitempty"`
290327
ExclusionFilters []LogsExclusion `json:"exclusion_filters,omitempty"`
291328
Filter *LogsFilter `json:"filter"`
329+
NumFlexLogsRetentionDays *int64 `json:"num_flex_logs_retention_days,omitempty"`
292330
NumRetentionDays *int64 `json:"num_retention_days,omitempty"`
293331
}{}
294332
if err = datadog.Unmarshal(bytes, &all); err != nil {
@@ -299,7 +337,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) {
299337
}
300338
additionalProperties := make(map[string]interface{})
301339
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
302-
datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "disable_daily_limit", "exclusion_filters", "filter", "num_retention_days"})
340+
datadog.DeleteKeys(additionalProperties, &[]string{"daily_limit", "daily_limit_reset", "daily_limit_warning_threshold_percentage", "disable_daily_limit", "exclusion_filters", "filter", "num_flex_logs_retention_days", "num_retention_days"})
303341
} else {
304342
return err
305343
}
@@ -317,6 +355,7 @@ func (o *LogsIndexUpdateRequest) UnmarshalJSON(bytes []byte) (err error) {
317355
hasInvalidField = true
318356
}
319357
o.Filter = *all.Filter
358+
o.NumFlexLogsRetentionDays = all.NumFlexLogsRetentionDays
320359
o.NumRetentionDays = all.NumRetentionDays
321360

322361
if len(additionalProperties) > 0 {

examples/v1/logs-indexes/CreateLogsIndex.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ func main() {
3232
Filter: datadogV1.LogsFilter{
3333
Query: datadog.PtrString("source:python"),
3434
},
35-
Name: "main",
36-
NumRetentionDays: datadog.PtrInt64(15),
35+
Name: "main",
36+
NumFlexLogsRetentionDays: datadog.PtrInt64(360),
37+
NumRetentionDays: datadog.PtrInt64(15),
3738
}
3839
ctx := datadog.NewDefaultContext(context.Background())
3940
configuration := datadog.NewConfiguration()

examples/v1/logs-indexes/UpdateLogsIndex.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ func main() {
3333
Filter: datadogV1.LogsFilter{
3434
Query: datadog.PtrString("source:python"),
3535
},
36-
NumRetentionDays: datadog.PtrInt64(15),
36+
NumFlexLogsRetentionDays: datadog.PtrInt64(360),
37+
NumRetentionDays: datadog.PtrInt64(15),
3738
}
3839
ctx := datadog.NewDefaultContext(context.Background())
3940
configuration := datadog.NewConfiguration()

tests/scenarios/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

0 commit comments

Comments
 (0)