Skip to content

Commit 69ffb6c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit e4989ea of spec repo
1 parent 6823564 commit 69ffb6c

File tree

4 files changed

+107
-4
lines changed

4 files changed

+107
-4
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32317,6 +32317,16 @@ components:
3231732317
MetricAllTagsAttributes:
3231832318
description: Object containing the definition of a metric's tags.
3231932319
properties:
32320+
ingested_tags:
32321+
description: List of ingested tag value pairs.
32322+
example:
32323+
- env:prod
32324+
- service:web
32325+
- version:1.0
32326+
items:
32327+
description: Tag key-value pairs.
32328+
type: string
32329+
type: array
3232032330
tags:
3232132331
description: List of indexed tag value pairs.
3232232332
example:
@@ -76164,11 +76174,67 @@ paths:
7616476174
- metrics_read
7616576175
/api/v2/metrics/{metric_name}/all-tags:
7616676176
get:
76167-
description: View indexed tag key-value pairs for a given metric name over the
76168-
previous hour.
76177+
description: 'View indexed tag key-value pairs for a given metric name.
76178+
76179+
Results are filtered by the `window[seconds]` parameter, which defaults to
76180+
14400 (4 hours).'
7616976181
operationId: ListTagsByMetricName
7617076182
parameters:
7617176183
- $ref: '#/components/parameters/MetricName'
76184+
- description: 'The number of seconds of look back (from now) to query for tag
76185+
data.
76186+
76187+
Default value is 14400 (4 hours), minimum value is 14400 (4 hours).'
76188+
example: 14400
76189+
in: query
76190+
name: window[seconds]
76191+
required: false
76192+
schema:
76193+
format: int64
76194+
type: integer
76195+
- description: Filter to specific tags.
76196+
example: env,service
76197+
in: query
76198+
name: filter[tags]
76199+
required: false
76200+
schema:
76201+
type: string
76202+
- description: Match pattern for filtering tags.
76203+
example: env:prod*
76204+
in: query
76205+
name: filter[match]
76206+
required: false
76207+
schema:
76208+
type: string
76209+
- description: 'Whether to include tag values in the response.
76210+
76211+
Defaults to true.'
76212+
example: true
76213+
in: query
76214+
name: filter[include_tag_values]
76215+
required: false
76216+
schema:
76217+
type: boolean
76218+
- description: 'Whether to allow partial results.
76219+
76220+
Defaults to false.'
76221+
example: false
76222+
in: query
76223+
name: filter[allow_partial]
76224+
required: false
76225+
schema:
76226+
type: boolean
76227+
- description: Maximum number of results to return.
76228+
example: 1000
76229+
in: query
76230+
name: page[limit]
76231+
required: false
76232+
schema:
76233+
default: 1000000
76234+
format: int32
76235+
maximum: 1000000
76236+
minimum: 1
76237+
type: integer
7617276238
responses:
7617376239
'200':
7617476240
content:

features/scenarios_model_mapping.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,6 +2522,12 @@
25222522
},
25232523
"v2.ListTagsByMetricName" => {
25242524
"metric_name" => "String",
2525+
"window_seconds" => "Integer",
2526+
"filter_tags" => "String",
2527+
"filter_match" => "String",
2528+
"filter_include_tag_values" => "Boolean",
2529+
"filter_allow_partial" => "Boolean",
2530+
"page_limit" => "Integer",
25252531
},
25262532
"v2.ListMetricAssets" => {
25272533
"metric_name" => "String",

lib/datadog_api_client/v2/api/metrics_api.rb

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,10 +781,17 @@ def list_tags_by_metric_name(metric_name, opts = {})
781781

782782
# List tags by metric name.
783783
#
784-
# View indexed tag key-value pairs for a given metric name over the previous hour.
784+
# View indexed tag key-value pairs for a given metric name.
785+
# Results are filtered by the `window[seconds]` parameter, which defaults to 14400 (4 hours).
785786
#
786787
# @param metric_name [String] The name of the metric.
787788
# @param opts [Hash] the optional parameters
789+
# @option opts [Integer] :window_seconds The number of seconds of look back (from now) to query for tag data. Default value is 14400 (4 hours), minimum value is 14400 (4 hours).
790+
# @option opts [String] :filter_tags Filter to specific tags.
791+
# @option opts [String] :filter_match Match pattern for filtering tags.
792+
# @option opts [Boolean] :filter_include_tag_values Whether to include tag values in the response. Defaults to true.
793+
# @option opts [Boolean] :filter_allow_partial Whether to allow partial results. Defaults to false.
794+
# @option opts [Integer] :page_limit Maximum number of results to return.
788795
# @return [Array<(MetricAllTagsResponse, Integer, Hash)>] MetricAllTagsResponse data, response status code and response headers
789796
def list_tags_by_metric_name_with_http_info(metric_name, opts = {})
790797

@@ -795,11 +802,23 @@ def list_tags_by_metric_name_with_http_info(metric_name, opts = {})
795802
if @api_client.config.client_side_validation && metric_name.nil?
796803
fail ArgumentError, "Missing the required parameter 'metric_name' when calling MetricsAPI.list_tags_by_metric_name"
797804
end
805+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] > 1000000
806+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling MetricsAPI.list_tags_by_metric_name, must be smaller than or equal to 1000000.'
807+
end
808+
if @api_client.config.client_side_validation && !opts[:'page_limit'].nil? && opts[:'page_limit'] < 1
809+
fail ArgumentError, 'invalid value for "opts[:"page_limit"]" when calling MetricsAPI.list_tags_by_metric_name, must be greater than or equal to 1.'
810+
end
798811
# resource path
799812
local_var_path = '/api/v2/metrics/{metric_name}/all-tags'.sub('{metric_name}', CGI.escape(metric_name.to_s).gsub('%2F', '/'))
800813

801814
# query parameters
802815
query_params = opts[:query_params] || {}
816+
query_params[:'window[seconds]'] = opts[:'window_seconds'] if !opts[:'window_seconds'].nil?
817+
query_params[:'filter[tags]'] = opts[:'filter_tags'] if !opts[:'filter_tags'].nil?
818+
query_params[:'filter[match]'] = opts[:'filter_match'] if !opts[:'filter_match'].nil?
819+
query_params[:'filter[include_tag_values]'] = opts[:'filter_include_tag_values'] if !opts[:'filter_include_tag_values'].nil?
820+
query_params[:'filter[allow_partial]'] = opts[:'filter_allow_partial'] if !opts[:'filter_allow_partial'].nil?
821+
query_params[:'page[limit]'] = opts[:'page_limit'] if !opts[:'page_limit'].nil?
803822

804823
# header parameters
805824
header_params = opts[:header_params] || {}

lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ module DatadogAPIClient::V2
2121
class MetricAllTagsAttributes
2222
include BaseGenericModel
2323

24+
# List of ingested tag value pairs.
25+
attr_accessor :ingested_tags
26+
2427
# List of indexed tag value pairs.
2528
attr_accessor :tags
2629

@@ -30,6 +33,7 @@ class MetricAllTagsAttributes
3033
# @!visibility private
3134
def self.attribute_map
3235
{
36+
:'ingested_tags' => :'ingested_tags',
3337
:'tags' => :'tags'
3438
}
3539
end
@@ -38,6 +42,7 @@ def self.attribute_map
3842
# @!visibility private
3943
def self.openapi_types
4044
{
45+
:'ingested_tags' => :'Array<String>',
4146
:'tags' => :'Array<String>'
4247
}
4348
end
@@ -60,6 +65,12 @@ def initialize(attributes = {})
6065
end
6166
}
6267

68+
if attributes.key?(:'ingested_tags')
69+
if (value = attributes[:'ingested_tags']).is_a?(Array)
70+
self.ingested_tags = value
71+
end
72+
end
73+
6374
if attributes.key?(:'tags')
6475
if (value = attributes[:'tags']).is_a?(Array)
6576
self.tags = value
@@ -93,6 +104,7 @@ def to_hash
93104
def ==(o)
94105
return true if self.equal?(o)
95106
self.class == o.class &&
107+
ingested_tags == o.ingested_tags &&
96108
tags == o.tags &&
97109
additional_properties == o.additional_properties
98110
end
@@ -101,7 +113,7 @@ def ==(o)
101113
# @return [Integer] Hash code
102114
# @!visibility private
103115
def hash
104-
[tags, additional_properties].hash
116+
[ingested_tags, tags, additional_properties].hash
105117
end
106118
end
107119
end

0 commit comments

Comments
 (0)