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
38 changes: 25 additions & 13 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2782,6 +2782,7 @@ components:
peer_tags:
description: Tags to query for a specific downstream entity (peer.service, peer.db_instance, peer.s3, peer.s3.bucket, etc.).
items:
description: A tag identifying a specific downstream entity (e.g. peer.service, peer.db_instance).
example: "peer.service:my-service"
type: string
type: array
Expand Down Expand Up @@ -6647,6 +6648,7 @@ components:
sources:
additionalProperties:
items:
description: A fallback source attribute name.
type: string
type: array
description: Fallback sources used to populate value of field.
Expand Down Expand Up @@ -6695,6 +6697,7 @@ components:
description: Optional list of profiles to modify the schema.
example: ["security_control", "host"]
items:
description: A profile name that modifies the schema behavior.
type: string
type: array
schema_type:
Expand Down Expand Up @@ -7730,25 +7733,13 @@ components:
- L2NORM
- PERCENTILE
- STDDEV
MonitorFormulaAndFunctionCostDataSource:
description: Data source for cost queries.
enum:
- metrics
- cloud_cost
- datadog_usage
example: "cloud_cost"
type: string
x-enum-varnames:
- METRICS
- CLOUD_COST
- DATADOG_USAGE
MonitorFormulaAndFunctionCostQueryDefinition:
description: A formula and functions cost query.
properties:
aggregator:
$ref: "#/components/schemas/MonitorFormulaAndFunctionCostAggregator"
data_source:
$ref: "#/components/schemas/MonitorFormulaAndFunctionCostDataSource"
$ref: "#/components/schemas/MonitorFormulaAndFunctionMetricsDataSource"
name:
description: Name of the query for use in formulas.
example: "query1"
Expand Down Expand Up @@ -7808,6 +7799,7 @@ components:
description: Columns to group results by.
example: ["col1", "col2"]
items:
description: A column name to group results by.
type: string
type: array
model_type_override:
Expand All @@ -7827,6 +7819,7 @@ components:
description: Optional grouping fields for aggregation.
example: ["entity_id"]
items:
description: A field name to group results by.
type: string
type: array
measure:
Expand Down Expand Up @@ -11161,8 +11154,10 @@ components:
description: Product Analytics audience account subquery.
properties:
name:
description: The name of the account subquery.
type: string
query:
description: The query string for the account subquery.
type: string
type: object
ProductAnalyticsAudienceFilters:
Expand All @@ -11173,6 +11168,7 @@ components:
$ref: "#/components/schemas/ProductAnalyticsAudienceAccountSubquery"
type: array
filter_condition:
description: An optional filter condition applied to the audience subquery.
type: string
segments:
items:
Expand All @@ -11184,26 +11180,33 @@ components:
type: array
type: object
ProductAnalyticsAudienceOccurrenceFilter:
description: Filter applied to occurrence counts when building a Product Analytics audience.
properties:
operator:
description: The comparison operator used for the occurrence filter (e.g. `gt`, `lt`, `eq`).
type: string
value:
description: The threshold value to compare occurrence counts against.
type: string
type: object
ProductAnalyticsAudienceSegmentSubquery:
description: Product Analytics audience segment subquery.
properties:
name:
description: The name of the segment subquery.
type: string
segment_id:
description: The unique identifier of the segment.
type: string
type: object
ProductAnalyticsAudienceUserSubquery:
description: Product Analytics audience user subquery.
properties:
name:
description: The name of the user subquery.
type: string
query:
description: The query string for the user subquery.
type: string
type: object
QuerySortOrder:
Expand Down Expand Up @@ -11772,6 +11775,7 @@ components:
- $ref: "#/components/schemas/SLOCountDefinitionWithBadEventsFormula"
SLOCountDefinitionWithBadEventsFormula:
additionalProperties: false
description: SLO count definition using a bad events formula alongside a good events formula.
properties:
bad_events_formula:
$ref: "#/components/schemas/SLOFormula"
Expand All @@ -11798,6 +11802,7 @@ components:
type: object
SLOCountDefinitionWithTotalEventsFormula:
additionalProperties: false
description: SLO count definition using a total events formula alongside a good events formula.
properties:
good_events_formula:
$ref: "#/components/schemas/SLOFormula"
Expand Down Expand Up @@ -13004,6 +13009,7 @@ components:
description: Fields to group by.
example: ["source", "destination"]
items:
description: A field name to group by.
type: string
type: array
limit:
Expand Down Expand Up @@ -13626,6 +13632,7 @@ components:
Always included in service level objective responses (but may be empty).
example: ["env:prod", "app:core"]
items:
description: A tag associated with the service level objective.
type: string
type: array
created_at:
Expand All @@ -13649,6 +13656,7 @@ components:
env_tags:
description: Tags with the `env` tag key.
items:
description: A tag with the `env` tag key.
type: string
type: array
groups:
Expand Down Expand Up @@ -13693,6 +13701,7 @@ components:
service_tags:
description: Tags with the `service` tag key.
items:
description: A tag with the `service` tag key.
type: string
type: array
slo_type:
Expand All @@ -13702,6 +13711,7 @@ components:
team_tags:
description: Tags with the `team` tag key.
items:
description: A tag with the `team` tag key.
type: string
type: array
thresholds:
Expand Down Expand Up @@ -14712,6 +14722,7 @@ components:
description: The tag values.
example: ["env"]
items:
description: A tag value string.
minLength: 1
type: string
type: array
Expand Down Expand Up @@ -17989,6 +18000,7 @@ components:
blockedRequestPatterns:
description: Array of URL patterns to block.
items:
description: A URL pattern to block during the Synthetic test.
type: string
type: array
checkCertificateRevocation:
Expand Down
5 changes: 3 additions & 2 deletions examples/v1/monitors/CreateMonitor_1303514967.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import com.datadog.api.client.v1.api.MonitorsApi;
import com.datadog.api.client.v1.model.Monitor;
import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionCostAggregator;
import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionCostDataSource;
import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionCostQueryDefinition;
import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionMetricsDataSource;
import com.datadog.api.client.v1.model.MonitorFormulaAndFunctionQueryDefinition;
import com.datadog.api.client.v1.model.MonitorOptions;
import com.datadog.api.client.v1.model.MonitorThresholds;
Expand Down Expand Up @@ -37,7 +37,8 @@ public static void main(String[] args) {
Collections.singletonList(
new MonitorFormulaAndFunctionQueryDefinition(
new MonitorFormulaAndFunctionCostQueryDefinition()
.dataSource(MonitorFormulaAndFunctionCostDataSource.CLOUD_COST)
.dataSource(
MonitorFormulaAndFunctionMetricsDataSource.CLOUD_COST)
.query(
"sum:aws.cost.net.amortized.shared.resources.allocated{aws_product"
+ " IN (amplify ,athena, backup, bedrock ) } by"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class MonitorFormulaAndFunctionCostQueryDefinition {
private MonitorFormulaAndFunctionCostAggregator aggregator;

public static final String JSON_PROPERTY_DATA_SOURCE = "data_source";
private MonitorFormulaAndFunctionCostDataSource dataSource;
private MonitorFormulaAndFunctionMetricsDataSource dataSource;

public static final String JSON_PROPERTY_NAME = "name";
private String name;
Expand All @@ -45,7 +45,7 @@ public MonitorFormulaAndFunctionCostQueryDefinition() {}
@JsonCreator
public MonitorFormulaAndFunctionCostQueryDefinition(
@JsonProperty(required = true, value = JSON_PROPERTY_DATA_SOURCE)
MonitorFormulaAndFunctionCostDataSource dataSource,
MonitorFormulaAndFunctionMetricsDataSource dataSource,
@JsonProperty(required = true, value = JSON_PROPERTY_NAME) String name,
@JsonProperty(required = true, value = JSON_PROPERTY_QUERY) String query) {
this.dataSource = dataSource;
Expand Down Expand Up @@ -81,24 +81,24 @@ public void setAggregator(MonitorFormulaAndFunctionCostAggregator aggregator) {
}

public MonitorFormulaAndFunctionCostQueryDefinition dataSource(
MonitorFormulaAndFunctionCostDataSource dataSource) {
MonitorFormulaAndFunctionMetricsDataSource dataSource) {
this.dataSource = dataSource;
this.unparsed |= !dataSource.isValid();
return this;
}

/**
* Data source for cost queries.
* Data source for metrics queries.
*
* @return dataSource
*/
@JsonProperty(JSON_PROPERTY_DATA_SOURCE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public MonitorFormulaAndFunctionCostDataSource getDataSource() {
public MonitorFormulaAndFunctionMetricsDataSource getDataSource() {
return dataSource;
}

public void setDataSource(MonitorFormulaAndFunctionCostDataSource dataSource) {
public void setDataSource(MonitorFormulaAndFunctionMetricsDataSource dataSource) {
if (!dataSource.isValid()) {
this.unparsed = true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ProductAnalyticsAudienceAccountSubquery name(String name) {
}

/**
* Getname
* The name of the account subquery.
*
* @return name
*/
Expand All @@ -58,7 +58,7 @@ public ProductAnalyticsAudienceAccountSubquery query(String query) {
}

/**
* Getquery
* The query string for the account subquery.
*
* @return query
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public ProductAnalyticsAudienceFilters filterCondition(String filterCondition) {
}

/**
* GetfilterCondition
* An optional filter condition applied to the audience subquery.
*
* @return filterCondition
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Map;
import java.util.Objects;

/** */
/** Filter applied to occurrence counts when building a Product Analytics audience. */
@JsonPropertyOrder({
ProductAnalyticsAudienceOccurrenceFilter.JSON_PROPERTY_OPERATOR,
ProductAnalyticsAudienceOccurrenceFilter.JSON_PROPERTY_VALUE
Expand All @@ -37,7 +37,8 @@ public ProductAnalyticsAudienceOccurrenceFilter operator(String operator) {
}

/**
* Getoperator
* The comparison operator used for the occurrence filter (e.g. <code>gt</code>, <code>lt</code>,
* <code>eq</code>).
*
* @return operator
*/
Expand All @@ -58,7 +59,7 @@ public ProductAnalyticsAudienceOccurrenceFilter value(String value) {
}

/**
* Getvalue
* The threshold value to compare occurrence counts against.
*
* @return value
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public ProductAnalyticsAudienceSegmentSubquery name(String name) {
}

/**
* Getname
* The name of the segment subquery.
*
* @return name
*/
Expand All @@ -58,7 +58,7 @@ public ProductAnalyticsAudienceSegmentSubquery segmentId(String segmentId) {
}

/**
* GetsegmentId
* The unique identifier of the segment.
*
* @return segmentId
*/
Expand Down
Loading
Loading