diff --git a/.generated-info b/.generated-info index 2f609c52737..3a9f0a244ab 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "4413e63", - "generated": "2025-08-19 20:29:58.463" + "spec_repo_commit": "1211759", + "generated": "2025-08-21 16:45:54.489" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5dc52e4a2ee..3c4fa5920b3 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50180,9 +50180,20 @@ paths: - cloud_cost_management_write /api/v2/cost_by_tag/active_billing_dimensions: get: - description: Get active billing dimensions for cost attribution. Cost data for - a given month becomes available no later than the 19th of the following month. + description: Get active billing dimensions for cost attribution in a given month. + Note that billing dimensions active in a given month may not appear in the + Monthly Cost Attribution API response until the 19th of the following month. + For the most accurate results, request the same month for both endpoints. operationId: GetActiveBillingDimensions + parameters: + - description: 'Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] + for billing dimensions active this month. Defaults to the current month.' + in: query + name: month + required: false + schema: + format: date-time + type: string responses: '200': content: diff --git a/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java b/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java index c5b1b298dee..04fd00d359e 100644 --- a/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/UsageMeteringApi.java @@ -54,6 +54,23 @@ public void setApiClient(ApiClient apiClient) { this.apiClient = apiClient; } + /** Manage optional parameters to getActiveBillingDimensions. */ + public static class GetActiveBillingDimensionsOptionalParameters { + private OffsetDateTime month; + + /** + * Set month. + * + * @param month Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for billing + * dimensions active this month. Defaults to the current month. (optional) + * @return GetActiveBillingDimensionsOptionalParameters + */ + public GetActiveBillingDimensionsOptionalParameters month(OffsetDateTime month) { + this.month = month; + return this; + } + } + /** * Get active billing dimensions for cost attribution. * @@ -63,7 +80,9 @@ public void setApiClient(ApiClient apiClient) { * @throws ApiException if fails to make API call */ public ActiveBillingDimensionsResponse getActiveBillingDimensions() throws ApiException { - return getActiveBillingDimensionsWithHttpInfo().getData(); + return getActiveBillingDimensionsWithHttpInfo( + new GetActiveBillingDimensionsOptionalParameters()) + .getData(); } /** @@ -74,7 +93,8 @@ public ActiveBillingDimensionsResponse getActiveBillingDimensions() throws ApiEx * @return CompletableFuture<ActiveBillingDimensionsResponse> */ public CompletableFuture getActiveBillingDimensionsAsync() { - return getActiveBillingDimensionsWithHttpInfoAsync() + return getActiveBillingDimensionsWithHttpInfoAsync( + new GetActiveBillingDimensionsOptionalParameters()) .thenApply( response -> { return response.getData(); @@ -82,9 +102,43 @@ public CompletableFuture getActiveBillingDimens } /** - * Get active billing dimensions for cost attribution. Cost data for a given month becomes - * available no later than the 19th of the following month. + * Get active billing dimensions for cost attribution. + * + *

See {@link #getActiveBillingDimensionsWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return ActiveBillingDimensionsResponse + * @throws ApiException if fails to make API call + */ + public ActiveBillingDimensionsResponse getActiveBillingDimensions( + GetActiveBillingDimensionsOptionalParameters parameters) throws ApiException { + return getActiveBillingDimensionsWithHttpInfo(parameters).getData(); + } + + /** + * Get active billing dimensions for cost attribution. * + *

See {@link #getActiveBillingDimensionsWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<ActiveBillingDimensionsResponse> + */ + public CompletableFuture getActiveBillingDimensionsAsync( + GetActiveBillingDimensionsOptionalParameters parameters) { + return getActiveBillingDimensionsWithHttpInfoAsync(parameters) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * Get active billing dimensions for cost attribution in a given month. Note that billing + * dimensions active in a given month may not appear in the Monthly Cost Attribution API response + * until the 19th of the following month. For the most accurate results, request the same month + * for both endpoints. + * + * @param parameters Optional parameters for the request. * @return ApiResponse<ActiveBillingDimensionsResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -97,19 +151,23 @@ public CompletableFuture getActiveBillingDimens * 429 Too many requests - * */ - public ApiResponse getActiveBillingDimensionsWithHttpInfo() - throws ApiException { + public ApiResponse getActiveBillingDimensionsWithHttpInfo( + GetActiveBillingDimensionsOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; + OffsetDateTime month = parameters.month; // create path and map variables String localVarPath = "/api/v2/cost_by_tag/active_billing_dimensions"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "month", month)); + Invocation.Builder builder = apiClient.createBuilder( "v2.UsageMeteringApi.getActiveBillingDimensions", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339"}, @@ -130,23 +188,29 @@ public ApiResponse getActiveBillingDimensionsWi * *

See {@link #getActiveBillingDimensionsWithHttpInfo}. * + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<ActiveBillingDimensionsResponse>> */ public CompletableFuture> - getActiveBillingDimensionsWithHttpInfoAsync() { + getActiveBillingDimensionsWithHttpInfoAsync( + GetActiveBillingDimensionsOptionalParameters parameters) { Object localVarPostBody = null; + OffsetDateTime month = parameters.month; // create path and map variables String localVarPath = "/api/v2/cost_by_tag/active_billing_dimensions"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "month", month)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.UsageMeteringApi.getActiveBillingDimensions", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json;datetime-format=rfc3339"},