Skip to content

Commit 18caced

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit d52b053f of spec repo
1 parent f50b368 commit 18caced

File tree

10 files changed

+509
-4
lines changed

10 files changed

+509
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
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": "2024-09-04 17:12:32.108678",
8-
"spec_repo_commit": "8e0507d2"
7+
"regenerated": "2024-09-05 16:26:45.123593",
8+
"spec_repo_commit": "d52b053f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-09-04 17:12:32.128009",
13-
"spec_repo_commit": "8e0507d2"
12+
"regenerated": "2024-09-05 16:26:45.142378",
13+
"spec_repo_commit": "d52b053f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,35 @@ components:
907907
type: string
908908
x-enum-varnames:
909909
- API_KEYS
910+
ASMExclusionFilter:
911+
description: Provides a Datadog ASM WAF Exclusion Filters API resource.
912+
properties:
913+
description:
914+
description: A description for the exclusion filter.
915+
example: Ignore certain requests
916+
type: string
917+
enabled:
918+
description: Indicates whether the exclusion filter is enabled.
919+
example: true
920+
type: boolean
921+
id:
922+
description: The ID of the exclusion filter.
923+
example: ef12345
924+
type: string
925+
search_query:
926+
description: The search query for the exclusion filter.
927+
example: user_agent:Chrome
928+
type: string
929+
type: object
930+
ASMExclusionFilterResponse:
931+
description: Response object containing a list of ASM WAF exclusion filters.
932+
properties:
933+
data:
934+
description: The ASMExclusionFilterResponse data.
935+
items:
936+
$ref: '#/components/schemas/ASMExclusionFilter'
937+
type: array
938+
type: object
910939
AWSRelatedAccount:
911940
description: AWS related account.
912941
properties:
@@ -33600,6 +33629,24 @@ paths:
3360033629
We are gradually onboarding support for more sources. If you have any
3360133630

3360233631
feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
33632+
/api/v2/remote_config/products/asm/waf/exclusion_filters:
33633+
get:
33634+
description: Retrieve a list of ASM exclusion filters.
33635+
operationId: ListASMExclusionFilters
33636+
responses:
33637+
'200':
33638+
content:
33639+
application/json:
33640+
schema:
33641+
$ref: '#/components/schemas/ASMExclusionFilterResponse'
33642+
description: OK
33643+
'403':
33644+
$ref: '#/components/responses/NotAuthorizedResponse'
33645+
'429':
33646+
$ref: '#/components/responses/TooManyRequestsResponse'
33647+
summary: List ASM Exclusion Filters
33648+
tags:
33649+
- ASM Exclusion Filters
3360333650
/api/v2/remote_config/products/cws/agent_rules:
3360433651
get:
3360533652
description: Get the list of Cloud Security Management Threats Agent rules.
@@ -39516,6 +39563,10 @@ tags:
3951639563
description: Find out more at
3951739564
url: https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/
3951839565
name: APM Retention Filters
39566+
- description: Exclusion Filters in the ASM libraries are used to circumvent protection
39567+
False Positives. See [ASM Exclusion Filters](https://datadoghq.atlassian.net/wiki/spaces/Attacks/pages/2757197949/Exclusion+Filter+to+search+exclusion)
39568+
for more information.
39569+
name: ASM Exclusion Filters
3951939570
- description: Search your Audit Logs events over HTTP.
3952039571
name: Audit
3952139572
- description: '[The AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example)
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
_context "context"
9+
_nethttp "net/http"
10+
_neturl "net/url"
11+
12+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
13+
)
14+
15+
// ASMExclusionFiltersApi service type
16+
type ASMExclusionFiltersApi datadog.Service
17+
18+
// ListASMExclusionFilters List ASM Exclusion Filters.
19+
// Retrieve a list of ASM exclusion filters.
20+
func (a *ASMExclusionFiltersApi) ListASMExclusionFilters(ctx _context.Context) (ASMExclusionFilterResponse, *_nethttp.Response, error) {
21+
var (
22+
localVarHTTPMethod = _nethttp.MethodGet
23+
localVarPostBody interface{}
24+
localVarReturnValue ASMExclusionFilterResponse
25+
)
26+
27+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.ASMExclusionFiltersApi.ListASMExclusionFilters")
28+
if err != nil {
29+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
30+
}
31+
32+
localVarPath := localBasePath + "/api/v2/remote_config/products/asm/waf/exclusion_filters"
33+
34+
localVarHeaderParams := make(map[string]string)
35+
localVarQueryParams := _neturl.Values{}
36+
localVarFormParams := _neturl.Values{}
37+
localVarHeaderParams["Accept"] = "application/json"
38+
39+
datadog.SetAuthKeys(
40+
ctx,
41+
&localVarHeaderParams,
42+
[2]string{"apiKeyAuth", "DD-API-KEY"},
43+
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
44+
)
45+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
46+
if err != nil {
47+
return localVarReturnValue, nil, err
48+
}
49+
50+
localVarHTTPResponse, err := a.Client.CallAPI(req)
51+
if err != nil || localVarHTTPResponse == nil {
52+
return localVarReturnValue, localVarHTTPResponse, err
53+
}
54+
55+
localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
56+
if err != nil {
57+
return localVarReturnValue, localVarHTTPResponse, err
58+
}
59+
60+
if localVarHTTPResponse.StatusCode >= 300 {
61+
newErr := datadog.GenericOpenAPIError{
62+
ErrorBody: localVarBody,
63+
ErrorMessage: localVarHTTPResponse.Status,
64+
}
65+
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
66+
var v APIErrorResponse
67+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
68+
if err != nil {
69+
return localVarReturnValue, localVarHTTPResponse, newErr
70+
}
71+
newErr.ErrorModel = v
72+
}
73+
return localVarReturnValue, localVarHTTPResponse, newErr
74+
}
75+
76+
err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
77+
if err != nil {
78+
newErr := datadog.GenericOpenAPIError{
79+
ErrorBody: localVarBody,
80+
ErrorMessage: err.Error(),
81+
}
82+
return localVarReturnValue, localVarHTTPResponse, newErr
83+
}
84+
85+
return localVarReturnValue, localVarHTTPResponse, nil
86+
}
87+
88+
// NewASMExclusionFiltersApi Returns NewASMExclusionFiltersApi.
89+
func NewASMExclusionFiltersApi(client *datadog.APIClient) *ASMExclusionFiltersApi {
90+
return &ASMExclusionFiltersApi{
91+
Client: client,
92+
}
93+
}

api/datadogV2/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
// - [APMRetentionFiltersApi.ListApmRetentionFilters]
1515
// - [APMRetentionFiltersApi.ReorderApmRetentionFilters]
1616
// - [APMRetentionFiltersApi.UpdateApmRetentionFilter]
17+
// - [ASMExclusionFiltersApi.ListASMExclusionFilters]
1718
// - [AuditApi.ListAuditLogs]
1819
// - [AuditApi.SearchAuditLogs]
1920
// - [AuthNMappingsApi.CreateAuthNMapping]

0 commit comments

Comments
 (0)