Skip to content

Commit 6153c4e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 2d1ebbf0 of spec repo (#1054)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 3754529 commit 6153c4e

File tree

5 files changed

+28
-7
lines changed

5 files changed

+28
-7
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.2",
7-
"regenerated": "2022-06-27 13:32:33.434285",
8-
"spec_repo_commit": "773b3560"
7+
"regenerated": "2022-06-27 16:07:30.831336",
8+
"spec_repo_commit": "2d1ebbf0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-06-27 13:32:33.527975",
13-
"spec_repo_commit": "773b3560"
12+
"regenerated": "2022-06-27 16:07:30.843259",
13+
"spec_repo_commit": "2d1ebbf0"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6340,6 +6340,17 @@ components:
63406340
- cases
63416341
- message
63426342
type: object
6343+
SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv:
6344+
description: 'If true, signals in non-production environments have a lower severity
6345+
than what is defined by the rule case, which can reduce signal noise.
6346+
6347+
The severity is decreased by one level: `CRITICAL` in production becomes `HIGH`
6348+
in non-production, `HIGH` becomes `MEDIUM` and so on. `INFO` remains `INFO`.
6349+
6350+
The decrement is applied when the environment tag of the signal starts with
6351+
`staging`, `test` or `dev`.'
6352+
example: false
6353+
type: boolean
63436354
SecurityMonitoringRuleDetectionMethod:
63446355
description: The detection method.
63456356
enum:
@@ -6533,6 +6544,8 @@ components:
65336544
SecurityMonitoringRuleOptions:
65346545
description: Options on rules.
65356546
properties:
6547+
decreaseCriticalityBasedOnEnv:
6548+
$ref: '#/components/schemas/SecurityMonitoringRuleDecreaseCriticalityBasedOnEnv'
65366549
detectionMethod:
65376550
$ref: '#/components/schemas/SecurityMonitoringRuleDetectionMethod'
65386551
evaluationWindow:

examples/v2/security-monitoring/UpdateSecurityMonitoringRule.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
],
5757
has_extended_title=True,
5858
options=SecurityMonitoringRuleOptions(
59+
decrease_criticality_based_on_env=False,
5960
detection_method=SecurityMonitoringRuleDetectionMethod("threshold"),
6061
evaluation_window=SecurityMonitoringRuleEvaluationWindow(0),
6162
hardcoded_evaluator_type=SecurityMonitoringRuleHardcodedEvaluatorType("log4shell"),

src/datadog_api_client/v2/model/security_monitoring_rule_options.py

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

tests/v2/features/security_monitoring.feature

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,22 +226,22 @@ Feature: Security Monitoring
226226
Scenario: Update an existing rule returns "Bad Request" response
227227
Given new "UpdateSecurityMonitoringRule" request
228228
And request contains "rule_id" parameter from "REPLACE.ME"
229-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
229+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
230230
When the request is sent
231231
Then the response status is 400 Bad Request
232232

233233
@generated @skip @team:DataDog/k9-cloud-security-platform
234234
Scenario: Update an existing rule returns "Not Found" response
235235
Given new "UpdateSecurityMonitoringRule" request
236236
And request contains "rule_id" parameter from "REPLACE.ME"
237-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
237+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
238238
When the request is sent
239239
Then the response status is 404 Not Found
240240

241241
@generated @skip @team:DataDog/k9-cloud-security-platform
242242
Scenario: Update an existing rule returns "OK" response
243243
Given new "UpdateSecurityMonitoringRule" request
244244
And request contains "rule_id" parameter from "REPLACE.ME"
245-
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
245+
And body with value {"cases": [{"notifications": [], "status": "critical"}], "filters": [{"action": "require"}], "hasExtendedTitle": true, "options": {"decreaseCriticalityBasedOnEnv": false, "detectionMethod": "threshold", "evaluationWindow": 0, "hardcodedEvaluatorType": "log4shell", "impossibleTravelOptions": {"baselineUserLocations": true}, "keepAlive": 0, "maxSignalDuration": 0, "newValueOptions": {"forgetAfter": 1, "learningDuration": 0, "learningMethod": "duration", "learningThreshold": 0}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
246246
When the request is sent
247247
Then the response status is 200 OK

0 commit comments

Comments
 (0)