Skip to content

Commit 3da7b2c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add specs for Cloud Network Monitoring API (#580)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 2a628b4 commit 3da7b2c

19 files changed

+1271
-4
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-03-31 17:39:54.402366",
8-
"spec_repo_commit": "3826157e"
7+
"regenerated": "2025-04-01 20:55:50.931392",
8+
"spec_repo_commit": "f629f10b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-03-31 17:39:54.418256",
13-
"spec_repo_commit": "3826157e"
12+
"regenerated": "2025-04-01 20:55:50.947165",
13+
"spec_repo_commit": "f629f10b"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

+185
Original file line numberDiff line numberDiff line change
@@ -30188,6 +30188,125 @@ components:
3018830188
description: Link to the Incident created on ServiceNow
3018930189
type: string
3019030190
type: object
30191+
SingleAggregatedConnectionResponseArray:
30192+
description: The definition of `SingleAggregatedConnectionResponseArray` object.
30193+
example:
30194+
data:
30195+
- attributes:
30196+
bytes_sent_by_client: 100
30197+
bytes_sent_by_server: 200
30198+
group_bys:
30199+
client_team:
30200+
- networks
30201+
server_service:
30202+
- hucklebuck
30203+
packets_sent_by_client: 10
30204+
packets_sent_by_server: 20
30205+
rtt_micro_seconds: 800
30206+
tcp_closed_connections: 30
30207+
tcp_established_connections: 40
30208+
tcp_refusals: 7
30209+
tcp_resets: 5
30210+
tcp_retransmits: 30
30211+
tcp_timeouts: 6
30212+
id: client_team:networks, server_service:hucklebuck
30213+
type: aggregated_connection
30214+
properties:
30215+
data:
30216+
description: The `SingleAggregatedConnectionResponseArray` `data`.
30217+
items:
30218+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseData'
30219+
type: array
30220+
type: object
30221+
SingleAggregatedConnectionResponseData:
30222+
description: The definition of `SingleAggregatedConnectionResponseData` object.
30223+
properties:
30224+
attributes:
30225+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataAttributes'
30226+
id:
30227+
description: The `SingleAggregatedConnectionResponseData` `id`.
30228+
type: string
30229+
type:
30230+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseDataType'
30231+
type: object
30232+
SingleAggregatedConnectionResponseDataAttributes:
30233+
description: The definition of `SingleAggregatedConnectionResponseDataAttributes`
30234+
object.
30235+
properties:
30236+
bytes_sent_by_client:
30237+
description: The total number of bytes sent by the client over the given
30238+
period.
30239+
format: int64
30240+
type: integer
30241+
bytes_sent_by_server:
30242+
description: The total number of bytes sent by the server over the given
30243+
period.
30244+
format: int64
30245+
type: integer
30246+
group_bys:
30247+
additionalProperties:
30248+
items:
30249+
type: string
30250+
type: array
30251+
description: The `attributes` `group_bys`.
30252+
type: object
30253+
packets_sent_by_client:
30254+
description: The total number of packets sent by the client over the given
30255+
period.
30256+
format: int64
30257+
type: integer
30258+
packets_sent_by_server:
30259+
description: The total number of packets sent by the server over the given
30260+
period.
30261+
format: int64
30262+
type: integer
30263+
rtt_micro_seconds:
30264+
description: Measured as TCP smoothed roundtrip time in microseconds (the
30265+
time between a TCP frame being sent and acknowledged).
30266+
format: int64
30267+
type: integer
30268+
tcp_closed_connections:
30269+
description: The number of TCP connections in a closed state. Measured in
30270+
connections per second from the client.
30271+
format: int64
30272+
type: integer
30273+
tcp_established_connections:
30274+
description: The number of TCP connections in an established state. Measured
30275+
in connections per second from the client.
30276+
format: int64
30277+
type: integer
30278+
tcp_refusals:
30279+
description: The number of TCP connections that were refused by the server.
30280+
Typically this indicates an attempt to connect to an IP/port that is not
30281+
receiving connections, or a firewall/security misconfiguration.
30282+
format: int64
30283+
type: integer
30284+
tcp_resets:
30285+
description: The number of TCP connections that were reset by the server.
30286+
format: int64
30287+
type: integer
30288+
tcp_retransmits:
30289+
description: TCP Retransmits represent detected failures that are retransmitted
30290+
to ensure delivery. Measured in count of retransmits from the client.
30291+
format: int64
30292+
type: integer
30293+
tcp_timeouts:
30294+
description: The number of TCP connections that timed out from the perspective
30295+
of the operating system. This can indicate general connectivity and latency
30296+
issues.
30297+
format: int64
30298+
type: integer
30299+
type: object
30300+
SingleAggregatedConnectionResponseDataType:
30301+
default: aggregated_connection
30302+
description: 'Aggregated connection resource type. Allowed enum values: `aggregated_connection`.
30303+
30304+
default: `aggregated_connection`'
30305+
enum:
30306+
- aggregated_connection
30307+
type: string
30308+
x-enum-varnames:
30309+
- AGGREGATED_CONNECTION
3019130310
SlackIntegrationMetadata:
3019230311
description: Incident integration metadata for the Slack integration.
3019330312
properties:
@@ -44282,6 +44401,68 @@ paths:
4428244401
summary: Update the tags for a device
4428344402
tags:
4428444403
- Network Device Monitoring
44404+
/api/v2/network/connections/aggregate:
44405+
get:
44406+
description: Get aggregated connections
44407+
operationId: GetAggregatedConnections
44408+
parameters:
44409+
- description: Unix timestamp (number of seconds since epoch) of the start of
44410+
the query window. If not provided, the start of the query window is 15 minutes
44411+
before the "to" timestamp. If neither "from" nor "to" are provided, the
44412+
query window is [now - 15m, now].
44413+
in: query
44414+
name: from
44415+
schema:
44416+
format: int64
44417+
type: integer
44418+
- description: Unix timestamp (number of seconds since epoch) of the end of
44419+
the query window. If not provided, the end of the query window is the current
44420+
time. If neither "from" nor "to" are provided, the query window is [now
44421+
- 15m, now].
44422+
in: query
44423+
name: to
44424+
schema:
44425+
format: int64
44426+
type: integer
44427+
- description: Comma-separated list of fields to group connections by.
44428+
in: query
44429+
name: group_by
44430+
schema:
44431+
type: string
44432+
- description: Comma-separated list of tags to filter connections by.
44433+
in: query
44434+
name: tags
44435+
schema:
44436+
type: string
44437+
- description: The number of connections to be returned. The maximum value is
44438+
5000.
44439+
in: query
44440+
name: limit
44441+
schema:
44442+
default: 100
44443+
format: int32
44444+
maximum: 5000
44445+
minimum: 1
44446+
type: integer
44447+
responses:
44448+
'200':
44449+
content:
44450+
application/json:
44451+
schema:
44452+
$ref: '#/components/schemas/SingleAggregatedConnectionResponseArray'
44453+
description: OK
44454+
'400':
44455+
$ref: '#/components/responses/BadRequestResponse'
44456+
'429':
44457+
$ref: '#/components/responses/TooManyRequestsResponse'
44458+
summary: Get aggregated connections
44459+
tags:
44460+
- Cloud Network Monitoring
44461+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
44462+
44463+
contact [Datadog support](https://docs.datadoghq.com/help/).
44464+
44465+
type: safe'
4428544466
/api/v2/org_configs:
4428644467
get:
4428744468
description: Returns all Org Configs (name, description, and value).
@@ -53624,6 +53805,10 @@ tags:
5362453805
and the `cloud_cost` data source. For more information, see the [Cloud Cost Management
5362553806
documentation](https://docs.datadoghq.com/cloud_cost_management/).
5362653807
name: Cloud Cost Management
53808+
- description: The Cloud Network Monitoring API allows you to fetch aggregated connections
53809+
and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
53810+
for more information.
53811+
name: Cloud Network Monitoring
5362753812
- description: Manage your Datadog Cloudflare integration directly through the Datadog
5362853813
API. See the [Cloudflare integration page](https://docs.datadoghq.com/integrations/cloudflare/)
5362953814
for more information.
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/datadog/configuration.rs

+1
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ impl Default for Configuration {
163163
("v2.list_aws_namespaces".to_owned(), false),
164164
("v2.update_aws_account".to_owned(), false),
165165
("v2.list_aws_logs_services".to_owned(), false),
166+
("v2.get_aggregated_connections".to_owned(), false),
166167
("v2.cancel_historical_job".to_owned(), false),
167168
("v2.convert_job_result_to_signal".to_owned(), false),
168169
("v2.delete_historical_job".to_owned(), false),

0 commit comments

Comments
 (0)