Skip to content

Commit ffcbd7b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5aaeecd of spec repo
1 parent 824e948 commit ffcbd7b

8 files changed

Lines changed: 173 additions & 10 deletions

File tree

‎.generator/schemas/v2/openapi.yaml‎

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102133,9 +102133,21 @@ components:
102133102133
additionalProperties: {}
102134102134
description: "The object containing all signal attributes and their\nassociated values."
102135102135
properties:
102136+
attributes:
102137+
additionalProperties: {}
102138+
description: A JSON object of attributes in the security signal, returned when listing or searching signals.
102139+
example:
102140+
workflow:
102141+
first_seen: "2020-06-23T14:46:01.000Z"
102142+
last_seen: "2020-06-23T14:46:49.000Z"
102143+
rule:
102144+
id: 0f5-e0c-805
102145+
name: "Brute Force Attack Grouped By User"
102146+
version: 12
102147+
type: object
102136102148
custom:
102137102149
additionalProperties: {}
102138-
description: A JSON object of attributes in the security signal.
102150+
description: A JSON object of attributes in the security signal, returned when retrieving a single signal.
102139102151
example:
102140102152
workflow:
102141102153
first_seen: "2020-06-23T14:46:01.000Z"
@@ -102968,8 +102980,21 @@ components:
102968102980
SecurityMonitoringSignalsListResponseMeta:
102969102981
description: Meta attributes.
102970102982
properties:
102983+
elapsed:
102984+
description: The time elapsed in milliseconds.
102985+
example: 132
102986+
format: int64
102987+
type: integer
102971102988
page:
102972102989
$ref: '#/components/schemas/SecurityMonitoringSignalsListResponseMetaPage'
102990+
request_id:
102991+
description: The unique identifier of the request.
102992+
example: example-request-id
102993+
type: string
102994+
status:
102995+
description: The status of the response.
102996+
example: done
102997+
type: string
102973102998
type: object
102974102999
SecurityMonitoringSignalsListResponseMetaPage:
102975103000
description: Paging attributes.
@@ -205487,15 +205512,24 @@ paths:
205487205512
value:
205488205513
data:
205489205514
- attributes:
205515+
attributes:
205516+
workflow:
205517+
rule:
205518+
id: 0f5-e0c-805
205519+
name: "Brute Force Attack Grouped By User"
205520+
version: 12
205490205521
tags:
205491205522
- "source:cloudtrail"
205492205523
id: AAAAAWgN8Xwgr1vKDQAAAABBV2dOOFh3ZzZobm1mWXJFYTR0OA
205493205524
type: signal
205494205525
links:
205495205526
next: ""
205496205527
meta:
205528+
elapsed: 132
205497205529
page:
205498205530
after: eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==
205531+
request_id: example-request-id
205532+
status: done
205499205533
schema:
205500205534
$ref: '#/components/schemas/SecurityMonitoringSignalsListResponse'
205501205535
description: OK

‎examples/v2/security-monitoring/SearchSecurityMonitoringSignals.py‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
Get a list of security signals returns "OK" response
33
"""
44

5+
from datetime import datetime
6+
from dateutil.relativedelta import relativedelta
57
from datadog_api_client import ApiClient, Configuration
68
from datadog_api_client.v2.api.security_monitoring_api import SecurityMonitoringApi
79
from datadog_api_client.v2.model.security_monitoring_signal_list_request import SecurityMonitoringSignalListRequest
@@ -12,17 +14,14 @@
1214
SecurityMonitoringSignalListRequestPage,
1315
)
1416
from datadog_api_client.v2.model.security_monitoring_signals_sort import SecurityMonitoringSignalsSort
15-
from datetime import datetime
16-
from dateutil.tz import tzutc
1717

1818
body = SecurityMonitoringSignalListRequest(
1919
filter=SecurityMonitoringSignalListRequestFilter(
20-
_from=datetime(2019, 1, 2, 9, 42, 36, 320000, tzinfo=tzutc()),
20+
_from=(datetime.now() + relativedelta(minutes=-15)),
2121
query="security:attack status:high",
22-
to=datetime(2019, 1, 3, 9, 42, 36, 320000, tzinfo=tzutc()),
22+
to=datetime.now(),
2323
),
2424
page=SecurityMonitoringSignalListRequestPage(
25-
cursor="eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
2625
limit=25,
2726
),
2827
sort=SecurityMonitoringSignalsSort.TIMESTAMP_ASCENDING,

‎src/datadog_api_client/v2/model/security_monitoring_signal_attributes.py‎

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,22 @@ class SecurityMonitoringSignalAttributes(ModelNormal):
2121
@cached_property
2222
def openapi_types(_):
2323
return {
24+
"attributes": (
25+
{
26+
str: (
27+
bool,
28+
date,
29+
datetime,
30+
dict,
31+
float,
32+
int,
33+
list,
34+
str,
35+
UUID,
36+
none_type,
37+
)
38+
},
39+
),
2440
"custom": (
2541
{
2642
str: (
@@ -43,6 +59,7 @@ def openapi_types(_):
4359
}
4460

4561
attribute_map = {
62+
"attributes": "attributes",
4663
"custom": "custom",
4764
"message": "message",
4865
"tags": "tags",
@@ -51,6 +68,7 @@ def openapi_types(_):
5168

5269
def __init__(
5370
self_,
71+
attributes: Union[Dict[str, Any], UnsetType] = unset,
5472
custom: Union[Dict[str, Any], UnsetType] = unset,
5573
message: Union[str, UnsetType] = unset,
5674
tags: Union[List[str], UnsetType] = unset,
@@ -61,7 +79,10 @@ def __init__(
6179
The object containing all signal attributes and their
6280
associated values.
6381
64-
:param custom: A JSON object of attributes in the security signal.
82+
:param attributes: A JSON object of attributes in the security signal, returned when listing or searching signals.
83+
:type attributes: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
84+
85+
:param custom: A JSON object of attributes in the security signal, returned when retrieving a single signal.
6586
:type custom: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
6687
6788
:param message: The message in the security signal defined by the rule that generated the signal.
@@ -73,6 +94,8 @@ def __init__(
7394
:param timestamp: The timestamp of the security signal.
7495
:type timestamp: datetime, optional
7596
"""
97+
if attributes is not unset:
98+
kwargs["attributes"] = attributes
7699
if custom is not unset:
77100
kwargs["custom"] = custom
78101
if message is not unset:

‎src/datadog_api_client/v2/model/security_monitoring_signals_list_response_meta.py‎

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,48 @@ def openapi_types(_):
2727
)
2828

2929
return {
30+
"elapsed": (int,),
3031
"page": (SecurityMonitoringSignalsListResponseMetaPage,),
32+
"request_id": (str,),
33+
"status": (str,),
3134
}
3235

3336
attribute_map = {
37+
"elapsed": "elapsed",
3438
"page": "page",
39+
"request_id": "request_id",
40+
"status": "status",
3541
}
3642

37-
def __init__(self_, page: Union[SecurityMonitoringSignalsListResponseMetaPage, UnsetType] = unset, **kwargs):
43+
def __init__(
44+
self_,
45+
elapsed: Union[int, UnsetType] = unset,
46+
page: Union[SecurityMonitoringSignalsListResponseMetaPage, UnsetType] = unset,
47+
request_id: Union[str, UnsetType] = unset,
48+
status: Union[str, UnsetType] = unset,
49+
**kwargs,
50+
):
3851
"""
3952
Meta attributes.
4053
54+
:param elapsed: The time elapsed in milliseconds.
55+
:type elapsed: int, optional
56+
4157
:param page: Paging attributes.
4258
:type page: SecurityMonitoringSignalsListResponseMetaPage, optional
59+
60+
:param request_id: The unique identifier of the request.
61+
:type request_id: str, optional
62+
63+
:param status: The status of the response.
64+
:type status: str, optional
4365
"""
66+
if elapsed is not unset:
67+
kwargs["elapsed"] = elapsed
4468
if page is not unset:
4569
kwargs["page"] = page
70+
if request_id is not unset:
71+
kwargs["request_id"] = request_id
72+
if status is not unset:
73+
kwargs["status"] = status
4674
super().__init__(kwargs)

‎tests/generated-test/test-runner-data/manifest.json‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9730,6 +9730,13 @@
97309730
"scenario": "Get a job's details returns \"OK\" response",
97319731
"version": "v2"
97329732
},
9733+
{
9734+
"feature": "Security Monitoring",
9735+
"feature_file": "../../v2/features/security_monitoring.feature",
9736+
"file": "v2/security-monitoring/get-a-list-of-security-signals-returns-ok-response.json",
9737+
"scenario": "Get a list of security signals returns \"OK\" response",
9738+
"version": "v2"
9739+
},
97339740
{
97349741
"feature": "Security Monitoring",
97359742
"feature_file": "../../v2/features/security_monitoring.feature",
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"api": "SecurityMonitoring",
3+
"expected_status": 200,
4+
"feature": "Security Monitoring",
5+
"id": "v2/Security Monitoring/Get a list of security signals returns \"OK\" response",
6+
"operation_id": "SearchSecurityMonitoringSignals",
7+
"request": {
8+
"body": {
9+
"schema": {
10+
"format": null,
11+
"ref": "SecurityMonitoringSignalListRequest",
12+
"type": "object"
13+
},
14+
"source": "inline",
15+
"value": {
16+
"$openapi_transformer_template": "{\"filter\": {\"from\": \"{{ timeISO(\"now-15m\") }}\", \"query\": \"security:attack status:high\", \"to\": \"{{ timeISO(\"now\") }}\"}, \"page\": {\"limit\": 25}, \"sort\": \"timestamp\"}"
17+
}
18+
},
19+
"content_type": "application/json",
20+
"method": "POST",
21+
"pagination": false,
22+
"parameters": [],
23+
"path": "/api/v2/security_monitoring/signals/search"
24+
},
25+
"scenario": "Get a list of security signals returns \"OK\" response",
26+
"schema_version": 1,
27+
"version": "v2"
28+
}

‎tests/generated-test/test-server-data/v2/security-monitoring.json‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6315,6 +6315,47 @@
63156315
"scenario": "Get a job's details returns \"OK\" response",
63166316
"version": "v2"
63176317
},
6318+
{
6319+
"feature": "Security Monitoring",
6320+
"frozen_at": "2026-09-07T11:46:49.362Z",
6321+
"interactions": [
6322+
{
6323+
"request": {
6324+
"body": {
6325+
"type": "json",
6326+
"value": {
6327+
"filter": {
6328+
"from": "2026-09-07T11:31:49.362Z",
6329+
"query": "security:attack status:high",
6330+
"to": "2026-09-07T11:46:49.362Z"
6331+
},
6332+
"page": {
6333+
"limit": 25
6334+
},
6335+
"sort": "timestamp"
6336+
}
6337+
},
6338+
"content_type": "application/json",
6339+
"method": "POST",
6340+
"path": "/api/v2/security_monitoring/signals/search",
6341+
"query": []
6342+
},
6343+
"response": {
6344+
"body": {
6345+
"encoding": "text",
6346+
"value": "{\"data\":[],\"meta\":{\"elapsed\":24,\"request_id\":\"pddv1ChZqcnNodVBJQ1RWQ3Z2c3ZWNk16b1hnIiwKHEcyOE2iTY5xAPH0dcTcAYFseqFJt4YjCHkKmO4SDDns4KG5VTag-ijkzg\",\"status\":\"done\"}}"
6347+
},
6348+
"headers": {
6349+
"content-type": "application/json"
6350+
},
6351+
"reason": "OK",
6352+
"status": 200
6353+
}
6354+
}
6355+
],
6356+
"scenario": "Get a list of security signals returns \"OK\" response",
6357+
"version": "v2"
6358+
},
63186359
{
63196360
"feature": "Security Monitoring",
63206361
"frozen_at": "2022-04-13T11:32:57.080Z",

‎tests/v2/features/security_monitoring.feature‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,12 +1787,15 @@ Feature: Security Monitoring
17871787
When the request is sent
17881788
Then the response status is 400 Bad Request
17891789

1790-
@generated @skip @team:DataDog/cloud-siem
1790+
@team:DataDog/cloud-siem
17911791
Scenario: Get a list of security signals returns "OK" response
17921792
Given new "SearchSecurityMonitoringSignals" request
1793-
And body with value {"filter": {"from": "2019-01-02T09:42:36.320Z", "query": "security:attack status:high", "to": "2019-01-03T09:42:36.320Z"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
1793+
And body with value {"filter": {"from": "{{ timeISO("now-15m") }}", "query": "security:attack status:high", "to": "{{ timeISO("now") }}"}, "page": {"limit": 25}, "sort": "timestamp"}
17941794
When the request is sent
17951795
Then the response status is 200 OK
1796+
And the response "meta" has field "elapsed"
1797+
And the response "meta" has field "request_id"
1798+
And the response "meta.status" is equal to "done"
17961799

17971800
@replay-only @skip-validation @team:DataDog/cloud-siem @with-pagination
17981801
Scenario: Get a list of security signals returns "OK" response with pagination

0 commit comments

Comments
 (0)