Skip to content

Commit 6111c76

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add query param in rules list endpoint (#3547)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent e4fae70 commit 6111c76

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85404,6 +85404,14 @@ paths:
8540485404
parameters:
8540585405
- $ref: '#/components/parameters/PageSize'
8540685406
- $ref: '#/components/parameters/PageNumber'
85407+
- description: A search query to filter security rules. You can filter by attributes
85408+
such as `type`, `source`, `tags`.
85409+
example: type:signal_correlation source:cloudtrail
85410+
in: query
85411+
name: query
85412+
required: false
85413+
schema:
85414+
type: string
8540785415
responses:
8540885416
'200':
8540985417
content:

api/datadogV2/api_security_monitoring.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5201,6 +5201,7 @@ func (a *SecurityMonitoringApi) ListSecurityMonitoringHistsignals(ctx _context.C
52015201
type ListSecurityMonitoringRulesOptionalParameters struct {
52025202
PageSize *int64
52035203
PageNumber *int64
5204+
Query *string
52045205
}
52055206

52065207
// NewListSecurityMonitoringRulesOptionalParameters creates an empty struct for parameters.
@@ -5221,6 +5222,12 @@ func (r *ListSecurityMonitoringRulesOptionalParameters) WithPageNumber(pageNumbe
52215222
return r
52225223
}
52235224

5225+
// WithQuery sets the corresponding parameter name and returns the struct.
5226+
func (r *ListSecurityMonitoringRulesOptionalParameters) WithQuery(query string) *ListSecurityMonitoringRulesOptionalParameters {
5227+
r.Query = &query
5228+
return r
5229+
}
5230+
52245231
// ListSecurityMonitoringRules List rules.
52255232
// List rules.
52265233
func (a *SecurityMonitoringApi) ListSecurityMonitoringRules(ctx _context.Context, o ...ListSecurityMonitoringRulesOptionalParameters) (SecurityMonitoringListRulesResponse, *_nethttp.Response, error) {
@@ -5254,6 +5261,9 @@ func (a *SecurityMonitoringApi) ListSecurityMonitoringRules(ctx _context.Context
52545261
if optionalParams.PageNumber != nil {
52555262
localVarQueryParams.Add("page[number]", datadog.ParameterToString(*optionalParams.PageNumber, ""))
52565263
}
5264+
if optionalParams.Query != nil {
5265+
localVarQueryParams.Add("query", datadog.ParameterToString(*optionalParams.Query, ""))
5266+
}
52575267
localVarHeaderParams["Accept"] = "application/json"
52585268

52595269
if a.Client.Cfg.DelegatedTokenConfig != nil {

0 commit comments

Comments
 (0)