Skip to content

Commit 7c195a9

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add some missing Workload Protection agent rule fields (#2844)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 6bec3d5 commit 7c195a9

File tree

66 files changed

+878
-421
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+878
-421
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 61 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9472,6 +9472,10 @@ components:
94729472
description: The name of the policy
94739473
example: my_agent_policy
94749474
type: string
9475+
pinned:
9476+
description: Whether the policy is pinned
9477+
example: false
9478+
type: boolean
94759479
policyVersion:
94769480
description: The version of the policy
94779481
example: '1'
@@ -9499,6 +9503,8 @@ components:
94999503
type: integer
95009504
updater:
95019505
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyUpdaterAttributes'
9506+
versions:
9507+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyVersions'
95029508
type: object
95039509
CloudWorkloadSecurityAgentPolicyCreateAttributes:
95049510
description: Create a new Cloud Workload Security Agent policy
@@ -9645,6 +9651,23 @@ components:
96459651
nullable: true
96469652
type: string
96479653
type: object
9654+
CloudWorkloadSecurityAgentPolicyVersion:
9655+
description: The versions of the policy
9656+
properties:
9657+
Date:
9658+
description: The date and time the version was created
9659+
nullable: true
9660+
type: string
9661+
Name:
9662+
description: The version of the policy
9663+
example: 1.47.0-rc2
9664+
type: string
9665+
type: object
9666+
CloudWorkloadSecurityAgentPolicyVersions:
9667+
description: The versions of the policy
9668+
items:
9669+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentPolicyVersion'
9670+
type: array
96489671
CloudWorkloadSecurityAgentRuleAction:
96499672
description: The action the rule can perform if triggered
96509673
properties:
@@ -9682,23 +9705,32 @@ components:
96829705
description: The set action applied on the scope matching the rule
96839706
properties:
96849707
append:
9685-
description: Whether the value should be appended to the field
9708+
description: Whether the value should be appended to the field.
96869709
type: boolean
9710+
default_value:
9711+
description: The default value of the set action
9712+
type: string
9713+
expression:
9714+
description: The expression of the set action.
9715+
type: string
96879716
field:
96889717
description: The field of the set action
96899718
type: string
9719+
inherited:
9720+
description: Whether the value should be inherited.
9721+
type: boolean
96909722
name:
96919723
description: The name of the set action
96929724
type: string
96939725
scope:
9694-
description: The scope of the set action
9726+
description: The scope of the set action.
96959727
type: string
96969728
size:
9697-
description: The size of the set action
9729+
description: The size of the set action.
96989730
format: int64
96999731
type: integer
97009732
ttl:
9701-
description: The time to live of the set action
9733+
description: The time to live of the set action.
97029734
format: int64
97039735
type: integer
97049736
value:
@@ -9779,6 +9811,10 @@ components:
97799811
items:
97809812
type: string
97819813
type: array
9814+
silent:
9815+
description: Whether the rule is silent.
9816+
example: false
9817+
type: boolean
97829818
updateAuthorUuId:
97839819
description: The ID of the user who updated the rule
97849820
example: e51c9744-d158-11ec-ad23-da7ad0900002
@@ -9806,8 +9842,11 @@ components:
98069842
properties:
98079843
actions:
98089844
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActions'
9845+
agent_version:
9846+
description: Constrain the rule to specific versions of the Datadog Agent.
9847+
type: string
98099848
blocking:
9810-
description: The blocking policies that the rule belongs to
9849+
description: The blocking policies that the rule belongs to.
98119850
items:
98129851
type: string
98139852
type: array
@@ -9816,25 +9855,25 @@ components:
98169855
example: My Agent rule
98179856
type: string
98189857
disabled:
9819-
description: The disabled policies that the rule belongs to
9858+
description: The disabled policies that the rule belongs to.
98209859
items:
98219860
type: string
98229861
type: array
98239862
enabled:
9824-
description: Whether the Agent rule is enabled
9863+
description: Whether the Agent rule is enabled.
98259864
example: true
98269865
type: boolean
98279866
expression:
98289867
description: The SECL expression of the Agent rule.
98299868
example: exec.file.name == "sh"
98309869
type: string
98319870
filters:
9832-
description: The platforms the Agent rule is supported on
9871+
description: The platforms the Agent rule is supported on.
98339872
items:
98349873
type: string
98359874
type: array
98369875
monitoring:
9837-
description: The monitoring policies that the rule belongs to
9876+
description: The monitoring policies that the rule belongs to.
98389877
items:
98399878
type: string
98409879
type: array
@@ -9843,14 +9882,18 @@ components:
98439882
example: my_agent_rule
98449883
type: string
98459884
policy_id:
9846-
description: The ID of the policy where the Agent rule is saved
9885+
description: The ID of the policy where the Agent rule is saved.
98479886
example: a8c8e364-6556-434d-b798-a4c23de29c0b
98489887
type: string
98499888
product_tags:
9850-
description: The list of product tags associated with the rule
9889+
description: The list of product tags associated with the rule.
98519890
items:
98529891
type: string
98539892
type: array
9893+
silent:
9894+
description: Whether the rule is silent.
9895+
example: false
9896+
type: boolean
98549897
required:
98559898
- name
98569899
- expression
@@ -9930,6 +9973,9 @@ components:
99309973
properties:
99319974
actions:
99329975
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActions'
9976+
agent_version:
9977+
description: Constrain the rule to specific versions of the Datadog Agent
9978+
type: string
99339979
blocking:
99349980
description: The blocking policies that the rule belongs to
99359981
items:
@@ -9966,6 +10012,10 @@ components:
996610012
items:
996710013
type: string
996810014
type: array
10015+
silent:
10016+
description: Whether the rule is silent.
10017+
example: false
10018+
type: boolean
996910019
type: object
997010020
CloudWorkloadSecurityAgentRuleUpdateData:
997110021
description: Object for a single Agent rule
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-05-27T10:24:52.127Z"
1+
"2025-10-10T15:20:39.566Z"

cassettes/v2/CSM-Threats_3156990395/Create-a-Workload-Protection-agent-rule-returns-Bad-Request-response_1067572025/recording.har

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
},
99
"entries": [
1010
{
11-
"_id": "182e29cd0f933ff5c5588f4ce6215a21",
11+
"_id": "396b2fca731ed8ac116876592ae9c6ea",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
@@ -26,23 +26,23 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 595,
29+
"headersSize": 593,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"params": [],
35-
"text": "{\"data\":{\"attributes\":{\"description\":\"My agent policy\",\"enabled\":true,\"hostTags\":[\"env:staging\"],\"name\":\"testcreateaworkloadprotectionagentrulereturnsbadrequestresponse1748341492\"},\"type\":\"policy\"}}"
35+
"text": "{\"data\":{\"attributes\":{\"description\":\"My agent policy\",\"enabled\":true,\"hostTags\":[\"env:staging\"],\"name\":\"testcreateaworkloadprotectionagentrulereturnsbadrequestresponse1760109639\"},\"type\":\"policy\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/remote_config/products/cws/policy"
3939
},
4040
"response": {
41-
"bodySize": 454,
41+
"bodySize": 450,
4242
"content": {
4343
"mimeType": "application/json",
44-
"size": 454,
45-
"text": "{\"data\":{\"id\":\"wqi-kze-rt7\",\"type\":\"policy\",\"attributes\":{\"blockingRulesCount\":0,\"datadogManaged\":false,\"description\":\"My agent policy\",\"disabledRulesCount\":1,\"enabled\":true,\"hostTags\":[\"env:staging\"],\"monitoringRulesCount\":225,\"name\":\"testcreateaworkloadprotectionagentrulereturnsbadrequestresponse1748341492\",\"policyVersion\":\"1\",\"priority\":1000000011,\"ruleCount\":226,\"updateDate\":1748341492528,\"updater\":{\"name\":\"frog\",\"handle\":\"[email protected]\"}}}}"
44+
"size": 450,
45+
"text": "{\"data\":{\"id\":\"sr5-i0h-lty\",\"type\":\"policy\",\"attributes\":{\"blockingRulesCount\":0,\"datadogManaged\":false,\"description\":\"My agent policy\",\"disabledRulesCount\":1,\"enabled\":true,\"hostTagsLists\":[[\"env:staging\"]],\"monitoringRulesCount\":7,\"name\":\"testcreateaworkloadprotectionagentrulereturnsbadrequestresponse1760109639\",\"pinned\":false,\"policyVersion\":\"1\",\"ruleCount\":8,\"updateDate\":1760109639958,\"updater\":{\"name\":\"frog\",\"handle\":\"[email protected]\"}}}}"
4646
},
4747
"cookies": [],
4848
"headers": [
@@ -57,11 +57,11 @@
5757
"status": 200,
5858
"statusText": "OK"
5959
},
60-
"startedDateTime": "2025-05-27T10:24:52.130Z",
61-
"time": 746
60+
"startedDateTime": "2025-10-10T15:20:39.571Z",
61+
"time": 859
6262
},
6363
{
64-
"_id": "d7f17e68d7f3cfd45191d2db96081e72",
64+
"_id": "c96671f68a37c051f820b4c05a204de7",
6565
"_order": 0,
6666
"cache": {},
6767
"request": {
@@ -79,23 +79,23 @@
7979
"value": "application/json"
8080
}
8181
],
82-
"headersSize": 598,
82+
"headersSize": 596,
8383
"httpVersion": "HTTP/1.1",
8484
"method": "POST",
8585
"postData": {
8686
"mimeType": "application/json",
8787
"params": [],
88-
"text": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name\",\"filters\":[],\"name\":\"my_agent_rule\",\"policy_id\":\"wqi-kze-rt7\",\"product_tags\":[]},\"type\":\"agent_rule\"}}"
88+
"text": "{\"data\":{\"attributes\":{\"description\":\"My Agent rule\",\"enabled\":true,\"expression\":\"exec.file.name\",\"filters\":[],\"name\":\"my_agent_rule\",\"policy_id\":\"sr5-i0h-lty\",\"product_tags\":[]},\"type\":\"agent_rule\"}}"
8989
},
9090
"queryString": [],
9191
"url": "https://api.datadoghq.com/api/v2/remote_config/products/cws/agent_rules"
9292
},
9393
"response": {
94-
"bodySize": 154,
94+
"bodySize": 121,
9595
"content": {
9696
"mimeType": "application/json",
97-
"size": 154,
98-
"text": "{\"errors\":[\"input_validation_error(Field 'expression' is invalid: rule `my_agent_rule` error: rule syntax error: bool expected: 1:1: exec.file.name\\n^)\"]}"
97+
"size": 121,
98+
"text": "{\"errors\":[\"input_validation_error(Field 'name' is invalid: the name 'my_agent_rule' is already used by a custom rule)\"]}"
9999
},
100100
"cookies": [],
101101
"headers": [
@@ -110,11 +110,11 @@
110110
"status": 400,
111111
"statusText": "Bad Request"
112112
},
113-
"startedDateTime": "2025-05-27T10:24:52.883Z",
114-
"time": 501
113+
"startedDateTime": "2025-10-10T15:20:40.436Z",
114+
"time": 393
115115
},
116116
{
117-
"_id": "4d3f95b180cb6f4b566ba489d950e4bf",
117+
"_id": "033f489d6cfaff7becf8fafbf0d27dcc",
118118
"_order": 0,
119119
"cache": {},
120120
"request": {
@@ -127,11 +127,11 @@
127127
"value": "*/*"
128128
}
129129
],
130-
"headersSize": 543,
130+
"headersSize": 541,
131131
"httpVersion": "HTTP/1.1",
132132
"method": "DELETE",
133133
"queryString": [],
134-
"url": "https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/wqi-kze-rt7"
134+
"url": "https://api.datadoghq.com/api/v2/remote_config/products/cws/policy/sr5-i0h-lty"
135135
},
136136
"response": {
137137
"bodySize": 0,
@@ -152,8 +152,8 @@
152152
"status": 204,
153153
"statusText": "No Content"
154154
},
155-
"startedDateTime": "2025-05-27T10:24:53.393Z",
156-
"time": 668
155+
"startedDateTime": "2025-10-10T15:20:40.833Z",
156+
"time": 919
157157
}
158158
],
159159
"pages": [],
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"2025-05-27T10:24:54.068Z"
1+
"2025-10-10T15:20:41.757Z"

0 commit comments

Comments
 (0)