Skip to content

Commit 7ef8cc5

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Audit and fix existing CCM endpoint OpenAPI spec for custom costs, aws config, azure config, and gcp config (#2659)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 3e94288 commit 7ef8cc5

File tree

37 files changed

+688
-100
lines changed

37 files changed

+688
-100
lines changed

.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": "8001cbb",
3-
"generated": "2025-08-13 20:28:25.331"
2+
"spec_repo_commit": "b434599",
3+
"generated": "2025-08-13 22:16:45.303"
44
}

.generator/schemas/v2/openapi.yaml

Lines changed: 55 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ components:
221221
name: cloud_account_id
222222
required: true
223223
schema:
224-
type: string
224+
format: int64
225+
type: integer
225226
CloudWorkloadSecurityAgentRuleID:
226227
description: The ID of the Agent rule
227228
example: 3b5-v82-ns6
@@ -4500,8 +4501,7 @@ components:
45004501
$ref: '#/components/schemas/AwsCURConfigAttributes'
45014502
id:
45024503
description: The ID of the AWS CUR config.
4503-
format: int64
4504-
type: integer
4504+
type: string
45054505
type:
45064506
$ref: '#/components/schemas/AwsCURConfigType'
45074507
required:
@@ -4642,9 +4642,6 @@ components:
46424642
description: The region the bucket is located in.
46434643
example: us-east-1
46444644
type: string
4645-
is_enabled:
4646-
description: Whether or not the Cloud Cost Management account is enabled.
4647-
type: boolean
46484645
months:
46494646
description: The month of the report.
46504647
format: int32
@@ -5136,8 +5133,7 @@ components:
51365133
type: string
51375134
id:
51385135
description: The ID of the Azure config.
5139-
format: int64
5140-
type: integer
5136+
type: string
51415137
months:
51425138
deprecated: true
51435139
description: The number of months the report has been backfilled.
@@ -5187,8 +5183,7 @@ components:
51875183
$ref: '#/components/schemas/AzureUCConfigPairAttributes'
51885184
id:
51895185
description: The ID of Cloud Cost Management account.
5190-
format: int64
5191-
type: integer
5186+
type: string
51925187
type:
51935188
$ref: '#/components/schemas/AzureUCConfigPairType'
51945189
required:
@@ -5205,8 +5200,7 @@ components:
52055200
type: array
52065201
id:
52075202
description: The ID of the Azure config pair.
5208-
format: int64
5209-
type: integer
5203+
type: string
52105204
required:
52115205
- configs
52125206
type: object
@@ -49730,13 +49724,44 @@ paths:
4973049724
get:
4973149725
description: List the Custom Costs files.
4973249726
operationId: ListCustomCostsFiles
49727+
parameters:
49728+
- description: Page number for pagination
49729+
in: query
49730+
name: page[number]
49731+
schema:
49732+
format: int64
49733+
type: integer
49734+
- description: Page size for pagination
49735+
in: query
49736+
name: page[size]
49737+
schema:
49738+
default: 100
49739+
format: int64
49740+
type: integer
49741+
- description: Filter by file status
49742+
in: query
49743+
name: filter[status]
49744+
schema:
49745+
type: string
49746+
- description: Sort key with optional descending prefix
49747+
in: query
49748+
name: sort
49749+
schema:
49750+
default: created_at
49751+
type: string
4973349752
responses:
4973449753
'200':
4973549754
content:
4973649755
application/json:
4973749756
schema:
4973849757
$ref: '#/components/schemas/CustomCostsFileListResponse'
4973949758
description: OK
49759+
'400':
49760+
content:
49761+
application/json:
49762+
schema:
49763+
$ref: '#/components/schemas/APIErrorResponse'
49764+
description: Bad Request
4974049765
'403':
4974149766
content:
4974249767
application/json:
@@ -49769,6 +49794,12 @@ paths:
4976949794
schema:
4977049795
$ref: '#/components/schemas/CustomCostsFileUploadResponse'
4977149796
description: Accepted
49797+
'400':
49798+
content:
49799+
application/json:
49800+
schema:
49801+
$ref: '#/components/schemas/APIErrorResponse'
49802+
description: Bad Request
4977249803
'403':
4977349804
content:
4977449805
application/json:
@@ -49800,6 +49831,12 @@ paths:
4980049831
schema:
4980149832
$ref: '#/components/schemas/APIErrorResponse'
4980249833
description: Forbidden
49834+
'404':
49835+
content:
49836+
application/json:
49837+
schema:
49838+
$ref: '#/components/schemas/APIErrorResponse'
49839+
description: Not Found
4980349840
'429':
4980449841
$ref: '#/components/responses/TooManyRequestsResponse'
4980549842
security:
@@ -49828,6 +49865,12 @@ paths:
4982849865
schema:
4982949866
$ref: '#/components/schemas/APIErrorResponse'
4983049867
description: Forbidden
49868+
'404':
49869+
content:
49870+
application/json:
49871+
schema:
49872+
$ref: '#/components/schemas/APIErrorResponse'
49873+
description: Not Found
4983149874
'429':
4983249875
$ref: '#/components/responses/TooManyRequestsResponse'
4983349876
security:

cassettes/v2/Cloud-Cost-Management_4135329986/Create-Cloud-Cost-Management-AWS-CUR-config-returns-OK-response_3001192141/recording.har

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 419,
45-
"text": "{\"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"
45+
"text": "{\"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"
4646
},
4747
"cookies": [],
4848
"headers": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-13T21:37:53.830Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Create Cloud Cost Management Azure configs returns \"Bad Request\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "b4d4fc3e28b7c04f2977704ddc412cee",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 542,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "application/json"
22+
},
23+
{
24+
"_fromType": "array",
25+
"name": "content-type",
26+
"value": "application/json"
27+
}
28+
],
29+
"headersSize": 579,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"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\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/cost/azure_uc_config"
39+
},
40+
"response": {
41+
"bodySize": 117,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 117,
45+
"text": "{\"errors\":[{\"status\":\"400\",\"title\":\"Bad Request\",\"detail\":\"attribute \\\"scope\\\" does not match the required format\"}]}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 668,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 400,
58+
"statusText": "Bad Request"
59+
},
60+
"startedDateTime": "2025-08-13T21:37:53.835Z",
61+
"time": 182
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

cassettes/v2/Cloud-Cost-Management_4135329986/Create-Cloud-Cost-Management-Azure-configs-returns-OK-response_3003002930/recording.har

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"content": {
4343
"mimeType": "application/json",
4444
"size": 1170,
45-
"text": "{\"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\"}]}}}"
45+
"text": "{\"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\"}]}}}"
4646
},
4747
"cookies": [],
4848
"headers": [
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-13T21:24:23.921Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Delete Cloud Cost Management AWS CUR config returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "2cafa5976cbb29b81cc7face9cd5b921",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "*/*"
22+
}
23+
],
24+
"headersSize": 519,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "DELETE",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/cost/aws_cur_config/123456"
29+
},
30+
"response": {
31+
"bodySize": 49,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 49,
35+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/vnd.api+json"
42+
}
43+
],
44+
"headersSize": 658,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 404,
48+
"statusText": "Not Found"
49+
},
50+
"startedDateTime": "2025-08-13T21:24:23.925Z",
51+
"time": 176
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-08-13T21:21:25.379Z"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Delete Cloud Cost Management Azure config returns \"Not Found\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "855b1afd0875448f0bb1b55c9c71975a",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 0,
16+
"cookies": [],
17+
"headers": [
18+
{
19+
"_fromType": "array",
20+
"name": "accept",
21+
"value": "*/*"
22+
}
23+
],
24+
"headersSize": 521,
25+
"httpVersion": "HTTP/1.1",
26+
"method": "DELETE",
27+
"queryString": [],
28+
"url": "https://api.datadoghq.com/api/v2/cost/azure_uc_config/123456"
29+
},
30+
"response": {
31+
"bodySize": 49,
32+
"content": {
33+
"mimeType": "application/vnd.api+json",
34+
"size": 49,
35+
"text": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\"}]}"
36+
},
37+
"cookies": [],
38+
"headers": [
39+
{
40+
"name": "content-type",
41+
"value": "application/vnd.api+json"
42+
}
43+
],
44+
"headersSize": 659,
45+
"httpVersion": "HTTP/1.1",
46+
"redirectURL": "",
47+
"status": 404,
48+
"statusText": "Not Found"
49+
},
50+
"startedDateTime": "2025-08-13T21:21:25.383Z",
51+
"time": 168
52+
}
53+
],
54+
"pages": [],
55+
"version": "1.2"
56+
}
57+
}

0 commit comments

Comments
 (0)