Skip to content

Commit 9bd547f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cfbf5cd of spec repo
1 parent 87dea61 commit 9bd547f

File tree

7 files changed

+76
-12
lines changed

7 files changed

+76
-12
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46982,6 +46982,14 @@ components:
4698246982
the queries to search signals in the signal explorer.
4698346983
example: env:staging status:low
4698446984
type: string
46985+
tags:
46986+
description: List of tags associated with the suppression rule.
46987+
example:
46988+
- technique:T1110-brute-force
46989+
- source:cloudtrail
46990+
items:
46991+
type: string
46992+
type: array
4698546993
update_date:
4698646994
description: A Unix millisecond timestamp given the update date of the suppression
4698746995
rule.
@@ -47043,6 +47051,14 @@ components:
4704347051
same syntax as the queries to search signals in the Signals Explorer.
4704447052
example: env:staging status:low
4704547053
type: string
47054+
tags:
47055+
description: List of tags associated with the suppression rule.
47056+
example:
47057+
- technique:T1110-brute-force
47058+
- source:cloudtrail
47059+
items:
47060+
type: string
47061+
type: array
4704647062
required:
4704747063
- name
4704847064
- enabled
@@ -47138,6 +47154,14 @@ components:
4713847154
the queries to search signals in the signal explorer.
4713947155
example: env:staging status:low
4714047156
type: string
47157+
tags:
47158+
description: List of tags associated with the suppression rule.
47159+
example:
47160+
- technique:T1110-brute-force
47161+
- source:cloudtrail
47162+
items:
47163+
type: string
47164+
type: array
4714147165
version:
4714247166
description: The current version of the suppression. This is optional, but
4714347167
it can help prevent concurrent modifications.

examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
name: "Example-Security-Monitoring",
1414
rule_query: "type:log_detection source:cloudtrail",
1515
suppression_query: "env:staging status:low",
16+
tags: [
17+
"technique:T1110-brute-force",
18+
"source:cloudtrail",
19+
],
1620
}),
1721
type: DatadogAPIClient::V2::SecurityMonitoringSuppressionType::SUPPRESSIONS,
1822
}),

features/v2/given.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@
967967
"parameters": [
968968
{
969969
"name": "body",
970-
"value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\"\n }\n }\n}"
970+
"value": "{\n \"data\": {\n \"type\": \"suppressions\",\n \"attributes\": {\n \"enabled\": true,\n \"name\": \"{{ unique }}\",\n \"description\": \"{{ unique }}\",\n \"rule_query\": \"source:cloudtrail\",\n \"suppression_query\": \"env:test\",\n \"tags\": [\"technique:T1110-brute-force\", \"source:cloudtrail\"]\n }\n }\n}"
971971
}
972972
],
973973
"step": "there is a valid \"suppression\" in the system",

features/v2/security_monitoring.feature

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -376,21 +376,21 @@ Feature: Security Monitoring
376376
@generated @skip @team:DataDog/k9-cloud-security-platform
377377
Scenario: Create a suppression rule returns "Bad Request" response
378378
Given new "CreateSecurityMonitoringSuppression" request
379-
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
379+
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
380380
When the request is sent
381381
Then the response status is 400 Bad Request
382382

383383
@generated @skip @team:DataDog/k9-cloud-security-platform
384384
Scenario: Create a suppression rule returns "Conflict" response
385385
Given new "CreateSecurityMonitoringSuppression" request
386-
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
386+
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
387387
When the request is sent
388388
Then the response status is 409 Conflict
389389

390390
@skip-validation @team:DataDog/k9-cloud-security-platform
391391
Scenario: Create a suppression rule returns "OK" response
392392
Given new "CreateSecurityMonitoringSuppression" request
393-
And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "start_date": {{ timestamp('now + 10d') }}000, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
393+
And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "start_date": {{ timestamp('now + 10d') }}000, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
394394
When the request is sent
395395
Then the response status is 200 OK
396396
And the response "data.type" is equal to "suppressions"
@@ -1474,23 +1474,23 @@ Feature: Security Monitoring
14741474
Scenario: Update a suppression rule returns "Bad Request" response
14751475
Given new "UpdateSecurityMonitoringSuppression" request
14761476
And request contains "suppression_id" parameter from "REPLACE.ME"
1477-
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
1477+
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
14781478
When the request is sent
14791479
Then the response status is 400 Bad Request
14801480

14811481
@generated @skip @team:DataDog/k9-cloud-security-platform
14821482
Scenario: Update a suppression rule returns "Concurrent Modification" response
14831483
Given new "UpdateSecurityMonitoringSuppression" request
14841484
And request contains "suppression_id" parameter from "REPLACE.ME"
1485-
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
1485+
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
14861486
When the request is sent
14871487
Then the response status is 409 Concurrent Modification
14881488

14891489
@generated @skip @team:DataDog/k9-cloud-security-platform
14901490
Scenario: Update a suppression rule returns "Not Found" response
14911491
Given new "UpdateSecurityMonitoringSuppression" request
14921492
And request contains "suppression_id" parameter from "REPLACE.ME"
1493-
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
1493+
And body with value {"data": {"attributes": {"data_exclusion_query": "source:cloudtrail account_id:12345", "description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": 1703187336000, "name": "Custom suppression", "rule_query": "type:log_detection source:cloudtrail", "start_date": 1703187336000, "suppression_query": "env:staging status:low", "tags": ["technique:T1110-brute-force", "source:cloudtrail"]}, "type": "suppressions"}}
14941494
When the request is sent
14951495
Then the response status is 404 Not Found
14961496

lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ class SecurityMonitoringSuppressionAttributes
5454
# The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
5555
attr_accessor :suppression_query
5656

57+
# List of tags associated with the suppression rule.
58+
attr_accessor :tags
59+
5760
# A Unix millisecond timestamp given the update date of the suppression rule.
5861
attr_accessor :update_date
5962

@@ -80,6 +83,7 @@ def self.attribute_map
8083
:'rule_query' => :'rule_query',
8184
:'start_date' => :'start_date',
8285
:'suppression_query' => :'suppression_query',
86+
:'tags' => :'tags',
8387
:'update_date' => :'update_date',
8488
:'updater' => :'updater',
8589
:'version' => :'version'
@@ -101,6 +105,7 @@ def self.openapi_types
101105
:'rule_query' => :'String',
102106
:'start_date' => :'Integer',
103107
:'suppression_query' => :'String',
108+
:'tags' => :'Array<String>',
104109
:'update_date' => :'Integer',
105110
:'updater' => :'SecurityMonitoringUser',
106111
:'version' => :'Integer'
@@ -169,6 +174,12 @@ def initialize(attributes = {})
169174
self.suppression_query = attributes[:'suppression_query']
170175
end
171176

177+
if attributes.key?(:'tags')
178+
if (value = attributes[:'tags']).is_a?(Array)
179+
self.tags = value
180+
end
181+
end
182+
172183
if attributes.key?(:'update_date')
173184
self.update_date = attributes[:'update_date']
174185
end
@@ -237,6 +248,7 @@ def ==(o)
237248
rule_query == o.rule_query &&
238249
start_date == o.start_date &&
239250
suppression_query == o.suppression_query &&
251+
tags == o.tags &&
240252
update_date == o.update_date &&
241253
updater == o.updater &&
242254
version == o.version &&
@@ -247,7 +259,7 @@ def ==(o)
247259
# @return [Integer] Hash code
248260
# @!visibility private
249261
def hash
250-
[creation_date, creator, data_exclusion_query, description, editable, enabled, expiration_date, name, rule_query, start_date, suppression_query, update_date, updater, version, additional_properties].hash
262+
[creation_date, creator, data_exclusion_query, description, editable, enabled, expiration_date, name, rule_query, start_date, suppression_query, tags, update_date, updater, version, additional_properties].hash
251263
end
252264
end
253265
end

lib/datadog_api_client/v2/models/security_monitoring_suppression_create_attributes.rb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class SecurityMonitoringSuppressionCreateAttributes
4545
# The suppression query of the suppression rule. If a signal matches this query, it is suppressed and is not triggered. It uses the same syntax as the queries to search signals in the Signals Explorer.
4646
attr_accessor :suppression_query
4747

48+
# List of tags associated with the suppression rule.
49+
attr_accessor :tags
50+
4851
attr_accessor :additional_properties
4952

5053
# Attribute mapping from ruby-style variable name to JSON key.
@@ -58,7 +61,8 @@ def self.attribute_map
5861
:'name' => :'name',
5962
:'rule_query' => :'rule_query',
6063
:'start_date' => :'start_date',
61-
:'suppression_query' => :'suppression_query'
64+
:'suppression_query' => :'suppression_query',
65+
:'tags' => :'tags'
6266
}
6367
end
6468

@@ -73,7 +77,8 @@ def self.openapi_types
7377
:'name' => :'String',
7478
:'rule_query' => :'String',
7579
:'start_date' => :'Integer',
76-
:'suppression_query' => :'String'
80+
:'suppression_query' => :'String',
81+
:'tags' => :'Array<String>'
7782
}
7883
end
7984

@@ -126,6 +131,12 @@ def initialize(attributes = {})
126131
if attributes.key?(:'suppression_query')
127132
self.suppression_query = attributes[:'suppression_query']
128133
end
134+
135+
if attributes.key?(:'tags')
136+
if (value = attributes[:'tags']).is_a?(Array)
137+
self.tags = value
138+
end
139+
end
129140
end
130141

131142
# Check to see if the all the properties in the model are valid
@@ -202,14 +213,15 @@ def ==(o)
202213
rule_query == o.rule_query &&
203214
start_date == o.start_date &&
204215
suppression_query == o.suppression_query &&
216+
tags == o.tags &&
205217
additional_properties == o.additional_properties
206218
end
207219

208220
# Calculates hash code according to all attributes.
209221
# @return [Integer] Hash code
210222
# @!visibility private
211223
def hash
212-
[data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, additional_properties].hash
224+
[data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, tags, additional_properties].hash
213225
end
214226
end
215227
end

lib/datadog_api_client/v2/models/security_monitoring_suppression_update_attributes.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class SecurityMonitoringSuppressionUpdateAttributes
4545
# The suppression query of the suppression rule. If a signal matches this query, it is suppressed and not triggered. Same syntax as the queries to search signals in the signal explorer.
4646
attr_accessor :suppression_query
4747

48+
# List of tags associated with the suppression rule.
49+
attr_accessor :tags
50+
4851
# The current version of the suppression. This is optional, but it can help prevent concurrent modifications.
4952
attr_reader :version
5053

@@ -62,6 +65,7 @@ def self.attribute_map
6265
:'rule_query' => :'rule_query',
6366
:'start_date' => :'start_date',
6467
:'suppression_query' => :'suppression_query',
68+
:'tags' => :'tags',
6569
:'version' => :'version'
6670
}
6771
end
@@ -78,6 +82,7 @@ def self.openapi_types
7882
:'rule_query' => :'String',
7983
:'start_date' => :'Integer',
8084
:'suppression_query' => :'String',
85+
:'tags' => :'Array<String>',
8186
:'version' => :'Integer'
8287
}
8388
end
@@ -141,6 +146,12 @@ def initialize(attributes = {})
141146
self.suppression_query = attributes[:'suppression_query']
142147
end
143148

149+
if attributes.key?(:'tags')
150+
if (value = attributes[:'tags']).is_a?(Array)
151+
self.tags = value
152+
end
153+
end
154+
144155
if attributes.key?(:'version')
145156
self.version = attributes[:'version']
146157
end
@@ -198,6 +209,7 @@ def ==(o)
198209
rule_query == o.rule_query &&
199210
start_date == o.start_date &&
200211
suppression_query == o.suppression_query &&
212+
tags == o.tags &&
201213
version == o.version &&
202214
additional_properties == o.additional_properties
203215
end
@@ -206,7 +218,7 @@ def ==(o)
206218
# @return [Integer] Hash code
207219
# @!visibility private
208220
def hash
209-
[data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, version, additional_properties].hash
221+
[data_exclusion_query, description, enabled, expiration_date, name, rule_query, start_date, suppression_query, tags, version, additional_properties].hash
210222
end
211223
end
212224
end

0 commit comments

Comments
 (0)