Skip to content

Commit fa7e12b

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 17f09b79 of spec repo (#1042)
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 3c1c66a commit fa7e12b

10 files changed

+191
-14
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-17 19:27:20.886323",
8-
"spec_repo_commit": "ba61a429"
7+
"regenerated": "2022-06-20 06:54:32.701099",
8+
"spec_repo_commit": "17f09b79"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-06-17 19:27:20.900051",
13-
"spec_repo_commit": "ba61a429"
12+
"regenerated": "2022-06-20 06:54:32.712627",
13+
"spec_repo_commit": "17f09b79"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6469,6 +6469,10 @@ components:
64696469
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsForgetAfter'
64706470
learningDuration:
64716471
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningDuration'
6472+
learningMethod:
6473+
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningMethod'
6474+
learningThreshold:
6475+
$ref: '#/components/schemas/SecurityMonitoringRuleNewValueOptionsLearningThreshold'
64726476
type: object
64736477
SecurityMonitoringRuleNewValueOptionsForgetAfter:
64746478
description: The duration in days after which a learned value is forgotten.
@@ -6489,6 +6493,7 @@ components:
64896493
- THREE_WEEKS
64906494
- FOUR_WEEKS
64916495
SecurityMonitoringRuleNewValueOptionsLearningDuration:
6496+
default: 0
64926497
description: 'The duration in days during which values are learned, and after
64936498
which signals will be generated for values that
64946499
@@ -6504,6 +6509,29 @@ components:
65046509
- ZERO_DAYS
65056510
- ONE_DAY
65066511
- SEVEN_DAYS
6512+
SecurityMonitoringRuleNewValueOptionsLearningMethod:
6513+
default: duration
6514+
description: The learning method used to determine when signals should be generated
6515+
for values that weren't learned.
6516+
enum:
6517+
- duration
6518+
- threshold
6519+
type: string
6520+
x-enum-varnames:
6521+
- DURATION
6522+
- THRESHOLD
6523+
SecurityMonitoringRuleNewValueOptionsLearningThreshold:
6524+
default: 0
6525+
description: A number of occurrences after which signals will be generated for
6526+
values that weren't learned.
6527+
enum:
6528+
- 0
6529+
- 1
6530+
format: int32
6531+
type: integer
6532+
x-enum-varnames:
6533+
- ZERO_OCCURRENCES
6534+
- ONE_OCCURRENCE
65076535
SecurityMonitoringRuleOptions:
65086536
description: Options on rules.
65096537
properties:

docs/datadog_api_client.v2.model.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2941,6 +2941,20 @@ security\_monitoring\_rule\_new\_value\_options\_learning\_duration
29412941
:members:
29422942
:show-inheritance:
29432943

2944+
security\_monitoring\_rule\_new\_value\_options\_learning\_method
2945+
-----------------------------------------------------------------
2946+
2947+
.. automodule:: datadog_api_client.v2.model.security_monitoring_rule_new_value_options_learning_method
2948+
:members:
2949+
:show-inheritance:
2950+
2951+
security\_monitoring\_rule\_new\_value\_options\_learning\_threshold
2952+
--------------------------------------------------------------------
2953+
2954+
.. automodule:: datadog_api_client.v2.model.security_monitoring_rule_new_value_options_learning_threshold
2955+
:members:
2956+
:show-inheritance:
2957+
29442958
security\_monitoring\_rule\_options
29452959
-----------------------------------
29462960

examples/v2/security-monitoring/UpdateSecurityMonitoringRule.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@
2828
from datadog_api_client.v2.model.security_monitoring_rule_new_value_options_learning_duration import (
2929
SecurityMonitoringRuleNewValueOptionsLearningDuration,
3030
)
31+
from datadog_api_client.v2.model.security_monitoring_rule_new_value_options_learning_method import (
32+
SecurityMonitoringRuleNewValueOptionsLearningMethod,
33+
)
34+
from datadog_api_client.v2.model.security_monitoring_rule_new_value_options_learning_threshold import (
35+
SecurityMonitoringRuleNewValueOptionsLearningThreshold,
36+
)
3137
from datadog_api_client.v2.model.security_monitoring_rule_options import SecurityMonitoringRuleOptions
3238
from datadog_api_client.v2.model.security_monitoring_rule_query import SecurityMonitoringRuleQuery
3339
from datadog_api_client.v2.model.security_monitoring_rule_query_aggregation import (
@@ -61,6 +67,8 @@
6167
new_value_options=SecurityMonitoringRuleNewValueOptions(
6268
forget_after=SecurityMonitoringRuleNewValueOptionsForgetAfter(1),
6369
learning_duration=SecurityMonitoringRuleNewValueOptionsLearningDuration(0),
70+
learning_method=SecurityMonitoringRuleNewValueOptionsLearningMethod("duration"),
71+
learning_threshold=SecurityMonitoringRuleNewValueOptionsLearningThreshold(0),
6472
),
6573
),
6674
queries=[

src/datadog_api_client/v2/model/security_monitoring_rule_new_value_options.py

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

src/datadog_api_client/v2/model/security_monitoring_rule_new_value_options_learning_duration.py

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

src/datadog_api_client/v2/model/security_monitoring_rule_new_value_options_learning_method.py

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

src/datadog_api_client/v2/model/security_monitoring_rule_new_value_options_learning_threshold.py

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

src/datadog_api_client/v2/models/__init__.py

Lines changed: 6 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}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
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}
230230
When the request is sent
231231
Then the response status is 400 Bad Request
232232

233233
@generated @skip @team:DataDog/security-monitoring
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}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
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}
238238
When the request is sent
239239
Then the response status is 404 Not Found
240240

241241
@generated @skip @team:DataDog/security-monitoring
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}}, "queries": [{"aggregation": "count", "distinctFields": [], "groupByFields": []}], "tags": [], "version": 1}
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}
246246
When the request is sent
247247
Then the response status is 200 OK

0 commit comments

Comments
 (0)