Skip to content

Commit df55d33

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cc1a5d2 of spec repo
1 parent 53dcb13 commit df55d33

14 files changed

Lines changed: 990 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64029,6 +64029,38 @@ components:
6402964029
type: string
6403064030
x-enum-varnames:
6403164031
- SIGNAL
64032+
SecurityMonitoringSignalUpdateAttributes:
64033+
description: Attributes for updating one or more triage attributes of a security signal.
64034+
properties:
64035+
archive_comment:
64036+
$ref: "#/components/schemas/SecurityMonitoringSignalArchiveComment"
64037+
archive_reason:
64038+
$ref: "#/components/schemas/SecurityMonitoringSignalArchiveReason"
64039+
assignee:
64040+
$ref: "#/components/schemas/SecurityMonitoringTriageUser"
64041+
state:
64042+
$ref: "#/components/schemas/SecurityMonitoringSignalState"
64043+
version:
64044+
$ref: "#/components/schemas/SecurityMonitoringSignalVersion"
64045+
type: object
64046+
SecurityMonitoringSignalUpdateData:
64047+
description: Data containing the triage update for a security signal.
64048+
properties:
64049+
attributes:
64050+
$ref: "#/components/schemas/SecurityMonitoringSignalUpdateAttributes"
64051+
type:
64052+
$ref: "#/components/schemas/SecurityMonitoringSignalMetadataType"
64053+
required:
64054+
- attributes
64055+
type: object
64056+
SecurityMonitoringSignalUpdateRequest:
64057+
description: Request body for updating the triage attributes of a security signal.
64058+
properties:
64059+
data:
64060+
$ref: "#/components/schemas/SecurityMonitoringSignalUpdateData"
64061+
required:
64062+
- data
64063+
type: object
6403264064
SecurityMonitoringSignalVersion:
6403364065
description: Version of the updated signal. If server side version is higher, update will be rejected.
6403464066
format: int64
@@ -64182,6 +64214,33 @@ components:
6418264214
- count
6418364215
- events
6418464216
type: object
64217+
SecurityMonitoringSignalsBulkUpdateData:
64218+
description: Data for updating a single security signal in a bulk update operation.
64219+
properties:
64220+
attributes:
64221+
$ref: "#/components/schemas/SecurityMonitoringSignalUpdateAttributes"
64222+
id:
64223+
description: The unique ID of the security signal.
64224+
example: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
64225+
type: string
64226+
type:
64227+
$ref: "#/components/schemas/SecurityMonitoringSignalType"
64228+
required:
64229+
- id
64230+
- attributes
64231+
type: object
64232+
SecurityMonitoringSignalsBulkUpdateRequest:
64233+
description: Request body for updating multiple attributes of multiple security signals.
64234+
properties:
64235+
data:
64236+
description: An array of signal updates.
64237+
items:
64238+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkUpdateData"
64239+
maxItems: 199
64240+
type: array
64241+
required:
64242+
- data
64243+
type: object
6418564244
SecurityMonitoringSignalsListResponse:
6418664245
description: "The response object with all security signals matching the request\nand pagination information."
6418764246
properties:
@@ -114190,6 +114249,51 @@ paths:
114190114249
operator: OR
114191114250
permissions:
114192114251
- security_monitoring_signals_write
114252+
/api/v2/security_monitoring/signals/bulk/update:
114253+
patch:
114254+
description: |-
114255+
Update one or more triage attributes of multiple security signals at once.
114256+
The maximum number of signals that can be updated in a single request is 199.
114257+
operationId: BulkEditSecurityMonitoringSignals
114258+
requestBody:
114259+
content:
114260+
application/json:
114261+
schema:
114262+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkUpdateRequest"
114263+
description: Attributes describing the signal updates.
114264+
required: true
114265+
responses:
114266+
"200":
114267+
content:
114268+
application/json:
114269+
schema:
114270+
$ref: "#/components/schemas/SecurityMonitoringSignalsBulkTriageUpdateResponse"
114271+
description: OK
114272+
"400":
114273+
content:
114274+
application/json:
114275+
schema:
114276+
$ref: "#/components/schemas/JSONAPIErrorResponse"
114277+
description: Bad Request
114278+
"403":
114279+
content:
114280+
application/json:
114281+
schema:
114282+
$ref: "#/components/schemas/JSONAPIErrorResponse"
114283+
description: Forbidden
114284+
"429":
114285+
$ref: "#/components/responses/TooManyRequestsResponse"
114286+
security:
114287+
- apiKeyAuth: []
114288+
appKeyAuth: []
114289+
- AuthZ: []
114290+
summary: Bulk update security signals
114291+
tags: ["Security Monitoring"]
114292+
x-codegen-request-body-name: body
114293+
"x-permission":
114294+
operator: OR
114295+
permissions:
114296+
- security_monitoring_signals_write
114193114297
/api/v2/security_monitoring/signals/search:
114194114298
post:
114195114299
description: |-
@@ -114479,6 +114583,58 @@ paths:
114479114583
permissions:
114480114584
- security_monitoring_rules_read
114481114585
- security_monitoring_signals_read
114586+
/api/v2/security_monitoring/signals/{signal_id}/update:
114587+
patch:
114588+
description: |-
114589+
Update one or more triage attributes of a security signal.
114590+
operationId: EditSecurityMonitoringSignal
114591+
parameters:
114592+
- $ref: "#/components/parameters/SignalID"
114593+
requestBody:
114594+
content:
114595+
application/json:
114596+
schema:
114597+
$ref: "#/components/schemas/SecurityMonitoringSignalUpdateRequest"
114598+
description: Attributes describing the signal triage update.
114599+
required: true
114600+
responses:
114601+
"200":
114602+
content:
114603+
application/json:
114604+
schema:
114605+
$ref: "#/components/schemas/SecurityMonitoringSignalTriageUpdateResponse"
114606+
description: OK
114607+
"400":
114608+
content:
114609+
application/json:
114610+
schema:
114611+
$ref: "#/components/schemas/JSONAPIErrorResponse"
114612+
description: Bad Request
114613+
"403":
114614+
content:
114615+
application/json:
114616+
schema:
114617+
$ref: "#/components/schemas/JSONAPIErrorResponse"
114618+
description: Forbidden
114619+
"404":
114620+
content:
114621+
application/json:
114622+
schema:
114623+
$ref: "#/components/schemas/JSONAPIErrorResponse"
114624+
description: Not Found
114625+
"429":
114626+
$ref: "#/components/responses/TooManyRequestsResponse"
114627+
security:
114628+
- apiKeyAuth: []
114629+
appKeyAuth: []
114630+
- AuthZ: []
114631+
summary: Update a security signal's triage attributes
114632+
tags: ["Security Monitoring"]
114633+
x-codegen-request-body-name: body
114634+
"x-permission":
114635+
operator: OR
114636+
permissions:
114637+
- security_monitoring_signals_write
114482114638
/api/v2/security_monitoring/terraform/{resource_type}/bulk:
114483114639
post:
114484114640
description: |-
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/**
2+
* Bulk update security signals returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SecurityMonitoringApi(configuration);
9+
10+
const params: v2.SecurityMonitoringApiBulkEditSecurityMonitoringSignalsRequest =
11+
{
12+
body: {
13+
data: [
14+
{
15+
attributes: {
16+
archiveReason: "none",
17+
assignee: {
18+
name: undefined,
19+
uuid: "773b045d-ccf8-4808-bd3b-955ef6a8c940",
20+
},
21+
state: "open",
22+
},
23+
id: "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA",
24+
type: "signal",
25+
},
26+
],
27+
},
28+
};
29+
30+
apiInstance
31+
.bulkEditSecurityMonitoringSignals(params)
32+
.then((data: v2.SecurityMonitoringSignalsBulkTriageUpdateResponse) => {
33+
console.log(
34+
"API called successfully. Returned data: " + JSON.stringify(data)
35+
);
36+
})
37+
.catch((error: any) => console.error(error));
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/**
2+
* Update a security signal's triage attributes returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.SecurityMonitoringApi(configuration);
9+
10+
const params: v2.SecurityMonitoringApiEditSecurityMonitoringSignalRequest = {
11+
body: {
12+
data: {
13+
attributes: {
14+
archiveReason: "none",
15+
assignee: {
16+
name: undefined,
17+
uuid: "773b045d-ccf8-4808-bd3b-955ef6a8c940",
18+
},
19+
state: "open",
20+
},
21+
type: "signal_metadata",
22+
},
23+
},
24+
signalId: "signal_id",
25+
};
26+
27+
apiInstance
28+
.editSecurityMonitoringSignal(params)
29+
.then((data: v2.SecurityMonitoringSignalTriageUpdateResponse) => {
30+
console.log(
31+
"API called successfully. Returned data: " + JSON.stringify(data)
32+
);
33+
})
34+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5166,6 +5166,13 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
51665166
},
51675167
"operationResponseType": "SecurityMonitoringSignalsBulkTriageUpdateResponse",
51685168
},
5169+
"v2.BulkEditSecurityMonitoringSignals": {
5170+
"body": {
5171+
"type": "SecurityMonitoringSignalsBulkUpdateRequest",
5172+
"format": "",
5173+
},
5174+
"operationResponseType": "SecurityMonitoringSignalsBulkTriageUpdateResponse",
5175+
},
51695176
"v2.SearchSecurityMonitoringSignals": {
51705177
"body": {
51715178
"type": "SecurityMonitoringSignalListRequest",
@@ -5227,6 +5234,17 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
52275234
},
52285235
"operationResponseType": "SecurityMonitoringSignalSuggestedActionsResponse",
52295236
},
5237+
"v2.EditSecurityMonitoringSignal": {
5238+
"signalId": {
5239+
"type": "string",
5240+
"format": "",
5241+
},
5242+
"body": {
5243+
"type": "SecurityMonitoringSignalUpdateRequest",
5244+
"format": "",
5245+
},
5246+
"operationResponseType": "SecurityMonitoringSignalTriageUpdateResponse",
5247+
},
52305248
"v2.BulkExportSecurityMonitoringTerraformResources": {
52315249
"resourceType": {
52325250
"type": "SecurityMonitoringTerraformResourceType",

features/v2/security_monitoring.feature

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,20 @@ Feature: Security Monitoring
121121
When the request is sent
122122
Then the response status is 200 OK
123123

124+
@generated @skip @team:DataDog/k9-cloud-siem
125+
Scenario: Bulk update security signals returns "Bad Request" response
126+
Given new "BulkEditSecurityMonitoringSignals" request
127+
And body with value {"data": [{"attributes": {"archive_reason": "none", "assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "state": "open"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
128+
When the request is sent
129+
Then the response status is 400 Bad Request
130+
131+
@generated @skip @team:DataDog/k9-cloud-siem
132+
Scenario: Bulk update security signals returns "OK" response
133+
Given new "BulkEditSecurityMonitoringSignals" request
134+
And body with value {"data": [{"attributes": {"archive_reason": "none", "assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "state": "open"}, "id": "AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA", "type": "signal"}]}
135+
When the request is sent
136+
Then the response status is 200 OK
137+
124138
@skip @team:DataDog/k9-cloud-siem
125139
Scenario: Bulk update triage assignee of security signals returns "Bad Request" response
126140
Given operation "BulkEditSecurityMonitoringSignalsAssignee" enabled
@@ -2188,6 +2202,30 @@ Feature: Security Monitoring
21882202
And the response "data.attributes.filtered_data_type" is equal to "logs"
21892203
And the response "data.attributes.name" is equal to "{{ unique }}"
21902204

2205+
@generated @skip @team:DataDog/k9-cloud-siem
2206+
Scenario: Update a security signal's triage attributes returns "Bad Request" response
2207+
Given new "EditSecurityMonitoringSignal" request
2208+
And request contains "signal_id" parameter from "REPLACE.ME"
2209+
And body with value {"data": {"attributes": {"archive_reason": "none", "assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "state": "open"}, "type": "signal_metadata"}}
2210+
When the request is sent
2211+
Then the response status is 400 Bad Request
2212+
2213+
@generated @skip @team:DataDog/k9-cloud-siem
2214+
Scenario: Update a security signal's triage attributes returns "Not Found" response
2215+
Given new "EditSecurityMonitoringSignal" request
2216+
And request contains "signal_id" parameter from "REPLACE.ME"
2217+
And body with value {"data": {"attributes": {"archive_reason": "none", "assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "state": "open"}, "type": "signal_metadata"}}
2218+
When the request is sent
2219+
Then the response status is 404 Not Found
2220+
2221+
@generated @skip @team:DataDog/k9-cloud-siem
2222+
Scenario: Update a security signal's triage attributes returns "OK" response
2223+
Given new "EditSecurityMonitoringSignal" request
2224+
And request contains "signal_id" parameter from "REPLACE.ME"
2225+
And body with value {"data": {"attributes": {"archive_reason": "none", "assignee": {"name": null, "uuid": "773b045d-ccf8-4808-bd3b-955ef6a8c940"}, "state": "open"}, "type": "signal_metadata"}}
2226+
When the request is sent
2227+
Then the response status is 200 OK
2228+
21912229
@generated @skip @team:DataDog/k9-cloud-siem
21922230
Scenario: Update a suppression rule returns "Bad Request" response
21932231
Given new "UpdateSecurityMonitoringSuppression" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5674,6 +5674,12 @@
56745674
"type": "idempotent"
56755675
}
56765676
},
5677+
"BulkEditSecurityMonitoringSignals": {
5678+
"tag": "Security Monitoring",
5679+
"undo": {
5680+
"type": "idempotent"
5681+
}
5682+
},
56775683
"SearchSecurityMonitoringSignals": {
56785684
"tag": "Security Monitoring",
56795685
"undo": {
@@ -5716,6 +5722,12 @@
57165722
"type": "safe"
57175723
}
57185724
},
5725+
"EditSecurityMonitoringSignal": {
5726+
"tag": "Security Monitoring",
5727+
"undo": {
5728+
"type": "idempotent"
5729+
}
5730+
},
57195731
"BulkExportSecurityMonitoringTerraformResources": {
57205732
"tag": "Security Monitoring",
57215733
"undo": {

0 commit comments

Comments
 (0)