Skip to content

Commit 6f812ac

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit a8466ac of spec repo (#4531)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent b7812c9 commit 6f812ac

12 files changed

Lines changed: 325 additions & 8 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 82 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58798,13 +58798,15 @@ components:
5879858798
- token
5879958799
type: object
5880058800
Metric:
58801-
description: Object for a single metric tag configuration.
58801+
description: Object for a single metric.
5880258802
example:
5880358803
id: metric.foo.bar
5880458804
type: metrics
5880558805
properties:
5880658806
id:
5880758807
$ref: "#/components/schemas/MetricName"
58808+
relationships:
58809+
$ref: "#/components/schemas/MetricRelationships"
5880858810
type:
5880958811
$ref: "#/components/schemas/MetricType"
5881058812
type: object
@@ -59341,12 +59343,12 @@ components:
5934159343
description: Object containing the definition of a metric's ingested and indexed volume.
5934259344
properties:
5934359345
indexed_volume:
59344-
description: Indexed volume for the given metric.
59346+
description: Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
5934559347
example: 10
5934659348
format: int64
5934759349
type: integer
5934859350
ingested_volume:
59349-
description: Ingested volume for the given metric.
59351+
description: Estimated average hourly number of ingested time series for the given metric over the last hour. This value is `0` for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
5935059352
example: 20
5935159353
format: int64
5935259354
type: integer
@@ -59523,6 +59525,12 @@ components:
5952359525
format: double
5952459526
type: number
5952559527
type: object
59528+
MetricRelationships:
59529+
description: Relationships for a metric.
59530+
properties:
59531+
metric_volumes:
59532+
$ref: "#/components/schemas/MetricVolumesRelationship"
59533+
type: object
5952659534
MetricResource:
5952759535
description: Metric resource.
5952859536
example: {name: "dummyhost", type: "host"}
@@ -59715,6 +59723,8 @@ components:
5971559723
$ref: "#/components/schemas/MetricTagConfigurationAttributes"
5971659724
id:
5971759725
$ref: "#/components/schemas/MetricName"
59726+
relationships:
59727+
$ref: "#/components/schemas/MetricRelationships"
5971859728
type:
5971959729
$ref: "#/components/schemas/MetricTagConfigurationType"
5972059730
type: object
@@ -59927,6 +59937,20 @@ components:
5992759937
oneOf:
5992859938
- $ref: "#/components/schemas/MetricDistinctVolume"
5992959939
- $ref: "#/components/schemas/MetricIngestedIndexedVolume"
59940+
MetricVolumesRelationship:
59941+
description: Relationship to a metric volume included in the response.
59942+
properties:
59943+
data:
59944+
$ref: "#/components/schemas/MetricVolumesRelationshipData"
59945+
type: object
59946+
MetricVolumesRelationshipData:
59947+
description: Relationship data for a metric volume.
59948+
properties:
59949+
id:
59950+
$ref: "#/components/schemas/MetricName"
59951+
type:
59952+
$ref: "#/components/schemas/MetricIngestedIndexedVolumeType"
59953+
type: object
5993059954
MetricVolumesResponse:
5993159955
description: Response object which includes a single metric's volume.
5993259956
properties:
@@ -59972,6 +59996,11 @@ components:
5997259996
items:
5997359997
$ref: "#/components/schemas/MetricsAndMetricTagConfigurations"
5997459998
type: array
59999+
included:
60000+
description: Array of metric volume resources included when requested with `include=metric_volumes`.
60001+
items:
60002+
$ref: "#/components/schemas/MetricIngestedIndexedVolume"
60003+
type: array
5997560004
links:
5997660005
$ref: "#/components/schemas/MetricsListResponseLinks"
5997760006
meta:
@@ -152443,13 +152472,20 @@ paths:
152443152472
Query parameters use bracket notation (for example, `filter[tags]`, `filter[queried][window][seconds]`). Pass them as standard URL query strings, URL-encoding the brackets if your client does not handle them. For example: `GET /api/v2/metrics?filter[tags]=env:prod&window[seconds]=86400&page[size]=500`.
152444152473
operationId: ListTagConfigurations
152445152474
parameters:
152446-
- description: Only return custom metrics that have been configured with Metrics Without Limits.
152475+
- description: Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits.
152447152476
example: true
152448152477
in: query
152449152478
name: filter[configured]
152450152479
required: false
152451152480
schema:
152452152481
type: boolean
152482+
- description: Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits.
152483+
example: true
152484+
in: query
152485+
name: filter[is_configurable]
152486+
required: false
152487+
schema:
152488+
type: boolean
152453152489
- description: Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
152454152490
example: "app,env"
152455152491
in: query
@@ -152507,6 +152543,20 @@ paths:
152507152543
required: false
152508152544
schema:
152509152545
type: boolean
152546+
- description: Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric.
152547+
example: metric_volumes
152548+
in: query
152549+
name: include
152550+
required: false
152551+
schema:
152552+
type: string
152553+
- description: "Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`)."
152554+
example: "-metric_volumes.indexed_volume"
152555+
in: query
152556+
name: sort
152557+
required: false
152558+
schema:
152559+
type: string
152510152560
- description: |-
152511152561
Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
152512152562
example: 3600
@@ -152548,6 +152598,34 @@ paths:
152548152598
meta:
152549152599
pagination:
152550152600
next_cursor:
152601+
with_metric_volumes:
152602+
value:
152603+
data:
152604+
- id: user.custom.cpu.usage
152605+
relationships:
152606+
metric_volumes:
152607+
data:
152608+
id: user.custom.cpu.usage
152609+
type: metric_volumes
152610+
type: metrics
152611+
- id: user.custom.mem.usage
152612+
relationships:
152613+
metric_volumes:
152614+
data:
152615+
id: user.custom.mem.usage
152616+
type: metric_volumes
152617+
type: metrics
152618+
included:
152619+
- attributes:
152620+
indexed_volume: 1000
152621+
ingested_volume: 456
152622+
id: user.custom.cpu.usage
152623+
type: metric_volumes
152624+
- attributes:
152625+
indexed_volume: 250
152626+
ingested_volume: 1011
152627+
id: user.custom.mem.usage
152628+
type: metric_volumes
152551152629
schema:
152552152630
$ref: "#/components/schemas/MetricsAndMetricTagConfigurationsResponse"
152553152631
description: Success

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11593,6 +11593,10 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
1159311593
type: "boolean",
1159411594
format: "",
1159511595
},
11596+
filterIsConfigurable: {
11597+
type: "boolean",
11598+
format: "",
11599+
},
1159611600
filterTagsConfigured: {
1159711601
type: "string",
1159811602
format: "",
@@ -11621,6 +11625,14 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
1162111625
type: "boolean",
1162211626
format: "",
1162311627
},
11628+
include: {
11629+
type: "string",
11630+
format: "",
11631+
},
11632+
sort: {
11633+
type: "string",
11634+
format: "",
11635+
},
1162411636
windowSeconds: {
1162511637
type: "number",
1162611638
format: "int64",

services/metrics/src/v2/MetricsApi.ts

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -839,13 +839,16 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
839839

840840
public async listTagConfigurations(
841841
filterConfigured?: boolean,
842+
filterIsConfigurable?: boolean,
842843
filterTagsConfigured?: string,
843844
filterMetricType?: MetricTagConfigurationMetricTypeCategory,
844845
filterIncludePercentiles?: boolean,
845846
filterQueried?: boolean,
846847
filterQueriedWindowSeconds?: number,
847848
filterTags?: string,
848849
filterRelatedAssets?: boolean,
850+
include?: string,
851+
sort?: string,
849852
windowSeconds?: number,
850853
pageSize?: number,
851854
pageCursor?: string,
@@ -882,6 +885,13 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
882885
"",
883886
);
884887
}
888+
if (filterIsConfigurable !== undefined) {
889+
requestContext.setQueryParam(
890+
"filter[is_configurable]",
891+
serialize(filterIsConfigurable, TypingInfo, "boolean", ""),
892+
"",
893+
);
894+
}
885895
if (filterTagsConfigured !== undefined) {
886896
requestContext.setQueryParam(
887897
"filter[tags_configured]",
@@ -936,6 +946,20 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory {
936946
"",
937947
);
938948
}
949+
if (include !== undefined) {
950+
requestContext.setQueryParam(
951+
"include",
952+
serialize(include, TypingInfo, "string", ""),
953+
"",
954+
);
955+
}
956+
if (sort !== undefined) {
957+
requestContext.setQueryParam(
958+
"sort",
959+
serialize(sort, TypingInfo, "string", ""),
960+
"",
961+
);
962+
}
939963
if (windowSeconds !== undefined) {
940964
requestContext.setQueryParam(
941965
"window[seconds]",
@@ -3280,10 +3304,15 @@ export interface MetricsApiListTagConfigurationByNameRequest {
32803304

32813305
export interface MetricsApiListTagConfigurationsRequest {
32823306
/**
3283-
* Only return custom metrics that have been configured with Metrics Without Limits.
3307+
* Only return custom metrics that have been configured (`true`) or not configured (`false`) with Metrics Without Limits.
32843308
* @type boolean
32853309
*/
32863310
filterConfigured?: boolean;
3311+
/**
3312+
* Only return metrics that are eligible (`true`) or ineligible (`false`) for configuration with Metrics Without Limits.
3313+
* @type boolean
3314+
*/
3315+
filterIsConfigurable?: boolean;
32873316
/**
32883317
* Only return metrics that have the given tag key(s) in their Metrics Without Limits configuration (included or excluded).
32893318
* @type string
@@ -3319,6 +3348,16 @@ export interface MetricsApiListTagConfigurationsRequest {
33193348
* @type boolean
33203349
*/
33213350
filterRelatedAssets?: boolean;
3351+
/**
3352+
* Include related resources in the response. Set to `metric_volumes` to include indexed and ingested volume counts for each metric.
3353+
* @type string
3354+
*/
3355+
include?: string;
3356+
/**
3357+
* Sort results by metric volume. Prefix a key with `-` for descending order. Supported keys: `metric_volumes.indexed_volume`, `metric_volumes.ingested_volume`, `metric_volumes.indexed_volume_delta`, `metric_volumes.ingested_volume_delta`. Requires a paginated request (`page[size]` or `page[cursor]`).
3358+
* @type string
3359+
*/
3360+
sort?: string;
33223361
/**
33233362
* Only return metrics that have been actively reporting in the specified window. The default value is 3600 seconds (1 hour), the maximum value is 2,592,000 seconds (30 days), and the minimum value is 1 second.
33243363
* @type number
@@ -3883,13 +3922,16 @@ export class MetricsApi {
38833922
): Promise<MetricsAndMetricTagConfigurationsResponse> {
38843923
const requestContextPromise = this.requestFactory.listTagConfigurations(
38853924
param.filterConfigured,
3925+
param.filterIsConfigurable,
38863926
param.filterTagsConfigured,
38873927
param.filterMetricType,
38883928
param.filterIncludePercentiles,
38893929
param.filterQueried,
38903930
param.filterQueriedWindowSeconds,
38913931
param.filterTags,
38923932
param.filterRelatedAssets,
3933+
param.include,
3934+
param.sort,
38933935
param.windowSeconds,
38943936
param.pageSize,
38953937
param.pageCursor,
@@ -3919,13 +3961,16 @@ export class MetricsApi {
39193961
while (true) {
39203962
const requestContext = await this.requestFactory.listTagConfigurations(
39213963
param.filterConfigured,
3964+
param.filterIsConfigurable,
39223965
param.filterTagsConfigured,
39233966
param.filterMetricType,
39243967
param.filterIncludePercentiles,
39253968
param.filterQueried,
39263969
param.filterQueriedWindowSeconds,
39273970
param.filterTags,
39283971
param.filterRelatedAssets,
3972+
param.include,
3973+
param.sort,
39293974
param.windowSeconds,
39303975
param.pageSize,
39313976
param.pageCursor,

services/metrics/src/v2/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export { MetricOrigin } from "./models/MetricOrigin";
116116
export { MetricPaginationMeta } from "./models/MetricPaginationMeta";
117117
export { MetricPayload } from "./models/MetricPayload";
118118
export { MetricPoint } from "./models/MetricPoint";
119+
export { MetricRelationships } from "./models/MetricRelationships";
119120
export { MetricResource } from "./models/MetricResource";
120121
export { MetricsAggregator } from "./models/MetricsAggregator";
121122
export { MetricsAndMetricTagConfigurations } from "./models/MetricsAndMetricTagConfigurations";
@@ -148,6 +149,8 @@ export { MetricTagConfigurationUpdateData } from "./models/MetricTagConfiguratio
148149
export { MetricTagConfigurationUpdateRequest } from "./models/MetricTagConfigurationUpdateRequest";
149150
export { MetricType } from "./models/MetricType";
150151
export { MetricVolumes } from "./models/MetricVolumes";
152+
export { MetricVolumesRelationship } from "./models/MetricVolumesRelationship";
153+
export { MetricVolumesRelationshipData } from "./models/MetricVolumesRelationshipData";
151154
export { MetricVolumesResponse } from "./models/MetricVolumesResponse";
152155
export { ProcessDataSource } from "./models/ProcessDataSource";
153156
export { ProcessScalarQuery } from "./models/ProcessScalarQuery";

services/metrics/src/v2/models/Metric.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3+
import { MetricRelationships } from "./MetricRelationships";
34
import { MetricType } from "./MetricType";
45

56
/**
6-
* Object for a single metric tag configuration.
7+
* Object for a single metric.
78
*/
89
export class Metric {
910
/**
1011
* The metric name for this resource.
1112
*/
1213
"id"?: string;
14+
/**
15+
* Relationships for a metric.
16+
*/
17+
"relationships"?: MetricRelationships;
1318
/**
1419
* The metric resource type.
1520
*/
@@ -33,6 +38,10 @@ export class Metric {
3338
baseName: "id",
3439
type: "string",
3540
},
41+
relationships: {
42+
baseName: "relationships",
43+
type: "MetricRelationships",
44+
},
3645
type: {
3746
baseName: "type",
3847
type: "MetricType",

services/metrics/src/v2/models/MetricIngestedIndexedVolumeAttributes.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import { AttributeTypeMap } from "@datadog/datadog-api-client";
55
*/
66
export class MetricIngestedIndexedVolumeAttributes {
77
/**
8-
* Indexed volume for the given metric.
8+
* Estimated average hourly number of indexed time series for the given metric over the last hour. For organizations on Metric Name Pricing, this represents the estimated sum of indexed data points over the last hour.
99
*/
1010
"indexedVolume"?: number;
1111
/**
12-
* Ingested volume for the given metric.
12+
* Estimated average hourly number of ingested time series for the given metric over the last hour. This value is `0` for metrics not configured with Metrics Without Limits. For organizations on Metric Name Pricing, this represents the estimated sum of ingested data points over the last hour.
1313
*/
1414
"ingestedVolume"?: number;
1515
/**

0 commit comments

Comments
 (0)