From 428e873c1589749687e14a28782f6609966fe034 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 13 Aug 2025 22:17:12 +0000 Subject: [PATCH] Regenerate client from commit b434599 of spec repo --- .generated-info | 4 +- .generator/schemas/v2/openapi.yaml | 67 +++++-- .../DeleteCostAWSCURConfig.java | 2 +- .../DeleteCostAzureUCConfig.java | 2 +- .../DeleteCostGCPUsageCostConfig.java | 2 +- .../UpdateCostAWSCURConfig.java | 2 +- .../UpdateCostAzureUCConfigs.java | 2 +- .../UpdateCostGCPUsageCostConfig.java | 2 +- .../client/v2/api/CloudCostManagementApi.java | 172 ++++++++++++++---- .../api/client/v2/model/AwsCURConfig.java | 8 +- .../AwsCURConfigPostRequestAttributes.java | 28 --- .../api/client/v2/model/AzureUCConfig.java | 8 +- .../client/v2/model/AzureUCConfigPair.java | 8 +- .../v2/model/AzureUCConfigPairAttributes.java | 8 +- ...nt_AWS_CUR_config_returns_OK_response.json | 2 +- ...onfigs_returns_Bad_Request_response.freeze | 1 + ..._configs_returns_Bad_Request_response.json | 32 ++++ ...ent_Azure_configs_returns_OK_response.json | 2 +- ...R_config_returns_Not_Found_response.freeze | 1 + ...CUR_config_returns_Not_Found_response.json | 28 +++ ...e_config_returns_Not_Found_response.freeze | 1 + ...ure_config_returns_Not_Found_response.json | 28 +++ ...sts_file_returns_Not_Found_response.freeze | 1 + ...Costs_file_returns_Not_Found_response.json | 28 +++ ...sts_file_returns_Not_Found_response.freeze | 1 + ...Costs_file_returns_Not_Found_response.json | 28 +++ ...t_AWS_CUR_configs_returns_OK_response.json | 2 +- ...ent_Azure_configs_returns_OK_response.json | 2 +- ..._files_returns_Bad_Request_response.freeze | 1 + ...ts_files_returns_Bad_Request_response.json | 33 ++++ ...nt_AWS_CUR_config_returns_OK_response.json | 2 +- ...ment_Azure_config_returns_OK_response.json | 2 +- ...s_file_returns_Bad_Request_response.freeze | 1 + ...sts_file_returns_Bad_Request_response.json | 32 ++++ .../v2/api/cloud_cost_management.feature | 64 +++++-- 35 files changed, 487 insertions(+), 120 deletions(-) create mode 100644 src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.json create mode 100644 src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.json create mode 100644 src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.freeze create mode 100644 src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.json diff --git a/.generated-info b/.generated-info index 1664f67e49a..86572a10239 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "8001cbb", - "generated": "2025-08-13 20:28:47.526" + "spec_repo_commit": "b434599", + "generated": "2025-08-13 22:17:12.090" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5ab5923ba83..d47fcb7159b 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -221,7 +221,8 @@ components: name: cloud_account_id required: true schema: - type: string + format: int64 + type: integer CloudWorkloadSecurityAgentRuleID: description: The ID of the Agent rule example: 3b5-v82-ns6 @@ -4500,8 +4501,7 @@ components: $ref: '#/components/schemas/AwsCURConfigAttributes' id: description: The ID of the AWS CUR config. - format: int64 - type: integer + type: string type: $ref: '#/components/schemas/AwsCURConfigType' required: @@ -4642,9 +4642,6 @@ components: description: The region the bucket is located in. example: us-east-1 type: string - is_enabled: - description: Whether or not the Cloud Cost Management account is enabled. - type: boolean months: description: The month of the report. format: int32 @@ -5136,8 +5133,7 @@ components: type: string id: description: The ID of the Azure config. - format: int64 - type: integer + type: string months: deprecated: true description: The number of months the report has been backfilled. @@ -5187,8 +5183,7 @@ components: $ref: '#/components/schemas/AzureUCConfigPairAttributes' id: description: The ID of Cloud Cost Management account. - format: int64 - type: integer + type: string type: $ref: '#/components/schemas/AzureUCConfigPairType' required: @@ -5205,8 +5200,7 @@ components: type: array id: description: The ID of the Azure config pair. - format: int64 - type: integer + type: string required: - configs type: object @@ -49730,6 +49724,31 @@ paths: get: description: List the Custom Costs files. operationId: ListCustomCostsFiles + parameters: + - description: Page number for pagination + in: query + name: page[number] + schema: + format: int64 + type: integer + - description: Page size for pagination + in: query + name: page[size] + schema: + default: 100 + format: int64 + type: integer + - description: Filter by file status + in: query + name: filter[status] + schema: + type: string + - description: Sort key with optional descending prefix + in: query + name: sort + schema: + default: created_at + type: string responses: '200': content: @@ -49737,6 +49756,12 @@ paths: schema: $ref: '#/components/schemas/CustomCostsFileListResponse' description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: @@ -49769,6 +49794,12 @@ paths: schema: $ref: '#/components/schemas/CustomCostsFileUploadResponse' description: Accepted + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Bad Request '403': content: application/json: @@ -49800,6 +49831,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: @@ -49828,6 +49865,12 @@ paths: schema: $ref: '#/components/schemas/APIErrorResponse' description: Forbidden + '404': + content: + application/json: + schema: + $ref: '#/components/schemas/APIErrorResponse' + description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' security: diff --git a/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.java b/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.java index 52639d9c743..620ed45d9e6 100644 --- a/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.java +++ b/examples/v2/cloud-cost-management/DeleteCostAWSCURConfig.java @@ -10,7 +10,7 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - apiInstance.deleteCostAWSCURConfig("100"); + apiInstance.deleteCostAWSCURConfig(100L); } catch (ApiException e) { System.err.println("Exception when calling CloudCostManagementApi#deleteCostAWSCURConfig"); System.err.println("Status code: " + e.getCode()); diff --git a/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.java b/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.java index 63e53134170..a39d9f01dfd 100644 --- a/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.java +++ b/examples/v2/cloud-cost-management/DeleteCostAzureUCConfig.java @@ -10,7 +10,7 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - apiInstance.deleteCostAzureUCConfig("100"); + apiInstance.deleteCostAzureUCConfig(100L); } catch (ApiException e) { System.err.println("Exception when calling CloudCostManagementApi#deleteCostAzureUCConfig"); System.err.println("Status code: " + e.getCode()); diff --git a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java index 022927331fa..3abe7e0cd16 100644 --- a/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java +++ b/examples/v2/cloud-cost-management/DeleteCostGCPUsageCostConfig.java @@ -10,7 +10,7 @@ public static void main(String[] args) { CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient); try { - apiInstance.deleteCostGCPUsageCostConfig("100"); + apiInstance.deleteCostGCPUsageCostConfig(100L); } catch (ApiException e) { System.err.println( "Exception when calling CloudCostManagementApi#deleteCostGCPUsageCostConfig"); diff --git a/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.java b/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.java index 8ecdd01001f..7c153bbaf2d 100644 --- a/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.java +++ b/examples/v2/cloud-cost-management/UpdateCostAWSCURConfig.java @@ -22,7 +22,7 @@ public static void main(String[] args) { .type(AwsCURConfigPatchRequestType.AWS_CUR_CONFIG_PATCH_REQUEST)); try { - AwsCURConfigsResponse result = apiInstance.updateCostAWSCURConfig("100", body); + AwsCURConfigsResponse result = apiInstance.updateCostAWSCURConfig(100L, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudCostManagementApi#updateCostAWSCURConfig"); diff --git a/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.java b/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.java index a856d2cc112..b0b6b406188 100644 --- a/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.java +++ b/examples/v2/cloud-cost-management/UpdateCostAzureUCConfigs.java @@ -22,7 +22,7 @@ public static void main(String[] args) { .type(AzureUCConfigPatchRequestType.AZURE_UC_CONFIG_PATCH_REQUEST)); try { - AzureUCConfigPairsResponse result = apiInstance.updateCostAzureUCConfigs("100", body); + AzureUCConfigPairsResponse result = apiInstance.updateCostAzureUCConfigs(100L, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling CloudCostManagementApi#updateCostAzureUCConfigs"); diff --git a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java index 47718205179..242dc8e16c5 100644 --- a/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java +++ b/examples/v2/cloud-cost-management/UpdateCostGCPUsageCostConfig.java @@ -22,7 +22,7 @@ public static void main(String[] args) { .type(GCPUsageCostConfigPatchRequestType.GCP_USAGE_COST_CONFIG_PATCH_REQUEST)); try { - GCPUsageCostConfigResponse result = apiInstance.updateCostGCPUsageCostConfig("100", body); + GCPUsageCostConfigResponse result = apiInstance.updateCostGCPUsageCostConfig(100L, body); System.out.println(result); } catch (ApiException e) { System.err.println( diff --git a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java index 3fe401e7c97..13db588e24a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/CloudCostManagementApi.java @@ -600,7 +600,7 @@ public CompletableFuture> deleteBudgetWithHttpInfoAsync(String * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public void deleteCostAWSCURConfig(String cloudAccountId) throws ApiException { + public void deleteCostAWSCURConfig(Long cloudAccountId) throws ApiException { deleteCostAWSCURConfigWithHttpInfo(cloudAccountId); } @@ -612,7 +612,7 @@ public void deleteCostAWSCURConfig(String cloudAccountId) throws ApiException { * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCostAWSCURConfigAsync(String cloudAccountId) { + public CompletableFuture deleteCostAWSCURConfigAsync(Long cloudAccountId) { return deleteCostAWSCURConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { @@ -636,7 +636,7 @@ public CompletableFuture deleteCostAWSCURConfigAsync(String cloudAccountId * 429 Too many requests - * */ - public ApiResponse deleteCostAWSCURConfigWithHttpInfo(String cloudAccountId) + public ApiResponse deleteCostAWSCURConfigWithHttpInfo(Long cloudAccountId) throws ApiException { Object localVarPostBody = null; @@ -684,7 +684,7 @@ public ApiResponse deleteCostAWSCURConfigWithHttpInfo(String cloudAccountI * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAsync( - String cloudAccountId) { + Long cloudAccountId) { Object localVarPostBody = null; // verify the required parameter 'cloudAccountId' is set @@ -741,7 +741,7 @@ public CompletableFuture> deleteCostAWSCURConfigWithHttpInfoAs * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public void deleteCostAzureUCConfig(String cloudAccountId) throws ApiException { + public void deleteCostAzureUCConfig(Long cloudAccountId) throws ApiException { deleteCostAzureUCConfigWithHttpInfo(cloudAccountId); } @@ -753,7 +753,7 @@ public void deleteCostAzureUCConfig(String cloudAccountId) throws ApiException { * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCostAzureUCConfigAsync(String cloudAccountId) { + public CompletableFuture deleteCostAzureUCConfigAsync(Long cloudAccountId) { return deleteCostAzureUCConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { @@ -777,7 +777,7 @@ public CompletableFuture deleteCostAzureUCConfigAsync(String cloudAccountI * 429 Too many requests - * */ - public ApiResponse deleteCostAzureUCConfigWithHttpInfo(String cloudAccountId) + public ApiResponse deleteCostAzureUCConfigWithHttpInfo(Long cloudAccountId) throws ApiException { Object localVarPostBody = null; @@ -825,7 +825,7 @@ public ApiResponse deleteCostAzureUCConfigWithHttpInfo(String cloudAccount * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoAsync( - String cloudAccountId) { + Long cloudAccountId) { Object localVarPostBody = null; // verify the required parameter 'cloudAccountId' is set @@ -882,7 +882,7 @@ public CompletableFuture> deleteCostAzureUCConfigWithHttpInfoA * @param cloudAccountId Cloud Account id. (required) * @throws ApiException if fails to make API call */ - public void deleteCostGCPUsageCostConfig(String cloudAccountId) throws ApiException { + public void deleteCostGCPUsageCostConfig(Long cloudAccountId) throws ApiException { deleteCostGCPUsageCostConfigWithHttpInfo(cloudAccountId); } @@ -894,7 +894,7 @@ public void deleteCostGCPUsageCostConfig(String cloudAccountId) throws ApiExcept * @param cloudAccountId Cloud Account id. (required) * @return CompletableFuture */ - public CompletableFuture deleteCostGCPUsageCostConfigAsync(String cloudAccountId) { + public CompletableFuture deleteCostGCPUsageCostConfigAsync(Long cloudAccountId) { return deleteCostGCPUsageCostConfigWithHttpInfoAsync(cloudAccountId) .thenApply( response -> { @@ -918,7 +918,7 @@ public CompletableFuture deleteCostGCPUsageCostConfigAsync(String cloudAcc * 429 Too many requests - * */ - public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(String cloudAccountId) + public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(Long cloudAccountId) throws ApiException { Object localVarPostBody = null; @@ -967,7 +967,7 @@ public ApiResponse deleteCostGCPUsageCostConfigWithHttpInfo(String cloudAc * @return CompletableFuture<ApiResponse<Void>> */ public CompletableFuture> deleteCostGCPUsageCostConfigWithHttpInfoAsync( - String cloudAccountId) { + Long cloudAccountId) { Object localVarPostBody = null; // verify the required parameter 'cloudAccountId' is set @@ -1056,6 +1056,7 @@ public CompletableFuture deleteCustomCostsFileAsync(String fileId) { * Status Code Description Response Headers * 204 No Content - * 403 Forbidden - + * 404 Not Found - * 429 Too many requests - * */ @@ -1323,6 +1324,7 @@ public CompletableFuture getCustomCostsFileAsync(Str * Status Code Description Response Headers * 200 OK - * 403 Forbidden - + * 404 Not Found - * 429 Too many requests - * */ @@ -1858,6 +1860,58 @@ public ApiResponse listCostGCPUsageCostConfigsWithH new GenericType() {}); } + /** Manage optional parameters to listCustomCostsFiles. */ + public static class ListCustomCostsFilesOptionalParameters { + private Long pageNumber; + private Long pageSize; + private String filterStatus; + private String sort; + + /** + * Set pageNumber. + * + * @param pageNumber Page number for pagination (optional) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters pageNumber(Long pageNumber) { + this.pageNumber = pageNumber; + return this; + } + + /** + * Set pageSize. + * + * @param pageSize Page size for pagination (optional, default to 100) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters pageSize(Long pageSize) { + this.pageSize = pageSize; + return this; + } + + /** + * Set filterStatus. + * + * @param filterStatus Filter by file status (optional) + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters filterStatus(String filterStatus) { + this.filterStatus = filterStatus; + return this; + } + + /** + * Set sort. + * + * @param sort Sort key with optional descending prefix (optional, default to "created_at") + * @return ListCustomCostsFilesOptionalParameters + */ + public ListCustomCostsFilesOptionalParameters sort(String sort) { + this.sort = sort; + return this; + } + } + /** * List Custom Costs files. * @@ -1867,7 +1921,7 @@ public ApiResponse listCostGCPUsageCostConfigsWithH * @throws ApiException if fails to make API call */ public CustomCostsFileListResponse listCustomCostsFiles() throws ApiException { - return listCustomCostsFilesWithHttpInfo().getData(); + return listCustomCostsFilesWithHttpInfo(new ListCustomCostsFilesOptionalParameters()).getData(); } /** @@ -1878,7 +1932,38 @@ public CustomCostsFileListResponse listCustomCostsFiles() throws ApiException { * @return CompletableFuture<CustomCostsFileListResponse> */ public CompletableFuture listCustomCostsFilesAsync() { - return listCustomCostsFilesWithHttpInfoAsync() + return listCustomCostsFilesWithHttpInfoAsync(new ListCustomCostsFilesOptionalParameters()) + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfo}. + * + * @param parameters Optional parameters for the request. + * @return CustomCostsFileListResponse + * @throws ApiException if fails to make API call + */ + public CustomCostsFileListResponse listCustomCostsFiles( + ListCustomCostsFilesOptionalParameters parameters) throws ApiException { + return listCustomCostsFilesWithHttpInfo(parameters).getData(); + } + + /** + * List Custom Costs files. + * + *

See {@link #listCustomCostsFilesWithHttpInfoAsync}. + * + * @param parameters Optional parameters for the request. + * @return CompletableFuture<CustomCostsFileListResponse> + */ + public CompletableFuture listCustomCostsFilesAsync( + ListCustomCostsFilesOptionalParameters parameters) { + return listCustomCostsFilesWithHttpInfoAsync(parameters) .thenApply( response -> { return response.getData(); @@ -1888,6 +1973,7 @@ public CompletableFuture listCustomCostsFilesAsync( /** * List the Custom Costs files. * + * @param parameters Optional parameters for the request. * @return ApiResponse<CustomCostsFileListResponse> * @throws ApiException if fails to make API call * @http.response.details @@ -1895,23 +1981,34 @@ public CompletableFuture listCustomCostsFilesAsync( * Response details * Status Code Description Response Headers * 200 OK - + * 400 Bad Request - * 403 Forbidden - * 429 Too many requests - * */ - public ApiResponse listCustomCostsFilesWithHttpInfo() - throws ApiException { + public ApiResponse listCustomCostsFilesWithHttpInfo( + ListCustomCostsFilesOptionalParameters parameters) throws ApiException { Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String filterStatus = parameters.filterStatus; + String sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/cost/custom_costs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + Invocation.Builder builder = apiClient.createBuilder( "v2.CloudCostManagementApi.listCustomCostsFiles", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1932,23 +2029,34 @@ public ApiResponse listCustomCostsFilesWithHttpInfo * *

See {@link #listCustomCostsFilesWithHttpInfo}. * + * @param parameters Optional parameters for the request. * @return CompletableFuture<ApiResponse<CustomCostsFileListResponse>> */ public CompletableFuture> - listCustomCostsFilesWithHttpInfoAsync() { + listCustomCostsFilesWithHttpInfoAsync(ListCustomCostsFilesOptionalParameters parameters) { Object localVarPostBody = null; + Long pageNumber = parameters.pageNumber; + Long pageSize = parameters.pageSize; + String filterStatus = parameters.filterStatus; + String sort = parameters.sort; // create path and map variables String localVarPath = "/api/v2/cost/custom_costs"; + List localVarQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[number]", pageNumber)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "page[size]", pageSize)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[status]", filterStatus)); + localVarQueryParams.addAll(apiClient.parameterToPairs("", "sort", sort)); + Invocation.Builder builder; try { builder = apiClient.createBuilder( "v2.CloudCostManagementApi.listCustomCostsFiles", localVarPath, - new ArrayList(), + localVarQueryParams, localVarHeaderParams, new HashMap(), new String[] {"application/json"}, @@ -1981,7 +2089,7 @@ public ApiResponse listCustomCostsFilesWithHttpInfo * @throws ApiException if fails to make API call */ public AwsCURConfigsResponse updateCostAWSCURConfig( - String cloudAccountId, AwsCURConfigPatchRequest body) throws ApiException { + Long cloudAccountId, AwsCURConfigPatchRequest body) throws ApiException { return updateCostAWSCURConfigWithHttpInfo(cloudAccountId, body).getData(); } @@ -1995,7 +2103,7 @@ public AwsCURConfigsResponse updateCostAWSCURConfig( * @return CompletableFuture<AwsCURConfigsResponse> */ public CompletableFuture updateCostAWSCURConfigAsync( - String cloudAccountId, AwsCURConfigPatchRequest body) { + Long cloudAccountId, AwsCURConfigPatchRequest body) { return updateCostAWSCURConfigWithHttpInfoAsync(cloudAccountId, body) .thenApply( response -> { @@ -2021,7 +2129,7 @@ public CompletableFuture updateCostAWSCURConfigAsync( * */ public ApiResponse updateCostAWSCURConfigWithHttpInfo( - String cloudAccountId, AwsCURConfigPatchRequest body) throws ApiException { + Long cloudAccountId, AwsCURConfigPatchRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2075,8 +2183,7 @@ public ApiResponse updateCostAWSCURConfigWithHttpInfo( * @return CompletableFuture<ApiResponse<AwsCURConfigsResponse>> */ public CompletableFuture> - updateCostAWSCURConfigWithHttpInfoAsync( - String cloudAccountId, AwsCURConfigPatchRequest body) { + updateCostAWSCURConfigWithHttpInfoAsync(Long cloudAccountId, AwsCURConfigPatchRequest body) { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2145,7 +2252,7 @@ public ApiResponse updateCostAWSCURConfigWithHttpInfo( * @throws ApiException if fails to make API call */ public AzureUCConfigPairsResponse updateCostAzureUCConfigs( - String cloudAccountId, AzureUCConfigPatchRequest body) throws ApiException { + Long cloudAccountId, AzureUCConfigPatchRequest body) throws ApiException { return updateCostAzureUCConfigsWithHttpInfo(cloudAccountId, body).getData(); } @@ -2159,7 +2266,7 @@ public AzureUCConfigPairsResponse updateCostAzureUCConfigs( * @return CompletableFuture<AzureUCConfigPairsResponse> */ public CompletableFuture updateCostAzureUCConfigsAsync( - String cloudAccountId, AzureUCConfigPatchRequest body) { + Long cloudAccountId, AzureUCConfigPatchRequest body) { return updateCostAzureUCConfigsWithHttpInfoAsync(cloudAccountId, body) .thenApply( response -> { @@ -2185,7 +2292,7 @@ public CompletableFuture updateCostAzureUCConfigsAsy * */ public ApiResponse updateCostAzureUCConfigsWithHttpInfo( - String cloudAccountId, AzureUCConfigPatchRequest body) throws ApiException { + Long cloudAccountId, AzureUCConfigPatchRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2240,7 +2347,7 @@ public ApiResponse updateCostAzureUCConfigsWithHttpI */ public CompletableFuture> updateCostAzureUCConfigsWithHttpInfoAsync( - String cloudAccountId, AzureUCConfigPatchRequest body) { + Long cloudAccountId, AzureUCConfigPatchRequest body) { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2309,7 +2416,7 @@ public ApiResponse updateCostAzureUCConfigsWithHttpI * @throws ApiException if fails to make API call */ public GCPUsageCostConfigResponse updateCostGCPUsageCostConfig( - String cloudAccountId, GCPUsageCostConfigPatchRequest body) throws ApiException { + Long cloudAccountId, GCPUsageCostConfigPatchRequest body) throws ApiException { return updateCostGCPUsageCostConfigWithHttpInfo(cloudAccountId, body).getData(); } @@ -2323,7 +2430,7 @@ public GCPUsageCostConfigResponse updateCostGCPUsageCostConfig( * @return CompletableFuture<GCPUsageCostConfigResponse> */ public CompletableFuture updateCostGCPUsageCostConfigAsync( - String cloudAccountId, GCPUsageCostConfigPatchRequest body) { + Long cloudAccountId, GCPUsageCostConfigPatchRequest body) { return updateCostGCPUsageCostConfigWithHttpInfoAsync(cloudAccountId, body) .thenApply( response -> { @@ -2350,7 +2457,7 @@ public CompletableFuture updateCostGCPUsageCostConfi * */ public ApiResponse updateCostGCPUsageCostConfigWithHttpInfo( - String cloudAccountId, GCPUsageCostConfigPatchRequest body) throws ApiException { + Long cloudAccountId, GCPUsageCostConfigPatchRequest body) throws ApiException { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2406,7 +2513,7 @@ public ApiResponse updateCostGCPUsageCostConfigWithH */ public CompletableFuture> updateCostGCPUsageCostConfigWithHttpInfoAsync( - String cloudAccountId, GCPUsageCostConfigPatchRequest body) { + Long cloudAccountId, GCPUsageCostConfigPatchRequest body) { Object localVarPostBody = body; // verify the required parameter 'cloudAccountId' is set @@ -2507,6 +2614,7 @@ public CompletableFuture uploadCustomCostsFileAsy * Response details * Status Code Description Response Headers * 202 Accepted - + * 400 Bad Request - * 403 Forbidden - * 429 Too many requests - * diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfig.java b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfig.java index f584c8632b7..31d90ab7334 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfig.java @@ -31,7 +31,7 @@ public class AwsCURConfig { private AwsCURConfigAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; - private Long id; + private String id; public static final String JSON_PROPERTY_TYPE = "type"; private AwsCURConfigType type = AwsCURConfigType.AWS_CUR_CONFIG; @@ -70,7 +70,7 @@ public void setAttributes(AwsCURConfigAttributes attributes) { this.attributes = attributes; } - public AwsCURConfig id(Long id) { + public AwsCURConfig id(String id) { this.id = id; return this; } @@ -83,11 +83,11 @@ public AwsCURConfig id(Long id) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostRequestAttributes.java index 53df418b213..ecfc811981a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AwsCURConfigPostRequestAttributes.java @@ -23,7 +23,6 @@ AwsCURConfigPostRequestAttributes.JSON_PROPERTY_ACCOUNT_ID, AwsCURConfigPostRequestAttributes.JSON_PROPERTY_BUCKET_NAME, AwsCURConfigPostRequestAttributes.JSON_PROPERTY_BUCKET_REGION, - AwsCURConfigPostRequestAttributes.JSON_PROPERTY_IS_ENABLED, AwsCURConfigPostRequestAttributes.JSON_PROPERTY_MONTHS, AwsCURConfigPostRequestAttributes.JSON_PROPERTY_REPORT_NAME, AwsCURConfigPostRequestAttributes.JSON_PROPERTY_REPORT_PREFIX @@ -44,9 +43,6 @@ public class AwsCURConfigPostRequestAttributes { public static final String JSON_PROPERTY_BUCKET_REGION = "bucket_region"; private String bucketRegion; - public static final String JSON_PROPERTY_IS_ENABLED = "is_enabled"; - private Boolean isEnabled; - public static final String JSON_PROPERTY_MONTHS = "months"; private Integer months; @@ -153,27 +149,6 @@ public void setBucketRegion(String bucketRegion) { this.bucketRegion = bucketRegion; } - public AwsCURConfigPostRequestAttributes isEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - return this; - } - - /** - * Whether or not the Cloud Cost Management account is enabled. - * - * @return isEnabled - */ - @jakarta.annotation.Nullable - @JsonProperty(JSON_PROPERTY_IS_ENABLED) - @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Boolean getIsEnabled() { - return isEnabled; - } - - public void setIsEnabled(Boolean isEnabled) { - this.isEnabled = isEnabled; - } - public AwsCURConfigPostRequestAttributes months(Integer months) { this.months = months; return this; @@ -296,7 +271,6 @@ public boolean equals(Object o) { && Objects.equals(this.accountId, awsCurConfigPostRequestAttributes.accountId) && Objects.equals(this.bucketName, awsCurConfigPostRequestAttributes.bucketName) && Objects.equals(this.bucketRegion, awsCurConfigPostRequestAttributes.bucketRegion) - && Objects.equals(this.isEnabled, awsCurConfigPostRequestAttributes.isEnabled) && Objects.equals(this.months, awsCurConfigPostRequestAttributes.months) && Objects.equals(this.reportName, awsCurConfigPostRequestAttributes.reportName) && Objects.equals(this.reportPrefix, awsCurConfigPostRequestAttributes.reportPrefix) @@ -311,7 +285,6 @@ public int hashCode() { accountId, bucketName, bucketRegion, - isEnabled, months, reportName, reportPrefix, @@ -326,7 +299,6 @@ public String toString() { sb.append(" accountId: ").append(toIndentedString(accountId)).append("\n"); sb.append(" bucketName: ").append(toIndentedString(bucketName)).append("\n"); sb.append(" bucketRegion: ").append(toIndentedString(bucketRegion)).append("\n"); - sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); sb.append(" months: ").append(toIndentedString(months)).append("\n"); sb.append(" reportName: ").append(toIndentedString(reportName)).append("\n"); sb.append(" reportPrefix: ").append(toIndentedString(reportPrefix)).append("\n"); diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java index 13d211dc3db..6032da52b51 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfig.java @@ -63,7 +63,7 @@ public class AzureUCConfig { private String exportPath; public static final String JSON_PROPERTY_ID = "id"; - private Long id; + private String id; public static final String JSON_PROPERTY_MONTHS = "months"; private Integer months; @@ -261,7 +261,7 @@ public void setExportPath(String exportPath) { this.exportPath = exportPath; } - public AzureUCConfig id(Long id) { + public AzureUCConfig id(String id) { this.id = id; return this; } @@ -274,11 +274,11 @@ public AzureUCConfig id(Long id) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPair.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPair.java index 2f2af487a81..a96055c4d61 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPair.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPair.java @@ -31,7 +31,7 @@ public class AzureUCConfigPair { private AzureUCConfigPairAttributes attributes; public static final String JSON_PROPERTY_ID = "id"; - private Long id; + private String id; public static final String JSON_PROPERTY_TYPE = "type"; private AzureUCConfigPairType type = AzureUCConfigPairType.AZURE_UC_CONFIGS; @@ -70,7 +70,7 @@ public void setAttributes(AzureUCConfigPairAttributes attributes) { this.attributes = attributes; } - public AzureUCConfigPair id(Long id) { + public AzureUCConfigPair id(String id) { this.id = id; return this; } @@ -83,11 +83,11 @@ public AzureUCConfigPair id(Long id) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPairAttributes.java b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPairAttributes.java index 1ac4ae87a73..69e0e019d1e 100644 --- a/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPairAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/AzureUCConfigPairAttributes.java @@ -32,7 +32,7 @@ public class AzureUCConfigPairAttributes { private List configs = new ArrayList<>(); public static final String JSON_PROPERTY_ID = "id"; - private Long id; + private String id; public AzureUCConfigPairAttributes() {} @@ -71,7 +71,7 @@ public void setConfigs(List configs) { this.configs = configs; } - public AzureUCConfigPairAttributes id(Long id) { + public AzureUCConfigPairAttributes id(String id) { this.id = id; return this; } @@ -84,11 +84,11 @@ public AzureUCConfigPairAttributes id(Long id) { @jakarta.annotation.Nullable @JsonProperty(JSON_PROPERTY_ID) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) - public Long getId() { + public String getId() { return id; } - public void setId(Long id) { + public void setId(String id) { this.id = id; } diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json index 4b06719e18c..27d0f529742 100644 --- a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\":{\"type\":\"aws_cur_config\",\"id\":177,\"attributes\":{\"account_id\":\"123456789123\",\"bucket_name\":\"dd-cost-bucket\",\"bucket_region\":\"us-east-1\",\"report_prefix\":\"dd-report-prefix\",\"report_name\":\"dd-report-name\",\"months\":15,\"updated_at\":\"2023-12-12T14:24:30.907264\",\"created_at\":\"2023-12-12T14:24:30.907264\",\"status\":\"active\",\"status_updated_at\":\"2023-12-12T14:24:30.904602\",\"error_messages\":[]}}}\n", + "body": "{\"data\":{\"type\":\"aws_cur_config\",\"id\":\"177\",\"attributes\":{\"account_id\":\"123456789123\",\"bucket_name\":\"dd-cost-bucket\",\"bucket_region\":\"us-east-1\",\"report_prefix\":\"dd-report-prefix\",\"report_name\":\"dd-report-name\",\"months\":15,\"updated_at\":\"2023-12-12T14:24:30.907264\",\"created_at\":\"2023-12-12T14:24:30.907264\",\"status\":\"active\",\"status_updated_at\":\"2023-12-12T14:24:30.904602\",\"error_messages\":[]}}}\n", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..41ded8947f2 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-08-13T21:37:53.830Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.json new file mode 100644 index 00000000000..c7a7beae9a7 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "{\"data\":{\"attributes\":{\"account_id\":\"1234abcd-1234-abcd-1234-1234abcd1234\",\"actual_bill_config\":{\"export_name\":\"dd-actual-export\",\"export_path\":\"dd-export-path\",\"storage_account\":\"dd-storage-account\",\"storage_container\":\"dd-storage-container\"},\"amortized_bill_config\":{\"export_name\":\"dd-actual-export\",\"export_path\":\"dd-export-path\",\"storage_account\":\"dd-storage-account\",\"storage_container\":\"dd-storage-container\"},\"client_id\":\"1234abcd-1234-abcd-1234-1234abcd1234\",\"scope\":\"this_is_an_invalid_scope\"},\"type\":\"azure_uc_config_post_request\"}}" + }, + "headers": {}, + "method": "POST", + "path": "/api/v2/cost/azure_uc_config", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"scope\\\" does not match the required format\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "b4d4fc3e-28b7-c04f-2977-704ddc412cee" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json index 13e84e753ac..e8f4319e2f6 100644 --- a/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Create_Cloud_Cost_Management_Azure_configs_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.860554\", \"updated_at\": \"2023-12-12T17:11:56.860554\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}, {\"id\": 1, \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.861623\", \"updated_at\": \"2023-12-12T17:11:56.861623\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}]}}}", + "body": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": \"1\", \"attributes\": {\"configs\": [{\"id\": \"1\", \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"1234abcd-1234-abcd-1234-1234abcd1234\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.860554\", \"updated_at\": \"2023-12-12T17:11:56.860554\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}, {\"id\": \"1\", \"storage_container\": \"test_storage_container\", \"scope\": \"test_scope\", \"status\": \"active\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"error_messages\": [], \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-12-12T17:11:56.855669\", \"created_at\": \"2023-12-12T17:11:56.861623\", \"updated_at\": \"2023-12-12T17:11:56.861623\", \"export_name\": \"test_export_name\", \"export_path\": \"test_export_path\"}]}}}", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..ee67bde8568 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-08-13T21:24:23.921Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json new file mode 100644 index 00000000000..3b7b8e16f79 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_AWS_CUR_config_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cost/aws_cur_config/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "2cafa597-6cbb-29b8-1cc7-face9cd5b921" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..7257ead0b22 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-08-13T21:21:25.379Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json new file mode 100644 index 00000000000..6bb061a5057 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Cloud_Cost_Management_Azure_config_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cost/azure_uc_config/123456", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "855b1afd-0875-448f-0bb1-b55c9c71975a" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..411b128dab6 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-08-13T21:13:51.484Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.json new file mode 100644 index 00000000000..58c038f2d00 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Delete_Custom_Costs_file_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "DELETE", + "path": "/api/v2/cost/custom_costs/00000000-0000-0000-0000-000000000000", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "1ee89786-e779-c23b-74a0-8addd2bc3929" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.freeze b/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.freeze new file mode 100644 index 00000000000..d30bc03f96b --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.freeze @@ -0,0 +1 @@ +2025-08-13T20:50:39.857Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.json b/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.json new file mode 100644 index 00000000000..71b749ee1d5 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Get_Custom_Costs_file_returns_Not_Found_response.json @@ -0,0 +1,28 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/custom_costs/00000000-0000-0000-0000-000000000000", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"metadata not found\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 404, + "reasonPhrase": "Not Found" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "cedb69f3-81ad-2185-8588-372630244679" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_AWS_CUR_configs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_AWS_CUR_configs_returns_OK_response.json index 9582da7d982..b2327608cf0 100644 --- a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_AWS_CUR_configs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_AWS_CUR_configs_returns_OK_response.json @@ -8,7 +8,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": 100, \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-hourly\", \"report_name\": \"billing-conductor-cur\", \"months\": 15, \"updated_at\": \"2023-10-27T12:38:39.585408\", \"created_at\": \"2023-10-10T13:53:28.774143\", \"status\": \"active\", \"status_updated_at\": \"2023-11-21T17:07:24.778386\", \"error_messages\": []}}]}", + "body": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": \"100\", \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-hourly\", \"report_name\": \"billing-conductor-cur\", \"months\": 15, \"updated_at\": \"2023-10-27T12:38:39.585408\", \"created_at\": \"2023-10-10T13:53:28.774143\", \"status\": \"active\", \"status_updated_at\": \"2023-11-21T17:07:24.778386\", \"error_messages\": []}}]}", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_Azure_configs_returns_OK_response.json b/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_Azure_configs_returns_OK_response.json index d6c804bd9f0..4fade1ed21e 100644 --- a/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_Azure_configs_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/List_Cloud_Cost_Management_Azure_configs_returns_OK_response.json @@ -8,7 +8,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\": [{\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.859447\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.859447\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.862026\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.862026\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": 1, \"attributes\": {\"configs\": [{\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.959808\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.959808\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": 1, \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.960815\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.960815\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}]}", + "body": "{\"data\": [{\"type\": \"azure_uc_configs\", \"id\": \"1\", \"attributes\": {\"configs\": [{\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-06-29T12:43:36.569819\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-03T13:48:16.827724\", \"error_messages\": [], \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": \"1\", \"attributes\": {\"configs\": [{\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.859447\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.859447\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T16:26:33.862026\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T16:26:33.862026\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T16:26:33.849153\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}, {\"type\": \"azure_uc_configs\", \"id\": \"1\", \"attributes\": {\"configs\": [{\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.959808\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.959808\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}, {\"id\": \"1\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"created_at\": \"2023-11-09T20:20:35.960815\", \"storage_container\": \"test_storage_container\", \"status\": \"active\", \"updated_at\": \"2023-11-09T20:20:35.960815\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"status_updated_at\": \"2023-11-09T20:20:35.956202\", \"storage_account\": \"test_storage_account\", \"months\": 15, \"export_path\": \"test_export_path\"}]}}]}", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..9ed454a0780 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-08-13T20:12:25.668Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.json new file mode 100644 index 00000000000..0534eac5a52 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/List_Custom_Costs_files_returns_Bad_Request_response.json @@ -0,0 +1,33 @@ +[ + { + "httpRequest": { + "headers": {}, + "method": "GET", + "path": "/api/v2/cost/custom_costs", + "queryStringParameters": { + "filter[status]": [ + "invalid_file_status" + ] + }, + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"unknown status, got invalid_file_status\"}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "51d40637-9b18-33d9-ae29-a33072806a6f" + } +] \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json index 7d8d0e386dc..4e80bcb34ff 100644 --- a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_AWS_CUR_config_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": 100, \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-report-hourly\", \"report_name\": \"cur-hourly\", \"months\": 15, \"updated_at\": \"2023-10-18T08:15:45.265597\", \"created_at\": \"2022-07-25T17:19:47.190482\", \"status\": \"active\", \"status_updated_at\": \"2023-11-08T22:47:55.372330\", \"error_messages\": []}}]}", + "body": "{\"data\": [{\"type\": \"aws_cur_config\", \"id\": \"100\", \"attributes\": {\"account_id\": \"000000000000\", \"bucket_name\": \"test_bucket_name\", \"bucket_region\": \"us-east-1\", \"report_prefix\": \"cur-report-hourly\", \"report_name\": \"cur-hourly\", \"months\": 15, \"updated_at\": \"2023-10-18T08:15:45.265597\", \"created_at\": \"2022-07-25T17:19:47.190482\", \"status\": \"active\", \"status_updated_at\": \"2023-11-08T22:47:55.372330\", \"error_messages\": []}}]}", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_OK_response.json b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_OK_response.json index 23435edb1d0..72b702b6f5c 100644 --- a/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_OK_response.json +++ b/src/test/resources/cassettes/features/v2/Update_Cloud_Cost_Management_Azure_config_returns_OK_response.json @@ -12,7 +12,7 @@ "secure": true }, "httpResponse": { - "body": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": 100, \"attributes\": {\"configs\": [{\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/amortized-cost\", \"status\": \"active\", \"id\": 56, \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}, {\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/actual-cost\", \"status\": \"active\", \"id\": 55, \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}]}}}", + "body": "{\"data\": {\"type\": \"azure_uc_configs\", \"id\": \"100\", \"attributes\": {\"configs\": [{\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/amortized-cost\", \"status\": \"active\", \"id\": \"56\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"amortized\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}, {\"updated_at\": \"2023-06-29T12:43:36.569819\", \"export_path\": \"/actual-cost\", \"status\": \"active\", \"id\": \"55\", \"account_id\": \"test_account_id\", \"client_id\": \"test_client_id\", \"dataset_type\": \"actual\", \"created_at\": \"2023-06-29T12:43:36.569819\", \"export_name\": \"test_export_name\", \"scope\": \"test_scope\", \"storage_account\": \"test_storage_account\", \"storage_container\": \"test_storage_container\", \"status_updated_at\": \"2023-12-13T13:29:24.462039\", \"months\": 15}]}}}", "headers": { "Content-Type": [ "application/json" diff --git a/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.freeze b/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.freeze new file mode 100644 index 00000000000..5c37aecb84d --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.freeze @@ -0,0 +1 @@ +2025-08-13T18:09:22.298Z \ No newline at end of file diff --git a/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.json b/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.json new file mode 100644 index 00000000000..3a802672411 --- /dev/null +++ b/src/test/resources/cassettes/features/v2/Upload_Custom_Costs_file_returns_Bad_Request_response.json @@ -0,0 +1,32 @@ +[ + { + "httpRequest": { + "body": { + "type": "JSON", + "json": "[{\"BilledCost\":100.5,\"BillingCurrency\":\"USD\",\"ChargeDescription\":\"Monthly usage charge for my service\",\"ChargePeriodEnd\":\"2023-02-28\",\"ChargePeriodStart\":\"2023-02-01\"}]" + }, + "headers": {}, + "method": "PUT", + "path": "/api/v2/cost/custom_costs", + "keepAlive": false, + "secure": true + }, + "httpResponse": { + "body": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"errors in object 0:\\nTags is a required field\\nProviderName is a required field\",\"meta\":{\"end\":167,\"obj\":0,\"start\":1}}]}", + "headers": { + "Content-Type": [ + "application/vnd.api+json" + ] + }, + "statusCode": 400, + "reasonPhrase": "Bad Request" + }, + "times": { + "remainingTimes": 1 + }, + "timeToLive": { + "unlimited": true + }, + "id": "550f00ae-ab67-03fb-6721-8c5019fd48ea" + } +] \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature index dcd04d3b83a..300d7094f79 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/cloud_cost_management.feature @@ -28,10 +28,10 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data.attributes.account_id" is equal to "123456789123" - @generated @skip @team:Datadog/cloud-cost-management + @team:Datadog/cloud-cost-management Scenario: Create Cloud Cost Management Azure configs returns "Bad Request" response Given new "CreateCostAzureUCConfigs" request - And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "/subscriptions/1234abcd-1234-abcd-1234-1234abcd1234"}, "type": "azure_uc_config_post_request"}} + And body with value {"data": {"attributes": {"account_id": "1234abcd-1234-abcd-1234-1234abcd1234", "actual_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "amortized_bill_config": {"export_name": "dd-actual-export", "export_path": "dd-export-path", "storage_account": "dd-storage-account", "storage_container": "dd-storage-container"}, "client_id": "1234abcd-1234-abcd-1234-1234abcd1234", "scope": "this_is_an_invalid_scope"}, "type": "azure_uc_config_post_request"}} When the request is sent Then the response status is 400 Bad Request @@ -89,14 +89,14 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "No Content" response Given new "DeleteCostAWSCURConfig" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content - @generated @skip @team:Datadog/cloud-cost-management + @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management AWS CUR config returns "Not Found" response Given new "DeleteCostAWSCURConfig" request - And request contains "cloud_account_id" parameter from "REPLACE.ME" + And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found @@ -110,35 +110,35 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management Azure config returns "No Content" response Given new "DeleteCostAzureUCConfig" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content - @generated @skip @team:Datadog/cloud-cost-management + @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management Azure config returns "Not Found" response Given new "DeleteCostAzureUCConfig" request - And request contains "cloud_account_id" parameter from "REPLACE.ME" + And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found - @team:Datadog/cloud-cost-management + @generated @skip @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Bad Request" response Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "Invalid" + And request contains "cloud_account_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @replay-only @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "No Content" response Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 When the request is sent Then the response status is 204 No Content @team:Datadog/cloud-cost-management Scenario: Delete Cloud Cost Management GCP Usage Cost config returns "Not Found" response Given new "DeleteCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "123456" + And request contains "cloud_account_id" parameter with value 123456 When the request is sent Then the response status is 404 Not Found @@ -156,6 +156,13 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 204 No Content + @team:Datadog/cloud-cost-management + Scenario: Delete Custom Costs file returns "Not Found" response + Given new "DeleteCustomCostsFile" request + And request contains "file_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + @team:Datadog/cloud-cost-management Scenario: Delete a budget returns "Bad Request" response Given new "DeleteBudget" request @@ -179,6 +186,13 @@ Feature: Cloud Cost Management And the response "data.attributes.name" is equal to "data.json" And the response "data.attributes.content[0].ChargeDescription" is equal to "my_description" + @team:Datadog/cloud-cost-management + Scenario: Get Custom Costs file returns "Not Found" response + Given new "GetCustomCostsFile" request + And request contains "file_id" parameter with value "00000000-0000-0000-0000-000000000000" + When the request is sent + Then the response status is 404 Not Found + @generated @skip @team:Datadog/cloud-cost-management Scenario: Get Custom Costs file returns "OK" response Given new "GetCustomCostsFile" request @@ -234,6 +248,13 @@ Feature: Cloud Cost Management Then the response status is 200 OK And the response "data[0].attributes.name" is equal to "data.json" + @team:Datadog/cloud-cost-management + Scenario: List Custom Costs files returns "Bad Request" response + Given new "ListCustomCostsFiles" request + And request contains "filter[status]" parameter with value "invalid_file_status" + When the request is sent + Then the response status is 400 Bad Request + @generated @skip @team:Datadog/cloud-cost-management Scenario: List Custom Costs files returns "OK" response Given new "ListCustomCostsFiles" request @@ -249,7 +270,7 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response Given new "UpdateCostAWSCURConfig" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}} When the request is sent Then the response status is 200 OK @@ -266,16 +287,16 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "OK" response Given new "UpdateCostAzureUCConfigs" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}} When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "azure_uc_configs" - @team:Datadog/cloud-cost-management + @generated @skip @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Bad Request" response Given new "UpdateCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "InvalidValue" + And request contains "cloud_account_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} When the request is sent Then the response status is 400 Bad Request @@ -283,7 +304,7 @@ Feature: Cloud Cost Management @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management GCP Usage Cost config returns "Not Found" response Given new "UpdateCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "12345678" + And request contains "cloud_account_id" parameter with value 12345678 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} When the request is sent Then the response status is 404 Not Found @@ -291,7 +312,7 @@ Feature: Cloud Cost Management @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management GCP Usage Cost config returns "OK" response Given new "UpdateCostGCPUsageCostConfig" request - And request contains "cloud_account_id" parameter with value "100" + And request contains "cloud_account_id" parameter with value 100 And body with value {"data": {"attributes": {"is_enabled": true}, "type": "gcp_uc_config_patch_request"}} When the request is sent Then the response status is 200 OK @@ -311,3 +332,10 @@ Feature: Cloud Cost Management And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] When the request is sent Then the response status is 202 Accepted + + @team:Datadog/cloud-cost-management + Scenario: Upload Custom Costs file returns "Bad Request" response + Given new "UploadCustomCostsFile" request + And body with value [{"BilledCost": 100.5, "BillingCurrency": "USD", "ChargeDescription": "Monthly usage charge for my service", "ChargePeriodEnd": "2023-02-28", "ChargePeriodStart": "2023-02-01"}] + When the request is sent + Then the response status is 400 Bad Request