Skip to content

Commit bbf6c9f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c0a45137 of spec repo
1 parent c6da664 commit bbf6c9f

8 files changed

+48
-23
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": "2025-04-10 11:41:57.737818",
8-
"spec_repo_commit": "7f98e0a9"
7+
"regenerated": "2025-04-10 18:01:24.451821",
8+
"spec_repo_commit": "c0a45137"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-04-10 11:41:57.752970",
13-
"spec_repo_commit": "7f98e0a9"
12+
"regenerated": "2025-04-10 18:01:24.467888",
13+
"spec_repo_commit": "c0a45137"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27215,6 +27215,7 @@ components:
2721527215
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionType'
2721627216
type: object
2721727217
SecurityMonitoringRuleCaseActionOptions:
27218+
additionalProperties: {}
2721827219
description: Options for the rule action
2721927220
properties:
2722027221
duration:
@@ -27223,16 +27224,24 @@ components:
2722327224
format: int64
2722427225
minimum: 0
2722527226
type: integer
27227+
userBehaviorName:
27228+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionOptionsUserBehaviorName'
2722627229
type: object
27230+
SecurityMonitoringRuleCaseActionOptionsUserBehaviorName:
27231+
description: Used with the case action of type 'user_behavior'. The value specified
27232+
in this field is applied as a risk tag to all users affected by the rule.
27233+
type: string
2722727234
SecurityMonitoringRuleCaseActionType:
2722827235
description: The action type.
2722927236
enum:
2723027237
- block_ip
2723127238
- block_user
27239+
- user_behavior
2723227240
type: string
2723327241
x-enum-varnames:
2723427242
- BLOCK_IP
2723527243
- BLOCK_USER
27244+
- USER_BEHAVIOR
2723627245
SecurityMonitoringRuleCaseCreate:
2723727246
description: Case when signal is generated.
2723827247
properties:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-02-06T16:50:39.787Z
1+
2025-04-09T15:02:05.047Z

cassettes/features/v2/security_monitoring/Create-a-detection-rule-with-type-application-security-returns-OK-response.yml

Lines changed: 13 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/CreateSecurityMonitoringRule_1965169892.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@
3131
duration: 900,
3232
}),
3333
}),
34+
DatadogAPIClient::V2::SecurityMonitoringRuleCaseAction.new({
35+
type: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionType::USER_BEHAVIOR,
36+
options: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionOptions.new({
37+
user_behavior_name: "behavior",
38+
}),
39+
}),
3440
],
3541
}),
3642
],

features/v2/security_monitoring.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ Feature: Security Monitoring
203203
@skip-validation @team:DataDog/k9-cloud-security-platform
204204
Scenario: Create a detection rule with type 'application_security 'returns "OK" response
205205
Given new "CreateSecurityMonitoringRule" request
206-
And body with value {"type":"application_security","name":"{{unique}}_appsec_rule","queries":[{"query":"@appsec.security_activity:business_logic.users.login.failure","aggregation":"count","groupByFields":["service","@http.client_ip"],"distinctFields":[]}],"filters":[],"cases":[{"name":"","status":"info","notifications":[],"condition":"a > 100000","actions":[{"type":"block_ip","options":{"duration":900}}]}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"evaluationWindow":900,"detectionMethod":"threshold"},"isEnabled":true,"message":"Test rule","tags":[],"groupSignalsBy":["service"]}
206+
And body with value {"type":"application_security","name":"{{unique}}_appsec_rule","queries":[{"query":"@appsec.security_activity:business_logic.users.login.failure","aggregation":"count","groupByFields":["service","@http.client_ip"],"distinctFields":[]}],"filters":[],"cases":[{"name":"","status":"info","notifications":[],"condition":"a > 100000","actions":[{"type":"block_ip","options":{"duration":900}}, {"type":"user_behavior","options":{"userBehaviorName":"behavior"}}]}],"options":{"keepAlive":3600,"maxSignalDuration":86400,"evaluationWindow":900,"detectionMethod":"threshold"},"isEnabled":true,"message":"Test rule","tags":[],"groupSignalsBy":["service"]}
207207
When the request is sent
208208
Then the response status is 200 OK
209209
And the response "name" is equal to "{{ unique }}_appsec_rule"

lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_options.rb

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,26 @@ class SecurityMonitoringRuleCaseActionOptions
2424
# Duration of the action in seconds. 0 indicates no expiration.
2525
attr_reader :duration
2626

27+
# Used with the case action of type 'user_behavior'. The value specified in this field is applied as a risk tag to all users affected by the rule.
28+
attr_accessor :user_behavior_name
29+
2730
attr_accessor :additional_properties
2831

2932
# Attribute mapping from ruby-style variable name to JSON key.
3033
# @!visibility private
3134
def self.attribute_map
3235
{
33-
:'duration' => :'duration'
36+
:'duration' => :'duration',
37+
:'user_behavior_name' => :'userBehaviorName'
3438
}
3539
end
3640

3741
# Attribute type mapping.
3842
# @!visibility private
3943
def self.openapi_types
4044
{
41-
:'duration' => :'Integer'
45+
:'duration' => :'Integer',
46+
:'user_behavior_name' => :'String'
4247
}
4348
end
4449

@@ -63,6 +68,10 @@ def initialize(attributes = {})
6368
if attributes.key?(:'duration')
6469
self.duration = attributes[:'duration']
6570
end
71+
72+
if attributes.key?(:'user_behavior_name')
73+
self.user_behavior_name = attributes[:'user_behavior_name']
74+
end
6675
end
6776

6877
# Check to see if the all the properties in the model are valid
@@ -110,14 +119,15 @@ def ==(o)
110119
return true if self.equal?(o)
111120
self.class == o.class &&
112121
duration == o.duration &&
122+
user_behavior_name == o.user_behavior_name &&
113123
additional_properties == o.additional_properties
114124
end
115125

116126
# Calculates hash code according to all attributes.
117127
# @return [Integer] Hash code
118128
# @!visibility private
119129
def hash
120-
[duration, additional_properties].hash
130+
[duration, user_behavior_name, additional_properties].hash
121131
end
122132
end
123133
end

lib/datadog_api_client/v2/models/security_monitoring_rule_case_action_type.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,6 @@ class SecurityMonitoringRuleCaseActionType
2323

2424
BLOCK_IP = "block_ip".freeze
2525
BLOCK_USER = "block_user".freeze
26+
USER_BEHAVIOR = "user_behavior".freeze
2627
end
2728
end

0 commit comments

Comments
 (0)