@@ -1987,6 +1987,89 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19871987 new GenericType <MetricsAndMetricTagConfigurationsResponse >() {});
19881988 }
19891989
1990+ /** Manage optional parameters to listTagsByMetricName. */
1991+ public static class ListTagsByMetricNameOptionalParameters {
1992+ private Long windowSeconds ;
1993+ private String filterTags ;
1994+ private String filterMatch ;
1995+ private Boolean filterIncludeTagValues ;
1996+ private Boolean filterAllowPartial ;
1997+ private Integer pageLimit ;
1998+
1999+ /**
2000+ * Set windowSeconds.
2001+ *
2002+ * @param windowSeconds The number of seconds of look back (from now) to query for tag data.
2003+ * Default value is 14400 (4 hours), minimum value is 14400 (4 hours). (optional)
2004+ * @return ListTagsByMetricNameOptionalParameters
2005+ */
2006+ public ListTagsByMetricNameOptionalParameters windowSeconds (Long windowSeconds ) {
2007+ this .windowSeconds = windowSeconds ;
2008+ return this ;
2009+ }
2010+
2011+ /**
2012+ * Set filterTags.
2013+ *
2014+ * @param filterTags Filter results to tags from data points that have the specified tags. For
2015+ * example, <code>filter[tags]=env:staging,host:123</code> returns tags only from data
2016+ * points with both <code>env:staging</code> and <code>host:123</code>. (optional)
2017+ * @return ListTagsByMetricNameOptionalParameters
2018+ */
2019+ public ListTagsByMetricNameOptionalParameters filterTags (String filterTags ) {
2020+ this .filterTags = filterTags ;
2021+ return this ;
2022+ }
2023+
2024+ /**
2025+ * Set filterMatch.
2026+ *
2027+ * @param filterMatch Filter returned tags to those matching a substring. For example, <code>
2028+ * filter[match]=env</code> returns tags like <code>env:prod</code>, <code>
2029+ * environment:staging</code>, etc. (optional)
2030+ * @return ListTagsByMetricNameOptionalParameters
2031+ */
2032+ public ListTagsByMetricNameOptionalParameters filterMatch (String filterMatch ) {
2033+ this .filterMatch = filterMatch ;
2034+ return this ;
2035+ }
2036+
2037+ /**
2038+ * Set filterIncludeTagValues.
2039+ *
2040+ * @param filterIncludeTagValues Whether to include tag values in the response. Defaults to
2041+ * true. (optional)
2042+ * @return ListTagsByMetricNameOptionalParameters
2043+ */
2044+ public ListTagsByMetricNameOptionalParameters filterIncludeTagValues (
2045+ Boolean filterIncludeTagValues ) {
2046+ this .filterIncludeTagValues = filterIncludeTagValues ;
2047+ return this ;
2048+ }
2049+
2050+ /**
2051+ * Set filterAllowPartial.
2052+ *
2053+ * @param filterAllowPartial Whether to allow partial results. Defaults to false. (optional)
2054+ * @return ListTagsByMetricNameOptionalParameters
2055+ */
2056+ public ListTagsByMetricNameOptionalParameters filterAllowPartial (Boolean filterAllowPartial ) {
2057+ this .filterAllowPartial = filterAllowPartial ;
2058+ return this ;
2059+ }
2060+
2061+ /**
2062+ * Set pageLimit.
2063+ *
2064+ * @param pageLimit Maximum number of results to return. (optional, default to 1000000)
2065+ * @return ListTagsByMetricNameOptionalParameters
2066+ */
2067+ public ListTagsByMetricNameOptionalParameters pageLimit (Integer pageLimit ) {
2068+ this .pageLimit = pageLimit ;
2069+ return this ;
2070+ }
2071+ }
2072+
19902073 /**
19912074 * List tags by metric name.
19922075 *
@@ -1997,7 +2080,9 @@ public ApiResponse<MetricsAndMetricTagConfigurationsResponse> listTagConfigurati
19972080 * @throws ApiException if fails to make API call
19982081 */
19992082 public MetricAllTagsResponse listTagsByMetricName (String metricName ) throws ApiException {
2000- return listTagsByMetricNameWithHttpInfo (metricName ).getData ();
2083+ return listTagsByMetricNameWithHttpInfo (
2084+ metricName , new ListTagsByMetricNameOptionalParameters ())
2085+ .getData ();
20012086 }
20022087
20032088 /**
@@ -2009,17 +2094,53 @@ public MetricAllTagsResponse listTagsByMetricName(String metricName) throws ApiE
20092094 * @return CompletableFuture<MetricAllTagsResponse>
20102095 */
20112096 public CompletableFuture <MetricAllTagsResponse > listTagsByMetricNameAsync (String metricName ) {
2012- return listTagsByMetricNameWithHttpInfoAsync (metricName )
2097+ return listTagsByMetricNameWithHttpInfoAsync (
2098+ metricName , new ListTagsByMetricNameOptionalParameters ())
20132099 .thenApply (
20142100 response -> {
20152101 return response .getData ();
20162102 });
20172103 }
20182104
20192105 /**
2020- * View indexed tag key-value pairs for a given metric name over the previous hour.
2106+ * List tags by metric name.
2107+ *
2108+ * <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20212109 *
20222110 * @param metricName The name of the metric. (required)
2111+ * @param parameters Optional parameters for the request.
2112+ * @return MetricAllTagsResponse
2113+ * @throws ApiException if fails to make API call
2114+ */
2115+ public MetricAllTagsResponse listTagsByMetricName (
2116+ String metricName , ListTagsByMetricNameOptionalParameters parameters ) throws ApiException {
2117+ return listTagsByMetricNameWithHttpInfo (metricName , parameters ).getData ();
2118+ }
2119+
2120+ /**
2121+ * List tags by metric name.
2122+ *
2123+ * <p>See {@link #listTagsByMetricNameWithHttpInfoAsync}.
2124+ *
2125+ * @param metricName The name of the metric. (required)
2126+ * @param parameters Optional parameters for the request.
2127+ * @return CompletableFuture<MetricAllTagsResponse>
2128+ */
2129+ public CompletableFuture <MetricAllTagsResponse > listTagsByMetricNameAsync (
2130+ String metricName , ListTagsByMetricNameOptionalParameters parameters ) {
2131+ return listTagsByMetricNameWithHttpInfoAsync (metricName , parameters )
2132+ .thenApply (
2133+ response -> {
2134+ return response .getData ();
2135+ });
2136+ }
2137+
2138+ /**
2139+ * View indexed and ingested tags for a given metric name. Results are filtered by the <code>
2140+ * window[seconds]</code> parameter, which defaults to 14400 (4 hours).
2141+ *
2142+ * @param metricName The name of the metric. (required)
2143+ * @param parameters Optional parameters for the request.
20232144 * @return ApiResponse<MetricAllTagsResponse>
20242145 * @throws ApiException if fails to make API call
20252146 * @http.response.details
@@ -2033,28 +2154,44 @@ public CompletableFuture<MetricAllTagsResponse> listTagsByMetricNameAsync(String
20332154 * <tr><td> 429 </td><td> Too Many Requests </td><td> - </td></tr>
20342155 * </table>
20352156 */
2036- public ApiResponse <MetricAllTagsResponse > listTagsByMetricNameWithHttpInfo (String metricName )
2037- throws ApiException {
2157+ public ApiResponse <MetricAllTagsResponse > listTagsByMetricNameWithHttpInfo (
2158+ String metricName , ListTagsByMetricNameOptionalParameters parameters ) throws ApiException {
20382159 Object localVarPostBody = null ;
20392160
20402161 // verify the required parameter 'metricName' is set
20412162 if (metricName == null ) {
20422163 throw new ApiException (
20432164 400 , "Missing the required parameter 'metricName' when calling listTagsByMetricName" );
20442165 }
2166+ Long windowSeconds = parameters .windowSeconds ;
2167+ String filterTags = parameters .filterTags ;
2168+ String filterMatch = parameters .filterMatch ;
2169+ Boolean filterIncludeTagValues = parameters .filterIncludeTagValues ;
2170+ Boolean filterAllowPartial = parameters .filterAllowPartial ;
2171+ Integer pageLimit = parameters .pageLimit ;
20452172 // create path and map variables
20462173 String localVarPath =
20472174 "/api/v2/metrics/{metric_name}/all-tags"
20482175 .replaceAll (
20492176 "\\ {" + "metric_name" + "\\ }" , apiClient .escapeString (metricName .toString ()));
20502177
2178+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
20512179 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
20522180
2181+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "window[seconds]" , windowSeconds ));
2182+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "filter[tags]" , filterTags ));
2183+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "filter[match]" , filterMatch ));
2184+ localVarQueryParams .addAll (
2185+ apiClient .parameterToPairs ("" , "filter[include_tag_values]" , filterIncludeTagValues ));
2186+ localVarQueryParams .addAll (
2187+ apiClient .parameterToPairs ("" , "filter[allow_partial]" , filterAllowPartial ));
2188+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "page[limit]" , pageLimit ));
2189+
20532190 Invocation .Builder builder =
20542191 apiClient .createBuilder (
20552192 "v2.MetricsApi.listTagsByMetricName" ,
20562193 localVarPath ,
2057- new ArrayList < Pair >() ,
2194+ localVarQueryParams ,
20582195 localVarHeaderParams ,
20592196 new HashMap <String , String >(),
20602197 new String [] {"application/json" },
@@ -2076,10 +2213,12 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20762213 * <p>See {@link #listTagsByMetricNameWithHttpInfo}.
20772214 *
20782215 * @param metricName The name of the metric. (required)
2216+ * @param parameters Optional parameters for the request.
20792217 * @return CompletableFuture<ApiResponse<MetricAllTagsResponse>>
20802218 */
20812219 public CompletableFuture <ApiResponse <MetricAllTagsResponse >>
2082- listTagsByMetricNameWithHttpInfoAsync (String metricName ) {
2220+ listTagsByMetricNameWithHttpInfoAsync (
2221+ String metricName , ListTagsByMetricNameOptionalParameters parameters ) {
20832222 Object localVarPostBody = null ;
20842223
20852224 // verify the required parameter 'metricName' is set
@@ -2091,21 +2230,37 @@ public ApiResponse<MetricAllTagsResponse> listTagsByMetricNameWithHttpInfo(Strin
20912230 "Missing the required parameter 'metricName' when calling listTagsByMetricName" ));
20922231 return result ;
20932232 }
2233+ Long windowSeconds = parameters .windowSeconds ;
2234+ String filterTags = parameters .filterTags ;
2235+ String filterMatch = parameters .filterMatch ;
2236+ Boolean filterIncludeTagValues = parameters .filterIncludeTagValues ;
2237+ Boolean filterAllowPartial = parameters .filterAllowPartial ;
2238+ Integer pageLimit = parameters .pageLimit ;
20942239 // create path and map variables
20952240 String localVarPath =
20962241 "/api/v2/metrics/{metric_name}/all-tags"
20972242 .replaceAll (
20982243 "\\ {" + "metric_name" + "\\ }" , apiClient .escapeString (metricName .toString ()));
20992244
2245+ List <Pair > localVarQueryParams = new ArrayList <Pair >();
21002246 Map <String , String > localVarHeaderParams = new HashMap <String , String >();
21012247
2248+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "window[seconds]" , windowSeconds ));
2249+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "filter[tags]" , filterTags ));
2250+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "filter[match]" , filterMatch ));
2251+ localVarQueryParams .addAll (
2252+ apiClient .parameterToPairs ("" , "filter[include_tag_values]" , filterIncludeTagValues ));
2253+ localVarQueryParams .addAll (
2254+ apiClient .parameterToPairs ("" , "filter[allow_partial]" , filterAllowPartial ));
2255+ localVarQueryParams .addAll (apiClient .parameterToPairs ("" , "page[limit]" , pageLimit ));
2256+
21022257 Invocation .Builder builder ;
21032258 try {
21042259 builder =
21052260 apiClient .createBuilder (
21062261 "v2.MetricsApi.listTagsByMetricName" ,
21072262 localVarPath ,
2108- new ArrayList < Pair >() ,
2263+ localVarQueryParams ,
21092264 localVarHeaderParams ,
21102265 new HashMap <String , String >(),
21112266 new String [] {"application/json" },
0 commit comments