diff --git a/.generated-info b/.generated-info index c6b75250c2..4f706fb14b 100644 --- a/.generated-info +++ b/.generated-info @@ -1,4 +1,4 @@ { - "spec_repo_commit": "e22129c", - "generated": "2025-08-25 17:47:43.193" + "spec_repo_commit": "1e6c346", + "generated": "2025-08-25 18:45:46.784" } diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e9385b0038..3705ce533d 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49699,6 +49699,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: @@ -49851,6 +49857,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/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.frozen new file mode 100644 index 0000000000..a2e736103d --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.frozen @@ -0,0 +1 @@ +2025-08-25T15:10:14.494Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.yaml new file mode 100644 index 0000000000..9da487f14f --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_aws_cur_config_returns_not_found_response.yaml @@ -0,0 +1,21 @@ +interactions: +- request: + body: '{"data":{"attributes":{"is_enabled":true},"type":"aws_cur_config_patch_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cost/aws_cur_config/12345678 + response: + body: + string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud + account with ID 12345678 was not found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.frozen new file mode 100644 index 0000000000..de3073eebf --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.frozen @@ -0,0 +1 @@ +2025-08-25T15:10:28.926Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.yaml new file mode 100644 index 0000000000..6b4bdd81fb --- /dev/null +++ b/tests/v2/cassettes/test_scenarios/test_update_cloud_cost_management_azure_config_returns_not_found_response.yaml @@ -0,0 +1,21 @@ +interactions: +- request: + body: '{"data":{"attributes":{"is_enabled":true},"type":"azure_uc_config_patch_request"}}' + headers: + accept: + - application/json + content-type: + - application/json + method: PATCH + uri: https://api.datadoghq.com/api/v2/cost/azure_uc_config/12345678 + response: + body: + string: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud + account with ID 12345678 was not found"}]}' + headers: + content-type: + - application/vnd.api+json + status: + code: 404 + message: Not Found +version: 1 diff --git a/tests/v2/features/cloud_cost_management.feature b/tests/v2/features/cloud_cost_management.feature index 300d7094f7..eed19e63a9 100644 --- a/tests/v2/features/cloud_cost_management.feature +++ b/tests/v2/features/cloud_cost_management.feature @@ -267,6 +267,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 200 OK + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response + Given new "UpdateCostAWSCURConfig" request + And request contains "cloud_account_id" parameter with value 12345678 + 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 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response Given new "UpdateCostAWSCURConfig" request @@ -284,6 +292,14 @@ Feature: Cloud Cost Management When the request is sent Then the response status is 400 Bad Request + @team:Datadog/cloud-cost-management + Scenario: Update Cloud Cost Management Azure config returns "Not Found" response + Given new "UpdateCostAzureUCConfigs" request + And request contains "cloud_account_id" parameter with value 12345678 + 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 404 Not Found + @replay-only @team:Datadog/cloud-cost-management Scenario: Update Cloud Cost Management Azure config returns "OK" response Given new "UpdateCostAzureUCConfigs" request