Skip to content

Commit 540de49

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6a5a250e of spec repo
1 parent 5ecfedb commit 540de49

File tree

7 files changed

+29
-12
lines changed

7 files changed

+29
-12
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": "2024-05-14 16:39:57.264850",
8-
"spec_repo_commit": "45952461"
7+
"regenerated": "2024-05-15 11:56:35.568236",
8+
"spec_repo_commit": "6a5a250e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-05-14 16:39:57.281596",
13-
"spec_repo_commit": "45952461"
12+
"regenerated": "2024-05-15 11:56:35.585550",
13+
"spec_repo_commit": "6a5a250e"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4105,6 +4105,11 @@ components:
41054105
description: The SECL expression of the Agent rule.
41064106
example: exec.file.name == \"sh\"
41074107
type: string
4108+
filters:
4109+
description: The platforms the Agent rule is supported on.
4110+
items:
4111+
type: string
4112+
type: array
41084113
name:
41094114
description: The name of the Agent rule.
41104115
example: my_agent_rule

examples/v2/csm-threats/CreateCSMThreatsAgentRule.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
description="My Agent rule",
2222
enabled=True,
2323
expression='exec.file.name == "sh"',
24+
filters=[
25+
'os == "linux"',
26+
],
2427
name="examplecsmthreat",
2528
),
2629
type=CloudWorkloadSecurityAgentRuleType.AGENT_RULE,

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_create_attributes.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6-
from typing import Union
6+
from typing import List, Union
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -20,13 +20,15 @@ def openapi_types(_):
2020
"description": (str,),
2121
"enabled": (bool,),
2222
"expression": (str,),
23+
"filters": ([str],),
2324
"name": (str,),
2425
}
2526

2627
attribute_map = {
2728
"description": "description",
2829
"enabled": "enabled",
2930
"expression": "expression",
31+
"filters": "filters",
3032
"name": "name",
3133
}
3234

@@ -36,6 +38,7 @@ def __init__(
3638
name: str,
3739
description: Union[str, UnsetType] = unset,
3840
enabled: Union[bool, UnsetType] = unset,
41+
filters: Union[List[str], UnsetType] = unset,
3942
**kwargs,
4043
):
4144
"""
@@ -50,13 +53,18 @@ def __init__(
5053
:param expression: The SECL expression of the Agent rule.
5154
:type expression: str
5255
56+
:param filters: The platforms the Agent rule is supported on.
57+
:type filters: [str], optional
58+
5359
:param name: The name of the Agent rule.
5460
:type name: str
5561
"""
5662
if description is not unset:
5763
kwargs["description"] = description
5864
if enabled is not unset:
5965
kwargs["enabled"] = enabled
66+
if filters is not unset:
67+
kwargs["filters"] = filters
6068
super().__init__(kwargs)
6169

6270
self_.expression = expression
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2024-04-23T17:57:44.371Z
1+
2024-05-15T10:52:45.387Z

tests/v2/cassettes/test_scenarios/test_create_a_csm_threats_agent_rule_returns_ok_response.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: '{"data":{"attributes":{"description":"My Agent rule","enabled":true,"expression":"exec.file.name
4-
== \"sh\"","name":"testcreateacsmthreatsagentrulereturnsokresponse1713895064"},"type":"agent_rule"}}'
4+
== \"sh\"","filters":["os == \"linux\""],"name":"testcreateacsmthreatsagentrulereturnsokresponse1715770365"},"type":"agent_rule"}}'
55
headers:
66
accept:
77
- application/json
@@ -11,10 +11,11 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules
1212
response:
1313
body:
14-
string: '{"data":{"id":"922-a60-32v","type":"agent_rule","attributes":{"category":"Process
15-
Activity","creationDate":1713895064438,"creator":{"name":"","handle":"[email protected]"},"defaultRule":false,"description":"My
14+
string: '{"data":{"id":"hcd-5u7-zd8","type":"agent_rule","attributes":{"category":"Process
15+
Activity","creationDate":1715770365873,"creator":{"name":"CI Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"},"defaultRule":false,"description":"My
1616
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","filters":["os
17-
== \"linux\""],"name":"testcreateacsmthreatsagentrulereturnsokresponse1713895064","updateDate":1713895064438,"updater":{"name":"","handle":"[email protected]"}}}}'
17+
== \"linux\""],"name":"testcreateacsmthreatsagentrulereturnsokresponse1715770365","updateDate":1715770365873,"updater":{"name":"CI
18+
Account","handle":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}}'
1819
headers:
1920
content-type:
2021
- application/json
@@ -27,7 +28,7 @@ interactions:
2728
accept:
2829
- '*/*'
2930
method: DELETE
30-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/922-a60-32v
31+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/hcd-5u7-zd8
3132
response:
3233
body:
3334
string: ''

tests/v2/features/csm_threats.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Feature: CSM Threats
2828
@team:DataDog/k9-cloud-security-platform @team:DataDog/k9-cws-backend
2929
Scenario: Create a CSM Threats Agent rule returns "OK" response
3030
Given new "CreateCSMThreatsAgentRule" request
31-
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\"", "name": "{{ unique_lower_alnum }}"}, "type": "agent_rule"}}
31+
And body with value {"data": {"attributes": {"description": "My Agent rule", "enabled": true, "expression": "exec.file.name == \"sh\"", "filters": ["os == \"linux\""], "name": "{{ unique_lower_alnum }}"}, "type": "agent_rule"}}
3232
When the request is sent
3333
Then the response status is 200 OK
3434

0 commit comments

Comments
 (0)