Skip to content

Commit f6c65ae

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit b5c0faa of spec repo
1 parent ecb3578 commit f6c65ae

34 files changed

Lines changed: 926 additions & 615 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 176 additions & 83 deletions
Large diffs are not rendered by default.

docs/datadog_api_client.v2.model.rst

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11120,6 +11120,27 @@ datadog\_api\_client.v2.model.feature\_flag\_environment module
1112011120
:members:
1112111121
:show-inheritance:
1112211122

11123+
datadog\_api\_client.v2.model.feature\_flag\_environment\_list\_item module
11124+
---------------------------------------------------------------------------
11125+
11126+
.. automodule:: datadog_api_client.v2.model.feature_flag_environment_list_item
11127+
:members:
11128+
:show-inheritance:
11129+
11130+
datadog\_api\_client.v2.model.feature\_flag\_list\_item module
11131+
--------------------------------------------------------------
11132+
11133+
.. automodule:: datadog_api_client.v2.model.feature_flag_list_item
11134+
:members:
11135+
:show-inheritance:
11136+
11137+
datadog\_api\_client.v2.model.feature\_flag\_list\_item\_attributes module
11138+
--------------------------------------------------------------------------
11139+
11140+
.. automodule:: datadog_api_client.v2.model.feature_flag_list_item_attributes
11141+
:members:
11142+
:show-inheritance:
11143+
1112311144
datadog\_api\_client.v2.model.feature\_flag\_response module
1112411145
------------------------------------------------------------
1112511146

@@ -11134,13 +11155,6 @@ datadog\_api\_client.v2.model.feature\_flag\_status module
1113411155
:members:
1113511156
:show-inheritance:
1113611157

11137-
datadog\_api\_client.v2.model.feature\_flag\_targeting\_rule module
11138-
-------------------------------------------------------------------
11139-
11140-
.. automodule:: datadog_api_client.v2.model.feature_flag_targeting_rule
11141-
:members:
11142-
:show-inheritance:
11143-
1114411158
datadog\_api\_client.v2.model.feature\_flags\_pagination\_meta module
1114511159
---------------------------------------------------------------------
1114611160

examples/v2/feature-flags/ListFeatureFlags.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
configuration = Configuration()
99
with ApiClient(configuration) as api_client:
1010
api_instance = FeatureFlagsApi(api_client)
11-
response = api_instance.list_feature_flags()
11+
response = api_instance.list_feature_flags(
12+
limit=10,
13+
)
1214

1315
print(response)

src/datadog_api_client/v2/api/security_monitoring_api.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def __init__(self, api_client=None):
192192
self._activate_content_pack_endpoint = _Endpoint(
193193
settings={
194194
"response_type": None,
195-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
195+
"auth": ["apiKeyAuth", "appKeyAuth"],
196196
"endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/activate",
197197
"operation_id": "activate_content_pack",
198198
"http_method": "PUT",
@@ -659,7 +659,7 @@ def __init__(self, api_client=None):
659659
self._deactivate_content_pack_endpoint = _Endpoint(
660660
settings={
661661
"response_type": None,
662-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
662+
"auth": ["apiKeyAuth", "appKeyAuth"],
663663
"endpoint_path": "/api/v2/security_monitoring/content_packs/{content_pack_id}/deactivate",
664664
"operation_id": "deactivate_content_pack",
665665
"http_method": "PUT",
@@ -1025,7 +1025,7 @@ def __init__(self, api_client=None):
10251025
self._get_content_packs_states_endpoint = _Endpoint(
10261026
settings={
10271027
"response_type": (SecurityMonitoringContentPackStatesResponse,),
1028-
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
1028+
"auth": ["apiKeyAuth", "appKeyAuth"],
10291029
"endpoint_path": "/api/v2/security_monitoring/content_packs/states",
10301030
"operation_id": "get_content_packs_states",
10311031
"http_method": "GET",
@@ -2993,11 +2993,11 @@ def activate_content_pack(
29932993
) -> None:
29942994
"""Activate content pack.
29952995
2996-
Activate a Cloud SIEM content pack. This operation configures the necessary
2996+
Activate a security monitoring content pack. This operation configures the necessary
29972997
log filters or security filters depending on the pricing model and updates the content
29982998
pack activation state.
29992999
3000-
:param content_pack_id: The ID of the content pack to activate (for example, ``aws-cloudtrail`` ).
3000+
:param content_pack_id: The ID of the content pack to activate.
30013001
:type content_pack_id: str
30023002
:rtype: None
30033003
"""
@@ -3417,10 +3417,10 @@ def deactivate_content_pack(
34173417
) -> None:
34183418
"""Deactivate content pack.
34193419
3420-
Deactivate a Cloud SIEM content pack. This operation removes the content pack's
3420+
Deactivate a security monitoring content pack. This operation removes the content pack's
34213421
configuration from log filters or security filters and updates the content pack activation state.
34223422
3423-
:param content_pack_id: The ID of the content pack to deactivate (for example, ``aws-cloudtrail`` ).
3423+
:param content_pack_id: The ID of the content pack to deactivate.
34243424
:type content_pack_id: str
34253425
:rtype: None
34263426
"""
@@ -3704,8 +3704,9 @@ def get_content_packs_states(
37043704
) -> SecurityMonitoringContentPackStatesResponse:
37053705
"""Get content pack states.
37063706
3707-
Get the activation state, integration status, and log collection status
3708-
for all Cloud SIEM content packs.
3707+
Get the activation and configuration states for all security monitoring content packs.
3708+
This endpoint returns status information about each content pack including activation state,
3709+
integration status, and log collection status.
37093710
37103711
:rtype: SecurityMonitoringContentPackStatesResponse
37113712
"""

src/datadog_api_client/v2/model/feature_flag_attributes.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def openapi_types(_):
4141
"last_updated_by": (UUID,),
4242
"name": (str,),
4343
"require_approval": (bool,),
44+
"staleness_status": (str,),
4445
"tags": ([str],),
4546
"updated_at": (datetime,),
4647
"value_type": (ValueType,),
@@ -59,6 +60,7 @@ def openapi_types(_):
5960
"last_updated_by": "last_updated_by",
6061
"name": "name",
6162
"require_approval": "require_approval",
63+
"staleness_status": "staleness_status",
6264
"tags": "tags",
6365
"updated_at": "updated_at",
6466
"value_type": "value_type",
@@ -80,6 +82,7 @@ def __init__(
8082
json_schema: Union[str, none_type, UnsetType] = unset,
8183
last_updated_by: Union[UUID, UnsetType] = unset,
8284
require_approval: Union[bool, UnsetType] = unset,
85+
staleness_status: Union[str, UnsetType] = unset,
8386
tags: Union[List[str], UnsetType] = unset,
8487
updated_at: Union[datetime, UnsetType] = unset,
8588
**kwargs,
@@ -120,6 +123,9 @@ def __init__(
120123
:param require_approval: Indicates whether this feature flag requires approval for changes.
121124
:type require_approval: bool, optional
122125
126+
:param staleness_status: Indicates the staleness status of the feature flag.
127+
:type staleness_status: str, optional
128+
123129
:param tags: Tags associated with the feature flag.
124130
:type tags: [str], optional
125131
@@ -148,6 +154,8 @@ def __init__(
148154
kwargs["last_updated_by"] = last_updated_by
149155
if require_approval is not unset:
150156
kwargs["require_approval"] = require_approval
157+
if staleness_status is not unset:
158+
kwargs["staleness_status"] = staleness_status
151159
if tags is not unset:
152160
kwargs["tags"] = tags
153161
if updated_at is not unset:

src/datadog_api_client/v2/model/feature_flag_environment.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@
1818

1919

2020
if TYPE_CHECKING:
21-
from datadog_api_client.v2.model.feature_flag_targeting_rule import FeatureFlagTargetingRule
2221
from datadog_api_client.v2.model.feature_flag_status import FeatureFlagStatus
2322

2423

2524
class FeatureFlagEnvironment(ModelNormal):
26-
validations = {
27-
"rollout_percentage": {
28-
"inclusive_maximum": 100,
29-
"inclusive_minimum": 0,
30-
},
31-
}
32-
3325
@cached_property
3426
def openapi_types(_):
35-
from datadog_api_client.v2.model.feature_flag_targeting_rule import FeatureFlagTargetingRule
3627
from datadog_api_client.v2.model.feature_flag_status import FeatureFlagStatus
3728

3829
return {
@@ -63,8 +54,6 @@ def openapi_types(_):
6354
"override_variant_id": (str, none_type),
6455
"pending_suggestion_id": (str, none_type),
6556
"require_feature_flag_approval": (bool,),
66-
"rollout_percentage": (int,),
67-
"rules": ([FeatureFlagTargetingRule],),
6857
"status": (FeatureFlagStatus,),
6958
}
7059

@@ -80,8 +69,6 @@ def openapi_types(_):
8069
"override_variant_id": "override_variant_id",
8170
"pending_suggestion_id": "pending_suggestion_id",
8271
"require_feature_flag_approval": "require_feature_flag_approval",
83-
"rollout_percentage": "rollout_percentage",
84-
"rules": "rules",
8572
"status": "status",
8673
}
8774

@@ -99,8 +86,6 @@ def __init__(
9986
override_variant_id: Union[str, none_type, UnsetType] = unset,
10087
pending_suggestion_id: Union[str, none_type, UnsetType] = unset,
10188
require_feature_flag_approval: Union[bool, UnsetType] = unset,
102-
rollout_percentage: Union[int, UnsetType] = unset,
103-
rules: Union[List[FeatureFlagTargetingRule], UnsetType] = unset,
10489
**kwargs,
10590
):
10691
"""
@@ -139,12 +124,6 @@ def __init__(
139124
:param require_feature_flag_approval: Indicates whether feature flag changes require approval in this environment.
140125
:type require_feature_flag_approval: bool, optional
141126
142-
:param rollout_percentage: Rollout percentage for this environment.
143-
:type rollout_percentage: int, optional
144-
145-
:param rules: Environment targeting rules for this feature flag.
146-
:type rules: [FeatureFlagTargetingRule], optional
147-
148127
:param status: The status of a feature flag in an environment.
149128
:type status: FeatureFlagStatus
150129
"""
@@ -168,10 +147,6 @@ def __init__(
168147
kwargs["pending_suggestion_id"] = pending_suggestion_id
169148
if require_feature_flag_approval is not unset:
170149
kwargs["require_feature_flag_approval"] = require_feature_flag_approval
171-
if rollout_percentage is not unset:
172-
kwargs["rollout_percentage"] = rollout_percentage
173-
if rules is not unset:
174-
kwargs["rules"] = rules
175150
super().__init__(kwargs)
176151

177152
self_.environment_id = environment_id
Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
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+
from typing import List, Union, TYPE_CHECKING
7+
8+
from datadog_api_client.model_utils import (
9+
ModelNormal,
10+
cached_property,
11+
none_type,
12+
unset,
13+
UnsetType,
14+
UUID,
15+
)
16+
17+
18+
if TYPE_CHECKING:
19+
from datadog_api_client.v2.model.feature_flag_status import FeatureFlagStatus
20+
21+
22+
class FeatureFlagEnvironmentListItem(ModelNormal):
23+
@cached_property
24+
def openapi_types(_):
25+
from datadog_api_client.v2.model.feature_flag_status import FeatureFlagStatus
26+
27+
return {
28+
"default_allocation_key": (str,),
29+
"default_variant_id": (str, none_type),
30+
"environment_id": (UUID,),
31+
"environment_name": (str,),
32+
"environment_queries": ([str],),
33+
"is_production": (bool,),
34+
"override_allocation_key": (str,),
35+
"override_variant_id": (str, none_type),
36+
"pending_suggestion_id": (str, none_type),
37+
"require_feature_flag_approval": (bool,),
38+
"status": (FeatureFlagStatus,),
39+
}
40+
41+
attribute_map = {
42+
"default_allocation_key": "default_allocation_key",
43+
"default_variant_id": "default_variant_id",
44+
"environment_id": "environment_id",
45+
"environment_name": "environment_name",
46+
"environment_queries": "environment_queries",
47+
"is_production": "is_production",
48+
"override_allocation_key": "override_allocation_key",
49+
"override_variant_id": "override_variant_id",
50+
"pending_suggestion_id": "pending_suggestion_id",
51+
"require_feature_flag_approval": "require_feature_flag_approval",
52+
"status": "status",
53+
}
54+
55+
def __init__(
56+
self_,
57+
environment_id: UUID,
58+
status: FeatureFlagStatus,
59+
default_allocation_key: Union[str, UnsetType] = unset,
60+
default_variant_id: Union[str, none_type, UnsetType] = unset,
61+
environment_name: Union[str, UnsetType] = unset,
62+
environment_queries: Union[List[str], UnsetType] = unset,
63+
is_production: Union[bool, UnsetType] = unset,
64+
override_allocation_key: Union[str, UnsetType] = unset,
65+
override_variant_id: Union[str, none_type, UnsetType] = unset,
66+
pending_suggestion_id: Union[str, none_type, UnsetType] = unset,
67+
require_feature_flag_approval: Union[bool, UnsetType] = unset,
68+
**kwargs,
69+
):
70+
"""
71+
Environment-specific settings for a feature flag in list responses.
72+
73+
:param default_allocation_key: The allocation key used for the default variant.
74+
:type default_allocation_key: str, optional
75+
76+
:param default_variant_id: The ID of the default variant for this environment.
77+
:type default_variant_id: str, none_type, optional
78+
79+
:param environment_id: The ID of the environment.
80+
:type environment_id: UUID
81+
82+
:param environment_name: The name of the environment.
83+
:type environment_name: str, optional
84+
85+
:param environment_queries: Queries that target this environment.
86+
:type environment_queries: [str], optional
87+
88+
:param is_production: Indicates whether the environment is production.
89+
:type is_production: bool, optional
90+
91+
:param override_allocation_key: The allocation key used for the override variant.
92+
:type override_allocation_key: str, optional
93+
94+
:param override_variant_id: The ID of the override variant for this environment.
95+
:type override_variant_id: str, none_type, optional
96+
97+
:param pending_suggestion_id: Pending suggestion identifier, if approval is required.
98+
:type pending_suggestion_id: str, none_type, optional
99+
100+
:param require_feature_flag_approval: Indicates whether feature flag changes require approval in this environment.
101+
:type require_feature_flag_approval: bool, optional
102+
103+
:param status: The status of a feature flag in an environment.
104+
:type status: FeatureFlagStatus
105+
"""
106+
if default_allocation_key is not unset:
107+
kwargs["default_allocation_key"] = default_allocation_key
108+
if default_variant_id is not unset:
109+
kwargs["default_variant_id"] = default_variant_id
110+
if environment_name is not unset:
111+
kwargs["environment_name"] = environment_name
112+
if environment_queries is not unset:
113+
kwargs["environment_queries"] = environment_queries
114+
if is_production is not unset:
115+
kwargs["is_production"] = is_production
116+
if override_allocation_key is not unset:
117+
kwargs["override_allocation_key"] = override_allocation_key
118+
if override_variant_id is not unset:
119+
kwargs["override_variant_id"] = override_variant_id
120+
if pending_suggestion_id is not unset:
121+
kwargs["pending_suggestion_id"] = pending_suggestion_id
122+
if require_feature_flag_approval is not unset:
123+
kwargs["require_feature_flag_approval"] = require_feature_flag_approval
124+
super().__init__(kwargs)
125+
126+
self_.environment_id = environment_id
127+
self_.status = status

0 commit comments

Comments
 (0)