Skip to content

Commit 063b525

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 216c60c of spec repo
1 parent 536cc0d commit 063b525

File tree

7 files changed

+466
-0
lines changed

7 files changed

+466
-0
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63779,6 +63779,65 @@ paths:
6377963779
tags:
6378063780
- Security Monitoring
6378163781
x-codegen-request-body-name: body
63782+
/api/v2/security_monitoring/configuration/suppressions/rules:
63783+
post:
63784+
description: Get the list of suppressions that would affect a rule.
63785+
operationId: GetSuppressionsAffectingFutureRule
63786+
requestBody:
63787+
content:
63788+
application/json:
63789+
schema:
63790+
$ref: '#/components/schemas/SecurityMonitoringRuleCreatePayload'
63791+
required: true
63792+
responses:
63793+
'200':
63794+
content:
63795+
application/json:
63796+
schema:
63797+
$ref: '#/components/schemas/SecurityMonitoringSuppressionsResponse'
63798+
description: OK
63799+
'400':
63800+
$ref: '#/components/responses/BadRequestResponse'
63801+
'403':
63802+
$ref: '#/components/responses/NotAuthorizedResponse'
63803+
'429':
63804+
$ref: '#/components/responses/TooManyRequestsResponse'
63805+
security:
63806+
- apiKeyAuth: []
63807+
appKeyAuth: []
63808+
- AuthZ:
63809+
- security_monitoring_suppressions_read
63810+
summary: Get suppressions affecting future rule
63811+
tags:
63812+
- Security Monitoring
63813+
/api/v2/security_monitoring/configuration/suppressions/rules/{rule_id}:
63814+
get:
63815+
description: Get the list of suppressions that affect a specific existing rule
63816+
by its ID.
63817+
operationId: GetSuppressionsAffectingRule
63818+
parameters:
63819+
- $ref: '#/components/parameters/SecurityMonitoringRuleID'
63820+
responses:
63821+
'200':
63822+
content:
63823+
application/json:
63824+
schema:
63825+
$ref: '#/components/schemas/SecurityMonitoringSuppressionsResponse'
63826+
description: OK
63827+
'403':
63828+
$ref: '#/components/responses/NotAuthorizedResponse'
63829+
'404':
63830+
$ref: '#/components/responses/NotFoundResponse'
63831+
'429':
63832+
$ref: '#/components/responses/TooManyRequestsResponse'
63833+
security:
63834+
- apiKeyAuth: []
63835+
appKeyAuth: []
63836+
- AuthZ:
63837+
- security_monitoring_suppressions_read
63838+
summary: Get suppressions affecting a specific rule
63839+
tags:
63840+
- Security Monitoring
6378263841
/api/v2/security_monitoring/configuration/suppressions/{suppression_id}:
6378363842
delete:
6378463843
description: Delete a specific suppression rule.

features/v2/security_monitoring.feature

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -822,6 +822,34 @@ Feature: Security Monitoring
822822
And the response "data.attributes.count" is equal to 1
823823
And the response "data.attributes.data[1].rule.name" has the same value as "security_rule.name"
824824

825+
@generated @skip @team:DataDog/k9-cloud-security-platform
826+
Scenario: Get suppressions affecting a specific rule returns "Not Found" response
827+
Given new "GetSuppressionsAffectingRule" request
828+
And request contains "rule_id" parameter from "REPLACE.ME"
829+
When the request is sent
830+
Then the response status is 404 Not Found
831+
832+
@generated @skip @team:DataDog/k9-cloud-security-platform
833+
Scenario: Get suppressions affecting a specific rule returns "OK" response
834+
Given new "GetSuppressionsAffectingRule" request
835+
And request contains "rule_id" parameter from "REPLACE.ME"
836+
When the request is sent
837+
Then the response status is 200 OK
838+
839+
@skip @team:DataDog/k9-cloud-security-platform
840+
Scenario: Get suppressions affecting future rule returns "Bad Request" response
841+
Given new "GetSuppressionsAffectingFutureRule" request
842+
And body from file "security_monitoring_future_rule_surpression_payload.json"
843+
When the request is sent
844+
Then the response status is 400 Bad Request
845+
846+
@skip @team:DataDog/k9-cloud-security-platform
847+
Scenario: Get suppressions affecting future rule returns "OK" response
848+
Given new "GetSuppressionsAffectingFutureRule" request
849+
And body from file "security_monitoring_future_rule_surpression_payload.json"
850+
When the request is sent
851+
Then the response status is 200 OK
852+
825853
@team:DataDog/cloud-security-posture-management
826854
Scenario: Get the list of signal-based notification rules returns "The list of notification rules." response
827855
Given there is a valid "valid_signal_notification_rule" in the system
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"calculatedFields": [
3+
{
4+
"expression": "@request_end_timestamp - @request_start_timestamp",
5+
"name": "response_time"
6+
}
7+
],
8+
"cases": [],
9+
"filters": [
10+
{
11+
"action": "require"
12+
}
13+
],
14+
"groupSignalsBy": [
15+
"service"
16+
],
17+
"hasExtendedTitle": true,
18+
"isEnabled": true,
19+
"message": "",
20+
"name": "My security monitoring rule.",
21+
"options": {
22+
"complianceRuleOptions": {
23+
"regoRule": {
24+
"policy": "package datadog\n\nimport data.datadog.output as dd_output\nimport future.keywords.contains\nimport future.keywords.if\nimport future.keywords.in\n\neval(resource) = \"skip\" if {\n # Logic that evaluates to true if the resource should be skipped\n true\n} else = \"pass\" {\n # Logic that evaluates to true if the resource is compliant\n true\n} else = \"fail\" {\n # Logic that evaluates to true if the resource is not compliant\n true\n}\n\n# This part remains unchanged for all rules\nresults contains result if {\n some resource in input.resources[input.main_resource_type]\n result := dd_output.format(resource, eval(resource))\n}\n",
25+
"resourceTypes": [
26+
"gcp_iam_service_account",
27+
"gcp_iam_policy"
28+
]
29+
},
30+
"resourceType": "aws_acm"
31+
},
32+
"decreaseCriticalityBasedOnEnv": false,
33+
"detectionMethod": "threshold",
34+
"evaluationWindow": 0,
35+
"hardcodedEvaluatorType": "log4shell",
36+
"impossibleTravelOptions": {
37+
"baselineUserLocations": true
38+
},
39+
"keepAlive": 0,
40+
"maxSignalDuration": 0,
41+
"newValueOptions": {
42+
"forgetAfter": 1,
43+
"learningDuration": 0,
44+
"learningMethod": "duration",
45+
"learningThreshold": 0
46+
},
47+
"thirdPartyRuleOptions": {
48+
"defaultNotifications": [],
49+
"defaultStatus": "critical",
50+
"rootQueries": [
51+
{
52+
"groupByFields": [],
53+
"query": "source:cloudtrail"
54+
}
55+
]
56+
}
57+
},
58+
"queries": [],
59+
"referenceTables": [
60+
{}
61+
],
62+
"schedulingOptions": {
63+
"rrule": "FREQ=HOURLY;INTERVAL=1;",
64+
"start": "2025-07-14T12:00:00",
65+
"timezone": "America/New_York"
66+
},
67+
"tags": [
68+
"env:prod",
69+
"team:security"
70+
],
71+
"thirdPartyCases": [],
72+
"type": "api_security"
73+
}

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2988,6 +2988,18 @@
29882988
"type": "unsafe"
29892989
}
29902990
},
2991+
"GetSuppressionsAffectingFutureRule": {
2992+
"tag": "Security Monitoring",
2993+
"undo": {
2994+
"type": "safe"
2995+
}
2996+
},
2997+
"GetSuppressionsAffectingRule": {
2998+
"tag": "Security Monitoring",
2999+
"undo": {
3000+
"type": "safe"
3001+
}
3002+
},
29913003
"DeleteSecurityMonitoringSuppression": {
29923004
"tag": "Security Monitoring",
29933005
"undo": {

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3891,6 +3891,20 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
38913891
},
38923892
operationResponseType: "SecurityMonitoringSuppressionResponse",
38933893
},
3894+
"SecurityMonitoringApi.V2.GetSuppressionsAffectingFutureRule": {
3895+
body: {
3896+
type: "SecurityMonitoringRuleCreatePayload",
3897+
format: "",
3898+
},
3899+
operationResponseType: "SecurityMonitoringSuppressionsResponse",
3900+
},
3901+
"SecurityMonitoringApi.V2.GetSuppressionsAffectingRule": {
3902+
ruleId: {
3903+
type: "string",
3904+
format: "",
3905+
},
3906+
operationResponseType: "SecurityMonitoringSuppressionsResponse",
3907+
},
38943908
"SecurityMonitoringApi.V2.GetSecurityMonitoringSuppression": {
38953909
suppressionId: {
38963910
type: "string",

0 commit comments

Comments
 (0)