Skip to content

Commit f3f2d7f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cb3ba813 of spec repo
1 parent c9ebc2d commit f3f2d7f

14 files changed

+90
-58
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-06-10 19:57:37.784810",
8-
"spec_repo_commit": "593ab828"
7+
"regenerated": "2025-06-11 12:45:22.346364",
8+
"spec_repo_commit": "cb3ba813"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-06-10 19:57:37.806273",
13-
"spec_repo_commit": "593ab828"
12+
"regenerated": "2025-06-11 12:45:22.361438",
13+
"spec_repo_commit": "cb3ba813"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7532,6 +7532,10 @@ components:
75327532
description: SECL expression used to target the container to apply the action
75337533
on
75347534
type: string
7535+
hash:
7536+
additionalProperties: {}
7537+
description: The hash action applied on the scope matching the rule
7538+
type: object
75357539
kill:
75367540
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleKill'
75377541
metadata:

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
value="test_value",
4141
scope="process",
4242
),
43+
hash=dict(),
4344
),
4445
],
4546
),

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_action.py

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

6-
from typing import Union, TYPE_CHECKING
6+
from typing import Any, Dict, Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
1010
cached_property,
11+
date,
12+
datetime,
13+
none_type,
1114
unset,
1215
UnsetType,
16+
UUID,
1317
)
1418

1519

@@ -38,13 +42,30 @@ def openapi_types(_):
3842

3943
return {
4044
"filter": (str,),
45+
"hash": (
46+
{
47+
str: (
48+
bool,
49+
date,
50+
datetime,
51+
dict,
52+
float,
53+
int,
54+
list,
55+
str,
56+
UUID,
57+
none_type,
58+
)
59+
},
60+
),
4161
"kill": (CloudWorkloadSecurityAgentRuleKill,),
4262
"metadata": (CloudWorkloadSecurityAgentRuleActionMetadata,),
4363
"set": (CloudWorkloadSecurityAgentRuleActionSet,),
4464
}
4565

4666
attribute_map = {
4767
"filter": "filter",
68+
"hash": "hash",
4869
"kill": "kill",
4970
"metadata": "metadata",
5071
"set": "set",
@@ -53,6 +74,7 @@ def openapi_types(_):
5374
def __init__(
5475
self_,
5576
filter: Union[str, UnsetType] = unset,
77+
hash: Union[Dict[str, Any], UnsetType] = unset,
5678
kill: Union[CloudWorkloadSecurityAgentRuleKill, UnsetType] = unset,
5779
metadata: Union[CloudWorkloadSecurityAgentRuleActionMetadata, UnsetType] = unset,
5880
set: Union[CloudWorkloadSecurityAgentRuleActionSet, UnsetType] = unset,
@@ -64,6 +86,9 @@ def __init__(
6486
:param filter: SECL expression used to target the container to apply the action on
6587
:type filter: str, optional
6688
89+
:param hash: The hash action applied on the scope matching the rule
90+
:type hash: {str: (bool, date, datetime, dict, float, int, list, str, UUID, none_type,)}, optional
91+
6792
:param kill: Kill system call applied on the container matching the rule
6893
:type kill: CloudWorkloadSecurityAgentRuleKill, optional
6994
@@ -75,6 +100,8 @@ def __init__(
75100
"""
76101
if filter is not unset:
77102
kwargs["filter"] = filter
103+
if hash is not unset:
104+
kwargs["hash"] = hash
78105
if kill is not unset:
79106
kwargs["kill"] = kill
80107
if metadata is not unset:
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-27T10:24:57.049Z
1+
2025-06-11T12:16:26.762Z

tests/v2/cassettes/test_scenarios/test_create_a_workload_protection_agent_rule_with_set_action_returns_ok_response.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1748341497"},"type":"policy"}}'
3+
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1749644186"},"type":"policy"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,17 +10,17 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy
1111
response:
1212
body:
13-
string: '{"data":{"id":"qyj-iza-vbu","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14-
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1748341497","policyVersion":"1","priority":1000000011,"ruleCount":226,"updateDate":1748341497346,"updater":{"name":"frog","handle":"[email protected]"}}}}'
13+
string: '{"data":{"id":"pit-qlh-dda","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14+
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1749644186","policyVersion":"1","priority":1000000013,"ruleCount":226,"updateDate":1749644187117,"updater":{"name":"frog","handle":"[email protected]"}}}}'
1515
headers:
1616
content-type:
1717
- application/json
1818
status:
1919
code: 200
2020
message: OK
2121
- request:
22-
body: '{"data":{"attributes":{"actions":[{"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23-
Agent rule with set action","enabled":true,"expression":"exec.file.name == \"sh\"","filters":[],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1748341497","policy_id":"qyj-iza-vbu","product_tags":[]},"type":"agent_rule"}}'
22+
body: '{"data":{"attributes":{"actions":[{"hash":{},"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23+
Agent rule with set action","enabled":true,"expression":"exec.file.name == \"sh\"","filters":[],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1749644186","policy_id":"pit-qlh-dda","product_tags":[]},"type":"agent_rule"}}'
2424
headers:
2525
accept:
2626
- application/json
@@ -30,10 +30,10 @@ interactions:
3030
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules
3131
response:
3232
body:
33-
string: '{"data":{"id":"zux-bp8-zov","type":"agent_rule","attributes":{"actions":[{"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34-
Activity","creationDate":1748341498175,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
33+
string: '{"data":{"id":"nsy-jhb-bgw","type":"agent_rule","attributes":{"actions":[{"hash":{},"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34+
Activity","creationDate":1749644187541,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
3535
Agent rule with set action","enabled":true,"expression":"exec.file.name ==
36-
\"sh\"","filters":["os == \"linux\""],"monitoring":["qyj-iza-vbu"],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1748341497","product_tags":[],"updateDate":1748341498175,"updater":{"name":"frog","handle":"[email protected]"}}}}'
36+
\"sh\"","filters":["os == \"linux\""],"monitoring":["pit-qlh-dda"],"name":"testcreateaworkloadprotectionagentrulewithsetactionreturnsokresponse1749644186","product_tags":[],"updateDate":1749644187541,"updater":{"name":"frog","handle":"[email protected]"}}}}'
3737
headers:
3838
content-type:
3939
- application/json
@@ -46,7 +46,7 @@ interactions:
4646
accept:
4747
- '*/*'
4848
method: DELETE
49-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/zux-bp8-zov
49+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/nsy-jhb-bgw
5050
response:
5151
body:
5252
string: ''
@@ -62,7 +62,7 @@ interactions:
6262
accept:
6363
- '*/*'
6464
method: DELETE
65-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/qyj-iza-vbu
65+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/pit-qlh-dda
6666
response:
6767
body:
6868
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-27T10:25:02.351Z
1+
2025-06-11T12:16:39.770Z

tests/v2/cassettes/test_scenarios/test_delete_a_workload_protection_agent_rule_returns_ok_response.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1748341502"},"type":"policy"}}'
3+
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1749644199"},"type":"policy"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,17 +10,17 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy
1111
response:
1212
body:
13-
string: '{"data":{"id":"ney-zeu-tex","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14-
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1748341502","policyVersion":"1","priority":1000000011,"ruleCount":226,"updateDate":1748341502642,"updater":{"name":"frog","handle":"[email protected]"}}}}'
13+
string: '{"data":{"id":"lih-oi0-gt3","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14+
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1749644199","policyVersion":"1","priority":1000000013,"ruleCount":226,"updateDate":1749644200118,"updater":{"name":"frog","handle":"[email protected]"}}}}'
1515
headers:
1616
content-type:
1717
- application/json
1818
status:
1919
code: 200
2020
message: OK
2121
- request:
22-
body: '{"data":{"attributes":{"actions":[{"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23-
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1748341502","policy_id":"ney-zeu-tex","product_tags":["security:attack","technique:T1059"]},"type":"agent_rule"}}'
22+
body: '{"data":{"attributes":{"actions":[{"hash":{},"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23+
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1749644199","policy_id":"lih-oi0-gt3","product_tags":["security:attack","technique:T1059"]},"type":"agent_rule"}}'
2424
headers:
2525
accept:
2626
- application/json
@@ -30,10 +30,10 @@ interactions:
3030
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules
3131
response:
3232
body:
33-
string: '{"data":{"id":"gys-bzk-zs4","type":"agent_rule","attributes":{"actions":[{"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34-
Activity","creationDate":1748341503254,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
33+
string: '{"data":{"id":"6qz-j4g-zv7","type":"agent_rule","attributes":{"actions":[{"hash":{},"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34+
Activity","creationDate":1749644200725,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
3535
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","filters":["os
36-
== \"linux\""],"monitoring":["ney-zeu-tex"],"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1748341502","product_tags":["security:attack","technique:T1059"],"updateDate":1748341503254,"updater":{"name":"frog","handle":"[email protected]"}}}}'
36+
== \"linux\""],"monitoring":["lih-oi0-gt3"],"name":"testdeleteaworkloadprotectionagentrulereturnsokresponse1749644199","product_tags":["security:attack","technique:T1059"],"updateDate":1749644200725,"updater":{"name":"frog","handle":"[email protected]"}}}}'
3737
headers:
3838
content-type:
3939
- application/json
@@ -46,7 +46,7 @@ interactions:
4646
accept:
4747
- '*/*'
4848
method: DELETE
49-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/gys-bzk-zs4?policy_id=ney-zeu-tex
49+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/6qz-j4g-zv7?policy_id=lih-oi0-gt3
5050
response:
5151
body:
5252
string: ''
@@ -62,7 +62,7 @@ interactions:
6262
accept:
6363
- '*/*'
6464
method: DELETE
65-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/gys-bzk-zs4
65+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/6qz-j4g-zv7
6666
response:
6767
body:
6868
string: '{"errors":[{"title":"failed to delete rule"}]}
@@ -80,7 +80,7 @@ interactions:
8080
accept:
8181
- '*/*'
8282
method: DELETE
83-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/ney-zeu-tex
83+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/lih-oi0-gt3
8484
response:
8585
body:
8686
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-27T10:25:11.236Z
1+
2025-06-11T12:16:52.114Z

tests/v2/cassettes/test_scenarios/test_get_a_workload_protection_agent_rule_returns_ok_response.yaml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1748341511"},"type":"policy"}}'
3+
body: '{"data":{"attributes":{"description":"My agent policy","enabled":true,"hostTags":["env:staging"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1749644212"},"type":"policy"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,17 +10,17 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy
1111
response:
1212
body:
13-
string: '{"data":{"id":"rb7-4db-zo7","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14-
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testgetaworkloadprotectionagentrulereturnsokresponse1748341511","policyVersion":"1","priority":1000000011,"ruleCount":226,"updateDate":1748341511524,"updater":{"name":"frog","handle":"[email protected]"}}}}'
13+
string: '{"data":{"id":"jfm-xp1-oos","type":"policy","attributes":{"blockingRulesCount":0,"datadogManaged":false,"description":"My
14+
agent policy","disabledRulesCount":1,"enabled":true,"hostTags":["env:staging"],"monitoringRulesCount":225,"name":"testgetaworkloadprotectionagentrulereturnsokresponse1749644212","policyVersion":"1","priority":1000000013,"ruleCount":226,"updateDate":1749644212454,"updater":{"name":"frog","handle":"[email protected]"}}}}'
1515
headers:
1616
content-type:
1717
- application/json
1818
status:
1919
code: 200
2020
message: OK
2121
- request:
22-
body: '{"data":{"attributes":{"actions":[{"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23-
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testgetaworkloadprotectionagentrulereturnsokresponse1748341511","policy_id":"rb7-4db-zo7","product_tags":["security:attack","technique:T1059"]},"type":"agent_rule"}}'
22+
body: '{"data":{"attributes":{"actions":[{"hash":{},"set":{"name":"test_set","scope":"process","value":"test_value"}}],"description":"My
23+
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","name":"testgetaworkloadprotectionagentrulereturnsokresponse1749644212","policy_id":"jfm-xp1-oos","product_tags":["security:attack","technique:T1059"]},"type":"agent_rule"}}'
2424
headers:
2525
accept:
2626
- application/json
@@ -30,10 +30,10 @@ interactions:
3030
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules
3131
response:
3232
body:
33-
string: '{"data":{"id":"xll-jfj-cti","type":"agent_rule","attributes":{"actions":[{"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34-
Activity","creationDate":1748341512094,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
33+
string: '{"data":{"id":"fye-yp2-gir","type":"agent_rule","attributes":{"actions":[{"hash":{},"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
34+
Activity","creationDate":1749644213189,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
3535
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","filters":["os
36-
== \"linux\""],"monitoring":["rb7-4db-zo7"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1748341511","product_tags":["security:attack","technique:T1059"],"updateDate":1748341512094,"updater":{"name":"frog","handle":"[email protected]"}}}}'
36+
== \"linux\""],"monitoring":["jfm-xp1-oos"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1749644212","product_tags":["security:attack","technique:T1059"],"updateDate":1749644213189,"updater":{"name":"frog","handle":"[email protected]"}}}}'
3737
headers:
3838
content-type:
3939
- application/json
@@ -46,13 +46,13 @@ interactions:
4646
accept:
4747
- application/json
4848
method: GET
49-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/xll-jfj-cti?policy_id=rb7-4db-zo7
49+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/fye-yp2-gir?policy_id=jfm-xp1-oos
5050
response:
5151
body:
52-
string: '{"data":{"id":"xll-jfj-cti","type":"agent_rule","attributes":{"actions":[{"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
53-
Activity","creationDate":1748341512094,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
52+
string: '{"data":{"id":"fye-yp2-gir","type":"agent_rule","attributes":{"actions":[{"hash":{},"set":{"name":"test_set","value":"test_value","scope":"process"},"disabled":false}],"category":"Process
53+
Activity","creationDate":1749644213189,"creator":{"name":"frog","handle":"[email protected]"},"defaultRule":false,"description":"My
5454
Agent rule","enabled":true,"expression":"exec.file.name == \"sh\"","filters":["os
55-
== \"linux\""],"monitoring":["rb7-4db-zo7"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1748341511","product_tags":["security:attack","technique:T1059"],"updateDate":1748341512094,"updater":{"name":"frog","handle":"[email protected]"}}}}'
55+
== \"linux\""],"monitoring":["jfm-xp1-oos"],"name":"testgetaworkloadprotectionagentrulereturnsokresponse1749644212","product_tags":["security:attack","technique:T1059"],"updateDate":1749644213189,"updater":{"name":"frog","handle":"[email protected]"}}}}'
5656
headers:
5757
content-type:
5858
- application/json
@@ -65,7 +65,7 @@ interactions:
6565
accept:
6666
- '*/*'
6767
method: DELETE
68-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/xll-jfj-cti
68+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules/fye-yp2-gir
6969
response:
7070
body:
7171
string: ''
@@ -81,7 +81,7 @@ interactions:
8181
accept:
8282
- '*/*'
8383
method: DELETE
84-
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/rb7-4db-zo7
84+
uri: https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/jfm-xp1-oos
8585
response:
8686
body:
8787
string: ''
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025-05-27T10:25:17.186Z
1+
2025-06-11T12:15:33.041Z

0 commit comments

Comments
 (0)