Skip to content

Add DNS specs for Cloud Network Monitoring API #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "8ca2883",
"generated": "2025-07-22 07:19:53.580"
"spec_repo_commit": "754ff74",
"generated": "2025-07-22 09:57:19.226"
}
230 changes: 229 additions & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12925,6 +12925,42 @@ components:
description: The type of the resource. The value should always be device.
type: string
type: object
DnsMetricKey:
description: The metric key for DNS metrics.
enum:
- dns_total_requests
- dns_failures
- dns_successful_responses
- dns_failed_responses
- dns_timeouts
- dns_responses.nxdomain
- dns_responses.servfail
- dns_responses.other
- dns_success_latency_percentile
- dns_failure_latency_percentile
type: string
x-enum-descriptions:
- The total number of DNS requests made by the client.
- The total number of timeouts and errors in DNS requests.
- The total number of successful DNS responses.
- The total number of failed DNS responses.
- The total number of DNS timeouts.
- The total number of DNS responses with the NXDOMAIN error code.
- The total number of DNS responses with the SERVFAIL error code.
- The total number of DNS responses with other error codes.
- The latency percentile for successful DNS responses.
- The latency percentile for failed DNS responses.
x-enum-varnames:
- DNS_TOTAL_REQUESTS
- DNS_FAILURES
- DNS_SUCCESSFUL_RESPONSES
- DNS_FAILED_RESPONSES
- DNS_TIMEOUTS
- DNS_RESPONSES_NXDOMAIN
- DNS_RESPONSES_SERVFAIL
- DNS_RESPONSES_OTHER
- DNS_SUCCESS_LATENCY_PERCENTILE
- DNS_FAILURE_LATENCY_PERCENTILE
DomainAllowlist:
description: The email domain allowlist for an org.
properties:
Expand Down Expand Up @@ -38398,6 +38434,134 @@ components:
type: string
x-enum-varnames:
- AGGREGATED_CONNECTION
SingleAggregatedDnsResponseArray:
additionalProperties: {}
description: List of aggregated DNS flows.
example:
data:
- attributes:
group_bys:
- key: client_team
value: networks
- key: server_service
value: hucklebuck
metrics:
- key: dns_total_requests
value: 100
- key: dns_failures
value: 6
- key: dns_successful_responses
value: 95
- key: dns_failed_responses
value: 4
- key: dns_timeouts
value: 2
- key: dns_responses.nxdomain
value: 1
- key: dns_responses.servfail
value: 1
- key: dns_responses.other
value: 3
- key: dns_success_latency_percentile
value: 50
- key: dns_failure_latency_percentile
value: 75
id: client_team:networks, server_service:hucklebuck
type: aggregated_dns
properties:
data:
description: Array of aggregated DNS objects.
items:
$ref: '#/components/schemas/SingleAggregatedDnsResponseData'
type: array
type: object
SingleAggregatedDnsResponseData:
description: Object describing an aggregated DNS flow.
properties:
attributes:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributes'
id:
description: A unique identifier for the aggregated DNS traffic based on
the group by values.
example: client_service:example-service,network.dns_query:example.com
type: string
type:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataType'
example: aggregated_dns
type: object
SingleAggregatedDnsResponseDataAttributes:
description: Attributes for an aggregated DNS flow.
properties:
group_bys:
additionalProperties: {}
description: The key, value pairs for each group by.
example:
- key: client_service
value: example-service
- key: network.dns_query
value: example.com
items:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesGroupByItems'
type: array
metrics:
additionalProperties: {}
description: Metrics associated with an aggregated DNS flow.
example:
- key: dns_total_requests
value: 100
- key: dns_failures
value: 7
- key: dns_successful_responses
value: 93
- key: dns_failed_responses
value: 5
- key: dns_timeouts
value: 2
- key: dns_responses.nxdomain
value: 1
- key: dns_responses.servfail
value: 1
- key: dns_responses.other
value: 3
- key: dns_success_latency_percentile
value: 50
- key: dns_failure_latency_percentile
value: 76
items:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesMetricsItems'
type: array
type: object
SingleAggregatedDnsResponseDataAttributesGroupByItems:
description: Attributes associated with a group by
properties:
key:
description: The group by key.
type: string
value:
additionalProperties:
items:
type: string
type: array
description: The group by value.
type: object
SingleAggregatedDnsResponseDataAttributesMetricsItems:
description: Metrics associated with an aggregated DNS flow.
properties:
key:
$ref: '#/components/schemas/DnsMetricKey'
value:
description: The metric value.
format: int64
type: integer
type: object
SingleAggregatedDnsResponseDataType:
default: aggregated_dns
description: Aggregated DNS resource type.
enum:
- aggregated_dns
type: string
x-enum-varnames:
- AGGREGATED_DNS
SlackIntegrationMetadata:
description: Incident integration metadata for the Slack integration.
properties:
Expand Down Expand Up @@ -55045,6 +55209,69 @@ paths:
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/network/dns/aggregate:
get:
description: Get all aggregated DNS traffic.
operationId: GetAggregatedDns
parameters:
- description: 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]`.
in: query
name: from
schema:
format: int64
type: integer
- description: 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]`.
in: query
name: to
schema:
format: int64
type: integer
- description: Comma-separated list of fields to group DNS traffic by. The server
side defaults to `network.dns_query` if unspecified. `server_ungrouped`
may be used if groups are not desired. The maximum number of group_by(s)
is 10.
in: query
name: group_by
schema:
type: string
- description: Comma-separated list of tags to filter DNS traffic by.
in: query
name: tags
schema:
type: string
- description: The number of aggregated DNS entries to be returned. The maximum
value is 7500.
in: query
name: limit
schema:
default: 100
format: int32
maximum: 7500
minimum: 1
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SingleAggregatedDnsResponseArray'
description: OK
'400':
$ref: '#/components/responses/BadRequestResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get all aggregated DNS traffic
tags:
- Cloud Network Monitoring
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/on-call/escalation-policies:
post:
description: Create a new On-Call escalation policy
Expand Down Expand Up @@ -65836,7 +66063,8 @@ tags:
documentation](https://docs.datadoghq.com/cloud_cost_management/).
name: Cloud Cost Management
- description: The Cloud Network Monitoring API allows you to fetch aggregated connections
and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
and DNS traffic with their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
and [DNS Monitoring page](https://docs.datadoghq.com/network_monitoring/dns/)
for more information.
name: Cloud Network Monitoring
- description: Manage your Datadog Cloudflare integration directly through the Datadog
Expand Down
19 changes: 19 additions & 0 deletions examples/v2_cloud-network-monitoring_GetAggregatedDns.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// Get all aggregated DNS traffic returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_cloud_network_monitoring::CloudNetworkMonitoringAPI;
use datadog_api_client::datadogV2::api_cloud_network_monitoring::GetAggregatedDnsOptionalParams;

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.GetAggregatedDns", true);
let api = CloudNetworkMonitoringAPI::with_config(configuration);
let resp = api
.get_aggregated_dns(GetAggregatedDnsOptionalParams::default())
.await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
1 change: 1 addition & 0 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ impl Default for Configuration {
),
("v2.validate_monitor_user_template".to_owned(), false),
("v2.get_aggregated_connections".to_owned(), false),
("v2.get_aggregated_dns".to_owned(), false),
("v2.create_pipeline".to_owned(), false),
("v2.delete_pipeline".to_owned(), false),
("v2.get_pipeline".to_owned(), false),
Expand Down
Loading
Loading