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
14 changes: 1 addition & 13 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8024,25 +8024,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
141 changes: 6 additions & 135 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7475,89 +7475,23 @@ components:
properties:
data:
items:
$ref: '#/components/schemas/TableRowResourceIdentifier'
$ref: '#/components/schemas/BatchDeleteRowsRequestData'
maxItems: 200
type: array
required:
- data
type: object
BatchRowsQueryDataType:
default: reference-tables-batch-rows-query
description: Resource type identifier for batch queries of reference table rows.
enum:
- reference-tables-batch-rows-query
example: reference-tables-batch-rows-query
type: string
x-enum-varnames:
- REFERENCE_TABLES_BATCH_ROWS_QUERY
BatchRowsQueryRequest:
properties:
data:
$ref: '#/components/schemas/BatchRowsQueryRequestData'
type: object
BatchRowsQueryRequestData:
properties:
attributes:
$ref: '#/components/schemas/BatchRowsQueryRequestDataAttributes'
type:
$ref: '#/components/schemas/BatchRowsQueryDataType'
required:
- type
type: object
BatchRowsQueryRequestDataAttributes:
properties:
row_ids:
example:
- row_id_1
- row_id_2
items:
type: string
type: array
table_id:
example: 00000000-0000-0000-0000-000000000000
type: string
required:
- row_ids
- table_id
type: object
BatchRowsQueryResponse:
example:
data:
id: 00000000-0000-0000-0000-000000000000
relationships:
rows:
data:
- id: row_id_1
type: row
- id: row_id_2
type: row
type: reference-tables-batch-rows-query
properties:
data:
$ref: '#/components/schemas/BatchRowsQueryResponseData'
type: object
BatchRowsQueryResponseData:
BatchDeleteRowsRequestData:
description: Row resource containing a single row identifier for deletion.
properties:
id:
example: primary_key_value
type: string
relationships:
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationships'
type:
$ref: '#/components/schemas/BatchRowsQueryDataType'
$ref: '#/components/schemas/TableRowResourceDataType'
required:
- type
type: object
BatchRowsQueryResponseDataRelationships:
properties:
rows:
$ref: '#/components/schemas/BatchRowsQueryResponseDataRelationshipsRows'
type: object
BatchRowsQueryResponseDataRelationshipsRows:
properties:
data:
items:
$ref: '#/components/schemas/TableRowResourceIdentifier'
type: array
- id
type: object
BatchUpsertRowsRequestArray:
description: The request body for creating or updating multiple rows into a
Expand Down Expand Up @@ -67019,18 +66953,6 @@ components:
type: string
x-enum-varnames:
- ROW
TableRowResourceIdentifier:
description: Row resource containing a single row identifier.
properties:
id:
example: primary_key_value
type: string
type:
$ref: '#/components/schemas/TableRowResourceDataType'
required:
- type
- id
type: object
TagsEventAttribute:
description: Array of tags associated with your event.
example:
Expand Down Expand Up @@ -96466,57 +96388,6 @@ paths:
operator: OR
permissions:
- timeseries_query
/api/v2/reference-tables/queries/batch-rows:
post:
description: Batch query reference table rows by their primary key values. Returns
only found rows in the included array.
operationId: BatchRowsQuery
requestBody:
content:
application/json:
examples:
happy_path:
summary: Batch query reference table rows by their primary key values.
value:
data:
attributes:
row_ids:
- row_id_1
- row_id_2
table_id: 00000000-0000-0000-0000-000000000000
type: reference-tables-batch-rows-query
schema:
$ref: '#/components/schemas/BatchRowsQueryRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BatchRowsQueryResponse'
description: Successfully retrieved rows. Some or all requested rows were
found. Response includes found rows in the included section.
'400':
$ref: '#/components/responses/BadRequestResponse'
'403':
$ref: '#/components/responses/ForbiddenResponse'
'404':
$ref: '#/components/responses/NotFoundResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
'500':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Internal Server Error
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ: []
summary: Batch rows query
tags:
- Reference Tables
/api/v2/reference-tables/tables:
get:
description: List all reference tables in this organization.
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
41 changes: 0 additions & 41 deletions examples/v2/reference-tables/BatchRowsQuery.java

This file was deleted.

4 changes: 2 additions & 2 deletions examples/v2/reference-tables/DeleteRows.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.ReferenceTablesApi;
import com.datadog.api.client.v2.model.BatchDeleteRowsRequestArray;
import com.datadog.api.client.v2.model.BatchDeleteRowsRequestData;
import com.datadog.api.client.v2.model.TableRowResourceDataType;
import com.datadog.api.client.v2.model.TableRowResourceIdentifier;
import java.util.Collections;

public class Example {
Expand All @@ -17,7 +17,7 @@ public static void main(String[] args) {
new BatchDeleteRowsRequestArray()
.data(
Collections.singletonList(
new TableRowResourceIdentifier()
new BatchDeleteRowsRequestData()
.id("primary_key_value")
.type(TableRowResourceDataType.ROW)));

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
Loading
Loading