Skip to content

Commit 039d819

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e5094d5 of spec repo
1 parent 177d72f commit 039d819

58 files changed

Lines changed: 2457 additions & 4230 deletions

File tree

Some content is hidden

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

.generator/schemas/v2/openapi.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10243,6 +10243,10 @@ components:
1024310243
description: Whether the policy is pinned
1024410244
example: false
1024510245
type: boolean
10246+
policyType:
10247+
description: The type of the policy
10248+
example: policy
10249+
type: string
1024610250
policyVersion:
1024710251
description: The version of the policy
1024810252
example: '1'
@@ -10421,11 +10425,11 @@ components:
1042110425
CloudWorkloadSecurityAgentPolicyVersion:
1042210426
description: The versions of the policy
1042310427
properties:
10424-
Date:
10428+
date:
1042510429
description: The date and time the version was created
1042610430
nullable: true
1042710431
type: string
10428-
Name:
10432+
name:
1042910433
description: The version of the policy
1043010434
example: 1.47.0-rc2
1043110435
type: string
@@ -10452,8 +10456,11 @@ components:
1045210456
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
1045310457
type: object
1045410458
CloudWorkloadSecurityAgentRuleActionHash:
10455-
additionalProperties: {}
10456-
description: An empty object indicating the hash action
10459+
description: Hash file specified by the field attribute
10460+
properties:
10461+
field:
10462+
description: The field of the hash action
10463+
type: string
1045710464
type: object
1045810465
CloudWorkloadSecurityAgentRuleActionMetadata:
1045910466
description: The metadata action applied on the scope matching the rule
@@ -10501,9 +10508,14 @@ components:
1050110508
format: int64
1050210509
type: integer
1050310510
value:
10504-
description: The value of the set action
10505-
type: string
10511+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSetValue'
1050610512
type: object
10513+
CloudWorkloadSecurityAgentRuleActionSetValue:
10514+
description: The value of the set action
10515+
oneOf:
10516+
- type: string
10517+
- type: integer
10518+
- type: boolean
1050710519
CloudWorkloadSecurityAgentRuleActions:
1050810520
description: The array of actions the rule can perform if triggered
1050910521
items:

docs/datadog_api_client.v2.model.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4064,6 +4064,13 @@ datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_se
40644064
:members:
40654065
:show-inheritance:
40664066

4067+
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_set\_value module
4068+
-----------------------------------------------------------------------------------------------
4069+
4070+
.. automodule:: datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value
4071+
:members:
4072+
:show-inheritance:
4073+
40674074
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_attributes module
40684075
---------------------------------------------------------------------------------------
40694076

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1295653933.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@
4646
),
4747
),
4848
CloudWorkloadSecurityAgentRuleAction(
49-
hash=CloudWorkloadSecurityAgentRuleActionHash(),
49+
hash=CloudWorkloadSecurityAgentRuleActionHash(
50+
field="exec.file",
51+
),
5052
),
5153
],
5254
),

examples/v2/csm-threats/CreateCSMThreatsAgentRule_1363354233.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
CloudWorkloadSecurityAgentRuleAction(
3838
set=CloudWorkloadSecurityAgentRuleActionSet(
3939
name="test_set",
40-
expression="open.file.path",
40+
expression="exec.file.path",
4141
default_value="/dev/null",
4242
scope="process",
4343
),

src/datadog_api_client/v2/model/cloud_workload_security_agent_policy_attributes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ def openapi_types(_):
5858
"monitoring_rules_count": (int,),
5959
"name": (str,),
6060
"pinned": (bool,),
61+
"policy_type": (str,),
6162
"policy_version": (str,),
6263
"priority": (int,),
6364
"rule_count": (int,),
@@ -78,6 +79,7 @@ def openapi_types(_):
7879
"monitoring_rules_count": "monitoringRulesCount",
7980
"name": "name",
8081
"pinned": "pinned",
82+
"policy_type": "policyType",
8183
"policy_version": "policyVersion",
8284
"priority": "priority",
8385
"rule_count": "ruleCount",
@@ -99,6 +101,7 @@ def __init__(
99101
monitoring_rules_count: Union[int, UnsetType] = unset,
100102
name: Union[str, UnsetType] = unset,
101103
pinned: Union[bool, UnsetType] = unset,
104+
policy_type: Union[str, UnsetType] = unset,
102105
policy_version: Union[str, UnsetType] = unset,
103106
priority: Union[int, UnsetType] = unset,
104107
rule_count: Union[int, UnsetType] = unset,
@@ -141,6 +144,9 @@ def __init__(
141144
:param pinned: Whether the policy is pinned
142145
:type pinned: bool, optional
143146
147+
:param policy_type: The type of the policy
148+
:type policy_type: str, optional
149+
144150
:param policy_version: The version of the policy
145151
:type policy_version: str, optional
146152
@@ -182,6 +188,8 @@ def __init__(
182188
kwargs["name"] = name
183189
if pinned is not unset:
184190
kwargs["pinned"] = pinned
191+
if policy_type is not unset:
192+
kwargs["policy_type"] = policy_type
185193
if policy_version is not unset:
186194
kwargs["policy_version"] = policy_version
187195
if priority is not unset:

src/datadog_api_client/v2/model/cloud_workload_security_agent_policy_version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ def openapi_types(_):
2323
}
2424

2525
attribute_map = {
26-
"date": "Date",
27-
"name": "Name",
26+
"date": "date",
27+
"name": "name",
2828
}
2929

3030
def __init__(self_, date: Union[str, none_type, UnsetType] = unset, name: Union[str, UnsetType] = unset, **kwargs):

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_action.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def __init__(
7373
:param filter: SECL expression used to target the container to apply the action on
7474
:type filter: str, optional
7575
76-
:param hash: An empty object indicating the hash action
76+
:param hash: Hash file specified by the field attribute
7777
:type hash: CloudWorkloadSecurityAgentRuleActionHash, optional
7878
7979
:param kill: Kill system call applied on the container matching the rule

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_action_hash.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,34 @@
33
# Copyright 2019-Present Datadog, Inc.
44
from __future__ import annotations
55

6+
from typing import Union
67

78
from datadog_api_client.model_utils import (
89
ModelNormal,
10+
cached_property,
11+
unset,
12+
UnsetType,
913
)
1014

1115

1216
class CloudWorkloadSecurityAgentRuleActionHash(ModelNormal):
13-
def __init__(self_, **kwargs):
17+
@cached_property
18+
def openapi_types(_):
19+
return {
20+
"field": (str,),
21+
}
22+
23+
attribute_map = {
24+
"field": "field",
25+
}
26+
27+
def __init__(self_, field: Union[str, UnsetType] = unset, **kwargs):
1428
"""
15-
An empty object indicating the hash action
29+
Hash file specified by the field attribute
30+
31+
:param field: The field of the hash action
32+
:type field: str, optional
1633
"""
34+
if field is not unset:
35+
kwargs["field"] = field
1736
super().__init__(kwargs)

src/datadog_api_client/v2/model/cloud_workload_security_agent_rule_action_set.py

Lines changed: 14 additions & 4 deletions
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 Union, TYPE_CHECKING
77

88
from datadog_api_client.model_utils import (
99
ModelNormal,
@@ -13,9 +13,19 @@
1313
)
1414

1515

16+
if TYPE_CHECKING:
17+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value import (
18+
CloudWorkloadSecurityAgentRuleActionSetValue,
19+
)
20+
21+
1622
class CloudWorkloadSecurityAgentRuleActionSet(ModelNormal):
1723
@cached_property
1824
def openapi_types(_):
25+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value import (
26+
CloudWorkloadSecurityAgentRuleActionSetValue,
27+
)
28+
1929
return {
2030
"append": (bool,),
2131
"default_value": (str,),
@@ -26,7 +36,7 @@ def openapi_types(_):
2636
"scope": (str,),
2737
"size": (int,),
2838
"ttl": (int,),
29-
"value": (str,),
39+
"value": (CloudWorkloadSecurityAgentRuleActionSetValue,),
3040
}
3141

3242
attribute_map = {
@@ -53,7 +63,7 @@ def __init__(
5363
scope: Union[str, UnsetType] = unset,
5464
size: Union[int, UnsetType] = unset,
5565
ttl: Union[int, UnsetType] = unset,
56-
value: Union[str, UnsetType] = unset,
66+
value: Union[CloudWorkloadSecurityAgentRuleActionSetValue, str, int, bool, UnsetType] = unset,
5767
**kwargs,
5868
):
5969
"""
@@ -87,7 +97,7 @@ def __init__(
8797
:type ttl: int, optional
8898
8999
:param value: The value of the set action
90-
:type value: str, optional
100+
:type value: CloudWorkloadSecurityAgentRuleActionSetValue, optional
91101
"""
92102
if append is not unset:
93103
kwargs["append"] = append
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
ModelComposed,
9+
cached_property,
10+
)
11+
12+
13+
class CloudWorkloadSecurityAgentRuleActionSetValue(ModelComposed):
14+
def __init__(self, **kwargs):
15+
"""
16+
The value of the set action
17+
"""
18+
super().__init__(kwargs)
19+
20+
@cached_property
21+
def _composed_schemas(_):
22+
# we need this here to make our import statements work
23+
# we must store _composed_schemas in here so the code is only run
24+
# when we invoke this method. If we kept this at the class
25+
# level we would get an error because the class level
26+
# code would be run when this module is imported, and these composed
27+
# classes don't exist yet because their module has not finished
28+
# loading
29+
return {
30+
"oneOf": [
31+
str,
32+
int,
33+
bool,
34+
],
35+
}

0 commit comments

Comments
 (0)