Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120748,6 +120748,19 @@ components:
description: The name of the feature flag.
example: "Updated Feature Flag XYZ789"
type: string
tags:
description: |-
Tags associated with the feature flag. This field replaces the full set of
existing tags; omit it to leave tags unchanged, or pass an empty array to
clear all tags. The owning team is set by including a tag of the form
`team:<team-handle>` in this array.
example: ["team:feature-flagging"]
items:
description: A tag associated with the feature flag.
maxLength: 200
type: string
maxItems: 100
type: array
type: object
UpdateFeatureFlagData:
description: Data for updating a feature flag.
Expand Down Expand Up @@ -149224,6 +149237,11 @@ paths:
description: |-
Updates an existing feature flag's metadata such as
name and description. Does not modify targeting rules or allocations.

To change the owning team, update `tags` and include a tag of the form
`team:<team-handle>` in the array. `tags` is a full replacement of the
existing tag set (including any `team:` tag), so include every tag you
want to keep, not just the ones you're adding.
operationId: UpdateFeatureFlag
parameters:
- $ref: "#/components/parameters/feature_flag_id"
Expand All @@ -149238,6 +149256,7 @@ paths:
description: Updated description for the feature flag
enabled: true
name: Updated Feature Flag XYZ789
tags: ["team:feature-flagging"]
type: feature-flags
schema:
$ref: "#/components/schemas/UpdateFeatureFlagRequest"
Expand Down
5 changes: 5 additions & 0 deletions src/datadog_api_client/v2/api/feature_flags_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,11 @@ def update_feature_flag(
Updates an existing feature flag's metadata such as
name and description. Does not modify targeting rules or allocations.

To change the owning team, update ``tags`` and include a tag of the form
``team:<team-handle>`` in the array. ``tags`` is a full replacement of the
existing tag set (including any ``team:`` tag), so include every tag you
want to keep, not just the ones you're adding.

:param feature_flag_id: The ID of the feature flag.
:type feature_flag_id: UUID
:type body: UpdateFeatureFlagRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright 2019-Present Datadog, Inc.
from __future__ import annotations

from typing import Union
from typing import List, Union

from datadog_api_client.model_utils import (
ModelNormal,
Expand All @@ -15,25 +15,34 @@


class UpdateFeatureFlagAttributes(ModelNormal):
validations = {
"tags": {
"max_items": 100,
},
}

@cached_property
def openapi_types(_):
return {
"description": (str,),
"json_schema": (str, none_type),
"name": (str,),
"tags": ([str],),
}

attribute_map = {
"description": "description",
"json_schema": "json_schema",
"name": "name",
"tags": "tags",
}

def __init__(
self_,
description: Union[str, UnsetType] = unset,
json_schema: Union[str, none_type, UnsetType] = unset,
name: Union[str, UnsetType] = unset,
tags: Union[List[str], UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -47,11 +56,19 @@ def __init__(

:param name: The name of the feature flag.
:type name: str, optional

:param tags: Tags associated with the feature flag. This field replaces the full set of
existing tags; omit it to leave tags unchanged, or pass an empty array to
clear all tags. The owning team is set by including a tag of the form
``team:<team-handle>`` in this array.
:type tags: [str], optional
"""
if description is not unset:
kwargs["description"] = description
if json_schema is not unset:
kwargs["json_schema"] = json_schema
if name is not unset:
kwargs["name"] = name
if tags is not unset:
kwargs["tags"] = tags
super().__init__(kwargs)
Loading