Skip to content

Commit 9ceecfe

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 71455c7c of spec repo
1 parent 6e3facd commit 9ceecfe

12 files changed

+78
-253
lines changed

.apigentools-info

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-04-14 16:33:06.797040",
8-
"spec_repo_commit": "c0287407"
7+
"regenerated": "2025-04-14 20:12:03.522931",
8+
"spec_repo_commit": "71455c7c"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-14 16:33:06.813573",
13-
"spec_repo_commit": "c0287407"
12+
"regenerated": "2025-04-14 20:12:03.539908",
13+
"spec_repo_commit": "71455c7c"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+14-82
Original file line numberDiff line numberDiff line change
@@ -19827,47 +19827,6 @@ components:
1982719827
- time
1982819828
- space
1982919829
type: object
19830-
MetricCustomAggregations:
19831-
description: 'A list of queryable aggregation combinations for a count, rate,
19832-
or gauge metric.
19833-
19834-
By default, count and rate metrics require the (time: sum, space: sum) aggregation
19835-
and
19836-
19837-
Gauge metrics require the (time: avg, space: avg) aggregation.
19838-
19839-
Additional time & space combinations are also available:
19840-
19841-
19842-
- time: avg, space: avg
19843-
19844-
- time: avg, space: max
19845-
19846-
- time: avg, space: min
19847-
19848-
- time: avg, space: sum
19849-
19850-
- time: count, space: sum
19851-
19852-
- time: max, space: max
19853-
19854-
- time: min, space: min
19855-
19856-
- time: sum, space: avg
19857-
19858-
- time: sum, space: sum
19859-
19860-
19861-
Can only be applied to non_distribution metrics that have a `metric_type`
19862-
of `count`, `rate`, or `gauge`.'
19863-
example:
19864-
- space: sum
19865-
time: sum
19866-
- space: sum
19867-
time: count
19868-
items:
19869-
$ref: '#/components/schemas/MetricCustomAggregation'
19870-
type: array
1987119830
MetricCustomSpaceAggregation:
1987219831
description: A space aggregation for use in query.
1987319832
enum:
@@ -20371,9 +20330,6 @@ components:
2037120330
description: Object for a single metric tag configuration.
2037220331
example:
2037320332
attributes:
20374-
aggregations:
20375-
- space: avg
20376-
time: avg
2037720333
created_at: '2020-03-25T09:48:37.463835Z'
2037820334
metric_type: gauge
2037920335
modified_at: '2020-04-25T09:48:37.463835Z'
@@ -20394,8 +20350,6 @@ components:
2039420350
description: Object containing the definition of a metric tag configuration
2039520351
attributes.
2039620352
properties:
20397-
aggregations:
20398-
$ref: '#/components/schemas/MetricCustomAggregations'
2039920353
created_at:
2040020354
description: Timestamp when the tag configuration was created.
2040120355
example: '2020-03-25T09:48:37.463835Z'
@@ -20438,8 +20392,6 @@ components:
2043820392
description: Object containing the definition of a metric tag configuration
2043920393
to be created.
2044020394
properties:
20441-
aggregations:
20442-
$ref: '#/components/schemas/MetricCustomAggregations'
2044320395
exclude_tags_mode:
2044420396
description: 'When set to true, the configuration will exclude the configured
2044520397
tags and include any other submitted tags.
@@ -20549,8 +20501,6 @@ components:
2054920501
description: Object containing the definition of a metric tag configuration
2055020502
to be updated.
2055120503
properties:
20552-
aggregations:
20553-
$ref: '#/components/schemas/MetricCustomAggregations'
2055420504
exclude_tags_mode:
2055520505
description: 'When set to true, the configuration will exclude the configured
2055620506
tags and include any other submitted tags.
@@ -45229,9 +45179,8 @@ paths:
4522945179
- metric_tags_write
4523045180
/api/v2/metrics/{metric_name}/active-configurations:
4523145181
get:
45232-
description: List tags and aggregations that are actively queried on dashboards,
45233-
notebooks, monitors, the Metrics Explorer, and using the API for a given metric
45234-
name.
45182+
description: List tags that are actively queried on dashboards, notebooks, monitors,
45183+
the Metrics Explorer, and using the API for a given metric name.
4523545184
operationId: ListActiveMetricConfigurations
4523645185
parameters:
4523745186
- $ref: '#/components/parameters/MetricName'
@@ -45277,7 +45226,7 @@ paths:
4527745226
schema:
4527845227
$ref: '#/components/schemas/APIErrorResponse'
4527945228
description: Too Many Requests
45280-
summary: List active tags and aggregations
45229+
summary: List active tags
4528145230
tags:
4528245231
- Metrics
4528345232
x-permission:
@@ -45381,9 +45330,8 @@ paths:
4538145330
- Metrics
4538245331
/api/v2/metrics/{metric_name}/estimate:
4538345332
get:
45384-
description: Returns the estimated cardinality for a metric with a given tag,
45385-
percentile and number of aggregations configuration using Metrics without
45386-
Limits™.
45333+
description: Returns the estimated cardinality for a metric with a given tag
45334+
and percentile configuration using Metrics without Limits™.
4538745335
operationId: EstimateMetricsOutputSeries
4538845336
parameters:
4538945337
- $ref: '#/components/parameters/MetricName'
@@ -45405,16 +45353,6 @@ paths:
4540545353
maximum: 2147483647
4540645354
minimum: 49
4540745355
type: integer
45408-
- description: The number of aggregations that a `count`, `rate`, or `gauge`
45409-
metric is configured to use. Max number of aggregation combos is 9.
45410-
example: 1
45411-
in: query
45412-
name: filter[num_aggregations]
45413-
required: false
45414-
schema:
45415-
format: int32
45416-
maximum: 9
45417-
type: integer
4541845356
- description: A boolean, for distribution metrics only, to estimate cardinality
4541945357
if the metric includes additional percentile aggregators.
4542045358
example: true
@@ -45550,13 +45488,10 @@ paths:
4555045488
- metrics_read
4555145489
patch:
4555245490
description: 'Update the tag configuration of a metric or percentile aggregations
45553-
of a distribution metric or custom aggregations
45491+
of a distribution metric. By setting `exclude_tags_mode`
4555445492

45555-
of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true
45556-
the behavior is changed
45557-
45558-
from an allow-list to a deny-list, and tags in the defined list will not be
45559-
queryable.
45493+
to true the behavior is changed from an allow-list to a deny-list, and tags
45494+
in the defined list will not be queryable.
4556045495

4556145496
Can only be used with application keys from users with the `Manage Tags for
4556245497
Metrics` permission. This endpoint requires
@@ -45614,17 +45549,14 @@ paths:
4561445549
description: 'Create and define a list of queryable tag keys for an existing
4561545550
count/gauge/rate/distribution metric.
4561645551

45617-
Optionally, include percentile aggregations on any distribution metric or
45618-
configure custom aggregations
45619-
45620-
on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true
45621-
the behavior is changed
45552+
Optionally, include percentile aggregations on any distribution metric. By
45553+
setting `exclude_tags_mode`
4562245554

45623-
from an allow-list to a deny-list, and tags in the defined list will not be
45624-
queryable.
45555+
to true the behavior is changed from an allow-list to a deny-list, and tags
45556+
in the defined list will not
4562545557

45626-
Can only be used with application keys of users with the `Manage Tags for
45627-
Metrics` permission.'
45558+
be queryable. Can only be used with application keys of users with the `Manage
45559+
Tags for Metrics` permission.'
4562845560
operationId: CreateTagConfiguration
4562945561
parameters:
4563045562
- $ref: '#/components/parameters/MetricName'

examples/v2_metrics_EstimateMetricsOutputSeries.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ async fn main() {
1111
.estimate_metrics_output_series(
1212
"system.cpu.idle".to_string(),
1313
EstimateMetricsOutputSeriesOptionalParams::default()
14-
.filter_groups("app,host".to_string())
15-
.filter_num_aggregations(4),
14+
.filter_groups("app,host".to_string()),
1615
)
1716
.await;
1817
if let Ok(value) = resp {

examples/v2_metrics_ListActiveMetricConfigurations.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// List active tags and aggregations returns "Success" response
1+
// List active tags returns "Success" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_metrics::ListActiveMetricConfigurationsOptionalParams;
44
use datadog_api_client::datadogV2::api_metrics::MetricsAPI;
@@ -9,7 +9,7 @@ async fn main() {
99
let api = MetricsAPI::with_config(configuration);
1010
let resp = api
1111
.list_active_metric_configurations(
12-
"static_test_metric_donotdelete".to_string(),
12+
"metric_name".to_string(),
1313
ListActiveMetricConfigurationsOptionalParams::default(),
1414
)
1515
.await;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// List active tags and aggregations returns "Success" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_metrics::ListActiveMetricConfigurationsOptionalParams;
4+
use datadog_api_client::datadogV2::api_metrics::MetricsAPI;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let configuration = datadog::Configuration::new();
9+
let api = MetricsAPI::with_config(configuration);
10+
let resp = api
11+
.list_active_metric_configurations(
12+
"static_test_metric_donotdelete".to_string(),
13+
ListActiveMetricConfigurationsOptionalParams::default(),
14+
)
15+
.await;
16+
if let Ok(value) = resp {
17+
println!("{:#?}", value);
18+
} else {
19+
println!("{:#?}", resp.unwrap_err());
20+
}
21+
}

src/datadogV2/api/api_metrics.rs

+14-30
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ pub struct EstimateMetricsOutputSeriesOptionalParams {
2020
pub filter_groups: Option<String>,
2121
/// The number of hours of look back (from now) to estimate cardinality with. If unspecified, it defaults to 0 hours.
2222
pub filter_hours_ago: Option<i32>,
23-
/// The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9.
24-
pub filter_num_aggregations: Option<i32>,
2523
/// A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
2624
pub filter_pct: Option<bool>,
2725
/// A window, in hours, from the look back to estimate cardinality with. The minimum and default is 1 hour.
@@ -39,11 +37,6 @@ impl EstimateMetricsOutputSeriesOptionalParams {
3937
self.filter_hours_ago = Some(value);
4038
self
4139
}
42-
/// The number of aggregations that a `count`, `rate`, or `gauge` metric is configured to use. Max number of aggregation combos is 9.
43-
pub fn filter_num_aggregations(mut self, value: i32) -> Self {
44-
self.filter_num_aggregations = Some(value);
45-
self
46-
}
4740
/// A boolean, for distribution metrics only, to estimate cardinality if the metric includes additional percentile aggregators.
4841
pub fn filter_pct(mut self, value: bool) -> Self {
4942
self.filter_pct = Some(value);
@@ -557,10 +550,9 @@ impl MetricsAPI {
557550
}
558551

559552
/// Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric.
560-
/// Optionally, include percentile aggregations on any distribution metric or configure custom aggregations
561-
/// on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
562-
/// from an allow-list to a deny-list, and tags in the defined list will not be queryable.
563-
/// Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
553+
/// Optionally, include percentile aggregations on any distribution metric. By setting `exclude_tags_mode`
554+
/// to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not
555+
/// be queryable. Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
564556
pub async fn create_tag_configuration(
565557
&self,
566558
metric_name: String,
@@ -587,10 +579,9 @@ impl MetricsAPI {
587579
}
588580

589581
/// Create and define a list of queryable tag keys for an existing count/gauge/rate/distribution metric.
590-
/// Optionally, include percentile aggregations on any distribution metric or configure custom aggregations
591-
/// on any count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
592-
/// from an allow-list to a deny-list, and tags in the defined list will not be queryable.
593-
/// Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
582+
/// Optionally, include percentile aggregations on any distribution metric. By setting `exclude_tags_mode`
583+
/// to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not
584+
/// be queryable. Can only be used with application keys of users with the `Manage Tags for Metrics` permission.
594585
pub async fn create_tag_configuration_with_http_info(
595586
&self,
596587
metric_name: String,
@@ -980,7 +971,7 @@ impl MetricsAPI {
980971
}
981972
}
982973

983-
/// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits&trade;.
974+
/// Returns the estimated cardinality for a metric with a given tag and percentile configuration using Metrics without Limits&trade;.
984975
pub async fn estimate_metrics_output_series(
985976
&self,
986977
metric_name: String,
@@ -1006,7 +997,7 @@ impl MetricsAPI {
1006997
}
1007998
}
1008999

1009-
/// Returns the estimated cardinality for a metric with a given tag, percentile and number of aggregations configuration using Metrics without Limits&trade;.
1000+
/// Returns the estimated cardinality for a metric with a given tag and percentile configuration using Metrics without Limits&trade;.
10101001
pub async fn estimate_metrics_output_series_with_http_info(
10111002
&self,
10121003
metric_name: String,
@@ -1021,7 +1012,6 @@ impl MetricsAPI {
10211012
// unbox and build optional parameters
10221013
let filter_groups = params.filter_groups;
10231014
let filter_hours_ago = params.filter_hours_ago;
1024-
let filter_num_aggregations = params.filter_num_aggregations;
10251015
let filter_pct = params.filter_pct;
10261016
let filter_timespan_h = params.filter_timespan_h;
10271017

@@ -1043,10 +1033,6 @@ impl MetricsAPI {
10431033
local_req_builder =
10441034
local_req_builder.query(&[("filter[hours_ago]", &local_query_param.to_string())]);
10451035
};
1046-
if let Some(ref local_query_param) = filter_num_aggregations {
1047-
local_req_builder = local_req_builder
1048-
.query(&[("filter[num_aggregations]", &local_query_param.to_string())]);
1049-
};
10501036
if let Some(ref local_query_param) = filter_pct {
10511037
local_req_builder =
10521038
local_req_builder.query(&[("filter[pct]", &local_query_param.to_string())]);
@@ -1122,7 +1108,7 @@ impl MetricsAPI {
11221108
}
11231109
}
11241110

1125-
/// List tags and aggregations that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
1111+
/// List tags that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
11261112
pub async fn list_active_metric_configurations(
11271113
&self,
11281114
metric_name: String,
@@ -1148,7 +1134,7 @@ impl MetricsAPI {
11481134
}
11491135
}
11501136

1151-
/// List tags and aggregations that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
1137+
/// List tags that are actively queried on dashboards, notebooks, monitors, the Metrics Explorer, and using the API for a given metric name.
11521138
pub async fn list_active_metric_configurations_with_http_info(
11531139
&self,
11541140
metric_name: String,
@@ -2400,9 +2386,8 @@ impl MetricsAPI {
24002386
}
24012387
}
24022388

2403-
/// Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
2404-
/// of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
2405-
/// from an allow-list to a deny-list, and tags in the defined list will not be queryable.
2389+
/// Update the tag configuration of a metric or percentile aggregations of a distribution metric. By setting `exclude_tags_mode`
2390+
/// to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not be queryable.
24062391
/// Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires
24072392
/// a tag configuration to be created first.
24082393
pub async fn update_tag_configuration(
@@ -2430,9 +2415,8 @@ impl MetricsAPI {
24302415
}
24312416
}
24322417

2433-
/// Update the tag configuration of a metric or percentile aggregations of a distribution metric or custom aggregations
2434-
/// of a count, rate, or gauge metric. By setting `exclude_tags_mode` to true the behavior is changed
2435-
/// from an allow-list to a deny-list, and tags in the defined list will not be queryable.
2418+
/// Update the tag configuration of a metric or percentile aggregations of a distribution metric. By setting `exclude_tags_mode`
2419+
/// to true the behavior is changed from an allow-list to a deny-list, and tags in the defined list will not be queryable.
24362420
/// Can only be used with application keys from users with the `Manage Tags for Metrics` permission. This endpoint requires
24372421
/// a tag configuration to be created first.
24382422
pub async fn update_tag_configuration_with_http_info(

src/datadogV2/model/mod.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -2246,12 +2246,6 @@ pub mod model_metric_tag_configuration;
22462246
pub use self::model_metric_tag_configuration::MetricTagConfiguration;
22472247
pub mod model_metric_tag_configuration_attributes;
22482248
pub use self::model_metric_tag_configuration_attributes::MetricTagConfigurationAttributes;
2249-
pub mod model_metric_custom_aggregation;
2250-
pub use self::model_metric_custom_aggregation::MetricCustomAggregation;
2251-
pub mod model_metric_custom_space_aggregation;
2252-
pub use self::model_metric_custom_space_aggregation::MetricCustomSpaceAggregation;
2253-
pub mod model_metric_custom_time_aggregation;
2254-
pub use self::model_metric_custom_time_aggregation::MetricCustomTimeAggregation;
22552249
pub mod model_metric_tag_configuration_metric_types;
22562250
pub use self::model_metric_tag_configuration_metric_types::MetricTagConfigurationMetricTypes;
22572251
pub mod model_metric_tag_configuration_type;
@@ -2292,6 +2286,12 @@ pub mod model_metric_suggested_tags_and_aggregations;
22922286
pub use self::model_metric_suggested_tags_and_aggregations::MetricSuggestedTagsAndAggregations;
22932287
pub mod model_metric_suggested_tags_attributes;
22942288
pub use self::model_metric_suggested_tags_attributes::MetricSuggestedTagsAttributes;
2289+
pub mod model_metric_custom_aggregation;
2290+
pub use self::model_metric_custom_aggregation::MetricCustomAggregation;
2291+
pub mod model_metric_custom_space_aggregation;
2292+
pub use self::model_metric_custom_space_aggregation::MetricCustomSpaceAggregation;
2293+
pub mod model_metric_custom_time_aggregation;
2294+
pub use self::model_metric_custom_time_aggregation::MetricCustomTimeAggregation;
22952295
pub mod model_metric_active_configuration_type;
22962296
pub use self::model_metric_active_configuration_type::MetricActiveConfigurationType;
22972297
pub mod model_metric_all_tags_response;

0 commit comments

Comments
 (0)