@@ -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.
224258func (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 {
0 commit comments