Skip to content

Commit 717dd5c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add DNS specs for Cloud Network Monitoring API (#2712)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 3ef9e1e commit 717dd5c

22 files changed

+815
-15
lines changed

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "b308db8",
3-
"generated": "2025-08-04 15:40:21.840"
2+
"spec_repo_commit": "69305be",
3+
"generated": "2025-08-05 16:20:40.645"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 196 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13644,6 +13644,42 @@ components:
1364413644
description: The type of the resource. The value should always be device.
1364513645
type: string
1364613646
type: object
13647+
DnsMetricKey:
13648+
description: The metric key for DNS metrics.
13649+
enum:
13650+
- dns_total_requests
13651+
- dns_failures
13652+
- dns_successful_responses
13653+
- dns_failed_responses
13654+
- dns_timeouts
13655+
- dns_responses.nxdomain
13656+
- dns_responses.servfail
13657+
- dns_responses.other
13658+
- dns_success_latency_percentile
13659+
- dns_failure_latency_percentile
13660+
type: string
13661+
x-enum-descriptions:
13662+
- The total number of DNS requests made by the client.
13663+
- The total number of timeouts and errors in DNS requests.
13664+
- The total number of successful DNS responses.
13665+
- The total number of failed DNS responses.
13666+
- The total number of DNS timeouts.
13667+
- The total number of DNS responses with the NXDOMAIN error code.
13668+
- The total number of DNS responses with the SERVFAIL error code.
13669+
- The total number of DNS responses with other error codes.
13670+
- The latency percentile for successful DNS responses.
13671+
- The latency percentile for failed DNS responses.
13672+
x-enum-varnames:
13673+
- DNS_TOTAL_REQUESTS
13674+
- DNS_FAILURES
13675+
- DNS_SUCCESSFUL_RESPONSES
13676+
- DNS_FAILED_RESPONSES
13677+
- DNS_TIMEOUTS
13678+
- DNS_RESPONSES_NXDOMAIN
13679+
- DNS_RESPONSES_SERVFAIL
13680+
- DNS_RESPONSES_OTHER
13681+
- DNS_SUCCESS_LATENCY_PERCENTILE
13682+
- DNS_FAILURE_LATENCY_PERCENTILE
1364713683
DomainAllowlist:
1364813684
description: The email domain allowlist for an org.
1364913685
properties:
@@ -39937,6 +39973,100 @@ components:
3993739973
type: string
3993839974
x-enum-varnames:
3993939975
- AGGREGATED_CONNECTION
39976+
SingleAggregatedDnsResponseArray:
39977+
description: List of aggregated DNS flows.
39978+
example:
39979+
data:
39980+
- attributes:
39981+
group_bys:
39982+
- key: client_service
39983+
value: example-service
39984+
- key: network.dns_query
39985+
value: example.com
39986+
metrics:
39987+
- key: dns_total_requests
39988+
value: 100
39989+
- key: dns_failures
39990+
value: 7
39991+
- key: dns_successful_responses
39992+
value: 93
39993+
- key: dns_failed_responses
39994+
value: 5
39995+
- key: dns_timeouts
39996+
value: 2
39997+
- key: dns_responses.nxdomain
39998+
value: 1
39999+
- key: dns_responses.servfail
40000+
value: 1
40001+
- key: dns_responses.other
40002+
value: 3
40003+
- key: dns_success_latency_percentile
40004+
value: 50
40005+
- key: dns_failure_latency_percentile
40006+
value: 75
40007+
id: client_service:example-service,network.dns_query:example.com
40008+
type: aggregated_dns
40009+
properties:
40010+
data:
40011+
description: Array of aggregated DNS objects.
40012+
items:
40013+
$ref: '#/components/schemas/SingleAggregatedDnsResponseData'
40014+
type: array
40015+
type: object
40016+
SingleAggregatedDnsResponseData:
40017+
description: Object describing an aggregated DNS flow.
40018+
properties:
40019+
attributes:
40020+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributes'
40021+
id:
40022+
description: A unique identifier for the aggregated DNS traffic based on
40023+
the group by values.
40024+
type: string
40025+
type:
40026+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataType'
40027+
type: object
40028+
SingleAggregatedDnsResponseDataAttributes:
40029+
description: Attributes for an aggregated DNS flow.
40030+
properties:
40031+
group_bys:
40032+
description: The key, value pairs for each group by.
40033+
items:
40034+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesGroupByItems'
40035+
type: array
40036+
metrics:
40037+
description: Metrics associated with an aggregated DNS flow.
40038+
items:
40039+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesMetricsItems'
40040+
type: array
40041+
type: object
40042+
SingleAggregatedDnsResponseDataAttributesGroupByItems:
40043+
description: Attributes associated with a group by
40044+
properties:
40045+
key:
40046+
description: The group by key.
40047+
type: string
40048+
value:
40049+
description: The group by value.
40050+
type: string
40051+
type: object
40052+
SingleAggregatedDnsResponseDataAttributesMetricsItems:
40053+
description: Metrics associated with an aggregated DNS flow.
40054+
properties:
40055+
key:
40056+
$ref: '#/components/schemas/DnsMetricKey'
40057+
value:
40058+
description: The metric value.
40059+
format: int64
40060+
type: integer
40061+
type: object
40062+
SingleAggregatedDnsResponseDataType:
40063+
default: aggregated_dns
40064+
description: Aggregated DNS resource type.
40065+
enum:
40066+
- aggregated_dns
40067+
type: string
40068+
x-enum-varnames:
40069+
- AGGREGATED_DNS
3994040070
SlackIntegrationMetadata:
3994140071
description: Incident integration metadata for the Slack integration.
3994240072
properties:
@@ -56857,7 +56987,7 @@ paths:
5685756987
schema:
5685856988
type: string
5685956989
- description: The number of connections to be returned. The maximum value is
56860-
7500.
56990+
7500. The default is 100.
5686156991
in: query
5686256992
name: limit
5686356993
schema:
@@ -56883,6 +57013,69 @@ paths:
5688357013
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
5688457014

5688557015
contact [Datadog support](https://docs.datadoghq.com/help/).'
57016+
/api/v2/network/dns/aggregate:
57017+
get:
57018+
description: Get all aggregated DNS traffic.
57019+
operationId: GetAggregatedDns
57020+
parameters:
57021+
- description: Unix timestamp (number of seconds since epoch) of the start of
57022+
the query window. If not provided, the start of the query window is 15 minutes
57023+
before the `to` timestamp. If neither `from` nor `to` are provided, the
57024+
query window is `[now - 15m, now]`.
57025+
in: query
57026+
name: from
57027+
schema:
57028+
format: int64
57029+
type: integer
57030+
- description: Unix timestamp (number of seconds since epoch) of the end of
57031+
the query window. If not provided, the end of the query window is the current
57032+
time. If neither `from` nor `to` are provided, the query window is `[now
57033+
- 15m, now]`.
57034+
in: query
57035+
name: to
57036+
schema:
57037+
format: int64
57038+
type: integer
57039+
- description: Comma-separated list of fields to group DNS traffic by. The server
57040+
side defaults to `network.dns_query` if unspecified. `server_ungrouped`
57041+
may be used if groups are not desired. The maximum number of group_by(s)
57042+
is 10.
57043+
in: query
57044+
name: group_by
57045+
schema:
57046+
type: string
57047+
- description: Comma-separated list of tags to filter DNS traffic by.
57048+
in: query
57049+
name: tags
57050+
schema:
57051+
type: string
57052+
- description: The number of aggregated DNS entries to be returned. The maximum
57053+
value is 7500. The default is 100.
57054+
in: query
57055+
name: limit
57056+
schema:
57057+
default: 100
57058+
format: int32
57059+
maximum: 7500
57060+
minimum: 1
57061+
type: integer
57062+
responses:
57063+
'200':
57064+
content:
57065+
application/json:
57066+
schema:
57067+
$ref: '#/components/schemas/SingleAggregatedDnsResponseArray'
57068+
description: OK
57069+
'400':
57070+
$ref: '#/components/responses/BadRequestResponse'
57071+
'429':
57072+
$ref: '#/components/responses/TooManyRequestsResponse'
57073+
summary: Get all aggregated DNS traffic
57074+
tags:
57075+
- Cloud Network Monitoring
57076+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
57077+
57078+
contact [Datadog support](https://docs.datadoghq.com/help/).'
5688657079
/api/v2/on-call/escalation-policies:
5688757080
post:
5688857081
description: Create a new On-Call escalation policy
@@ -67689,7 +67882,8 @@ tags:
6768967882
documentation](https://docs.datadoghq.com/cloud_cost_management/).
6769067883
name: Cloud Cost Management
6769167884
- description: The Cloud Network Monitoring API allows you to fetch aggregated connections
67692-
and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
67885+
and DNS traffic with their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
67886+
and [DNS Monitoring page](https://docs.datadoghq.com/network_monitoring/dns/)
6769367887
for more information.
6769467888
name: Cloud Network Monitoring
6769567889
- description: Manage your Datadog Cloudflare integration directly through the Datadog

docs/datadog_api_client.v2.model.rst

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5436,6 +5436,13 @@ datadog\_api\_client.v2.model.devices\_list\_data module
54365436
:members:
54375437
:show-inheritance:
54385438

5439+
datadog\_api\_client.v2.model.dns\_metric\_key module
5440+
-----------------------------------------------------
5441+
5442+
.. automodule:: datadog_api_client.v2.model.dns_metric_key
5443+
:members:
5444+
:show-inheritance:
5445+
54395446
datadog\_api\_client.v2.model.domain\_allowlist module
54405447
------------------------------------------------------
54415448

@@ -17630,6 +17637,48 @@ datadog\_api\_client.v2.model.single\_aggregated\_connection\_response\_data\_ty
1763017637
:members:
1763117638
:show-inheritance:
1763217639

17640+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_array module
17641+
-----------------------------------------------------------------------------
17642+
17643+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_array
17644+
:members:
17645+
:show-inheritance:
17646+
17647+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data module
17648+
----------------------------------------------------------------------------
17649+
17650+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data
17651+
:members:
17652+
:show-inheritance:
17653+
17654+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes module
17655+
----------------------------------------------------------------------------------------
17656+
17657+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes
17658+
:members:
17659+
:show-inheritance:
17660+
17661+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes\_group\_by\_items module
17662+
----------------------------------------------------------------------------------------------------------
17663+
17664+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes_group_by_items
17665+
:members:
17666+
:show-inheritance:
17667+
17668+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes\_metrics\_items module
17669+
--------------------------------------------------------------------------------------------------------
17670+
17671+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes_metrics_items
17672+
:members:
17673+
:show-inheritance:
17674+
17675+
datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_type module
17676+
----------------------------------------------------------------------------------
17677+
17678+
.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_type
17679+
:members:
17680+
:show-inheritance:
17681+
1763317682
datadog\_api\_client.v2.model.slack\_integration\_metadata module
1763417683
-----------------------------------------------------------------
1763517684

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Get all aggregated DNS traffic returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.cloud_network_monitoring_api import CloudNetworkMonitoringApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_aggregated_dns"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = CloudNetworkMonitoringApi(api_client)
12+
response = api_instance.get_aggregated_dns()
13+
14+
print(response)

src/datadog_api_client/configuration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ def __init__(
302302
"v2.validate_existing_monitor_user_template": False,
303303
"v2.validate_monitor_user_template": False,
304304
"v2.get_aggregated_connections": False,
305+
"v2.get_aggregated_dns": False,
305306
"v2.create_pipeline": False,
306307
"v2.delete_pipeline": False,
307308
"v2.get_pipeline": False,

0 commit comments

Comments
 (0)