Skip to content

Commit 1bedfa8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add docs for 404 not found error in cost-onboarding-api (DataDog#3287)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 16ab702 commit 1bedfa8

8 files changed

Lines changed: 80 additions & 4 deletions

.generated-info

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"spec_repo_commit": "e22129c",
3-
"generated": "2025-08-25 17:49:14.050"
2+
"spec_repo_commit": "1e6c346",
3+
"generated": "2025-08-25 18:47:15.797"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49699,6 +49699,12 @@ paths:
4969949699
schema:
4970049700
$ref: '#/components/schemas/APIErrorResponse'
4970149701
description: Forbidden
49702+
'404':
49703+
content:
49704+
application/json:
49705+
schema:
49706+
$ref: '#/components/schemas/APIErrorResponse'
49707+
description: Not Found
4970249708
'429':
4970349709
$ref: '#/components/responses/TooManyRequestsResponse'
4970449710
security:
@@ -49851,6 +49857,12 @@ paths:
4985149857
schema:
4985249858
$ref: '#/components/schemas/APIErrorResponse'
4985349859
description: Forbidden
49860+
'404':
49861+
content:
49862+
application/json:
49863+
schema:
49864+
$ref: '#/components/schemas/APIErrorResponse'
49865+
description: Not Found
4985449866
'429':
4985549867
$ref: '#/components/responses/TooManyRequestsResponse'
4985649868
security:

api/datadogV2/api_cloud_cost_management.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ func (a *CloudCostManagementApi) UpdateCostAWSCURConfig(ctx _context.Context, cl
12521252
ErrorBody: localVarBody,
12531253
ErrorMessage: localVarHTTPResponse.Status,
12541254
}
1255-
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
1255+
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 {
12561256
var v APIErrorResponse
12571257
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
12581258
if err != nil {
@@ -1333,7 +1333,7 @@ func (a *CloudCostManagementApi) UpdateCostAzureUCConfigs(ctx _context.Context,
13331333
ErrorBody: localVarBody,
13341334
ErrorMessage: localVarHTTPResponse.Status,
13351335
}
1336-
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
1336+
if localVarHTTPResponse.StatusCode == 400 || localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 404 || localVarHTTPResponse.StatusCode == 429 {
13371337
var v APIErrorResponse
13381338
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
13391339
if err != nil {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-08-25T15:10:14.494Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"data":{"attributes":{"is_enabled":true},"type":"aws_cur_config_patch_request"}}
5+
form: {}
6+
headers:
7+
Accept:
8+
- application/json
9+
Content-Type:
10+
- application/json
11+
id: 0
12+
method: PATCH
13+
url: https://api.datadoghq.com/api/v2/cost/aws_cur_config/12345678
14+
response:
15+
body: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud
16+
account with ID 12345678 was not found"}]}'
17+
code: 404
18+
duration: 0ms
19+
headers:
20+
Content-Type:
21+
- application/vnd.api+json
22+
status: 404 Not Found
23+
version: 2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2025-08-25T15:10:28.926Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
interactions:
2+
- request:
3+
body: |
4+
{"data":{"attributes":{"is_enabled":true},"type":"azure_uc_config_patch_request"}}
5+
form: {}
6+
headers:
7+
Accept:
8+
- application/json
9+
Content-Type:
10+
- application/json
11+
id: 0
12+
method: PATCH
13+
url: https://api.datadoghq.com/api/v2/cost/azure_uc_config/12345678
14+
response:
15+
body: '{"errors":[{"status":"404","title":"Cloud account not found","detail":"Cloud
16+
account with ID 12345678 was not found"}]}'
17+
code: 404
18+
duration: 0ms
19+
headers:
20+
Content-Type:
21+
- application/vnd.api+json
22+
status: 404 Not Found
23+
version: 2

tests/scenarios/features/v2/cloud_cost_management.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,14 @@ Feature: Cloud Cost Management
267267
When the request is sent
268268
Then the response status is 200 OK
269269

270+
@team:Datadog/cloud-cost-management
271+
Scenario: Update Cloud Cost Management AWS CUR config returns "Not Found" response
272+
Given new "UpdateCostAWSCURConfig" request
273+
And request contains "cloud_account_id" parameter with value 12345678
274+
And body with value {"data": {"attributes": {"is_enabled": true}, "type": "aws_cur_config_patch_request"}}
275+
When the request is sent
276+
Then the response status is 404 Not Found
277+
270278
@replay-only @team:Datadog/cloud-cost-management
271279
Scenario: Update Cloud Cost Management AWS CUR config returns "OK" response
272280
Given new "UpdateCostAWSCURConfig" request
@@ -284,6 +292,14 @@ Feature: Cloud Cost Management
284292
When the request is sent
285293
Then the response status is 400 Bad Request
286294

295+
@team:Datadog/cloud-cost-management
296+
Scenario: Update Cloud Cost Management Azure config returns "Not Found" response
297+
Given new "UpdateCostAzureUCConfigs" request
298+
And request contains "cloud_account_id" parameter with value 12345678
299+
And body with value {"data": {"attributes": {"is_enabled": true}, "type": "azure_uc_config_patch_request"}}
300+
When the request is sent
301+
Then the response status is 404 Not Found
302+
287303
@replay-only @team:Datadog/cloud-cost-management
288304
Scenario: Update Cloud Cost Management Azure config returns "OK" response
289305
Given new "UpdateCostAzureUCConfigs" request

0 commit comments

Comments
 (0)