Skip to content

Commit 516be4b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit c799512 of spec repo
1 parent 27f9b78 commit 516be4b

File tree

57 files changed

+2238
-2974
lines changed

Some content is hidden

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

57 files changed

+2238
-2974
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10205,11 +10205,11 @@ components:
1020510205
CloudWorkloadSecurityAgentPolicyVersion:
1020610206
description: The versions of the policy
1020710207
properties:
10208-
Date:
10208+
date:
1020910209
description: The date and time the version was created
1021010210
nullable: true
1021110211
type: string
10212-
Name:
10212+
name:
1021310213
description: The version of the policy
1021410214
example: 1.47.0-rc2
1021510215
type: string
@@ -10236,8 +10236,11 @@ components:
1023610236
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
1023710237
type: object
1023810238
CloudWorkloadSecurityAgentRuleActionHash:
10239-
additionalProperties: {}
10240-
description: An empty object indicating the hash action
10239+
description: Hash file specified by the field attribute
10240+
properties:
10241+
field:
10242+
description: The field of the hash action
10243+
type: string
1024110244
type: object
1024210245
CloudWorkloadSecurityAgentRuleActionMetadata:
1024310246
description: The metadata action applied on the scope matching the rule
@@ -10285,9 +10288,14 @@ components:
1028510288
format: int64
1028610289
type: integer
1028710290
value:
10288-
description: The value of the set action
10289-
type: string
10291+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSetValue'
1029010292
type: object
10293+
CloudWorkloadSecurityAgentRuleActionSetValue:
10294+
description: The value of the set action
10295+
oneOf:
10296+
- type: string
10297+
- type: integer
10298+
- type: boolean
1029110299
CloudWorkloadSecurityAgentRuleActions:
1029210300
description: The array of actions the rule can perform if triggered
1029310301
items:

docs/datadog_api_client.v2.model.rst

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

3948+
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_action\_set\_value module
3949+
-----------------------------------------------------------------------------------------------
3950+
3951+
.. automodule:: datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value
3952+
:members:
3953+
:show-inheritance:
3954+
39483955
datadog\_api\_client.v2.model.cloud\_workload\_security\_agent\_rule\_attributes module
39493956
---------------------------------------------------------------------------------------
39503957

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_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+
}

src/datadog_api_client/v2/models/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -762,6 +762,9 @@
762762
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set import (
763763
CloudWorkloadSecurityAgentRuleActionSet,
764764
)
765+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value import (
766+
CloudWorkloadSecurityAgentRuleActionSetValue,
767+
)
765768
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_attributes import (
766769
CloudWorkloadSecurityAgentRuleAttributes,
767770
)
@@ -5514,6 +5517,7 @@
55145517
"CloudWorkloadSecurityAgentRuleActionHash",
55155518
"CloudWorkloadSecurityAgentRuleActionMetadata",
55165519
"CloudWorkloadSecurityAgentRuleActionSet",
5520+
"CloudWorkloadSecurityAgentRuleActionSetValue",
55175521
"CloudWorkloadSecurityAgentRuleAttributes",
55185522
"CloudWorkloadSecurityAgentRuleCreateAttributes",
55195523
"CloudWorkloadSecurityAgentRuleCreateData",

0 commit comments

Comments
 (0)