Skip to content

Commit 9bc3caf

Browse files
api-clients-generation-pipeline[bot]mellon85zippolyteci.datadog-api-spec
authored
Added filters to rule endpoints in security monitoring API (#632)
* Added filters api tests * record * Regenerate client from commit ca13c42 of spec repo Co-authored-by: Dario Meloni <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: Hippolyte HENRY <[email protected]> Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 5cb3b50 commit 9bc3caf

21 files changed

+1944
-900
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.4.1.dev2",
7-
"regenerated": "2020-12-29 08:51:05.500744",
8-
"spec_repo_commit": "2554c85"
7+
"regenerated": "2020-12-29 12:58:48.946979",
8+
"spec_repo_commit": "ca13c42"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev2",
12-
"regenerated": "2020-12-29 08:51:12.443081",
13-
"spec_repo_commit": "2554c85"
12+
"regenerated": "2020-12-29 12:58:55.447918",
13+
"spec_repo_commit": "ca13c42"
1414
}
1515
}
1616
}

api/v2/datadog/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,8 @@ docs/RolesResponse.md
234234
docs/RolesSort.md
235235
docs/RolesType.md
236236
docs/SecurityMonitoringApi.md
237+
docs/SecurityMonitoringFilter.md
238+
docs/SecurityMonitoringFilterAction.md
237239
docs/SecurityMonitoringListRulesResponse.md
238240
docs/SecurityMonitoringRuleCase.md
239241
docs/SecurityMonitoringRuleCaseCreate.md
@@ -491,6 +493,8 @@ model_role_update_response_data.go
491493
model_roles_response.go
492494
model_roles_sort.go
493495
model_roles_type.go
496+
model_security_monitoring_filter.go
497+
model_security_monitoring_filter_action.go
494498
model_security_monitoring_list_rules_response.go
495499
model_security_monitoring_rule_case.go
496500
model_security_monitoring_rule_case_create.go

api/v2/datadog/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,8 @@ Class | Method | HTTP request | Description
360360
- [RolesResponse](docs/RolesResponse.md)
361361
- [RolesSort](docs/RolesSort.md)
362362
- [RolesType](docs/RolesType.md)
363+
- [SecurityMonitoringFilter](docs/SecurityMonitoringFilter.md)
364+
- [SecurityMonitoringFilterAction](docs/SecurityMonitoringFilterAction.md)
363365
- [SecurityMonitoringListRulesResponse](docs/SecurityMonitoringListRulesResponse.md)
364366
- [SecurityMonitoringRuleCase](docs/SecurityMonitoringRuleCase.md)
365367
- [SecurityMonitoringRuleCaseCreate](docs/SecurityMonitoringRuleCaseCreate.md)

api/v2/datadog/api/openapi.yaml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8564,6 +8564,26 @@ components:
85648564
type: string
85658565
x-enum-varnames:
85668566
- ROLES
8567+
SecurityMonitoringFilter:
8568+
description: The rule's suppression filter.
8569+
example:
8570+
query: query
8571+
properties:
8572+
action:
8573+
$ref: '#/components/schemas/SecurityMonitoringFilterAction'
8574+
query:
8575+
description: Query for selecting logs to apply the filtering action.
8576+
type: string
8577+
type: object
8578+
SecurityMonitoringFilterAction:
8579+
description: The type of filtering action.
8580+
enum:
8581+
- require
8582+
- suppress
8583+
type: string
8584+
x-enum-varnames:
8585+
- REQUIRE
8586+
- SUPPRESS
85678587
SecurityMonitoringListRulesResponse:
85688588
description: List of rules.
85698589
example:
@@ -8579,6 +8599,9 @@ components:
85798599
notifications:
85808600
- notifications
85818601
- notifications
8602+
filters:
8603+
- query: query
8604+
- query: query
85828605
message: message
85838606
queries:
85848607
- distinctFields:
@@ -8622,6 +8645,9 @@ components:
86228645
notifications:
86238646
- notifications
86248647
- notifications
8648+
filters:
8649+
- query: query
8650+
- query: query
86258651
message: message
86268652
queries:
86278653
- distinctFields:
@@ -8722,6 +8748,9 @@ components:
87228748
isEnabled: true
87238749
name: ""
87248750
options: {}
8751+
filters:
8752+
- query: query
8753+
- query: query
87258754
message: ""
87268755
queries: []
87278756
tags:
@@ -8734,6 +8763,12 @@ components:
87348763
items:
87358764
$ref: '#/components/schemas/SecurityMonitoringRuleCaseCreate'
87368765
type: array
8766+
filters:
8767+
description: Additional queries to filter matched events before they are
8768+
processed.
8769+
items:
8770+
$ref: '#/components/schemas/SecurityMonitoringFilter'
8771+
type: array
87378772
isEnabled:
87388773
description: Whether the rule is enabled.
87398774
example: true
@@ -8964,6 +8999,9 @@ components:
89648999
notifications:
89659000
- notifications
89669001
- notifications
9002+
filters:
9003+
- query: query
9004+
- query: query
89679005
message: message
89689006
queries:
89699007
- distinctFields:
@@ -9010,6 +9048,12 @@ components:
90109048
description: User ID of the user who created the rule.
90119049
format: int64
90129050
type: integer
9051+
filters:
9052+
description: Additional queries to filter matched events before they are
9053+
processed.
9054+
items:
9055+
$ref: '#/components/schemas/SecurityMonitoringFilter'
9056+
type: array
90139057
id:
90149058
description: The ID of the rule.
90159059
type: string
@@ -9077,6 +9121,9 @@ components:
90779121
isEnabled: true
90789122
name: name
90799123
options: {}
9124+
filters:
9125+
- query: query
9126+
- query: query
90809127
message: message
90819128
queries:
90829129
- distinctFields:
@@ -9106,6 +9153,12 @@ components:
91069153
items:
91079154
$ref: '#/components/schemas/SecurityMonitoringRuleCase'
91089155
type: array
9156+
filters:
9157+
description: Additional queries to filter matched events before they are
9158+
processed.
9159+
items:
9160+
$ref: '#/components/schemas/SecurityMonitoringFilter'
9161+
type: array
91099162
isEnabled:
91109163
description: Whether the rule is enabled.
91119164
type: boolean
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SecurityMonitoringFilter
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**Action** | Pointer to [**SecurityMonitoringFilterAction**](SecurityMonitoringFilterAction.md) | | [optional]
8+
**Query** | Pointer to **string** | Query for selecting logs to apply the filtering action. | [optional]
9+
10+
## Methods
11+
12+
### NewSecurityMonitoringFilter
13+
14+
`func NewSecurityMonitoringFilter() *SecurityMonitoringFilter`
15+
16+
NewSecurityMonitoringFilter instantiates a new SecurityMonitoringFilter object
17+
This constructor will assign default values to properties that have it defined,
18+
and makes sure properties required by API are set, but the set of arguments
19+
will change when the set of required properties is changed
20+
21+
### NewSecurityMonitoringFilterWithDefaults
22+
23+
`func NewSecurityMonitoringFilterWithDefaults() *SecurityMonitoringFilter`
24+
25+
NewSecurityMonitoringFilterWithDefaults instantiates a new SecurityMonitoringFilter object
26+
This constructor will only assign default values to properties that have it defined,
27+
but it doesn't guarantee that properties required by API are set
28+
29+
### GetAction
30+
31+
`func (o *SecurityMonitoringFilter) GetAction() SecurityMonitoringFilterAction`
32+
33+
GetAction returns the Action field if non-nil, zero value otherwise.
34+
35+
### GetActionOk
36+
37+
`func (o *SecurityMonitoringFilter) GetActionOk() (*SecurityMonitoringFilterAction, bool)`
38+
39+
GetActionOk returns a tuple with the Action field if it's non-nil, zero value otherwise
40+
and a boolean to check if the value has been set.
41+
42+
### SetAction
43+
44+
`func (o *SecurityMonitoringFilter) SetAction(v SecurityMonitoringFilterAction)`
45+
46+
SetAction sets Action field to given value.
47+
48+
### HasAction
49+
50+
`func (o *SecurityMonitoringFilter) HasAction() bool`
51+
52+
HasAction returns a boolean if a field has been set.
53+
54+
### GetQuery
55+
56+
`func (o *SecurityMonitoringFilter) GetQuery() string`
57+
58+
GetQuery returns the Query field if non-nil, zero value otherwise.
59+
60+
### GetQueryOk
61+
62+
`func (o *SecurityMonitoringFilter) GetQueryOk() (*string, bool)`
63+
64+
GetQueryOk returns a tuple with the Query field if it's non-nil, zero value otherwise
65+
and a boolean to check if the value has been set.
66+
67+
### SetQuery
68+
69+
`func (o *SecurityMonitoringFilter) SetQuery(v string)`
70+
71+
SetQuery sets Query field to given value.
72+
73+
### HasQuery
74+
75+
`func (o *SecurityMonitoringFilter) HasQuery() bool`
76+
77+
HasQuery returns a boolean if a field has been set.
78+
79+
80+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
81+
82+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SecurityMonitoringFilterAction
2+
3+
## Enum
4+
5+
6+
* `REQUIRE` (value: `"require"`)
7+
8+
* `SUPPRESS` (value: `"suppress"`)
9+
10+
11+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
12+
13+

api/v2/datadog/docs/SecurityMonitoringRuleCreatePayload.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Cases** | [**[]SecurityMonitoringRuleCaseCreate**](SecurityMonitoringRuleCaseCreate.md) | Cases for generating signals. |
8+
**Filters** | Pointer to [**[]SecurityMonitoringFilter**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
89
**IsEnabled** | **bool** | Whether the rule is enabled. |
910
**Message** | **string** | Message for generated signals. |
1011
**Name** | **string** | The name of the rule. |
@@ -51,6 +52,31 @@ and a boolean to check if the value has been set.
5152
SetCases sets Cases field to given value.
5253

5354

55+
### GetFilters
56+
57+
`func (o *SecurityMonitoringRuleCreatePayload) GetFilters() []SecurityMonitoringFilter`
58+
59+
GetFilters returns the Filters field if non-nil, zero value otherwise.
60+
61+
### GetFiltersOk
62+
63+
`func (o *SecurityMonitoringRuleCreatePayload) GetFiltersOk() (*[]SecurityMonitoringFilter, bool)`
64+
65+
GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise
66+
and a boolean to check if the value has been set.
67+
68+
### SetFilters
69+
70+
`func (o *SecurityMonitoringRuleCreatePayload) SetFilters(v []SecurityMonitoringFilter)`
71+
72+
SetFilters sets Filters field to given value.
73+
74+
### HasFilters
75+
76+
`func (o *SecurityMonitoringRuleCreatePayload) HasFilters() bool`
77+
78+
HasFilters returns a boolean if a field has been set.
79+
5480
### GetIsEnabled
5581

5682
`func (o *SecurityMonitoringRuleCreatePayload) GetIsEnabled() bool`

api/v2/datadog/docs/SecurityMonitoringRuleResponse.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
77
**Cases** | Pointer to [**[]SecurityMonitoringRuleCase**](SecurityMonitoringRuleCase.md) | Cases for generating signals. | [optional]
88
**CreatedAt** | Pointer to **int64** | When the rule was created, timestamp in milliseconds. | [optional]
99
**CreationAuthorId** | Pointer to **int64** | User ID of the user who created the rule. | [optional]
10+
**Filters** | Pointer to [**[]SecurityMonitoringFilter**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
1011
**Id** | Pointer to **string** | The ID of the rule. | [optional]
1112
**IsDefault** | Pointer to **bool** | Whether the rule is included by default. | [optional]
1213
**IsDeleted** | Pointer to **bool** | Whether the rule has been deleted. | [optional]
@@ -112,6 +113,31 @@ SetCreationAuthorId sets CreationAuthorId field to given value.
112113

113114
HasCreationAuthorId returns a boolean if a field has been set.
114115

116+
### GetFilters
117+
118+
`func (o *SecurityMonitoringRuleResponse) GetFilters() []SecurityMonitoringFilter`
119+
120+
GetFilters returns the Filters field if non-nil, zero value otherwise.
121+
122+
### GetFiltersOk
123+
124+
`func (o *SecurityMonitoringRuleResponse) GetFiltersOk() (*[]SecurityMonitoringFilter, bool)`
125+
126+
GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise
127+
and a boolean to check if the value has been set.
128+
129+
### SetFilters
130+
131+
`func (o *SecurityMonitoringRuleResponse) SetFilters(v []SecurityMonitoringFilter)`
132+
133+
SetFilters sets Filters field to given value.
134+
135+
### HasFilters
136+
137+
`func (o *SecurityMonitoringRuleResponse) HasFilters() bool`
138+
139+
HasFilters returns a boolean if a field has been set.
140+
115141
### GetId
116142

117143
`func (o *SecurityMonitoringRuleResponse) GetId() string`

api/v2/datadog/docs/SecurityMonitoringRuleUpdatePayload.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Cases** | Pointer to [**[]SecurityMonitoringRuleCase**](SecurityMonitoringRuleCase.md) | Cases for generating signals. | [optional]
8+
**Filters** | Pointer to [**[]SecurityMonitoringFilter**](SecurityMonitoringFilter.md) | Additional queries to filter matched events before they are processed. | [optional]
89
**IsEnabled** | Pointer to **bool** | Whether the rule is enabled. | [optional]
910
**Message** | Pointer to **string** | Message for generated signals. | [optional]
1011
**Name** | Pointer to **string** | Name of the rule. | [optional]
@@ -56,6 +57,31 @@ SetCases sets Cases field to given value.
5657

5758
HasCases returns a boolean if a field has been set.
5859

60+
### GetFilters
61+
62+
`func (o *SecurityMonitoringRuleUpdatePayload) GetFilters() []SecurityMonitoringFilter`
63+
64+
GetFilters returns the Filters field if non-nil, zero value otherwise.
65+
66+
### GetFiltersOk
67+
68+
`func (o *SecurityMonitoringRuleUpdatePayload) GetFiltersOk() (*[]SecurityMonitoringFilter, bool)`
69+
70+
GetFiltersOk returns a tuple with the Filters field if it's non-nil, zero value otherwise
71+
and a boolean to check if the value has been set.
72+
73+
### SetFilters
74+
75+
`func (o *SecurityMonitoringRuleUpdatePayload) SetFilters(v []SecurityMonitoringFilter)`
76+
77+
SetFilters sets Filters field to given value.
78+
79+
### HasFilters
80+
81+
`func (o *SecurityMonitoringRuleUpdatePayload) HasFilters() bool`
82+
83+
HasFilters returns a boolean if a field has been set.
84+
5985
### GetIsEnabled
6086

6187
`func (o *SecurityMonitoringRuleUpdatePayload) GetIsEnabled() bool`

0 commit comments

Comments
 (0)