Skip to content

Commit a2f3cb6

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
[Cloud Network Monitoring API] Update text for response (#585)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 038af9b commit a2f3cb6

9 files changed

+58
-41
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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-03 09:26:26.183125",
8-
"spec_repo_commit": "f1a43647"
7+
"regenerated": "2025-04-03 16:27:50.158184",
8+
"spec_repo_commit": "4468962d"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-03 09:26:26.198748",
13-
"spec_repo_commit": "f1a43647"
12+
"regenerated": "2025-04-03 16:27:50.174263",
13+
"spec_repo_commit": "4468962d"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30212,7 +30212,7 @@ components:
3021230212
type: string
3021330213
type: object
3021430214
SingleAggregatedConnectionResponseArray:
30215-
description: The definition of `SingleAggregatedConnectionResponseArray` object.
30215+
description: List of aggregated connections.
3021630216
example:
3021730217
data:
3021830218
- attributes:
@@ -30236,25 +30236,25 @@ components:
3023630236
type: aggregated_connection
3023730237
properties:
3023830238
data:
30239-
description: The `SingleAggregatedConnectionResponseArray` `data`.
30239+
description: Array of aggregated connection objects.
3024030240
items:
3024130241
$ref: '#/components/schemas/SingleAggregatedConnectionResponseData'
3024230242
type: array
3024330243
type: object
3024430244
SingleAggregatedConnectionResponseData:
30245-
description: The definition of `SingleAggregatedConnectionResponseData` object.
30245+
description: Object describing an aggregated connection.
3024630246
properties:
3024730247
attributes:
3024830248
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes'
3024930249
id:
30250-
description: The `SingleAggregatedConnectionResponseData` `id`.
30250+
description: A unique identifier for the aggregated connection based on
30251+
the group by values.
3025130252
type: string
3025230253
type:
3025330254
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType'
3025430255
type: object
3025530256
SingleAggregatedConnectionResponseDataAttributes:
30256-
description: The definition of `SingleAggregatedConnectionResponseDataAttributes`
30257-
object.
30257+
description: Attributes for an aggregated connection.
3025830258
properties:
3025930259
bytes_sent_by_client:
3026030260
description: The total number of bytes sent by the client over the given
@@ -30268,10 +30268,11 @@ components:
3026830268
type: integer
3026930269
group_bys:
3027030270
additionalProperties:
30271+
description: The values for each group by.
3027130272
items:
3027230273
type: string
3027330274
type: array
30274-
description: The `attributes` `group_bys`.
30275+
description: The key, value pairs for each group by.
3027530276
type: object
3027630277
packets_sent_by_client:
3027730278
description: The total number of packets sent by the client over the given
@@ -30322,9 +30323,7 @@ components:
3032230323
type: object
3032330324
SingleAggregatedConnectionResponseDataType:
3032430325
default: aggregated_connection
30325-
description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
30326-
30327-
default: `aggregated_connection`'
30326+
description: Aggregated connection resource type.
3032830327
enum:
3032930328
- aggregated_connection
3033030329
type: string
@@ -44426,22 +44425,22 @@ paths:
4442644425
- Network Device Monitoring
4442744426
/api/v2/network/connections/aggregate:
4442844427
get:
44429-
description: Get aggregated connections
44428+
description: Get all aggregated connections.
4443044429
operationId: GetAggregatedConnections
4443144430
parameters:
4443244431
- description: Unix timestamp (number of seconds since epoch) of the start of
4443344432
the query window. If not provided, the start of the query window is 15 minutes
44434-
before the "to" timestamp. If neither "from" nor "to" are provided, the
44435-
query window is [now - 15m, now].
44433+
before the `to` timestamp. If neither `from` nor `to` are provided, the
44434+
query window is `[now - 15m, now]`.
4443644435
in: query
4443744436
name: from
4443844437
schema:
4443944438
format: int64
4444044439
type: integer
4444144440
- description: Unix timestamp (number of seconds since epoch) of the end of
4444244441
the query window. If not provided, the end of the query window is the current
44443-
time. If neither "from" nor "to" are provided, the query window is [now
44444-
- 15m, now].
44442+
time. If neither `from` nor `to` are provided, the query window is `[now
44443+
- 15m, now]`.
4444544444
in: query
4444644445
name: to
4444744446
schema:
@@ -44478,7 +44477,7 @@ paths:
4447844477
$ref: '#/components/responses/BadRequestResponse'
4447944478
'429':
4448044479
$ref: '#/components/responses/TooManyRequestsResponse'
44481-
summary: Get aggregated connections
44480+
summary: Get all aggregated connections
4448244481
tags:
4448344482
- Cloud Network Monitoring
4448444483
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

examples/v2_cloud-network-monitoring_GetAggregatedConnections.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Get aggregated connections returns "OK" response
1+
// Get all aggregated connections returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_network_monitoring::CloudNetworkMonitoringAPI;
44
use datadog_api_client::datadogV2::api_cloud_network_monitoring::GetAggregatedConnectionsOptionalParams;
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Get aggregated connections returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_network_monitoring::CloudNetworkMonitoringAPI;
4+
use datadog_api_client::datadogV2::api_cloud_network_monitoring::GetAggregatedConnectionsOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.GetAggregatedConnections", true);
10+
let api = CloudNetworkMonitoringAPI::with_config(configuration);
11+
let resp = api
12+
.get_aggregated_connections(GetAggregatedConnectionsOptionalParams::default())
13+
.await;
14+
if let Ok(value) = resp {
15+
println!("{:#?}", value);
16+
} else {
17+
println!("{:#?}", resp.unwrap_err());
18+
}
19+
}

src/datadogV2/api/api_cloud_network_monitoring.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ use serde::{Deserialize, Serialize};
1010
#[non_exhaustive]
1111
#[derive(Clone, Default, Debug)]
1212
pub struct GetAggregatedConnectionsOptionalParams {
13-
/// Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the "to" timestamp. If neither "from" nor "to" are provided, the query window is [now - 15m, now].
13+
/// Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`.
1414
pub from: Option<i64>,
15-
/// Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither "from" nor "to" are provided, the query window is [now - 15m, now].
15+
/// Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`.
1616
pub to: Option<i64>,
1717
/// Comma-separated list of fields to group connections by.
1818
pub group_by: Option<String>,
@@ -23,12 +23,12 @@ pub struct GetAggregatedConnectionsOptionalParams {
2323
}
2424

2525
impl GetAggregatedConnectionsOptionalParams {
26-
/// Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the "to" timestamp. If neither "from" nor "to" are provided, the query window is [now - 15m, now].
26+
/// Unix timestamp (number of seconds since epoch) of the start of the query window. If not provided, the start of the query window is 15 minutes before the `to` timestamp. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`.
2727
pub fn from(mut self, value: i64) -> Self {
2828
self.from = Some(value);
2929
self
3030
}
31-
/// Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither "from" nor "to" are provided, the query window is [now - 15m, now].
31+
/// Unix timestamp (number of seconds since epoch) of the end of the query window. If not provided, the end of the query window is the current time. If neither `from` nor `to` are provided, the query window is `[now - 15m, now]`.
3232
pub fn to(mut self, value: i64) -> Self {
3333
self.to = Some(value);
3434
self
@@ -123,7 +123,7 @@ impl CloudNetworkMonitoringAPI {
123123
Self { config, client }
124124
}
125125

126-
/// Get aggregated connections
126+
/// Get all aggregated connections.
127127
pub async fn get_aggregated_connections(
128128
&self,
129129
params: GetAggregatedConnectionsOptionalParams,
@@ -145,7 +145,7 @@ impl CloudNetworkMonitoringAPI {
145145
}
146146
}
147147

148-
/// Get aggregated connections
148+
/// Get all aggregated connections.
149149
pub async fn get_aggregated_connections_with_http_info(
150150
&self,
151151
params: GetAggregatedConnectionsOptionalParams,

src/datadogV2/model/model_single_aggregated_connection_response_array.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// The definition of `SingleAggregatedConnectionResponseArray` object.
9+
/// List of aggregated connections.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct SingleAggregatedConnectionResponseArray {
14-
/// The `SingleAggregatedConnectionResponseArray` `data`.
14+
/// Array of aggregated connection objects.
1515
#[serde(rename = "data")]
1616
pub data: Option<Vec<crate::datadogV2::model::SingleAggregatedConnectionResponseData>>,
1717
#[serde(flatten)]

src/datadogV2/model/model_single_aggregated_connection_response_data.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,19 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// The definition of `SingleAggregatedConnectionResponseData` object.
9+
/// Object describing an aggregated connection.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
1313
pub struct SingleAggregatedConnectionResponseData {
14-
/// The definition of `SingleAggregatedConnectionResponseDataAttributes` object.
14+
/// Attributes for an aggregated connection.
1515
#[serde(rename = "attributes")]
1616
pub attributes:
1717
Option<crate::datadogV2::model::SingleAggregatedConnectionResponseDataAttributes>,
18-
/// The `SingleAggregatedConnectionResponseData` `id`.
18+
/// A unique identifier for the aggregated connection based on the group by values.
1919
#[serde(rename = "id")]
2020
pub id: Option<String>,
21-
/// Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
22-
/// default: `aggregated_connection`
21+
/// Aggregated connection resource type.
2322
#[serde(rename = "type")]
2423
pub type_: Option<crate::datadogV2::model::SingleAggregatedConnectionResponseDataType>,
2524
#[serde(flatten)]

src/datadogV2/model/model_single_aggregated_connection_response_data_attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use serde::{Deserialize, Deserializer, Serialize};
66
use serde_with::skip_serializing_none;
77
use std::fmt::{self, Formatter};
88

9-
/// The definition of `SingleAggregatedConnectionResponseDataAttributes` object.
9+
/// Attributes for an aggregated connection.
1010
#[non_exhaustive]
1111
#[skip_serializing_none]
1212
#[derive(Clone, Debug, PartialEq, Serialize)]
@@ -17,7 +17,7 @@ pub struct SingleAggregatedConnectionResponseDataAttributes {
1717
/// The total number of bytes sent by the server over the given period.
1818
#[serde(rename = "bytes_sent_by_server")]
1919
pub bytes_sent_by_server: Option<i64>,
20-
/// The `attributes` `group_bys`.
20+
/// The key, value pairs for each group by.
2121
#[serde(rename = "group_bys")]
2222
pub group_bys: Option<std::collections::BTreeMap<String, Vec<String>>>,
2323
/// The total number of packets sent by the client over the given period.

tests/scenarios/features/v2/cloud_network_monitoring.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@ Feature: Cloud Network Monitoring
1212
And operation "GetAggregatedConnections" enabled
1313
And new "GetAggregatedConnections" request
1414

15-
@generated @skip @team:Datadog/networks
16-
Scenario: Get aggregated connections returns "Bad Request" response
17-
When the request is sent
18-
Then the response status is 400 Bad Request
19-
2015
@team:Datadog/networks
2116
Scenario: Get aggregated connections returns "OK" response
2217
When the request is sent
@@ -27,3 +22,8 @@ Feature: Cloud Network Monitoring
2722
Given request contains "limit" parameter with value 6000
2823
When the request is sent
2924
Then the response status is 400 Bad Request
25+
26+
@generated @skip @team:Datadog/networks
27+
Scenario: Get all aggregated connections returns "OK" response
28+
When the request is sent
29+
Then the response status is 200 OK

0 commit comments

Comments
 (0)