Skip to content

Commit

Permalink
Regenerate client from commit d52b053f of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Sep 5, 2024
1 parent f50b368 commit 18caced
Show file tree
Hide file tree
Showing 10 changed files with 509 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-04 17:12:32.108678",
"spec_repo_commit": "8e0507d2"
"regenerated": "2024-09-05 16:26:45.123593",
"spec_repo_commit": "d52b053f"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-09-04 17:12:32.128009",
"spec_repo_commit": "8e0507d2"
"regenerated": "2024-09-05 16:26:45.142378",
"spec_repo_commit": "d52b053f"
}
}
}
51 changes: 51 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -907,6 +907,35 @@ components:
type: string
x-enum-varnames:
- API_KEYS
ASMExclusionFilter:
description: Provides a Datadog ASM WAF Exclusion Filters API resource.
properties:
description:
description: A description for the exclusion filter.
example: Ignore certain requests
type: string
enabled:
description: Indicates whether the exclusion filter is enabled.
example: true
type: boolean
id:
description: The ID of the exclusion filter.
example: ef12345
type: string
search_query:
description: The search query for the exclusion filter.
example: user_agent:Chrome
type: string
type: object
ASMExclusionFilterResponse:
description: Response object containing a list of ASM WAF exclusion filters.
properties:
data:
description: The ASMExclusionFilterResponse data.
items:
$ref: '#/components/schemas/ASMExclusionFilter'
type: array
type: object
AWSRelatedAccount:
description: AWS related account.
properties:
Expand Down Expand Up @@ -33600,6 +33629,24 @@ paths:
We are gradually onboarding support for more sources. If you have any

feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).'
/api/v2/remote_config/products/asm/waf/exclusion_filters:
get:
description: Retrieve a list of ASM exclusion filters.
operationId: ListASMExclusionFilters
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ASMExclusionFilterResponse'
description: OK
'403':
$ref: '#/components/responses/NotAuthorizedResponse'
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: List ASM Exclusion Filters
tags:
- ASM Exclusion Filters
/api/v2/remote_config/products/cws/agent_rules:
get:
description: Get the list of Cloud Security Management Threats Agent rules.
Expand Down Expand Up @@ -39516,6 +39563,10 @@ tags:
description: Find out more at
url: https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/
name: APM Retention Filters
- description: Exclusion Filters in the ASM libraries are used to circumvent protection
False Positives. See [ASM Exclusion Filters](https://datadoghq.atlassian.net/wiki/spaces/Attacks/pages/2757197949/Exclusion+Filter+to+search+exclusion)
for more information.
name: ASM Exclusion Filters
- description: Search your Audit Logs events over HTTP.
name: Audit
- description: '[The AuthN Mappings API](https://docs.datadoghq.com/account_management/authn_mapping/?tab=example)
Expand Down
93 changes: 93 additions & 0 deletions api/datadogV2/api_asm_exclusion_filters.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV2

import (
_context "context"
_nethttp "net/http"
_neturl "net/url"

"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// ASMExclusionFiltersApi service type
type ASMExclusionFiltersApi datadog.Service

// ListASMExclusionFilters List ASM Exclusion Filters.
// Retrieve a list of ASM exclusion filters.
func (a *ASMExclusionFiltersApi) ListASMExclusionFilters(ctx _context.Context) (ASMExclusionFilterResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue ASMExclusionFilterResponse
)

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.ASMExclusionFiltersApi.ListASMExclusionFilters")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
}

localVarPath := localBasePath + "/api/v2/remote_config/products/asm/waf/exclusion_filters"

localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
localVarHeaderParams["Accept"] = "application/json"

datadog.SetAuthKeys(
ctx,
&localVarHeaderParams,
[2]string{"apiKeyAuth", "DD-API-KEY"},
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
)
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
if err != nil {
return localVarReturnValue, nil, err
}

localVarHTTPResponse, err := a.Client.CallAPI(req)
if err != nil || localVarHTTPResponse == nil {
return localVarReturnValue, localVarHTTPResponse, err
}

localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
if err != nil {
return localVarReturnValue, localVarHTTPResponse, err
}

if localVarHTTPResponse.StatusCode >= 300 {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: localVarHTTPResponse.Status,
}
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
var v APIErrorResponse
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
return localVarReturnValue, localVarHTTPResponse, newErr
}
newErr.ErrorModel = v
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
if err != nil {
newErr := datadog.GenericOpenAPIError{
ErrorBody: localVarBody,
ErrorMessage: err.Error(),
}
return localVarReturnValue, localVarHTTPResponse, newErr
}

return localVarReturnValue, localVarHTTPResponse, nil
}

// NewASMExclusionFiltersApi Returns NewASMExclusionFiltersApi.
func NewASMExclusionFiltersApi(client *datadog.APIClient) *ASMExclusionFiltersApi {
return &ASMExclusionFiltersApi{
Client: client,
}
}
1 change: 1 addition & 0 deletions api/datadogV2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// - [APMRetentionFiltersApi.ListApmRetentionFilters]
// - [APMRetentionFiltersApi.ReorderApmRetentionFilters]
// - [APMRetentionFiltersApi.UpdateApmRetentionFilter]
// - [ASMExclusionFiltersApi.ListASMExclusionFilters]
// - [AuditApi.ListAuditLogs]
// - [AuditApi.SearchAuditLogs]
// - [AuthNMappingsApi.CreateAuthNMapping]
Expand Down
Loading

0 comments on commit 18caced

Please sign in to comment.