Skip to content

Commit a52206b

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 75e4e49 of spec repo
1 parent fc4fc3c commit a52206b

File tree

57 files changed

+2470
-4255
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

+2470
-4255
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10421,11 +10421,11 @@ components:
1042110421
CloudWorkloadSecurityAgentPolicyVersion:
1042210422
description: The versions of the policy
1042310423
properties:
10424-
Date:
10424+
date:
1042510425
description: The date and time the version was created
1042610426
nullable: true
1042710427
type: string
10428-
Name:
10428+
name:
1042910429
description: The version of the policy
1043010430
example: 1.47.0-rc2
1043110431
type: string
@@ -10452,8 +10452,11 @@ components:
1045210452
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSet'
1045310453
type: object
1045410454
CloudWorkloadSecurityAgentRuleActionHash:
10455-
additionalProperties: {}
10456-
description: An empty object indicating the hash action
10455+
description: Hash file specified by the field attribute
10456+
properties:
10457+
field:
10458+
description: The field of the hash action
10459+
type: string
1045710460
type: object
1045810461
CloudWorkloadSecurityAgentRuleActionMetadata:
1045910462
description: The metadata action applied on the scope matching the rule
@@ -10501,9 +10504,14 @@ components:
1050110504
format: int64
1050210505
type: integer
1050310506
value:
10504-
description: The value of the set action
10505-
type: string
10507+
$ref: '#/components/schemas/CloudWorkloadSecurityAgentRuleActionSetValue'
1050610508
type: object
10509+
CloudWorkloadSecurityAgentRuleActionSetValue:
10510+
description: The value of the set action
10511+
oneOf:
10512+
- type: string
10513+
- type: integer
10514+
- type: boolean
1050710515
CloudWorkloadSecurityAgentRuleActions:
1050810516
description: The array of actions the rule can perform if triggered
1050910517
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_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
@@ -781,6 +781,9 @@
781781
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set import (
782782
CloudWorkloadSecurityAgentRuleActionSet,
783783
)
784+
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_action_set_value import (
785+
CloudWorkloadSecurityAgentRuleActionSetValue,
786+
)
784787
from datadog_api_client.v2.model.cloud_workload_security_agent_rule_attributes import (
785788
CloudWorkloadSecurityAgentRuleAttributes,
786789
)
@@ -5660,6 +5663,7 @@
56605663
"CloudWorkloadSecurityAgentRuleActionHash",
56615664
"CloudWorkloadSecurityAgentRuleActionMetadata",
56625665
"CloudWorkloadSecurityAgentRuleActionSet",
5666+
"CloudWorkloadSecurityAgentRuleActionSetValue",
56635667
"CloudWorkloadSecurityAgentRuleAttributes",
56645668
"CloudWorkloadSecurityAgentRuleCreateAttributes",
56655669
"CloudWorkloadSecurityAgentRuleCreateData",

0 commit comments

Comments
 (0)