Skip to content

Commit ba14c4f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add tag pipeline, custom allocation rule and get cloud account by id for AWS/Azure/GCP configs APIs (#2786)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 364508a commit ba14c4f

File tree

180 files changed

+12467
-736
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+12467
-736
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 2506 additions & 196 deletions
Large diffs are not rendered by default.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
},
99
"entries": [
1010
{
11-
"_id": "ffbfdd2f625816f5b1da35a9d620c031",
11+
"_id": "86b1980ae0a41e3c519c5c80312afbb3",
1212
"_order": 0,
1313
"cache": {},
1414
"request": {
15-
"bodySize": 603,
15+
"bodySize": 568,
1616
"cookies": [],
1717
"headers": [
1818
{
@@ -26,13 +26,13 @@
2626
"value": "application/json"
2727
}
2828
],
29-
"headersSize": 573,
29+
"headersSize": 599,
3030
"httpVersion": "HTTP/1.1",
3131
"method": "POST",
3232
"postData": {
3333
"mimeType": "application/json",
3434
"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\", \"is_enabled\": true, \"scope\": \"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234\"}, \"type\": \"azure_uc_config_post_request\"}}"
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\":\"subscriptions/1234abcd-1234-abcd-1234-1234abcd1234\"},\"type\":\"azure_uc_config_post_request\"}}"
3636
},
3737
"queryString": [],
3838
"url": "https://api.datadoghq.com/api/v2/cost/azure_uc_config"
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"log": {
3-
"_recordingName": "Cloud Cost Management/Create Cloud Cost Management GCP Usage Cost config returns \"Bad Request\" response",
3+
"_recordingName": "Cloud Cost Management/Create Google Cloud Usage Cost config returns \"Bad Request\" response",
44
"creator": {
55
"comment": "persister:fs",
66
"name": "Polly.JS",
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"log": {
3-
"_recordingName": "Cloud Cost Management/Create Cloud Cost Management GCP Usage Cost config returns \"OK\" response",
3+
"_recordingName": "Cloud Cost Management/Create Google Cloud Usage Cost config returns \"OK\" response",
44
"creator": {
55
"comment": "persister:fs",
66
"name": "Polly.JS",
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-09-15T20:24:10.628Z"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Create arbitrary cost rule returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "bb520c0cd6081a1034c15ed0b3d5d0c3",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 613,
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": 575,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"costs_to_allocate\":[{\"condition\":\"is\",\"tag\":\"account_id\",\"value\":\"123456789\",\"values\":[]},{\"condition\":\"in\",\"tag\":\"environment\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"enabled\":true,\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"allocated_by_tag_keys\":[\"team\",\"environment\"],\"based_on_costs\":[{\"condition\":\"is\",\"tag\":\"service\",\"value\":\"web-api\",\"values\":[]},{\"condition\":\"not in\",\"tag\":\"team\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"granularity\":\"daily\",\"method\":\"proportional\"},\"type\":\"shared\"},\"type\":\"upsert_arbitrary_rule\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/cost/arbitrary_rule"
39+
},
40+
"response": {
41+
"bodySize": 784,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 784,
45+
"text": "{\"data\":{\"id\":\"435\",\"type\":\"arbitrary_rule\",\"attributes\":{\"costs_to_allocate\":[{\"tag\":\"account_id\",\"condition\":\"is\",\"value\":\"123456789\",\"values\":null},{\"tag\":\"environment\",\"condition\":\"in\",\"value\":\"\",\"values\":[\"production\",\"staging\"]}],\"created\":\"2025-09-15T20:23:11.705977625Z\",\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"order_id\":1,\"provider\":[\"aws\",\"gcp\"],\"rule_name\":\"example-arbitrary-cost-rule\",\"strategy\":{\"method\":\"proportional\",\"granularity\":\"daily\",\"based_on_costs\":[{\"tag\":\"service\",\"condition\":\"is\",\"value\":\"web-api\",\"values\":null},{\"tag\":\"team\",\"condition\":\"not in\",\"value\":\"\",\"values\":[\"legacy\",\"deprecated\"]}],\"allocated_by_tag_keys\":[\"team\",\"environment\"]},\"type\":\"shared\",\"updated\":\"2025-09-15T20:23:11.705977625Z\",\"version\":1}}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 672,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-09-15T20:24:10.633Z",
61+
"time": 153
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"2025-09-16T16:51:02.186Z"
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"log": {
3+
"_recordingName": "Cloud Cost Management/Create ruleset returns \"OK\" response",
4+
"creator": {
5+
"comment": "persister:fs",
6+
"name": "Polly.JS",
7+
"version": "6.0.5"
8+
},
9+
"entries": [
10+
{
11+
"_id": "96d71858d435a6785fe5dfc8309baca1",
12+
"_order": 0,
13+
"cache": {},
14+
"request": {
15+
"bodySize": 349,
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": 563,
30+
"httpVersion": "HTTP/1.1",
31+
"method": "POST",
32+
"postData": {
33+
"mimeType": "application/json",
34+
"params": [],
35+
"text": "{\"data\":{\"attributes\":{\"enabled\":true,\"rules\":[{\"enabled\":true,\"mapping\":null,\"name\":\"Add Cost Center Tag\",\"query\":{\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"case_insensitivity\":false,\"if_not_exists\":true,\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\"},\"reference_table\":null}]},\"id\":\"New Ruleset\",\"type\":\"create_ruleset\"}}"
36+
},
37+
"queryString": [],
38+
"url": "https://api.datadoghq.com/api/v2/tags/enrichment"
39+
},
40+
"response": {
41+
"bodySize": 603,
42+
"content": {
43+
"mimeType": "application/vnd.api+json",
44+
"size": 603,
45+
"text": "{\"data\":{\"id\":\"1b680ec0-8e29-4b79-bb01-45f0c645a789\",\"type\":\"ruleset\",\"attributes\":{\"created\":{\"seconds\":1758041403,\"nanos\":117388000},\"enabled\":true,\"last_modified_user_uuid\":\"3ad549bf-eba0-11e9-a77a-0705486660d0\",\"modified\":{\"seconds\":1758041403,\"nanos\":117388000},\"name\":\"New Ruleset\",\"position\":1,\"rules\":[{\"name\":\"Add Cost Center Tag\",\"enabled\":true,\"query\":{\"query\":\"account_id:\\\"123456789\\\" AND service:\\\"web-api\\\"\",\"addition\":{\"key\":\"cost_center\",\"value\":\"engineering\"},\"if_not_exists\":true,\"case_insensitivity\":false},\"mapping\":null,\"reference_table\":null,\"metadata\":null}],\"version\":3603412}}}"
46+
},
47+
"cookies": [],
48+
"headers": [
49+
{
50+
"name": "content-type",
51+
"value": "application/vnd.api+json"
52+
}
53+
],
54+
"headersSize": 675,
55+
"httpVersion": "HTTP/1.1",
56+
"redirectURL": "",
57+
"status": 200,
58+
"statusText": "OK"
59+
},
60+
"startedDateTime": "2025-09-16T16:51:02.189Z",
61+
"time": 170
62+
}
63+
],
64+
"pages": [],
65+
"version": "1.2"
66+
}
67+
}

0 commit comments

Comments
 (0)