Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7265,6 +7265,12 @@ components:
maximum: 99.99
minimum: 50
type: number
description:
description: |-
A description of the index, to help explain its purpose or configuration to other users.
Maximum length of 250 characters.
example: "Contains logs matching the criteria defined by the filter."
type: string
exclusion_filters:
description: |-
An array of exclusion objects. The logs are tested against the query of each filter,
Expand Down Expand Up @@ -7339,6 +7345,12 @@ components:
maximum: 99.99
minimum: 50
type: number
description:
description: |-
A description of the index, to help explain its purpose or configuration to other users.
Maximum length of 250 characters.
example: "Contains logs matching the criteria defined by the filter."
type: string
disable_daily_limit:
description: |-
If true, sets the `daily_limit` value to null and the index is not limited on a daily basis (any
Expand Down
4 changes: 2 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -185612,8 +185612,8 @@ paths:
x-codegen-request-body-name: body
x-sunset: "2026-04-01"
x-unstable: |-
**Note**: This endpoint is deprecated. To update outcomes, use the
[Update Scorecard outcomes](https://docs.datadoghq.com/api/latest/scorecards/update-scorecard-outcomes/) endpoint.
**Note**: This endpoint is in Preview.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/scorecard/rules:
get:
description: Fetch all rules.
Expand Down
1 change: 1 addition & 0 deletions examples/v1/logs-indexes/CreateLogsIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static void main(String[] args) {
.dailyLimit(300000000L)
.dailyLimitReset(new LogsDailyLimitReset().resetTime("14:00").resetUtcOffset("+02:00"))
.dailyLimitWarningThresholdPercentage(70.0)
.description("Contains logs matching the criteria defined by the filter.")
.exclusionFilters(
Collections.singletonList(
new LogsExclusion()
Expand Down
1 change: 1 addition & 0 deletions examples/v1/logs-indexes/UpdateLogsIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public static void main(String[] args) {
.dailyLimit(300000000L)
.dailyLimitReset(new LogsDailyLimitReset().resetTime("14:00").resetUtcOffset("+02:00"))
.dailyLimitWarningThresholdPercentage(70.0)
.description("Contains logs matching the criteria defined by the filter.")
.disableDailyLimit(false)
.exclusionFilters(
Collections.singletonList(
Expand Down
29 changes: 29 additions & 0 deletions src/main/java/com/datadog/api/client/v1/model/LogsIndex.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
LogsIndex.JSON_PROPERTY_DAILY_LIMIT,
LogsIndex.JSON_PROPERTY_DAILY_LIMIT_RESET,
LogsIndex.JSON_PROPERTY_DAILY_LIMIT_WARNING_THRESHOLD_PERCENTAGE,
LogsIndex.JSON_PROPERTY_DESCRIPTION,
LogsIndex.JSON_PROPERTY_EXCLUSION_FILTERS,
LogsIndex.JSON_PROPERTY_FILTER,
LogsIndex.JSON_PROPERTY_IS_RATE_LIMITED,
Expand All @@ -46,6 +47,9 @@ public class LogsIndex {
"daily_limit_warning_threshold_percentage";
private Double dailyLimitWarningThresholdPercentage;

public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;

public static final String JSON_PROPERTY_EXCLUSION_FILTERS = "exclusion_filters";
private List<LogsExclusion> exclusionFilters = null;

Expand Down Expand Up @@ -148,6 +152,28 @@ public void setDailyLimitWarningThresholdPercentage(Double dailyLimitWarningThre
this.dailyLimitWarningThresholdPercentage = dailyLimitWarningThresholdPercentage;
}

public LogsIndex description(String description) {
this.description = description;
return this;
}

/**
* A description of the index, to help explain its purpose or configuration to other users.
* Maximum length of 250 characters.
*
* @return description
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public LogsIndex exclusionFilters(List<LogsExclusion> exclusionFilters) {
this.exclusionFilters = exclusionFilters;
if (exclusionFilters != null) {
Expand Down Expand Up @@ -386,6 +412,7 @@ public boolean equals(Object o) {
&& Objects.equals(
this.dailyLimitWarningThresholdPercentage,
logsIndex.dailyLimitWarningThresholdPercentage)
&& Objects.equals(this.description, logsIndex.description)
&& Objects.equals(this.exclusionFilters, logsIndex.exclusionFilters)
&& Objects.equals(this.filter, logsIndex.filter)
&& Objects.equals(this.isRateLimited, logsIndex.isRateLimited)
Expand All @@ -402,6 +429,7 @@ public int hashCode() {
dailyLimit,
dailyLimitReset,
dailyLimitWarningThresholdPercentage,
description,
exclusionFilters,
filter,
isRateLimited,
Expand All @@ -421,6 +449,7 @@ public String toString() {
sb.append(" dailyLimitWarningThresholdPercentage: ")
.append(toIndentedString(dailyLimitWarningThresholdPercentage))
.append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" exclusionFilters: ").append(toIndentedString(exclusionFilters)).append("\n");
sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
sb.append(" isRateLimited: ").append(toIndentedString(isRateLimited)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
LogsIndexUpdateRequest.JSON_PROPERTY_DAILY_LIMIT,
LogsIndexUpdateRequest.JSON_PROPERTY_DAILY_LIMIT_RESET,
LogsIndexUpdateRequest.JSON_PROPERTY_DAILY_LIMIT_WARNING_THRESHOLD_PERCENTAGE,
LogsIndexUpdateRequest.JSON_PROPERTY_DESCRIPTION,
LogsIndexUpdateRequest.JSON_PROPERTY_DISABLE_DAILY_LIMIT,
LogsIndexUpdateRequest.JSON_PROPERTY_EXCLUSION_FILTERS,
LogsIndexUpdateRequest.JSON_PROPERTY_FILTER,
Expand All @@ -45,6 +46,9 @@ public class LogsIndexUpdateRequest {
"daily_limit_warning_threshold_percentage";
private Double dailyLimitWarningThresholdPercentage;

public static final String JSON_PROPERTY_DESCRIPTION = "description";
private String description;

public static final String JSON_PROPERTY_DISABLE_DAILY_LIMIT = "disable_daily_limit";
private Boolean disableDailyLimit;

Expand Down Expand Up @@ -142,6 +146,28 @@ public void setDailyLimitWarningThresholdPercentage(Double dailyLimitWarningThre
this.dailyLimitWarningThresholdPercentage = dailyLimitWarningThresholdPercentage;
}

public LogsIndexUpdateRequest description(String description) {
this.description = description;
return this;
}

/**
* A description of the index, to help explain its purpose or configuration to other users.
* Maximum length of 250 characters.
*
* @return description
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DESCRIPTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getDescription() {
return description;
}

public void setDescription(String description) {
this.description = description;
}

public LogsIndexUpdateRequest disableDailyLimit(Boolean disableDailyLimit) {
this.disableDailyLimit = disableDailyLimit;
return this;
Expand Down Expand Up @@ -376,6 +402,7 @@ public boolean equals(Object o) {
&& Objects.equals(
this.dailyLimitWarningThresholdPercentage,
logsIndexUpdateRequest.dailyLimitWarningThresholdPercentage)
&& Objects.equals(this.description, logsIndexUpdateRequest.description)
&& Objects.equals(this.disableDailyLimit, logsIndexUpdateRequest.disableDailyLimit)
&& Objects.equals(this.exclusionFilters, logsIndexUpdateRequest.exclusionFilters)
&& Objects.equals(this.filter, logsIndexUpdateRequest.filter)
Expand All @@ -392,6 +419,7 @@ public int hashCode() {
dailyLimit,
dailyLimitReset,
dailyLimitWarningThresholdPercentage,
description,
disableDailyLimit,
exclusionFilters,
filter,
Expand All @@ -410,6 +438,7 @@ public String toString() {
sb.append(" dailyLimitWarningThresholdPercentage: ")
.append(toIndentedString(dailyLimitWarningThresholdPercentage))
.append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" disableDailyLimit: ").append(toIndentedString(disableDailyLimit)).append("\n");
sb.append(" exclusionFilters: ").append(toIndentedString(exclusionFilters)).append("\n");
sb.append(" filter: ").append(toIndentedString(filter)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,21 @@ Feature: Logs Indexes
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Create an index returns "Invalid Parameter Error" response
Given new "CreateLogsIndex" request
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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
When the request is sent
Then the response status is 400 Invalid Parameter Error

@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Create an index returns "OK" response
Given new "CreateLogsIndex" request
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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Create an index returns "Unprocessable Entity" response
Given new "CreateLogsIndex" request
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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
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, "description": "Contains logs matching the criteria defined by the filter.", "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
When the request is sent
Then the response status is 422 Unprocessable Entity

Expand Down Expand Up @@ -73,15 +73,15 @@ Feature: Logs Indexes
Scenario: Update an index returns "Invalid Parameter Error" response
Given new "UpdateLogsIndex" request
And request contains "name" parameter from "REPLACE.ME"
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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
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, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
When the request is sent
Then the response status is 400 Invalid Parameter Error

@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Update an index returns "OK" response
Given new "UpdateLogsIndex" request
And request contains "name" parameter from "REPLACE.ME"
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_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
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, "description": "Contains logs matching the criteria defined by the filter.", "disable_daily_limit": false, "exclusion_filters": [{"filter": {"query": "*", "sample_attribute": "@ci.job_id", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "num_flex_logs_retention_days": 360, "num_retention_days": 15, "tags": ["team:backend", "env:production"]}
When the request is sent
Then the response status is 200 OK

Expand Down
Loading