Skip to content

Add DNS specs for Cloud Network Monitoring API #2712

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": "bd643af",
"generated": "2025-07-22 16:43:14.580"
"spec_repo_commit": "f8112e8",
"generated": "2025-07-22 21:24:37.530"
}
171 changes: 170 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,75 @@ components:
type: string
x-enum-varnames:
- AGGREGATED_CONNECTION
SingleAggregatedDnsResponseArray:
description: List of aggregated DNS flows.
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:
description: The key, value pairs for each group by.
items:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesGroupByItems'
type: array
metrics:
description: Metrics associated with an aggregated DNS flow.
items:
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesMetricsItems'
type: array
type: object
SingleAggregatedDnsResponseDataAttributesGroupByItems:
description: Attributes associated with a group by
properties:
key:
description: The group by key.
example: client_team
type: string
value:
description: The group by value.
example: networks
type: string
type: object
SingleAggregatedDnsResponseDataAttributesMetricsItems:
description: Metrics associated with an aggregated DNS flow.
properties:
key:
$ref: '#/components/schemas/DnsMetricKey'
example: dns_total_requests
value:
description: The metric value.
example: 100
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 +55150,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 +66004,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
49 changes: 49 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4974,6 +4974,13 @@ datadog\_api\_client.v2.model.devices\_list\_data module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.dns\_metric\_key module
-----------------------------------------------------

.. automodule:: datadog_api_client.v2.model.dns_metric_key
:members:
:show-inheritance:

datadog\_api\_client.v2.model.domain\_allowlist module
------------------------------------------------------

Expand Down Expand Up @@ -16552,6 +16559,48 @@ datadog\_api\_client.v2.model.single\_aggregated\_connection\_response\_data\_ty
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_array module
-----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_array
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data module
----------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes module
----------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes\_group\_by\_items module
----------------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes_group_by_items
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_attributes\_metrics\_items module
--------------------------------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_attributes_metrics_items
:members:
:show-inheritance:

datadog\_api\_client.v2.model.single\_aggregated\_dns\_response\_data\_type module
----------------------------------------------------------------------------------

.. automodule:: datadog_api_client.v2.model.single_aggregated_dns_response_data_type
:members:
:show-inheritance:

datadog\_api\_client.v2.model.slack\_integration\_metadata module
-----------------------------------------------------------------

Expand Down
14 changes: 14 additions & 0 deletions examples/v2/cloud-network-monitoring/GetAggregatedDns.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""
Get all aggregated DNS traffic returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.cloud_network_monitoring_api import CloudNetworkMonitoringApi

configuration = Configuration()
configuration.unstable_operations["get_aggregated_dns"] = True
with ApiClient(configuration) as api_client:
api_instance = CloudNetworkMonitoringApi(api_client)
response = api_instance.get_aggregated_dns()

print(response)
1 change: 1 addition & 0 deletions src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ def __init__(
"v2.validate_existing_monitor_user_template": False,
"v2.validate_monitor_user_template": False,
"v2.get_aggregated_connections": False,
"v2.get_aggregated_dns": False,
"v2.create_pipeline": False,
"v2.delete_pipeline": False,
"v2.get_pipeline": False,
Expand Down
Loading
Loading