diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e8bb5351a80b..fc6f224d3bb3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -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:` 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. @@ -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:` 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" @@ -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" diff --git a/lib/datadog_api_client/v2/api/feature_flags_api.rb b/lib/datadog_api_client/v2/api/feature_flags_api.rb index a048eec828c1..c4a7a5f713a0 100644 --- a/lib/datadog_api_client/v2/api/feature_flags_api.rb +++ b/lib/datadog_api_client/v2/api/feature_flags_api.rb @@ -1361,6 +1361,11 @@ def update_feature_flag(feature_flag_id, body, opts = {}) # 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:` 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 [UUID] The ID of the feature flag. # @param body [UpdateFeatureFlagRequest] # @param opts [Hash] the optional parameters diff --git a/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb b/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb index 39bcc05f3f31..9a2e948d925c 100644 --- a/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb +++ b/lib/datadog_api_client/v2/models/update_feature_flag_attributes.rb @@ -30,6 +30,12 @@ class UpdateFeatureFlagAttributes # The name of the feature flag. attr_accessor :name + # 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:` in this array. + attr_reader :tags + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. @@ -38,7 +44,8 @@ def self.attribute_map { :'description' => :'description', :'json_schema' => :'json_schema', - :'name' => :'name' + :'name' => :'name', + :'tags' => :'tags' } end @@ -48,7 +55,8 @@ def self.openapi_types { :'description' => :'String', :'json_schema' => :'String', - :'name' => :'String' + :'name' => :'String', + :'tags' => :'Array' } end @@ -89,6 +97,30 @@ def initialize(attributes = {}) if attributes.key?(:'name') self.name = attributes[:'name'] end + + if attributes.key?(:'tags') + if (value = attributes[:'tags']).is_a?(Array) + self.tags = value + end + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if !@tags.nil? && @tags.length > 100 + true + end + + # Custom attribute writer method with validation + # @param tags [Object] Object to be assigned + # @!visibility private + def tags=(tags) + if !tags.nil? && tags.length > 100 + fail ArgumentError, 'invalid value for "tags", number of items must be less than or equal to 100.' + end + @tags = tags end # Returns the object in the form of hash, with additionalProperties support. @@ -120,6 +152,7 @@ def ==(o) description == o.description && json_schema == o.json_schema && name == o.name && + tags == o.tags && additional_properties == o.additional_properties end @@ -127,7 +160,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [description, json_schema, name, additional_properties].hash + [description, json_schema, name, tags, additional_properties].hash end end end