Skip to content

Commit a3749f5

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6e838a18 of spec repo
1 parent 84247d8 commit a3749f5

19 files changed

+584
-21
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-02-06 17:59:35.241509",
8-
"spec_repo_commit": "b89b292b"
7+
"regenerated": "2025-02-07 10:27:02.214256",
8+
"spec_repo_commit": "6e838a18"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-02-06 17:59:35.256609",
13-
"spec_repo_commit": "b89b292b"
12+
"regenerated": "2025-02-07 10:27:02.229779",
13+
"spec_repo_commit": "6e838a18"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 93 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ components:
193193
schema:
194194
type: string
195195
ConfluentAccountID:
196-
description: Confluent Account id.
196+
description: Confluent Account ID.
197197
in: path
198198
name: account_id
199199
required: true
@@ -15657,6 +15657,15 @@ components:
1565715657
example: 1729843470000
1565815658
format: int64
1565915659
type: integer
15660+
groupSignalsBy:
15661+
description: Additional grouping to perform on top of the existing groups
15662+
in the query section. Must be a subset of the existing groups.
15663+
example:
15664+
- service
15665+
items:
15666+
description: Field to group by.
15667+
type: string
15668+
type: array
1566015669
index:
1566115670
description: Index used to load the data.
1566215671
example: cloud_siem
@@ -24242,6 +24251,11 @@ components:
2424224251
SecurityMonitoringRuleCase:
2424324252
description: Case when signal is generated.
2424424253
properties:
24254+
actions:
24255+
description: Action to perform for each rule case.
24256+
items:
24257+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseAction'
24258+
type: array
2424524259
condition:
2424624260
description: 'A rule case contains logical operations (`>`,`>=`, `&&`, `||`)
2424724261
to determine if a signal should be generated
@@ -24260,9 +24274,42 @@ components:
2426024274
status:
2426124275
$ref: '#/components/schemas/SecurityMonitoringRuleSeverity'
2426224276
type: object
24277+
SecurityMonitoringRuleCaseAction:
24278+
description: Action to perform when a signal is triggered. Only available for
24279+
Application Security rule type.
24280+
properties:
24281+
options:
24282+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionOptions'
24283+
type:
24284+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseActionType'
24285+
type: object
24286+
SecurityMonitoringRuleCaseActionOptions:
24287+
description: Options for the rule action
24288+
properties:
24289+
duration:
24290+
description: Duration of the action in seconds. 0 indicates no expiration.
24291+
example: 0
24292+
format: int64
24293+
minimum: 0
24294+
type: integer
24295+
type: object
24296+
SecurityMonitoringRuleCaseActionType:
24297+
description: The action type.
24298+
enum:
24299+
- block_ip
24300+
- block_user
24301+
type: string
24302+
x-enum-varnames:
24303+
- BLOCK_IP
24304+
- BLOCK_USER
2426324305
SecurityMonitoringRuleCaseCreate:
2426424306
description: Case when signal is generated.
2426524307
properties:
24308+
actions:
24309+
description: Action to perform for each rule case.
24310+
items:
24311+
$ref: '#/components/schemas/SecurityMonitoringRuleCaseAction'
24312+
type: array
2426624313
condition:
2426724314
description: 'A case contains logical operations (`>`,`>=`, `&&`, `||`)
2426824315
to determine if a signal should be generated
@@ -24724,6 +24771,15 @@ components:
2472424771
items:
2472524772
$ref: '#/components/schemas/SecurityMonitoringFilter'
2472624773
type: array
24774+
groupSignalsBy:
24775+
description: Additional grouping to perform on top of the existing groups
24776+
in the query section. Must be a subset of the existing groups.
24777+
example:
24778+
- service
24779+
items:
24780+
description: Field to group by.
24781+
type: string
24782+
type: array
2472724783
hasExtendedTitle:
2472824784
description: Whether the notifications include the triggering group-by values
2472924785
in their title.
@@ -25429,6 +25485,15 @@ components:
2542925485
items:
2543025486
$ref: '#/components/schemas/SecurityMonitoringFilter'
2543125487
type: array
25488+
groupSignalsBy:
25489+
description: Additional grouping to perform on top of the existing groups
25490+
in the query section. Must be a subset of the existing groups.
25491+
example:
25492+
- service
25493+
items:
25494+
description: Field to group by.
25495+
type: string
25496+
type: array
2543225497
hasExtendedTitle:
2543325498
description: Whether the notifications include the triggering group-by values
2543425499
in their title.
@@ -25501,6 +25566,15 @@ components:
2550125566
items:
2550225567
$ref: '#/components/schemas/SecurityMonitoringFilter'
2550325568
type: array
25569+
groupSignalsBy:
25570+
description: Additional grouping to perform on top of the existing groups
25571+
in the query section. Must be a subset of the existing groups.
25572+
example:
25573+
- service
25574+
items:
25575+
description: Field to group by.
25576+
type: string
25577+
type: array
2550425578
hasExtendedTitle:
2550525579
description: Whether the notifications include the triggering group-by values
2550625580
in their title.
@@ -25642,6 +25716,15 @@ components:
2564225716
items:
2564325717
$ref: '#/components/schemas/SecurityMonitoringFilter'
2564425718
type: array
25719+
groupSignalsBy:
25720+
description: Additional grouping to perform on top of the existing groups
25721+
in the query section. Must be a subset of the existing groups.
25722+
example:
25723+
- service
25724+
items:
25725+
description: Field to group by.
25726+
type: string
25727+
type: array
2564525728
hasExtendedTitle:
2564625729
description: Whether the notifications include the triggering group-by values
2564725730
in their title.
@@ -25719,6 +25802,15 @@ components:
2571925802
items:
2572025803
$ref: '#/components/schemas/SecurityMonitoringFilter'
2572125804
type: array
25805+
groupSignalsBy:
25806+
description: Additional grouping to perform on top of the existing groups
25807+
in the query section. Must be a subset of the existing groups.
25808+
example:
25809+
- service
25810+
items:
25811+
description: Field to group by.
25812+
type: string
25813+
type: array
2572225814
hasExtendedTitle:
2572325815
description: Whether the notifications include the triggering group-by values
2572425816
in their title.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-02-06T16:50:39.787Z

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

Lines changed: 46 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Create a detection rule with type 'application_security 'returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5+
6+
body = DatadogAPIClient::V2::SecurityMonitoringStandardRuleCreatePayload.new({
7+
type: DatadogAPIClient::V2::SecurityMonitoringRuleTypeCreate::APPLICATION_SECURITY,
8+
name: "Example-Security-Monitoring_appsec_rule",
9+
queries: [
10+
DatadogAPIClient::V2::SecurityMonitoringStandardRuleQuery.new({
11+
query: "@appsec.security_activity:business_logic.users.login.failure",
12+
aggregation: DatadogAPIClient::V2::SecurityMonitoringRuleQueryAggregation::COUNT,
13+
group_by_fields: [
14+
"service",
15+
"@http.client_ip",
16+
],
17+
distinct_fields: [],
18+
}),
19+
],
20+
filters: [],
21+
cases: [
22+
DatadogAPIClient::V2::SecurityMonitoringRuleCaseCreate.new({
23+
name: "",
24+
status: DatadogAPIClient::V2::SecurityMonitoringRuleSeverity::INFO,
25+
notifications: [],
26+
condition: "a > 100000",
27+
actions: [
28+
DatadogAPIClient::V2::SecurityMonitoringRuleCaseAction.new({
29+
type: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionType::BLOCK_IP,
30+
options: DatadogAPIClient::V2::SecurityMonitoringRuleCaseActionOptions.new({
31+
duration: 900,
32+
}),
33+
}),
34+
],
35+
}),
36+
],
37+
options: DatadogAPIClient::V2::SecurityMonitoringRuleOptions.new({
38+
keep_alive: DatadogAPIClient::V2::SecurityMonitoringRuleKeepAlive::ONE_HOUR,
39+
max_signal_duration: DatadogAPIClient::V2::SecurityMonitoringRuleMaxSignalDuration::ONE_DAY,
40+
evaluation_window: DatadogAPIClient::V2::SecurityMonitoringRuleEvaluationWindow::FIFTEEN_MINUTES,
41+
detection_method: DatadogAPIClient::V2::SecurityMonitoringRuleDetectionMethod::THRESHOLD,
42+
}),
43+
is_enabled: true,
44+
message: "Test rule",
45+
tags: [],
46+
group_signals_by: [
47+
"service",
48+
],
49+
})
50+
p api_instance.create_security_monitoring_rule(body)

features/v2/security_monitoring.feature

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,16 @@ Feature: Security Monitoring
200200
And the response "options.detectionMethod" is equal to "third_party"
201201
And the response "thirdPartyCases[0].query" is equal to "status:error"
202202

203+
@skip-validation @team:DataDog/k9-cloud-security-platform
204+
Scenario: Create a detection rule with type 'application_security 'returns "OK" response
205+
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"]}
207+
When the request is sent
208+
Then the response status is 200 OK
209+
And the response "name" is equal to "{{ unique }}_appsec_rule"
210+
And the response "type" is equal to "application_security"
211+
And the response "message" is equal to "Test rule"
212+
203213
@skip-validation @team:DataDog/k9-cloud-security-platform
204214
Scenario: Create a detection rule with type 'impossible_travel' returns "OK" response
205215
Given new "CreateSecurityMonitoringRule" request

lib/datadog_api_client/inflector.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,9 @@ def overrides
24202420
"v2.security_monitoring_list_rules_response" => "SecurityMonitoringListRulesResponse",
24212421
"v2.security_monitoring_reference_table" => "SecurityMonitoringReferenceTable",
24222422
"v2.security_monitoring_rule_case" => "SecurityMonitoringRuleCase",
2423+
"v2.security_monitoring_rule_case_action" => "SecurityMonitoringRuleCaseAction",
2424+
"v2.security_monitoring_rule_case_action_options" => "SecurityMonitoringRuleCaseActionOptions",
2425+
"v2.security_monitoring_rule_case_action_type" => "SecurityMonitoringRuleCaseActionType",
24232426
"v2.security_monitoring_rule_case_create" => "SecurityMonitoringRuleCaseCreate",
24242427
"v2.security_monitoring_rule_convert_payload" => "SecurityMonitoringRuleConvertPayload",
24252428
"v2.security_monitoring_rule_convert_response" => "SecurityMonitoringRuleConvertResponse",

lib/datadog_api_client/v2/api/confluent_cloud_api.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def create_confluent_resource(account_id, body, opts = {})
102102
#
103103
# Create a Confluent resource for the account associated with the provided ID.
104104
#
105-
# @param account_id [String] Confluent Account id.
105+
# @param account_id [String] Confluent Account ID.
106106
# @param body [ConfluentResourceRequest] Confluent payload
107107
# @param opts [Hash] the optional parameters
108108
# @return [Array<(ConfluentResourceResponse, Integer, Hash)>] ConfluentResourceResponse data, response status code and response headers
@@ -174,7 +174,7 @@ def delete_confluent_account(account_id, opts = {})
174174
#
175175
# Delete a Confluent account with the provided account ID.
176176
#
177-
# @param account_id [String] Confluent Account id.
177+
# @param account_id [String] Confluent Account ID.
178178
# @param opts [Hash] the optional parameters
179179
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
180180
def delete_confluent_account_with_http_info(account_id, opts = {})
@@ -239,7 +239,7 @@ def delete_confluent_resource(account_id, resource_id, opts = {})
239239
#
240240
# Delete a Confluent resource with the provided resource id for the account associated with the provided account ID.
241241
#
242-
# @param account_id [String] Confluent Account id.
242+
# @param account_id [String] Confluent Account ID.
243243
# @param resource_id [String] Confluent Account Resource ID.
244244
# @param opts [Hash] the optional parameters
245245
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
@@ -309,7 +309,7 @@ def get_confluent_account(account_id, opts = {})
309309
#
310310
# Get the Confluent account with the provided account ID.
311311
#
312-
# @param account_id [String] Confluent Account id.
312+
# @param account_id [String] Confluent Account ID.
313313
# @param opts [Hash] the optional parameters
314314
# @return [Array<(ConfluentAccountResponse, Integer, Hash)>] ConfluentAccountResponse data, response status code and response headers
315315
def get_confluent_account_with_http_info(account_id, opts = {})
@@ -374,7 +374,7 @@ def get_confluent_resource(account_id, resource_id, opts = {})
374374
#
375375
# Get a Confluent resource with the provided resource id for the account associated with the provided account ID.
376376
#
377-
# @param account_id [String] Confluent Account id.
377+
# @param account_id [String] Confluent Account ID.
378378
# @param resource_id [String] Confluent Account Resource ID.
379379
# @param opts [Hash] the optional parameters
380380
# @return [Array<(ConfluentResourceResponse, Integer, Hash)>] ConfluentResourceResponse data, response status code and response headers
@@ -504,7 +504,7 @@ def list_confluent_resource(account_id, opts = {})
504504
#
505505
# Get a Confluent resource for the account associated with the provided ID.
506506
#
507-
# @param account_id [String] Confluent Account id.
507+
# @param account_id [String] Confluent Account ID.
508508
# @param opts [Hash] the optional parameters
509509
# @return [Array<(ConfluentResourcesResponse, Integer, Hash)>] ConfluentResourcesResponse data, response status code and response headers
510510
def list_confluent_resource_with_http_info(account_id, opts = {})
@@ -569,7 +569,7 @@ def update_confluent_account(account_id, body, opts = {})
569569
#
570570
# Update the Confluent account with the provided account ID.
571571
#
572-
# @param account_id [String] Confluent Account id.
572+
# @param account_id [String] Confluent Account ID.
573573
# @param body [ConfluentAccountUpdateRequest] Confluent payload
574574
# @param opts [Hash] the optional parameters
575575
# @return [Array<(ConfluentAccountResponse, Integer, Hash)>] ConfluentAccountResponse data, response status code and response headers
@@ -641,7 +641,7 @@ def update_confluent_resource(account_id, resource_id, body, opts = {})
641641
#
642642
# Update a Confluent resource with the provided resource id for the account associated with the provided account ID.
643643
#
644-
# @param account_id [String] Confluent Account id.
644+
# @param account_id [String] Confluent Account ID.
645645
# @param resource_id [String] Confluent Account Resource ID.
646646
# @param body [ConfluentResourceRequest] Confluent payload
647647
# @param opts [Hash] the optional parameters

0 commit comments

Comments
 (0)