Skip to content

Commit 70bfec7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 30861753 of spec repo
1 parent c9ebc2d commit 70bfec7

17 files changed

+114
-57
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 13:39:53.558210",
8+
"spec_repo_commit": "30861753"
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 13:39:53.579971",
13+
"spec_repo_commit": "30861753"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7532,13 +7532,19 @@ components:
75327532
description: SECL expression used to target the container to apply the action
75337533
on
75347534
type: string
7535+
hash:
7536+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionHash'
75357537
kill:
75367538
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleKill'
75377539
metadata:
75387540
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionMetadata'
75397541
set:
75407542
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
75417543
type: object
7544+
CloudWorkloadSecurityAgentRuleActionHash:
7545+
additionalProperties: false
7546+
description: An empty object indicating the hash action
7547+
type: object
75427548
CloudWorkloadSecurityAgentRuleActionMetadata:
75437549
description: The metadata action applied on the scope matching the rule
75447550
properties:

docs/datadog_api_client.v2.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2839,6 +2839,13 @@ datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action mod
28392839
:members:
28402840
:show-inheritance:
28412841

2842+
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_hash module
2843+
-----------------------------------------------------------------------------------------
2844+
2845+
.. automodule:: datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_hash
2846+
:members:
2847+
:show-inheritance:
2848+
28422849
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_metadata module
28432850
---------------------------------------------------------------------------------------------
28442851

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
from datadog_api_client import ApiClient, Configuration
77
from datadog_api_client.v2.api.csm_threats_api import CSMThreatsApi
88
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action import CloudWorkloadSecurityAgentRuleAction
9+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_hash import (
10+
CloudWorkloadSecurityAgentRuleActionHash,
11+
)
912
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set import (
1013
CloudWorkloadSecurityAgentRuleActionSet,
1114
)
@@ -40,6 +43,7 @@
4043
value="test_value",
4144
scope="process",
4245
),
46+
hash=CloudWorkloadSecurityAgentRuleActionHash(),
4347
),
4448
],
4549
),

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_action.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414

1515

1616
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_hash import (
18+
CloudWorkloadSecurityAgentRuleActionHash,
19+
)
1720
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_kill import CloudWorkloadSecurityAgentRuleKill
1821
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_metadata import (
1922
CloudWorkloadSecurityAgentRuleActionMetadata,
@@ -26,6 +29,9 @@
2629
class CloudWorkloadSecurityAgentRuleAction(ModelNormal):
2730
@cached_property
2831
def openapi_types(_):
32+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_hash import (
33+
CloudWorkloadSecurityAgentRuleActionHash,
34+
)
2935
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_kill import (
3036
CloudWorkloadSecurityAgentRuleKill,
3137
)
@@ -38,13 +44,15 @@ def openapi_types(_):
3844

3945
return {
4046
"filter": (str,),
47+
"hash": (CloudWorkloadSecurityAgentRuleActionHash,),
4148
"kill": (CloudWorkloadSecurityAgentRuleKill,),
4249
"metadata": (CloudWorkloadSecurityAgentRuleActionMetadata,),
4350
"set": (CloudWorkloadSecurityAgentRuleActionSet,),
4451
}
4552

4653
attribute_map = {
4754
"filter": "filter",
55+
"hash": "hash",
4856
"kill": "kill",
4957
"metadata": "metadata",
5058
"set": "set",
@@ -53,6 +61,7 @@ def openapi_types(_):
5361
def __init__(
5462
self_,
5563
filter: Union[str, UnsetType] = unset,
64+
hash: Union[CloudWorkloadSecurityAgentRuleActionHash, UnsetType] = unset,
5665
kill: Union[CloudWorkloadSecurityAgentRuleKill, UnsetType] = unset,
5766
metadata: Union[CloudWorkloadSecurityAgentRuleActionMetadata, UnsetType] = unset,
5867
set: Union[CloudWorkloadSecurityAgentRuleActionSet, UnsetType] = unset,
@@ -64,6 +73,9 @@ def __init__(
6473
:param filter: SECL expression used to target the container to apply the action on
6574
:type filter: str, optional
6675
76+
:param hash: An empty object indicating the hash action
77+
:type hash: CloudWorkloadSecurityAgentRuleActionHash, optional
78+
6779
:param kill: Kill system call applied on the container matching the rule
6880
:type kill: CloudWorkloadSecurityAgentRuleKill, optional
6981
@@ -75,6 +87,8 @@ def __init__(
7587
"""
7688
if filter is not unset:
7789
kwargs["filter"] = filter
90+
if hash is not unset:
91+
kwargs["hash"] = hash
7892
if kill is not unset:
7993
kwargs["kill"] = kill
8094
if metadata is not unset:
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
# This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
# Copyright 2019-Present Datadog, Inc.
4+
from __future__ import annotations
5+
6+
7+
from datadog_api_client.model_utils import (
8+
ModelNormal,
9+
cached_property,
10+
)
11+
12+
13+
class CloudWorkloadSecurityAgentRuleActionHash(ModelNormal):
14+
@cached_property
15+
def additional_properties_type(_):
16+
return None
17+
18+
def __init__(self_, **kwargs):
19+
"""
20+
An empty object indicating the hash action
21+
"""
22+
super().__init__(kwargs)

src/datadog_api_client/v2/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,9 @@
531531
CloudWorkloadSecurityAgentPolicyUpdaterAttributes,
532532
)
533533
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action import CloudWorkloadSecurityAgentRuleAction
534+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_hash import (
535+
CloudWorkloadSecurityAgentRuleActionHash,
536+
)
534537
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_metadata import (
535538
CloudWorkloadSecurityAgentRuleActionMetadata,
536539
)
@@ -3897,6 +3900,7 @@
38973900
"CloudWorkloadSecurityAgentPolicyUpdateRequest",
38983901
"CloudWorkloadSecurityAgentPolicyUpdaterAttributes",
38993902
"CloudWorkloadSecurityAgentRuleAction",
3903+
"CloudWorkloadSecurityAgentRuleActionHash",
39003904
"CloudWorkloadSecurityAgentRuleActionMetadata",
39013905
"CloudWorkloadSecurityAgentRuleActionSet",
39023906
"CloudWorkloadSecurityAgentRuleAttributes",
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

0 commit comments

Comments
 (0)