Skip to content

Commit cf837fa

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 22079dd of spec repo
1 parent 859c15b commit cf837fa

21 files changed

+1319
-12
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": "df31e44",
3-
"generated": "2025-07-28 19:55:56.622"
2+
"spec_repo_commit": "22079dd",
3+
"generated": "2025-07-29 20:36:15.009"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 195 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12939,6 +12939,42 @@ components:
1293912939
description: The type of the resource. The value should always be device.
1294012940
type: string
1294112941
type: object
12942+
DnsMetricKey:
12943+
description: The metric key for DNS metrics.
12944+
enum:
12945+
- dns_total_requests
12946+
- dns_failures
12947+
- dns_successful_responses
12948+
- dns_failed_responses
12949+
- dns_timeouts
12950+
- dns_responses.nxdomain
12951+
- dns_responses.servfail
12952+
- dns_responses.other
12953+
- dns_success_latency_percentile
12954+
- dns_failure_latency_percentile
12955+
type: string
12956+
x-enum-descriptions:
12957+
- The total number of DNS requests made by the client.
12958+
- The total number of timeouts and errors in DNS requests.
12959+
- The total number of successful DNS responses.
12960+
- The total number of failed DNS responses.
12961+
- The total number of DNS timeouts.
12962+
- The total number of DNS responses with the NXDOMAIN error code.
12963+
- The total number of DNS responses with the SERVFAIL error code.
12964+
- The total number of DNS responses with other error codes.
12965+
- The latency percentile for successful DNS responses.
12966+
- The latency percentile for failed DNS responses.
12967+
x-enum-varnames:
12968+
- DNS_TOTAL_REQUESTS
12969+
- DNS_FAILURES
12970+
- DNS_SUCCESSFUL_RESPONSES
12971+
- DNS_FAILED_RESPONSES
12972+
- DNS_TIMEOUTS
12973+
- DNS_RESPONSES_NXDOMAIN
12974+
- DNS_RESPONSES_SERVFAIL
12975+
- DNS_RESPONSES_OTHER
12976+
- DNS_SUCCESS_LATENCY_PERCENTILE
12977+
- DNS_FAILURE_LATENCY_PERCENTILE
1294212978
DomainAllowlist:
1294312979
description: The email domain allowlist for an org.
1294412980
properties:
@@ -38433,6 +38469,100 @@ components:
3843338469
type: string
3843438470
x-enum-varnames:
3843538471
- AGGREGATED_CONNECTION
38472+
SingleAggregatedDnsResponseArray:
38473+
description: List of aggregated DNS flows.
38474+
example:
38475+
data:
38476+
- attributes:
38477+
group_bys:
38478+
- key: client_service
38479+
value: example-service
38480+
- key: network.dns_query
38481+
value: example.com
38482+
metrics:
38483+
- key: dns_total_requests
38484+
value: 100
38485+
- key: dns_failures
38486+
value: 7
38487+
- key: dns_successful_responses
38488+
value: 93
38489+
- key: dns_failed_responses
38490+
value: 5
38491+
- key: dns_timeouts
38492+
value: 2
38493+
- key: dns_responses.nxdomain
38494+
value: 1
38495+
- key: dns_responses.servfail
38496+
value: 1
38497+
- key: dns_responses.other
38498+
value: 3
38499+
- key: dns_success_latency_percentile
38500+
value: 50
38501+
- key: dns_failure_latency_percentile
38502+
value: 75
38503+
id: client_service:example-service,network.dns_query:example.com
38504+
type: aggregated_dns
38505+
properties:
38506+
data:
38507+
description: Array of aggregated DNS objects.
38508+
items:
38509+
$ref: '#/components/schemas/SingleAggregatedDnsResponseData'
38510+
type: array
38511+
type: object
38512+
SingleAggregatedDnsResponseData:
38513+
description: Object describing an aggregated DNS flow.
38514+
properties:
38515+
attributes:
38516+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributes'
38517+
id:
38518+
description: A unique identifier for the aggregated DNS traffic based on
38519+
the group by values.
38520+
type: string
38521+
type:
38522+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataType'
38523+
type: object
38524+
SingleAggregatedDnsResponseDataAttributes:
38525+
description: Attributes for an aggregated DNS flow.
38526+
properties:
38527+
group_bys:
38528+
description: The key, value pairs for each group by.
38529+
items:
38530+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesGroupByItems'
38531+
type: array
38532+
metrics:
38533+
description: Metrics associated with an aggregated DNS flow.
38534+
items:
38535+
$ref: '#/components/schemas/SingleAggregatedDnsResponseDataAttributesMetricsItems'
38536+
type: array
38537+
type: object
38538+
SingleAggregatedDnsResponseDataAttributesGroupByItems:
38539+
description: Attributes associated with a group by
38540+
properties:
38541+
key:
38542+
description: The group by key.
38543+
type: string
38544+
value:
38545+
description: The group by value.
38546+
type: string
38547+
type: object
38548+
SingleAggregatedDnsResponseDataAttributesMetricsItems:
38549+
description: Metrics associated with an aggregated DNS flow.
38550+
properties:
38551+
key:
38552+
$ref: '#/components/schemas/DnsMetricKey'
38553+
value:
38554+
description: The metric value.
38555+
format: int64
38556+
type: integer
38557+
type: object
38558+
SingleAggregatedDnsResponseDataType:
38559+
default: aggregated_dns
38560+
description: Aggregated DNS resource type.
38561+
enum:
38562+
- aggregated_dns
38563+
type: string
38564+
x-enum-varnames:
38565+
- AGGREGATED_DNS
3843638566
SlackIntegrationMetadata:
3843738567
description: Incident integration metadata for the Slack integration.
3843838568
properties:
@@ -55119,6 +55249,69 @@ paths:
5511955249
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
5512055250

5512155251
contact [Datadog support](https://docs.datadoghq.com/help/).'
55252+
/api/v2/network/dns/aggregate:
55253+
get:
55254+
description: Get all aggregated DNS traffic.
55255+
operationId: GetAggregatedDns
55256+
parameters:
55257+
- description: Unix timestamp (number of seconds since epoch) of the start of
55258+
the query window. If not provided, the start of the query window is 15 minutes
55259+
before the `to` timestamp. If neither `from` nor `to` are provided, the
55260+
query window is `[now - 15m, now]`.
55261+
in: query
55262+
name: from
55263+
schema:
55264+
format: int64
55265+
type: integer
55266+
- description: Unix timestamp (number of seconds since epoch) of the end of
55267+
the query window. If not provided, the end of the query window is the current
55268+
time. If neither `from` nor `to` are provided, the query window is `[now
55269+
- 15m, now]`.
55270+
in: query
55271+
name: to
55272+
schema:
55273+
format: int64
55274+
type: integer
55275+
- description: Comma-separated list of fields to group DNS traffic by. The server
55276+
side defaults to `network.dns_query` if unspecified. `server_ungrouped`
55277+
may be used if groups are not desired. The maximum number of group_by(s)
55278+
is 10.
55279+
in: query
55280+
name: group_by
55281+
schema:
55282+
type: string
55283+
- description: Comma-separated list of tags to filter DNS traffic by.
55284+
in: query
55285+
name: tags
55286+
schema:
55287+
type: string
55288+
- description: The number of aggregated DNS entries to be returned. The maximum
55289+
value is 7500.
55290+
in: query
55291+
name: limit
55292+
schema:
55293+
default: 100
55294+
format: int32
55295+
maximum: 7500
55296+
minimum: 1
55297+
type: integer
55298+
responses:
55299+
'200':
55300+
content:
55301+
application/json:
55302+
schema:
55303+
$ref: '#/components/schemas/SingleAggregatedDnsResponseArray'
55304+
description: OK
55305+
'400':
55306+
$ref: '#/components/responses/BadRequestResponse'
55307+
'429':
55308+
$ref: '#/components/responses/TooManyRequestsResponse'
55309+
summary: Get all aggregated DNS traffic
55310+
tags:
55311+
- Cloud Network Monitoring
55312+
x-unstable: '**Note**: This endpoint is in Preview. If you have any feedback,
55313+
55314+
contact [Datadog support](https://docs.datadoghq.com/help/).'
5512255315
/api/v2/on-call/escalation-policies:
5512355316
post:
5512455317
description: Create a new On-Call escalation policy
@@ -65906,7 +66099,8 @@ tags:
6590666099
documentation](https://docs.datadoghq.com/cloud_cost_management/).
6590766100
name: Cloud Cost Management
6590866101
- description: The Cloud Network Monitoring API allows you to fetch aggregated connections
65909-
and their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
66102+
and DNS traffic with their attributes. See the [Cloud Network Monitoring page](https://docs.datadoghq.com/network_monitoring/cloud_network_monitoring/)
66103+
and [DNS Monitoring page](https://docs.datadoghq.com/network_monitoring/dns/)
6591066104
for more information.
6591166105
name: Cloud Network Monitoring
6591266106
- description: Manage your Datadog Cloudflare integration directly through the Datadog

api/datadog/configuration.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ func NewConfiguration() *Configuration {
661661
"v2.ValidateExistingMonitorUserTemplate": false,
662662
"v2.ValidateMonitorUserTemplate": false,
663663
"v2.GetAggregatedConnections": false,
664+
"v2.GetAggregatedDns": false,
664665
"v2.CreatePipeline": false,
665666
"v2.DeletePipeline": false,
666667
"v2.GetPipeline": false,

api/datadogV2/api_cloud_network_monitoring.go

Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,160 @@ func (a *CloudNetworkMonitoringApi) GetAggregatedConnections(ctx _context.Contex
171171
return localVarReturnValue, localVarHTTPResponse, nil
172172
}
173173

174+
// GetAggregatedDnsOptionalParameters holds optional parameters for GetAggregatedDns.
175+
type GetAggregatedDnsOptionalParameters struct {
176+
From *int64
177+
To *int64
178+
GroupBy *string
179+
Tags *string
180+
Limit *int32
181+
}
182+
183+
// NewGetAggregatedDnsOptionalParameters creates an empty struct for parameters.
184+
func NewGetAggregatedDnsOptionalParameters() *GetAggregatedDnsOptionalParameters {
185+
this := GetAggregatedDnsOptionalParameters{}
186+
return &this
187+
}
188+
189+
// WithFrom sets the corresponding parameter name and returns the struct.
190+
func (r *GetAggregatedDnsOptionalParameters) WithFrom(from int64) *GetAggregatedDnsOptionalParameters {
191+
r.From = &from
192+
return r
193+
}
194+
195+
// WithTo sets the corresponding parameter name and returns the struct.
196+
func (r *GetAggregatedDnsOptionalParameters) WithTo(to int64) *GetAggregatedDnsOptionalParameters {
197+
r.To = &to
198+
return r
199+
}
200+
201+
// WithGroupBy sets the corresponding parameter name and returns the struct.
202+
func (r *GetAggregatedDnsOptionalParameters) WithGroupBy(groupBy string) *GetAggregatedDnsOptionalParameters {
203+
r.GroupBy = &groupBy
204+
return r
205+
}
206+
207+
// WithTags sets the corresponding parameter name and returns the struct.
208+
func (r *GetAggregatedDnsOptionalParameters) WithTags(tags string) *GetAggregatedDnsOptionalParameters {
209+
r.Tags = &tags
210+
return r
211+
}
212+
213+
// WithLimit sets the corresponding parameter name and returns the struct.
214+
func (r *GetAggregatedDnsOptionalParameters) WithLimit(limit int32) *GetAggregatedDnsOptionalParameters {
215+
r.Limit = &limit
216+
return r
217+
}
218+
219+
// GetAggregatedDns Get all aggregated DNS traffic.
220+
// Get all aggregated DNS traffic.
221+
func (a *CloudNetworkMonitoringApi) GetAggregatedDns(ctx _context.Context, o ...GetAggregatedDnsOptionalParameters) (SingleAggregatedDnsResponseArray, *_nethttp.Response, error) {
222+
var (
223+
localVarHTTPMethod = _nethttp.MethodGet
224+
localVarPostBody interface{}
225+
localVarReturnValue SingleAggregatedDnsResponseArray
226+
optionalParams GetAggregatedDnsOptionalParameters
227+
)
228+
229+
if len(o) > 1 {
230+
return localVarReturnValue, nil, datadog.ReportError("only one argument of type GetAggregatedDnsOptionalParameters is allowed")
231+
}
232+
if len(o) == 1 {
233+
optionalParams = o[0]
234+
}
235+
236+
operationId := "v2.GetAggregatedDns"
237+
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
238+
if !isOperationEnabled {
239+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
240+
}
241+
if isOperationEnabled && a.Client.Cfg.Debug {
242+
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
243+
}
244+
245+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.CloudNetworkMonitoringApi.GetAggregatedDns")
246+
if err != nil {
247+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
248+
}
249+
250+
localVarPath := localBasePath + "/api/v2/network/dns/aggregate"
251+
252+
localVarHeaderParams := make(map[string]string)
253+
localVarQueryParams := _neturl.Values{}
254+
localVarFormParams := _neturl.Values{}
255+
if optionalParams.From != nil {
256+
localVarQueryParams.Add("from", datadog.ParameterToString(*optionalParams.From, ""))
257+
}
258+
if optionalParams.To != nil {
259+
localVarQueryParams.Add("to", datadog.ParameterToString(*optionalParams.To, ""))
260+
}
261+
if optionalParams.GroupBy != nil {
262+
localVarQueryParams.Add("group_by", datadog.ParameterToString(*optionalParams.GroupBy, ""))
263+
}
264+
if optionalParams.Tags != nil {
265+
localVarQueryParams.Add("tags", datadog.ParameterToString(*optionalParams.Tags, ""))
266+
}
267+
if optionalParams.Limit != nil {
268+
localVarQueryParams.Add("limit", datadog.ParameterToString(*optionalParams.Limit, ""))
269+
}
270+
localVarHeaderParams["Accept"] = "application/json"
271+
272+
if a.Client.Cfg.DelegatedTokenConfig != nil {
273+
err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig)
274+
if err != nil {
275+
return localVarReturnValue, nil, err
276+
}
277+
} else {
278+
datadog.SetAuthKeys(
279+
ctx,
280+
&localVarHeaderParams,
281+
[2]string{"apiKeyAuth", "DD-API-KEY"},
282+
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
283+
)
284+
}
285+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
286+
if err != nil {
287+
return localVarReturnValue, nil, err
288+
}
289+
290+
localVarHTTPResponse, err := a.Client.CallAPI(req)
291+
if err != nil || localVarHTTPResponse == nil {
292+
return localVarReturnValue, localVarHTTPResponse, err
293+
}
294+
295+
localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
296+
if err != nil {
297+
return localVarReturnValue, localVarHTTPResponse, err
298+
}
299+
300+
if localVarHTTPResponse.StatusCode >= 300 {
301+
newErr := datadog.GenericOpenAPIError{
302+
ErrorBody: localVarBody,
303+
ErrorMessage: localVarHTTPResponse.Status,
304+
}
305+
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 429 {
306+
var v APIErrorResponse
307+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
308+
if err != nil {
309+
return localVarReturnValue, localVarHTTPResponse, newErr
310+
}
311+
newErr.ErrorModel = v
312+
}
313+
return localVarReturnValue, localVarHTTPResponse, newErr
314+
}
315+
316+
err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
317+
if err != nil {
318+
newErr := datadog.GenericOpenAPIError{
319+
ErrorBody: localVarBody,
320+
ErrorMessage: err.Error(),
321+
}
322+
return localVarReturnValue, localVarHTTPResponse, newErr
323+
}
324+
325+
return localVarReturnValue, localVarHTTPResponse, nil
326+
}
327+
174328
// NewCloudNetworkMonitoringApi Returns NewCloudNetworkMonitoringApi.
175329
func NewCloudNetworkMonitoringApi(client *datadog.APIClient) *CloudNetworkMonitoringApi {
176330
return &CloudNetworkMonitoringApi{

0 commit comments

Comments
 (0)