Skip to content

Commit 36b1d1f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 2faab29 of spec repo
1 parent 3149b18 commit 36b1d1f

26 files changed

+918
-520
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 270 additions & 36 deletions
Large diffs are not rendered by default.

examples/v2/cloud-cost-management/UpdateArbitraryCostRule.rb renamed to examples/v2/cloud-cost-management/CreateCustomAllocationRule.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Update arbitrary cost rule returns "OK" response
1+
# Create custom allocation rule returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
@@ -11,7 +11,6 @@
1111
condition: "is",
1212
tag: "account_id",
1313
value: "123456789",
14-
values: [],
1514
}),
1615
DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems.new({
1716
condition: "in",
@@ -40,7 +39,6 @@
4039
condition: "is",
4140
tag: "service",
4241
value: "web-api",
43-
values: [],
4442
}),
4543
DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems.new({
4644
condition: "not in",
@@ -60,4 +58,4 @@
6058
type: DatadogAPIClient::V2::ArbitraryCostUpsertRequestDataType::UPSERT_ARBITRARY_RULE,
6159
}),
6260
})
63-
p api_instance.update_arbitrary_cost_rule(123456, body)
61+
p api_instance.create_custom_allocation_rule(body)

examples/v2/cloud-cost-management/CreateRuleset.rb renamed to examples/v2/cloud-cost-management/CreateTagPipelinesRuleset.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItems.new({
1212
enabled: true,
1313
mapping: nil,
14+
metadata: nil,
1415
name: "Add Cost Center Tag",
1516
query: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQuery.new({
1617
addition: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQueryAddition.new({
@@ -29,4 +30,4 @@
2930
type: DatadogAPIClient::V2::CreateRulesetRequestDataType::CREATE_RULESET,
3031
}),
3132
})
32-
p api_instance.create_ruleset(body)
33+
p api_instance.create_tag_pipelines_ruleset(body)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Create tag pipeline ruleset returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
6+
body = DatadogAPIClient::V2::CreateRulesetRequest.new({
7+
data: DatadogAPIClient::V2::CreateRulesetRequestData.new({
8+
attributes: DatadogAPIClient::V2::CreateRulesetRequestDataAttributes.new({
9+
enabled: true,
10+
rules: [
11+
DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItems.new({
12+
enabled: true,
13+
mapping: nil,
14+
name: "Add Cost Center Tag",
15+
query: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQuery.new({
16+
addition: DatadogAPIClient::V2::CreateRulesetRequestDataAttributesRulesItemsQueryAddition.new({
17+
key: "cost_center",
18+
value: "engineering",
19+
}),
20+
case_insensitivity: false,
21+
if_not_exists: true,
22+
query: 'account_id:"123456789" AND service:"web-api"',
23+
}),
24+
reference_table: nil,
25+
}),
26+
],
27+
}),
28+
id: "New Ruleset",
29+
type: DatadogAPIClient::V2::CreateRulesetRequestDataType::CREATE_RULESET,
30+
}),
31+
})
32+
p api_instance.create_tag_pipelines_ruleset(body)

examples/v2/cloud-cost-management/DeleteArbitraryCostRule.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete custom allocation rule returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
api_instance.delete_custom_allocation_rule(123456)

examples/v2/cloud-cost-management/DeleteRuleset.rb renamed to examples/v2/cloud-cost-management/DeleteTagPipelinesRuleset.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5-
api_instance.delete_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142")
5+
api_instance.delete_tag_pipelines_ruleset("ruleset_id")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Delete tag pipeline ruleset returns "No Content" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
api_instance.delete_tag_pipelines_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142")

examples/v2/cloud-cost-management/GetArbitraryCostRule.rb

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get custom allocation rule returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
p api_instance.get_custom_allocation_rule(123456)

0 commit comments

Comments
 (0)