Skip to content

Commit 30caf72

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 3d683e08 of spec repo
1 parent 611db22 commit 30caf72

16 files changed

+682
-4
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-01-22 15:54:16.616972",
8-
"spec_repo_commit": "7a8ea4b1"
7+
"regenerated": "2025-01-23 15:33:51.890975",
8+
"spec_repo_commit": "3d683e08"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-22 15:54:16.633227",
13-
"spec_repo_commit": "7a8ea4b1"
12+
"regenerated": "2025-01-23 15:33:51.906081",
13+
"spec_repo_commit": "3d683e08"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12666,6 +12666,20 @@ components:
1266612666
$ref: '#/components/schemas/GetInterfacesData'
1266712667
type: array
1266812668
type: object
12669+
GetRuleVersionHistoryResponse:
12670+
description: Response object containing the version history of a rule.
12671+
properties:
12672+
count:
12673+
description: The number of rule versions.
12674+
format: int32
12675+
maximum: 2147483647
12676+
type: integer
12677+
data:
12678+
description: A list of rule versions.
12679+
items:
12680+
$ref: '#/components/schemas/RuleVersionHistory'
12681+
type: array
12682+
type: object
1266912683
GetSBOMResponse:
1267012684
description: The expected response schema when getting an SBOM.
1267112685
properties:
@@ -22930,6 +22944,42 @@ components:
2293022944
type: string
2293122945
x-enum-varnames:
2293222946
- RULE
22947+
RuleVersionHistory:
22948+
description: A rule version with a list of updates.
22949+
properties:
22950+
changes:
22951+
description: A list of changes.
22952+
items:
22953+
$ref: '#/components/schemas/RuleVersionUpdate'
22954+
type: array
22955+
rule:
22956+
$ref: '#/components/schemas/SecurityMonitoringRuleResponse'
22957+
type: object
22958+
RuleVersionUpdate:
22959+
description: A change in a rule version.
22960+
properties:
22961+
change:
22962+
description: The new value of the field.
22963+
example: cloud_provider:aws
22964+
type: string
22965+
field:
22966+
description: The field that was changed.
22967+
example: Tags
22968+
type: string
22969+
type:
22970+
$ref: '#/components/schemas/RuleVersionUpdateType'
22971+
type: object
22972+
RuleVersionUpdateType:
22973+
description: The type of change.
22974+
enum:
22975+
- create
22976+
- update
22977+
- delete
22978+
type: string
22979+
x-enum-varnames:
22980+
- CREATE
22981+
- UPDATE
22982+
- DELETE
2293322983
RumMetricCompute:
2293422984
description: The compute rule to compute the rum-based metric.
2293522985
properties:
@@ -44751,6 +44801,42 @@ paths:
4475144801
operator: OR
4475244802
permissions:
4475344803
- security_monitoring_rules_write
44804+
/api/v2/security_monitoring/rules/{rule_id}/version_history:
44805+
get:
44806+
description: Get a rule's version history.
44807+
operationId: GetRuleVersionHistory
44808+
parameters:
44809+
- $ref: '#/components/parameters/SecurityMonitoringRuleID'
44810+
- $ref: '#/components/parameters/PageSize'
44811+
- $ref: '#/components/parameters/PageNumber'
44812+
responses:
44813+
'200':
44814+
content:
44815+
application/json:
44816+
schema:
44817+
$ref: '#/components/schemas/GetRuleVersionHistoryResponse'
44818+
description: OK
44819+
'400':
44820+
$ref: '#/components/responses/BadRequestResponse'
44821+
'403':
44822+
$ref: '#/components/responses/NotAuthorizedResponse'
44823+
'404':
44824+
$ref: '#/components/responses/NotFoundResponse'
44825+
'429':
44826+
$ref: '#/components/responses/TooManyRequestsResponse'
44827+
security:
44828+
- apiKeyAuth: []
44829+
appKeyAuth: []
44830+
- AuthZ:
44831+
- security_monitoring_rules_read
44832+
summary: Get a rule's version history
44833+
tags:
44834+
- Security Monitoring
44835+
x-permission:
44836+
operator: OR
44837+
permissions:
44838+
- security_monitoring_rules_read
44839+
x-unstable: '**Note**: This endpoint is in beta and may be subject to changes.'
4475444840
/api/v2/security_monitoring/signals:
4475544841
get:
4475644842
description: 'The list endpoint returns security signals that match a search
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-01-22T19:09:57.587Z

cassettes/features/v2/security_monitoring/Get-rule-version-history-returns-OK-response.yml

Lines changed: 44 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get a rule's version history returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_rule_version_history".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
8+
p api_instance.get_rule_version_history("rule_id")
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get rule version history returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::SecurityMonitoringAPI.new
5+
6+
# there is a valid "security_rule" in the system
7+
SECURITY_RULE_ID = ENV["SECURITY_RULE_ID"]
8+
p api_instance.get_rule_version_history(SECURITY_RULE_ID)

features/scenarios_model_mapping.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1935,6 +1935,11 @@
19351935
"rule_id" => "String",
19361936
"body" => "SecurityMonitoringRuleTestRequest",
19371937
},
1938+
"v2.GetRuleVersionHistory" => {
1939+
"rule_id" => "String",
1940+
"page_size" => "Integer",
1941+
"page_number" => "Integer",
1942+
},
19381943
"v2.ListSecurityMonitoringSignals" => {
19391944
"filter_query" => "String",
19401945
"filter_from" => "Time",

features/v2/security_monitoring.feature

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,30 @@ Feature: Security Monitoring
534534
And the response "name" is equal to "{{ unique }}"
535535
And the response "id" has the same value as "security_rule.id"
536536

537+
@generated @skip @team:DataDog/k9-cloud-security-platform
538+
Scenario: Get a rule's version history returns "Bad Request" response
539+
Given operation "GetRuleVersionHistory" enabled
540+
And new "GetRuleVersionHistory" request
541+
And request contains "rule_id" parameter from "REPLACE.ME"
542+
When the request is sent
543+
Then the response status is 400 Bad Request
544+
545+
@generated @skip @team:DataDog/k9-cloud-security-platform
546+
Scenario: Get a rule's version history returns "Not Found" response
547+
Given operation "GetRuleVersionHistory" enabled
548+
And new "GetRuleVersionHistory" request
549+
And request contains "rule_id" parameter from "REPLACE.ME"
550+
When the request is sent
551+
Then the response status is 404 Not Found
552+
553+
@generated @skip @team:DataDog/k9-cloud-security-platform
554+
Scenario: Get a rule's version history returns "OK" response
555+
Given operation "GetRuleVersionHistory" enabled
556+
And new "GetRuleVersionHistory" request
557+
And request contains "rule_id" parameter from "REPLACE.ME"
558+
When the request is sent
559+
Then the response status is 200 OK
560+
537561
@generated @skip @team:DataDog/k9-cloud-security-platform
538562
Scenario: Get a security filter returns "Not Found" response
539563
Given new "GetSecurityFilter" request
@@ -599,6 +623,17 @@ Feature: Security Monitoring
599623
When the request is sent
600624
Then the response status is 200 OK
601625

626+
@replay-only @skip-validation @team:DataDog/k9-cloud-security-platform
627+
Scenario: Get rule version history returns "OK" response
628+
Given new "GetRuleVersionHistory" request
629+
And there is a valid "security_rule" in the system
630+
And request contains "rule_id" parameter from "security_rule.id"
631+
When the request is sent
632+
Then the response status is 200 OK
633+
And the response "data.id" has the same value as "security_rule.id"
634+
And the response "data.attributes.count" is equal to 1
635+
And the response "data.attributes.data[1].rule.name" has the same value as "security_rule.name"
636+
602637
@generated @skip @team:DataDog/cloud-security-posture-management
603638
Scenario: List findings returns "Bad Request: The server cannot process the request due to invalid syntax in the request." response
604639
Given operation "ListFindings" enabled

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,6 +2251,12 @@
22512251
"type": "idempotent"
22522252
}
22532253
},
2254+
"GetRuleVersionHistory": {
2255+
"tag": "Security Monitoring",
2256+
"undo": {
2257+
"type": "safe"
2258+
}
2259+
},
22542260
"ListSecurityMonitoringSignals": {
22552261
"tag": "Security Monitoring",
22562262
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ def initialize
246246
"v2.delete_historical_job": false,
247247
"v2.get_finding": false,
248248
"v2.get_historical_job": false,
249+
"v2.get_rule_version_history": false,
249250
"v2.get_sbom": false,
250251
"v2.list_findings": false,
251252
"v2.list_historical_jobs": false,

0 commit comments

Comments
 (0)