|
20 | 20 | import com.datadog.api.client.v2.model.BudgetValidationRequest; |
21 | 21 | import com.datadog.api.client.v2.model.BudgetValidationResponse; |
22 | 22 | import com.datadog.api.client.v2.model.BudgetWithEntries; |
| 23 | +import com.datadog.api.client.v2.model.CostTagDescriptionsResponse; |
23 | 24 | import com.datadog.api.client.v2.model.CreateRulesetRequest; |
24 | 25 | import com.datadog.api.client.v2.model.CustomCostsFileGetResponse; |
25 | 26 | import com.datadog.api.client.v2.model.CustomCostsFileLineItem; |
@@ -3211,6 +3212,180 @@ public CompletableFuture<ApiResponse<OCIConfigsResponse>> listCostOCIConfigsWith |
3211 | 3212 | new GenericType<OCIConfigsResponse>() {}); |
3212 | 3213 | } |
3213 | 3214 |
|
| 3215 | + /** Manage optional parameters to listCostTagDescriptions. */ |
| 3216 | + public static class ListCostTagDescriptionsOptionalParameters { |
| 3217 | + private String filterCloud; |
| 3218 | + |
| 3219 | + /** |
| 3220 | + * Set filterCloud. |
| 3221 | + * |
| 3222 | + * @param filterCloud Filter descriptions to a specific cloud provider (for example, <code>aws |
| 3223 | + * </code>). Omit to return descriptions across all clouds. (optional) |
| 3224 | + * @return ListCostTagDescriptionsOptionalParameters |
| 3225 | + */ |
| 3226 | + public ListCostTagDescriptionsOptionalParameters filterCloud(String filterCloud) { |
| 3227 | + this.filterCloud = filterCloud; |
| 3228 | + return this; |
| 3229 | + } |
| 3230 | + } |
| 3231 | + |
| 3232 | + /** |
| 3233 | + * List Cloud Cost Management tag descriptions. |
| 3234 | + * |
| 3235 | + * <p>See {@link #listCostTagDescriptionsWithHttpInfo}. |
| 3236 | + * |
| 3237 | + * @return CostTagDescriptionsResponse |
| 3238 | + * @throws ApiException if fails to make API call |
| 3239 | + */ |
| 3240 | + public CostTagDescriptionsResponse listCostTagDescriptions() throws ApiException { |
| 3241 | + return listCostTagDescriptionsWithHttpInfo(new ListCostTagDescriptionsOptionalParameters()) |
| 3242 | + .getData(); |
| 3243 | + } |
| 3244 | + |
| 3245 | + /** |
| 3246 | + * List Cloud Cost Management tag descriptions. |
| 3247 | + * |
| 3248 | + * <p>See {@link #listCostTagDescriptionsWithHttpInfoAsync}. |
| 3249 | + * |
| 3250 | + * @return CompletableFuture<CostTagDescriptionsResponse> |
| 3251 | + */ |
| 3252 | + public CompletableFuture<CostTagDescriptionsResponse> listCostTagDescriptionsAsync() { |
| 3253 | + return listCostTagDescriptionsWithHttpInfoAsync(new ListCostTagDescriptionsOptionalParameters()) |
| 3254 | + .thenApply( |
| 3255 | + response -> { |
| 3256 | + return response.getData(); |
| 3257 | + }); |
| 3258 | + } |
| 3259 | + |
| 3260 | + /** |
| 3261 | + * List Cloud Cost Management tag descriptions. |
| 3262 | + * |
| 3263 | + * <p>See {@link #listCostTagDescriptionsWithHttpInfo}. |
| 3264 | + * |
| 3265 | + * @param parameters Optional parameters for the request. |
| 3266 | + * @return CostTagDescriptionsResponse |
| 3267 | + * @throws ApiException if fails to make API call |
| 3268 | + */ |
| 3269 | + public CostTagDescriptionsResponse listCostTagDescriptions( |
| 3270 | + ListCostTagDescriptionsOptionalParameters parameters) throws ApiException { |
| 3271 | + return listCostTagDescriptionsWithHttpInfo(parameters).getData(); |
| 3272 | + } |
| 3273 | + |
| 3274 | + /** |
| 3275 | + * List Cloud Cost Management tag descriptions. |
| 3276 | + * |
| 3277 | + * <p>See {@link #listCostTagDescriptionsWithHttpInfoAsync}. |
| 3278 | + * |
| 3279 | + * @param parameters Optional parameters for the request. |
| 3280 | + * @return CompletableFuture<CostTagDescriptionsResponse> |
| 3281 | + */ |
| 3282 | + public CompletableFuture<CostTagDescriptionsResponse> listCostTagDescriptionsAsync( |
| 3283 | + ListCostTagDescriptionsOptionalParameters parameters) { |
| 3284 | + return listCostTagDescriptionsWithHttpInfoAsync(parameters) |
| 3285 | + .thenApply( |
| 3286 | + response -> { |
| 3287 | + return response.getData(); |
| 3288 | + }); |
| 3289 | + } |
| 3290 | + |
| 3291 | + /** |
| 3292 | + * List Cloud Cost Management tag key descriptions for the organization. Use <code>filter[cloud] |
| 3293 | + * </code> to scope the result to a single cloud provider; when omitted, both cross-cloud defaults |
| 3294 | + * and cloud-specific descriptions are returned. |
| 3295 | + * |
| 3296 | + * @param parameters Optional parameters for the request. |
| 3297 | + * @return ApiResponse<CostTagDescriptionsResponse> |
| 3298 | + * @throws ApiException if fails to make API call |
| 3299 | + * @http.response.details |
| 3300 | + * <table border="1"> |
| 3301 | + * <caption>Response details</caption> |
| 3302 | + * <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 3303 | + * <tr><td> 200 </td><td> OK </td><td> - </td></tr> |
| 3304 | + * <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr> |
| 3305 | + * <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr> |
| 3306 | + * </table> |
| 3307 | + */ |
| 3308 | + public ApiResponse<CostTagDescriptionsResponse> listCostTagDescriptionsWithHttpInfo( |
| 3309 | + ListCostTagDescriptionsOptionalParameters parameters) throws ApiException { |
| 3310 | + Object localVarPostBody = null; |
| 3311 | + String filterCloud = parameters.filterCloud; |
| 3312 | + // create path and map variables |
| 3313 | + String localVarPath = "/api/v2/cost/tag_descriptions"; |
| 3314 | + |
| 3315 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 3316 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 3317 | + |
| 3318 | + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[cloud]", filterCloud)); |
| 3319 | + |
| 3320 | + Invocation.Builder builder = |
| 3321 | + apiClient.createBuilder( |
| 3322 | + "v2.CloudCostManagementApi.listCostTagDescriptions", |
| 3323 | + localVarPath, |
| 3324 | + localVarQueryParams, |
| 3325 | + localVarHeaderParams, |
| 3326 | + new HashMap<String, String>(), |
| 3327 | + new String[] {"application/json"}, |
| 3328 | + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); |
| 3329 | + return apiClient.invokeAPI( |
| 3330 | + "GET", |
| 3331 | + builder, |
| 3332 | + localVarHeaderParams, |
| 3333 | + new String[] {}, |
| 3334 | + localVarPostBody, |
| 3335 | + new HashMap<String, Object>(), |
| 3336 | + false, |
| 3337 | + new GenericType<CostTagDescriptionsResponse>() {}); |
| 3338 | + } |
| 3339 | + |
| 3340 | + /** |
| 3341 | + * List Cloud Cost Management tag descriptions. |
| 3342 | + * |
| 3343 | + * <p>See {@link #listCostTagDescriptionsWithHttpInfo}. |
| 3344 | + * |
| 3345 | + * @param parameters Optional parameters for the request. |
| 3346 | + * @return CompletableFuture<ApiResponse<CostTagDescriptionsResponse>> |
| 3347 | + */ |
| 3348 | + public CompletableFuture<ApiResponse<CostTagDescriptionsResponse>> |
| 3349 | + listCostTagDescriptionsWithHttpInfoAsync( |
| 3350 | + ListCostTagDescriptionsOptionalParameters parameters) { |
| 3351 | + Object localVarPostBody = null; |
| 3352 | + String filterCloud = parameters.filterCloud; |
| 3353 | + // create path and map variables |
| 3354 | + String localVarPath = "/api/v2/cost/tag_descriptions"; |
| 3355 | + |
| 3356 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 3357 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 3358 | + |
| 3359 | + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[cloud]", filterCloud)); |
| 3360 | + |
| 3361 | + Invocation.Builder builder; |
| 3362 | + try { |
| 3363 | + builder = |
| 3364 | + apiClient.createBuilder( |
| 3365 | + "v2.CloudCostManagementApi.listCostTagDescriptions", |
| 3366 | + localVarPath, |
| 3367 | + localVarQueryParams, |
| 3368 | + localVarHeaderParams, |
| 3369 | + new HashMap<String, String>(), |
| 3370 | + new String[] {"application/json"}, |
| 3371 | + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); |
| 3372 | + } catch (ApiException ex) { |
| 3373 | + CompletableFuture<ApiResponse<CostTagDescriptionsResponse>> result = |
| 3374 | + new CompletableFuture<>(); |
| 3375 | + result.completeExceptionally(ex); |
| 3376 | + return result; |
| 3377 | + } |
| 3378 | + return apiClient.invokeAPIAsync( |
| 3379 | + "GET", |
| 3380 | + builder, |
| 3381 | + localVarHeaderParams, |
| 3382 | + new String[] {}, |
| 3383 | + localVarPostBody, |
| 3384 | + new HashMap<String, Object>(), |
| 3385 | + false, |
| 3386 | + new GenericType<CostTagDescriptionsResponse>() {}); |
| 3387 | + } |
| 3388 | + |
3214 | 3389 | /** |
3215 | 3390 | * List custom allocation rules. |
3216 | 3391 | * |
|
0 commit comments