Skip to content

Commit 994ce71

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b4e964b3 of spec repo
1 parent 9ecce26 commit 994ce71

12 files changed

+92
-44
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-12-26 16:01:44.053811",
8-
"spec_repo_commit": "f2e98b01"
7+
"regenerated": "2025-01-02 14:39:40.447374",
8+
"spec_repo_commit": "b4e964b3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-12-26 16:01:44.071562",
13-
"spec_repo_commit": "f2e98b01"
12+
"regenerated": "2025-01-02 14:39:40.463809",
13+
"spec_repo_commit": "b4e964b3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24825,6 +24825,12 @@ components:
2482524825
as the search bar for detection rules.
2482624826
example: type:log_detection source:cloudtrail
2482724827
type: string
24828+
start_date:
24829+
description: A Unix millisecond timestamp giving the start date for the
24830+
suppression rule. After this date, it starts suppressing signals.
24831+
example: 1703187336000
24832+
format: int64
24833+
type: integer
2482824834
suppression_query:
2482924835
description: The suppression query of the suppression rule. If a signal
2483024836
matches this query, it is suppressed and not triggered. Same syntax as
@@ -24880,6 +24886,12 @@ components:
2488024886
as the search bar for detection rules.
2488124887
example: type:log_detection source:cloudtrail
2488224888
type: string
24889+
start_date:
24890+
description: A Unix millisecond timestamp giving the start date for the
24891+
suppression rule. After this date, it starts suppressing signals.
24892+
example: 1703187336000
24893+
format: int64
24894+
type: integer
2488324895
suppression_query:
2488424896
description: The suppression query of the suppression rule. If a signal
2488524897
matches this query, it is suppressed and is not triggered. It uses the
@@ -24966,6 +24978,15 @@ components:
2496624978
as the search bar for detection rules.
2496724979
example: type:log_detection source:cloudtrail
2496824980
type: string
24981+
start_date:
24982+
description: A Unix millisecond timestamp giving the start date for the
24983+
suppression rule. After this date, it starts suppressing signals. If unset,
24984+
the start date of the suppression rule is left untouched. If set to `null`,
24985+
the start date is removed.
24986+
example: 1703187336000
24987+
format: int64
24988+
nullable: true
24989+
type: integer
2496924990
suppression_query:
2497024991
description: The suppression query of the suppression rule. If a signal
2497124992
matches this query, it is suppressed and not triggered. Same syntax as
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-20T17:07:03.155Z
1+
2024-11-27T15:22:34.711Z

cassettes/features/v2/security_monitoring/Create-a-suppression-rule-returns-OK-response.yml

Lines changed: 12 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-05-20T17:07:12.131Z
1+
2024-11-27T15:24:35.169Z

cassettes/features/v2/security_monitoring/Create-a-suppression-rule-with-an-exclusion-query-returns-OK-response.yml

Lines changed: 10 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/v2/security-monitoring/CreateSecurityMonitoringSuppression.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({
99
description: "This rule suppresses low-severity signals in staging environments.",
1010
enabled: true,
11+
start_date: 1637493071000,
1112
expiration_date: 1638443471000,
1213
name: "Example-Security-Monitoring",
1314
rule_query: "type:log_detection source:cloudtrail",

examples/v2/security-monitoring/CreateSecurityMonitoringSuppression_3192265332.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
attributes: DatadogAPIClient::V2::SecurityMonitoringSuppressionCreateAttributes.new({
99
description: "This rule suppresses low-severity signals in staging environments.",
1010
enabled: true,
11+
start_date: 1637493071000,
1112
expiration_date: 1638443471000,
1213
name: "Example-Security-Monitoring",
1314
rule_query: "type:log_detection source:cloudtrail",

features/v2/security_monitoring.feature

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -264,21 +264,21 @@ Feature: Security Monitoring
264264
@generated @skip @team:DataDog/k9-cloud-security-platform
265265
Scenario: Create a suppression rule returns "Bad Request" response
266266
Given new "CreateSecurityMonitoringSuppression" request
267-
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", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
267+
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"}}
268268
When the request is sent
269269
Then the response status is 400 Bad Request
270270

271271
@generated @skip @team:DataDog/k9-cloud-security-platform
272272
Scenario: Create a suppression rule returns "Conflict" response
273273
Given new "CreateSecurityMonitoringSuppression" request
274-
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", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
274+
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"}}
275275
When the request is sent
276276
Then the response status is 409 Conflict
277277

278278
@skip-validation @team:DataDog/k9-cloud-security-platform
279279
Scenario: Create a suppression rule returns "OK" response
280280
Given new "CreateSecurityMonitoringSuppression" request
281-
And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
281+
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"}}
282282
When the request is sent
283283
Then the response status is 200 OK
284284
And the response "data.type" is equal to "suppressions"
@@ -288,7 +288,7 @@ Feature: Security Monitoring
288288
@skip-validation @team:DataDog/k9-cloud-security-platform
289289
Scenario: Create a suppression rule with an exclusion query returns "OK" response
290290
Given new "CreateSecurityMonitoringSuppression" request
291-
And body with value {"data": {"attributes": {"description": "This rule suppresses low-severity signals in staging environments.", "enabled": true, "expiration_date": {{ timestamp('now + 21d') }}000, "name": "{{ unique }}", "rule_query": "type:log_detection source:cloudtrail", "data_exclusion_query": "account_id:12345"}, "type": "suppressions"}}
291+
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", "data_exclusion_query": "account_id:12345"}, "type": "suppressions"}}
292292
When the request is sent
293293
Then the response status is 200 OK
294294
And the response "data.type" is equal to "suppressions"
@@ -867,23 +867,23 @@ Feature: Security Monitoring
867867
Scenario: Update a suppression rule returns "Bad Request" response
868868
Given new "UpdateSecurityMonitoringSuppression" request
869869
And request contains "suppression_id" parameter from "REPLACE.ME"
870-
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", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
870+
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"}}
871871
When the request is sent
872872
Then the response status is 400 Bad Request
873873

874874
@generated @skip @team:DataDog/k9-cloud-security-platform
875875
Scenario: Update a suppression rule returns "Concurrent Modification" response
876876
Given new "UpdateSecurityMonitoringSuppression" request
877877
And request contains "suppression_id" parameter from "REPLACE.ME"
878-
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", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
878+
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"}}
879879
When the request is sent
880880
Then the response status is 409 Concurrent Modification
881881

882882
@generated @skip @team:DataDog/k9-cloud-security-platform
883883
Scenario: Update a suppression rule returns "Not Found" response
884884
Given new "UpdateSecurityMonitoringSuppression" request
885885
And request contains "suppression_id" parameter from "REPLACE.ME"
886-
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", "suppression_query": "env:staging status:low"}, "type": "suppressions"}}
886+
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"}}
887887
When the request is sent
888888
Then the response status is 404 Not Found
889889

lib/datadog_api_client/v2/models/security_monitoring_suppression_attributes.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class SecurityMonitoringSuppressionAttributes
4848
# The rule query of the suppression rule, with the same syntax as the search bar for detection rules.
4949
attr_accessor :rule_query
5050

51+
# A Unix millisecond timestamp giving the start date for the suppression rule. After this date, it starts suppressing signals.
52+
attr_accessor :start_date
53+
5154
# 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.
5255
attr_accessor :suppression_query
5356

@@ -75,6 +78,7 @@ def self.attribute_map
7578
:'expiration_date' => :'expiration_date',
7679
:'name' => :'name',
7780
:'rule_query' => :'rule_query',
81+
:'start_date' => :'start_date',
7882
:'suppression_query' => :'suppression_query',
7983
:'update_date' => :'update_date',
8084
:'updater' => :'updater',
@@ -95,6 +99,7 @@ def self.openapi_types
9599
:'expiration_date' => :'Integer',
96100
:'name' => :'String',
97101
:'rule_query' => :'String',
102+
:'start_date' => :'Integer',
98103
:'suppression_query' => :'String',
99104
:'update_date' => :'Integer',
100105
:'updater' => :'SecurityMonitoringUser',
@@ -156,6 +161,10 @@ def initialize(attributes = {})
156161
self.rule_query = attributes[:'rule_query']
157162
end
158163

164+
if attributes.key?(:'start_date')
165+
self.start_date = attributes[:'start_date']
166+
end
167+
159168
if attributes.key?(:'suppression_query')
160169
self.suppression_query = attributes[:'suppression_query']
161170
end
@@ -226,6 +235,7 @@ def ==(o)
226235
expiration_date == o.expiration_date &&
227236
name == o.name &&
228237
rule_query == o.rule_query &&
238+
start_date == o.start_date &&
229239
suppression_query == o.suppression_query &&
230240
update_date == o.update_date &&
231241
updater == o.updater &&
@@ -237,7 +247,7 @@ def ==(o)
237247
# @return [Integer] Hash code
238248
# @!visibility private
239249
def hash
240-
[creation_date, creator, data_exclusion_query, description, editable, enabled, expiration_date, name, rule_query, suppression_query, update_date, updater, version, additional_properties].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
241251
end
242252
end
243253
end

0 commit comments

Comments
 (0)