Skip to content

Commit 6154bce

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 35d655b of spec repo
1 parent d03353f commit 6154bce

28 files changed

Lines changed: 893 additions & 530 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 162 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -26598,6 +26598,10 @@ components:
2659826598
description: Indicates whether this feature flag requires approval for changes.
2659926599
example: false
2660026600
type: boolean
26601+
staleness_status:
26602+
description: Indicates the whether a feature flag is stale or not.
26603+
example: "ACTIVE"
26604+
type: string
2660126605
tags:
2660226606
description: Tags associated with the feature flag.
2660326607
example: []
@@ -26681,24 +26685,171 @@ components:
2668126685
description: Indicates whether feature flag changes require approval in this environment.
2668226686
example: false
2668326687
type: boolean
26684-
rollout_percentage:
26685-
description: Rollout percentage for this environment.
26686-
example: 0
26687-
format: int64
26688-
maximum: 100
26689-
minimum: 0
26690-
type: integer
26691-
rules:
26692-
description: Environment targeting rules for this feature flag.
26688+
status:
26689+
$ref: "#/components/schemas/FeatureFlagStatus"
26690+
required:
26691+
- environment_id
26692+
- status
26693+
type: object
26694+
FeatureFlagEnvironmentListItem:
26695+
description: Environment-specific settings for a feature flag in list responses.
26696+
properties:
26697+
default_allocation_key:
26698+
description: The allocation key used for the default variant.
26699+
example: "allocation-default-123abc"
26700+
type: string
26701+
default_variant_id:
26702+
description: The ID of the default variant for this environment.
26703+
example: "550e8400-e29b-41d4-a716-446655440002"
26704+
nullable: true
26705+
type: string
26706+
environment_id:
26707+
description: The ID of the environment.
26708+
example: "550e8400-e29b-41d4-a716-446655440001"
26709+
format: uuid
26710+
type: string
26711+
environment_name:
26712+
description: The name of the environment.
26713+
example: "env-search-term"
26714+
type: string
26715+
environment_queries:
26716+
description: Queries that target this environment.
26717+
example:
26718+
- "test-feature-flag"
26719+
- "env-search-term"
2669326720
items:
26694-
$ref: "#/components/schemas/FeatureFlagTargetingRule"
26721+
description: A query string targeting the environment.
26722+
type: string
2669526723
type: array
26724+
is_production:
26725+
description: Indicates whether the environment is production.
26726+
example: false
26727+
type: boolean
26728+
override_allocation_key:
26729+
description: The allocation key used for the override variant.
26730+
example: "allocation-override-123abc"
26731+
type: string
26732+
override_variant_id:
26733+
description: The ID of the override variant for this environment.
26734+
example: "550e8400-e29b-41d4-a716-446655440003"
26735+
nullable: true
26736+
type: string
26737+
pending_suggestion_id:
26738+
description: Pending suggestion identifier, if approval is required.
26739+
example: "550e8400-e29b-41d4-a716-446655440099"
26740+
nullable: true
26741+
type: string
26742+
require_feature_flag_approval:
26743+
description: Indicates whether feature flag changes require approval in this environment.
26744+
example: false
26745+
type: boolean
2669626746
status:
2669726747
$ref: "#/components/schemas/FeatureFlagStatus"
2669826748
required:
2669926749
- environment_id
2670026750
- status
2670126751
type: object
26752+
FeatureFlagListItem:
26753+
description: A feature flag resource for list responses.
26754+
properties:
26755+
attributes:
26756+
$ref: "#/components/schemas/FeatureFlagListItemAttributes"
26757+
id:
26758+
description: The unique identifier of the feature flag.
26759+
example: "550e8400-e29b-41d4-a716-446655440000"
26760+
format: uuid
26761+
type: string
26762+
type:
26763+
$ref: "#/components/schemas/CreateFeatureFlagDataType"
26764+
required:
26765+
- id
26766+
- type
26767+
- attributes
26768+
type: object
26769+
FeatureFlagListItemAttributes:
26770+
description: Attributes of a feature flag in list responses.
26771+
properties:
26772+
archived_at:
26773+
description: The timestamp when the feature flag was archived.
26774+
example: "2023-01-01T00:00:00Z"
26775+
format: date-time
26776+
nullable: true
26777+
type: string
26778+
created_at:
26779+
description: The timestamp when the feature flag was created.
26780+
example: "2023-01-01T00:00:00Z"
26781+
format: date-time
26782+
type: string
26783+
created_by:
26784+
description: The ID of the user who created the feature flag.
26785+
example: "550e8400-e29b-41d4-a716-446655440010"
26786+
format: uuid
26787+
type: string
26788+
description:
26789+
description: The description of the feature flag.
26790+
example: "This is an example feature flag for demonstration"
26791+
type: string
26792+
distribution_channel:
26793+
description: Distribution channel for the feature flag.
26794+
example: "ALL"
26795+
type: string
26796+
feature_flag_environments:
26797+
description: Environment-specific settings for the feature flag.
26798+
items:
26799+
$ref: "#/components/schemas/FeatureFlagEnvironmentListItem"
26800+
type: array
26801+
json_schema:
26802+
description: JSON schema for validation when value_type is JSON.
26803+
example: '{"type": "object", "properties": {"enabled": {"type": "boolean"}}}'
26804+
nullable: true
26805+
type: string
26806+
key:
26807+
description: The unique key of the feature flag.
26808+
example: "feature-flag-abc123"
26809+
type: string
26810+
last_updated_by:
26811+
description: The ID of the user who last updated the feature flag.
26812+
example: "550e8400-e29b-41d4-a716-446655440010"
26813+
format: uuid
26814+
type: string
26815+
name:
26816+
description: The name of the feature flag.
26817+
example: "Feature Flag ABC123"
26818+
type: string
26819+
require_approval:
26820+
description: Indicates whether this feature flag requires approval for changes.
26821+
example: false
26822+
type: boolean
26823+
staleness_status:
26824+
description: Indicates the staleness status of the feature flag.
26825+
example: "ACTIVE"
26826+
type: string
26827+
tags:
26828+
description: Tags associated with the feature flag.
26829+
example: []
26830+
items:
26831+
description: A tag associated with the feature flag.
26832+
type: string
26833+
type: array
26834+
updated_at:
26835+
description: The timestamp when the feature flag was last updated.
26836+
example: "2023-01-01T00:00:00Z"
26837+
format: date-time
26838+
type: string
26839+
value_type:
26840+
$ref: "#/components/schemas/ValueType"
26841+
variants:
26842+
description: The variants of the feature flag.
26843+
items:
26844+
$ref: "#/components/schemas/Variant"
26845+
type: array
26846+
required:
26847+
- key
26848+
- name
26849+
- description
26850+
- value_type
26851+
- variants
26852+
type: object
2670226853
FeatureFlagResponse:
2670326854
description: Response containing a feature flag.
2670426855
properties:
@@ -26717,10 +26868,6 @@ components:
2671726868
x-enum-varnames:
2671826869
- ENABLED
2671926870
- DISABLED
26720-
FeatureFlagTargetingRule:
26721-
additionalProperties: {}
26722-
description: A targeting rule for a feature flag.
26723-
type: object
2672426871
FeatureFlagsPaginationMeta:
2672526872
description: Pagination metadata for feature flags.
2672626873
properties:
@@ -40561,7 +40708,7 @@ components:
4056140708
data:
4056240709
description: List of feature flags.
4056340710
items:
40564-
$ref: "#/components/schemas/FeatureFlag"
40711+
$ref: "#/components/schemas/FeatureFlagListItem"
4056540712
type: array
4056640713
meta:
4056740714
$ref: "#/components/schemas/FeatureFlagsPaginationMeta"

docs/datadog_api_client.v2.model.rst

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

11186+
datadog\_api\_client.v2.model.feature\_flag\_environment\_list\_item module
11187+
---------------------------------------------------------------------------
11188+
11189+
.. automodule:: datadog_api_client.v2.model.feature_flag_environment_list_item
11190+
:members:
11191+
:show-inheritance:
11192+
11193+
datadog\_api\_client.v2.model.feature\_flag\_list\_item module
11194+
--------------------------------------------------------------
11195+
11196+
.. automodule:: datadog_api_client.v2.model.feature_flag_list_item
11197+
:members:
11198+
:show-inheritance:
11199+
11200+
datadog\_api\_client.v2.model.feature\_flag\_list\_item\_attributes module
11201+
--------------------------------------------------------------------------
11202+
11203+
.. automodule:: datadog_api_client.v2.model.feature_flag_list_item_attributes
11204+
:members:
11205+
:show-inheritance:
11206+
1118611207
datadog\_api\_client.v2.model.feature\_flag\_response module
1118711208
------------------------------------------------------------
1118811209

@@ -11197,13 +11218,6 @@ datadog\_api\_client.v2.model.feature\_flag\_status module
1119711218
:members:
1119811219
:show-inheritance:
1119911220

11200-
datadog\_api\_client.v2.model.feature\_flag\_targeting\_rule module
11201-
-------------------------------------------------------------------
11202-
11203-
.. automodule:: datadog_api_client.v2.model.feature_flag_targeting_rule
11204-
:members:
11205-
:show-inheritance:
11206-
1120711221
datadog\_api\_client.v2.model.feature\_flags\_pagination\_meta module
1120811222
---------------------------------------------------------------------
1120911223

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/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 whether a feature flag is stale or not.
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

0 commit comments

Comments
 (0)