@@ -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<MetricAllTagsResponse>
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<MetricAllTagsResponse>
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 tag key-value pairs 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<MetricAllTagsResponse>
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<ApiResponse<MetricAllTagsResponse>>
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" },
0 commit comments