Skip to content

Commit b4ec6cd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6a15890 of spec repo
1 parent 6823564 commit b4ec6cd

File tree

6 files changed

+120
-15
lines changed

6 files changed

+120
-15
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 75 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32305,7 +32305,7 @@ components:
3230532305
x-enum-varnames:
3230632306
- ACTIVELY_QUERIED_CONFIGURATIONS
3230732307
MetricAllTags:
32308-
description: Object for a single metric's indexed tags.
32308+
description: Object for a single metric's indexed and ingested tags.
3230932309
properties:
3231032310
attributes:
3231132311
$ref: '#/components/schemas/MetricAllTagsAttributes'
@@ -32315,21 +32315,33 @@ components:
3231532315
$ref: '#/components/schemas/MetricType'
3231632316
type: object
3231732317
MetricAllTagsAttributes:
32318-
description: Object containing the definition of a metric's tags.
32318+
description: Object containing the definition of a metric's indexed and ingested
32319+
tags.
3231932320
properties:
32321+
ingested_tags:
32322+
description: List of ingested tags.
32323+
example:
32324+
- env:prod
32325+
- service:web
32326+
- version:1.0
32327+
items:
32328+
description: Ingested tags for the metric.
32329+
type: string
32330+
type: array
3232032331
tags:
32321-
description: List of indexed tag value pairs.
32332+
description: List of indexed tags.
3232232333
example:
3232332334
- sport:golf
3232432335
- sport:football
3232532336
- animal:dog
3232632337
items:
32327-
description: Tag key-value pairs.
32338+
description: Indexed tags for the metric.
3232832339
type: string
3232932340
type: array
3233032341
type: object
3233132342
MetricAllTagsResponse:
32332-
description: Response object that includes a single metric's indexed tags.
32343+
description: Response object that includes a single metric's indexed and ingested
32344+
tags.
3233332345
properties:
3233432346
data:
3233532347
$ref: '#/components/schemas/MetricAllTags'
@@ -76164,11 +76176,67 @@ paths:
7616476176
- metrics_read
7616576177
/api/v2/metrics/{metric_name}/all-tags:
7616676178
get:
76167-
description: View indexed tag key-value pairs for a given metric name over the
76168-
previous hour.
76179+
description: 'View indexed and ingested tags for a given metric name.
76180+
76181+
Results are filtered by the `window[seconds]` parameter, which defaults to
76182+
14400 (4 hours).'
7616976183
operationId: ListTagsByMetricName
7617076184
parameters:
7617176185
- $ref: '#/components/parameters/MetricName'
76186+
- description: 'The number of seconds of look back (from now) to query for tag
76187+
data.
76188+
76189+
Default value is 14400 (4 hours), minimum value is 14400 (4 hours).'
76190+
example: 14400
76191+
in: query
76192+
name: window[seconds]
76193+
required: false
76194+
schema:
76195+
format: int64
76196+
type: integer
76197+
- description: Filter to specific tags.
76198+
example: env,service
76199+
in: query
76200+
name: filter[tags]
76201+
required: false
76202+
schema:
76203+
type: string
76204+
- description: Match pattern for filtering tags.
76205+
example: env:prod*
76206+
in: query
76207+
name: filter[match]
76208+
required: false
76209+
schema:
76210+
type: string
76211+
- description: 'Whether to include tag values in the response.
76212+
76213+
Defaults to true.'
76214+
example: true
76215+
in: query
76216+
name: filter[include_tag_values]
76217+
required: false
76218+
schema:
76219+
type: boolean
76220+
- description: 'Whether to allow partial results.
76221+
76222+
Defaults to false.'
76223+
example: false
76224+
in: query
76225+
name: filter[allow_partial]
76226+
required: false
76227+
schema:
76228+
type: boolean
76229+
- description: Maximum number of results to return.
76230+
example: 1000
76231+
in: query
76232+
name: page[limit]
76233+
required: false
76234+
schema:
76235+
default: 1000000
76236+
format: int32
76237+
maximum: 1000000
76238+
minimum: 1
76239+
type: integer
7617276240
responses:
7617376241
'200':
7617476242
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 and ingested tags 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.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# Object for a single metric's indexed tags.
20+
# Object for a single metric's indexed and ingested tags.
2121
class MetricAllTags
2222
include BaseGenericModel
2323

24-
# Object containing the definition of a metric's tags.
24+
# Object containing the definition of a metric's indexed and ingested tags.
2525
attr_accessor :attributes
2626

2727
# The metric name for this resource.

lib/datadog_api_client/v2/models/metric_all_tags_attributes.rb

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# Object containing the definition of a metric's tags.
20+
# Object containing the definition of a metric's indexed and ingested tags.
2121
class MetricAllTagsAttributes
2222
include BaseGenericModel
2323

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

2730
attr_accessor :additional_properties
@@ -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

lib/datadog_api_client/v2/models/metric_all_tags_response.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V2
20-
# Response object that includes a single metric's indexed tags.
20+
# Response object that includes a single metric's indexed and ingested tags.
2121
class MetricAllTagsResponse
2222
include BaseGenericModel
2323

24-
# Object for a single metric's indexed tags.
24+
# Object for a single metric's indexed and ingested tags.
2525
attr_accessor :data
2626

2727
attr_accessor :additional_properties

0 commit comments

Comments
 (0)