Skip to content

Commit faf42ba

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a49cdd4 of spec repo
1 parent 17f8f4d commit faf42ba

File tree

5 files changed

+280
-24
lines changed

5 files changed

+280
-24
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 that are not indexed.
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:

src/main/java/com/datadog/api/client/v2/api/MetricsApi.java

Lines changed: 159 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,85 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19881988
new GenericType<MetricsAndMetricTagConfigurationsResponse>() {});
19891989
}
19901990

1991+
/** Manage optional parameters to listTagsByMetricName. */
1992+
public static class ListTagsByMetricNameOptionalParameters {
1993+
private Long windowSeconds;
1994+
private String filterTags;
1995+
private String filterMatch;
1996+
private Boolean filterIncludeTagValues;
1997+
private Boolean filterAllowPartial;
1998+
private Integer pageLimit;
1999+
2000+
/**
2001+
* Set windowSeconds.
2002+
*
2003+
* @param windowSeconds The number of seconds of look back (from now) to query for tag data.
2004+
* Default value is 14400 (4 hours), minimum value is 14400 (4 hours). (optional)
2005+
* @return ListTagsByMetricNameOptionalParameters
2006+
*/
2007+
public ListTagsByMetricNameOptionalParameters windowSeconds(Long windowSeconds) {
2008+
this.windowSeconds = windowSeconds;
2009+
return this;
2010+
}
2011+
2012+
/**
2013+
* Set filterTags.
2014+
*
2015+
* @param filterTags Filter to specific tags. (optional)
2016+
* @return ListTagsByMetricNameOptionalParameters
2017+
*/
2018+
public ListTagsByMetricNameOptionalParameters filterTags(String filterTags) {
2019+
this.filterTags = filterTags;
2020+
return this;
2021+
}
2022+
2023+
/**
2024+
* Set filterMatch.
2025+
*
2026+
* @param filterMatch Match pattern for filtering tags. (optional)
2027+
* @return ListTagsByMetricNameOptionalParameters
2028+
*/
2029+
public ListTagsByMetricNameOptionalParameters filterMatch(String filterMatch) {
2030+
this.filterMatch = filterMatch;
2031+
return this;
2032+
}
2033+
2034+
/**
2035+
* Set filterIncludeTagValues.
2036+
*
2037+
* @param filterIncludeTagValues Whether to include tag values in the response. Defaults to
2038+
* true. (optional)
2039+
* @return ListTagsByMetricNameOptionalParameters
2040+
*/
2041+
public ListTagsByMetricNameOptionalParameters filterIncludeTagValues(
2042+
Boolean filterIncludeTagValues) {
2043+
this.filterIncludeTagValues = filterIncludeTagValues;
2044+
return this;
2045+
}
2046+
2047+
/**
2048+
* Set filterAllowPartial.
2049+
*
2050+
* @param filterAllowPartial Whether to allow partial results. Defaults to false. (optional)
2051+
* @return ListTagsByMetricNameOptionalParameters
2052+
*/
2053+
public ListTagsByMetricNameOptionalParameters filterAllowPartial(Boolean filterAllowPartial) {
2054+
this.filterAllowPartial = filterAllowPartial;
2055+
return this;
2056+
}
2057+
2058+
/**
2059+
* Set pageLimit.
2060+
*
2061+
* @param pageLimit Maximum number of results to return. (optional, default to 1000000)
2062+
* @return ListTagsByMetricNameOptionalParameters
2063+
*/
2064+
public ListTagsByMetricNameOptionalParameters pageLimit(Integer pageLimit) {
2065+
this.pageLimit = pageLimit;
2066+
return this;
2067+
}
2068+
}
2069+
19912070
/**
19922071
* List tags by metric name.
19932072
*
@@ -1998,7 +2077,9 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19982077
* @throws ApiException if fails to make API call
19992078
*/
20002079
public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiException {
2001-
return listTagsByMetricNameWithHttpInfo(metricName).getData();
2080+
return listTagsByMetricNameWithHttpInfo(
2081+
metricName, new ListTagsByMetricNameOptionalParameters())
2082+
.getData();
20022083
}
20032084

20042085
/**
@@ -2010,17 +2091,53 @@ public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiE
20102091
* @return CompletableFuture&lt;MetricAllTagsResponse&gt;
20112092
*/
20122093
public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(String metricName) {
2013-
return listTagsByMetricNameWithHttpInfoAsync(metricName)
2094+
return listTagsByMetricNameWithHttpInfoAsync(
2095+
metricName, new ListTagsByMetricNameOptionalParameters())
20142096
.thenApply(
20152097
response -> {
20162098
return response.getData();
20172099
});
20182100
}
20192101

20202102
/**
2021-
* View indexed tag key-value pairs for a given metric name over the previous hour.
2103+
* List tags by metric name.
2104+
*
2105+
* <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20222106
*
20232107
* @param metricName The name of the metric. (required)
2108+
* @param parameters Optional parameters for the request.
2109+
* @return MetricAllTagsResponse
2110+
* @throws ApiException if fails to make API call
2111+
*/
2112+
public MetricAllTagsResponse listTagsByMetricName(
2113+
String metricName, ListTagsByMetricNameOptionalParameters parameters) throws ApiException {
2114+
return listTagsByMetricNameWithHttpInfo(metricName, parameters).getData();
2115+
}
2116+
2117+
/**
2118+
* List tags by metric name.
2119+
*
2120+
* <p>See {@link #listTagsByMetricNameWithHttpInfoAsync}.
2121+
*
2122+
* @param metricName The name of the metric. (required)
2123+
* @param parameters Optional parameters for the request.
2124+
* @return CompletableFuture&lt;MetricAllTagsResponse&gt;
2125+
*/
2126+
public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(
2127+
String metricName, ListTagsByMetricNameOptionalParameters parameters) {
2128+
return listTagsByMetricNameWithHttpInfoAsync(metricName, parameters)
2129+
.thenApply(
2130+
response -> {
2131+
return response.getData();
2132+
});
2133+
}
2134+
2135+
/**
2136+
* View indexed and ingested tags for a given metric name. Results are filtered by the <code>
2137+
* window[seconds]</code> parameter, which defaults to 14400 (4 hours).
2138+
*
2139+
* @param metricName The name of the metric. (required)
2140+
* @param parameters Optional parameters for the request.
20242141
* @return ApiResponse&lt;MetricAllTagsResponse&gt;
20252142
* @throws ApiException if fails to make API call
20262143
* @http.response.details
@@ -2034,28 +2151,44 @@ public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(String
20342151
* <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
20352152
* </table>
20362153
*/
2037-
public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(String metricName)
2038-
throws ApiException {
2154+
public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(
2155+
String metricName, ListTagsByMetricNameOptionalParameters parameters) throws ApiException {
20392156
Object localVarPostBody = null;
20402157

20412158
// verify the required parameter 'metricName' is set
20422159
if (metricName == null) {
20432160
throw new ApiException(
20442161
400, "Missing the required parameter 'metricName' when calling listTagsByMetricName");
20452162
}
2163+
Long windowSeconds = parameters.windowSeconds;
2164+
String filterTags = parameters.filterTags;
2165+
String filterMatch = parameters.filterMatch;
2166+
Boolean filterIncludeTagValues = parameters.filterIncludeTagValues;
2167+
Boolean filterAllowPartial = parameters.filterAllowPartial;
2168+
Integer pageLimit = parameters.pageLimit;
20462169
// create path and map variables
20472170
String localVarPath =
20482171
"/api/v2/metrics/{metric_name}/all-tags"
20492172
.replaceAll(
20502173
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
20512174

2175+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
20522176
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
20532177

2178+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2179+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
2180+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[match]", filterMatch));
2181+
localVarQueryParams.addAll(
2182+
apiClient.parameterToPairs("", "filter[include_tag_values]", filterIncludeTagValues));
2183+
localVarQueryParams.addAll(
2184+
apiClient.parameterToPairs("", "filter[allow_partial]", filterAllowPartial));
2185+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
2186+
20542187
Invocation.Builder builder =
20552188
apiClient.createBuilder(
20562189
"v2.MetricsApi.listTagsByMetricName",
20572190
localVarPath,
2058-
new ArrayList<Pair>(),
2191+
localVarQueryParams,
20592192
localVarHeaderParams,
20602193
new HashMap<String, String>(),
20612194
new String[] {"application/json"},
@@ -2077,10 +2210,12 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20772210
* <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20782211
*
20792212
* @param metricName The name of the metric. (required)
2213+
* @param parameters Optional parameters for the request.
20802214
* @return CompletableFuture&lt;ApiResponse&lt;MetricAllTagsResponse&gt;&gt;
20812215
*/
20822216
public CompletableFuture<ApiResponse<MetricAllTagsResponse>>
2083-
listTagsByMetricNameWithHttpInfoAsync(String metricName) {
2217+
listTagsByMetricNameWithHttpInfoAsync(
2218+
String metricName, ListTagsByMetricNameOptionalParameters parameters) {
20842219
Object localVarPostBody = null;
20852220

20862221
// verify the required parameter 'metricName' is set
@@ -2092,21 +2227,37 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20922227
"Missing the required parameter 'metricName' when calling listTagsByMetricName"));
20932228
return result;
20942229
}
2230+
Long windowSeconds = parameters.windowSeconds;
2231+
String filterTags = parameters.filterTags;
2232+
String filterMatch = parameters.filterMatch;
2233+
Boolean filterIncludeTagValues = parameters.filterIncludeTagValues;
2234+
Boolean filterAllowPartial = parameters.filterAllowPartial;
2235+
Integer pageLimit = parameters.pageLimit;
20952236
// create path and map variables
20962237
String localVarPath =
20972238
"/api/v2/metrics/{metric_name}/all-tags"
20982239
.replaceAll(
20992240
"\\{" + "metric_name" + "\\}", apiClient.escapeString(metricName.toString()));
21002241

2242+
List<Pair> localVarQueryParams = new ArrayList<Pair>();
21012243
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
21022244

2245+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "window[seconds]", windowSeconds));
2246+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[tags]", filterTags));
2247+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[match]", filterMatch));
2248+
localVarQueryParams.addAll(
2249+
apiClient.parameterToPairs("", "filter[include_tag_values]", filterIncludeTagValues));
2250+
localVarQueryParams.addAll(
2251+
apiClient.parameterToPairs("", "filter[allow_partial]", filterAllowPartial));
2252+
localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[limit]", pageLimit));
2253+
21032254
Invocation.Builder builder;
21042255
try {
21052256
builder =
21062257
apiClient.createBuilder(
21072258
"v2.MetricsApi.listTagsByMetricName",
21082259
localVarPath,
2109-
new ArrayList<Pair>(),
2260+
localVarQueryParams,
21102261
localVarHeaderParams,
21112262
new HashMap<String, String>(),
21122263
new String[] {"application/json"},

src/main/java/com/datadog/api/client/v2/model/MetricAllTags.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.Map;
1717
import java.util.Objects;
1818

19-
/** Object for a single metric's indexed tags. */
19+
/** Object for a single metric's indexed and ingested tags. */
2020
@JsonPropertyOrder({
2121
MetricAllTags.JSON_PROPERTY_ATTRIBUTES,
2222
MetricAllTags.JSON_PROPERTY_ID,
@@ -42,7 +42,7 @@ public MetricAllTags attributes(MetricAllTagsAttributes attributes) {
4242
}
4343

4444
/**
45-
* Object containing the definition of a metric's tags.
45+
* Object containing the definition of a metric's indexed and ingested tags.
4646
*
4747
* @return attributes
4848
*/

0 commit comments

Comments
 (0)