Skip to content

Commit edb44f8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add OpenAPI definitions for CCM status endpoints (DataDog#3288)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 401dba3 commit edb44f8

15 files changed

Lines changed: 1218 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6353,6 +6353,62 @@ components:
63536353
type: string
63546354
x-enum-varnames:
63556355
- ARBITRARY_RULE
6356+
ArbitraryRuleStatusResponseArray:
6357+
description: Processing statuses for all custom allocation rules in the specified organization.
6358+
example:
6359+
data:
6360+
- attributes:
6361+
processing_status: processing
6362+
id: "123"
6363+
type: arbitrary_rule_status
6364+
- attributes:
6365+
processing_status: done
6366+
id: "456"
6367+
type: arbitrary_rule_status
6368+
properties:
6369+
data:
6370+
description: Processing status for a custom allocation rule.
6371+
items:
6372+
$ref: "#/components/schemas/ArbitraryRuleStatusResponseData"
6373+
type: array
6374+
required:
6375+
- data
6376+
type: object
6377+
ArbitraryRuleStatusResponseData:
6378+
description: Processing status for a custom allocation rule.
6379+
properties:
6380+
attributes:
6381+
$ref: "#/components/schemas/ArbitraryRuleStatusResponseDataAttributes"
6382+
id:
6383+
description: The unique identifier of the custom allocation rule.
6384+
example: "123"
6385+
type: string
6386+
type:
6387+
$ref: "#/components/schemas/ArbitraryRuleStatusResponseDataType"
6388+
required:
6389+
- id
6390+
- type
6391+
- attributes
6392+
type: object
6393+
ArbitraryRuleStatusResponseDataAttributes:
6394+
description: Processing status for a custom allocation rule.
6395+
properties:
6396+
processing_status:
6397+
description: The processing status of the custom allocation rule.
6398+
example: processing
6399+
type: string
6400+
required:
6401+
- processing_status
6402+
type: object
6403+
ArbitraryRuleStatusResponseDataType:
6404+
default: arbitrary_rule_status
6405+
description: Custom allocation rule status resource type.
6406+
enum:
6407+
- arbitrary_rule_status
6408+
example: arbitrary_rule_status
6409+
type: string
6410+
x-enum-varnames:
6411+
- ARBITRARY_RULE_STATUS
63566412
Argument:
63576413
description: A named argument for a custom static analysis rule.
63586414
properties:
@@ -60398,6 +60454,62 @@ components:
6039860454
type: string
6039960455
x-enum-varnames:
6040060456
- RULESET
60457+
RulesetStatusRespArray:
60458+
description: Processing statuses for all tag pipeline rulesets in the specified organization.
60459+
example:
60460+
data:
60461+
- attributes:
60462+
processing_status: processing
60463+
id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10
60464+
type: ruleset_status
60465+
- attributes:
60466+
processing_status: done
60467+
id: a7b8c9d0-1234-5678-9abc-def012345678
60468+
type: ruleset_status
60469+
properties:
60470+
data:
60471+
description: Processing status for a tag pipeline ruleset.
60472+
items:
60473+
$ref: "#/components/schemas/RulesetStatusRespData"
60474+
type: array
60475+
required:
60476+
- data
60477+
type: object
60478+
RulesetStatusRespData:
60479+
description: Processing status for a tag pipeline ruleset.
60480+
properties:
60481+
attributes:
60482+
$ref: "#/components/schemas/RulesetStatusRespDataAttributes"
60483+
id:
60484+
description: The unique identifier of the ruleset.
60485+
example: 55ef2385-9ae1-4410-90c4-5ac1b60fec10
60486+
type: string
60487+
type:
60488+
$ref: "#/components/schemas/RulesetStatusRespDataType"
60489+
required:
60490+
- id
60491+
- type
60492+
- attributes
60493+
type: object
60494+
RulesetStatusRespDataAttributes:
60495+
description: Processing status for a tag pipeline ruleset.
60496+
properties:
60497+
processing_status:
60498+
description: The processing status of the ruleset.
60499+
example: processing
60500+
type: string
60501+
required:
60502+
- processing_status
60503+
type: object
60504+
RulesetStatusRespDataType:
60505+
default: ruleset_status
60506+
description: Ruleset status resource type.
60507+
enum:
60508+
- ruleset_status
60509+
example: ruleset_status
60510+
type: string
60511+
x-enum-varnames:
60512+
- RULESET_STATUS
6040160513
RumCrossProductSampling:
6040260514
description: The configuration for cross-product retention filters.
6040360515
properties:
@@ -94972,6 +95084,39 @@ paths:
9497295084
summary: Reorder custom allocation rules
9497395085
tags:
9497495086
- Cloud Cost Management
95087+
/api/v2/cost/arbitrary_rule/status:
95088+
get:
95089+
description: List the processing status of all custom allocation rules. Returns only the ID and processing status for each rule.
95090+
operationId: ListCustomAllocationRulesStatus
95091+
responses:
95092+
"200":
95093+
content:
95094+
application/json:
95095+
examples:
95096+
default:
95097+
value:
95098+
data:
95099+
- attributes:
95100+
processing_status: processing
95101+
id: "123"
95102+
type: arbitrary_rule_status
95103+
- attributes:
95104+
processing_status: done
95105+
id: "456"
95106+
type: arbitrary_rule_status
95107+
schema:
95108+
$ref: "#/components/schemas/ArbitraryRuleStatusResponseArray"
95109+
description: OK
95110+
"429":
95111+
$ref: "#/components/responses/TooManyRequestsResponse"
95112+
security:
95113+
- apiKeyAuth: []
95114+
appKeyAuth: []
95115+
- AuthZ:
95116+
- cloud_cost_management_read
95117+
summary: List custom allocation rule statuses
95118+
tags:
95119+
- Cloud Cost Management
9497595120
/api/v2/cost/arbitrary_rule/{rule_id}:
9497695121
delete:
9497795122
description: Delete a custom allocation rule - Delete an existing custom allocation rule by its ID
@@ -141041,6 +141186,39 @@ paths:
141041141186
summary: Reorder tag pipeline rulesets
141042141187
tags:
141043141188
- Cloud Cost Management
141189+
/api/v2/tags/enrichment/status:
141190+
get:
141191+
description: List the processing status of all tag pipeline rulesets. Returns only the ID and processing status for each ruleset.
141192+
operationId: ListTagPipelinesRulesetsStatus
141193+
responses:
141194+
"200":
141195+
content:
141196+
application/json:
141197+
examples:
141198+
default:
141199+
value:
141200+
data:
141201+
- attributes:
141202+
processing_status: processing
141203+
id: 55ef2385-9ae1-4410-90c4-5ac1b60fec10
141204+
type: ruleset_status
141205+
- attributes:
141206+
processing_status: done
141207+
id: a7b8c9d0-1234-5678-9abc-def012345678
141208+
type: ruleset_status
141209+
schema:
141210+
$ref: "#/components/schemas/RulesetStatusRespArray"
141211+
description: OK
141212+
"429":
141213+
$ref: "#/components/responses/TooManyRequestsResponse"
141214+
security:
141215+
- apiKeyAuth: []
141216+
appKeyAuth: []
141217+
- AuthZ:
141218+
- cloud_cost_management_read
141219+
summary: List tag pipeline ruleset statuses
141220+
tags:
141221+
- Cloud Cost Management
141044141222
/api/v2/tags/enrichment/validate-query:
141045141223
post:
141046141224
description: Validate a tag pipeline query - Validate the syntax and structure of a tag pipeline query
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List custom allocation rule statuses returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
p api_instance.list_custom_allocation_rules_status()
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# List tag pipeline ruleset statuses returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
5+
p api_instance.list_tag_pipelines_rulesets_status()

features/v2/cloud_cost_management.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,13 +351,25 @@ Feature: Cloud Cost Management
351351
When the request is sent
352352
Then the response status is 200 OK
353353

354+
@generated @skip @team:DataDog/cloud-cost-management
355+
Scenario: List custom allocation rule statuses returns "OK" response
356+
Given new "ListCustomAllocationRulesStatus" request
357+
When the request is sent
358+
Then the response status is 200 OK
359+
354360
@replay-only @team:DataDog/cloud-cost-management
355361
Scenario: List custom allocation rules returns "OK" response
356362
Given new "ListCustomAllocationRules" request
357363
When the request is sent
358364
Then the response status is 200 OK
359365
And the response "data[0].attributes.rule_name" is equal to "example-arbitrary-cost-rule"
360366

367+
@generated @skip @team:DataDog/cloud-cost-management
368+
Scenario: List tag pipeline ruleset statuses returns "OK" response
369+
Given new "ListTagPipelinesRulesetsStatus" request
370+
When the request is sent
371+
Then the response status is 200 OK
372+
361373
@replay-only @team:DataDog/cloud-cost-management
362374
Scenario: List tag pipeline rulesets returns "OK" response
363375
Given new "ListTagPipelinesRulesets" request

features/v2/undo.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,6 +1283,12 @@
12831283
"type": "idempotent"
12841284
}
12851285
},
1286+
"ListCustomAllocationRulesStatus": {
1287+
"tag": "Cloud Cost Management",
1288+
"undo": {
1289+
"type": "safe"
1290+
}
1291+
},
12861292
"DeleteCustomAllocationRule": {
12871293
"tag": "Cloud Cost Management",
12881294
"undo": {
@@ -6703,6 +6709,12 @@
67036709
"type": "idempotent"
67046710
}
67056711
},
6712+
"ListTagPipelinesRulesetsStatus": {
6713+
"tag": "Cloud Cost Management",
6714+
"undo": {
6715+
"type": "safe"
6716+
}
6717+
},
67066718
"ValidateQuery": {
67076719
"tag": "Cloud Cost Management",
67086720
"undo": {

lib/datadog_api_client/inflector.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,6 +1299,10 @@ def overrides
12991299
"v2.arbitrary_rule_response_data_attributes_strategy_based_on_costs_items" => "ArbitraryRuleResponseDataAttributesStrategyBasedOnCostsItems",
13001300
"v2.arbitrary_rule_response_data_attributes_strategy_evaluate_grouped_by_filters_items" => "ArbitraryRuleResponseDataAttributesStrategyEvaluateGroupedByFiltersItems",
13011301
"v2.arbitrary_rule_response_data_type" => "ArbitraryRuleResponseDataType",
1302+
"v2.arbitrary_rule_status_response_array" => "ArbitraryRuleStatusResponseArray",
1303+
"v2.arbitrary_rule_status_response_data" => "ArbitraryRuleStatusResponseData",
1304+
"v2.arbitrary_rule_status_response_data_attributes" => "ArbitraryRuleStatusResponseDataAttributes",
1305+
"v2.arbitrary_rule_status_response_data_type" => "ArbitraryRuleStatusResponseDataType",
13021306
"v2.argument" => "Argument",
13031307
"v2.asana_access_token" => "AsanaAccessToken",
13041308
"v2.asana_access_token_type" => "AsanaAccessTokenType",
@@ -4843,6 +4847,10 @@ def overrides
48434847
"v2.ruleset_resp_data_attributes_rules_items_reference_table" => "RulesetRespDataAttributesRulesItemsReferenceTable",
48444848
"v2.ruleset_resp_data_attributes_rules_items_reference_table_field_pairs_items" => "RulesetRespDataAttributesRulesItemsReferenceTableFieldPairsItems",
48454849
"v2.ruleset_resp_data_type" => "RulesetRespDataType",
4850+
"v2.ruleset_status_resp_array" => "RulesetStatusRespArray",
4851+
"v2.ruleset_status_resp_data" => "RulesetStatusRespData",
4852+
"v2.ruleset_status_resp_data_attributes" => "RulesetStatusRespDataAttributes",
4853+
"v2.ruleset_status_resp_data_type" => "RulesetStatusRespDataType",
48464854
"v2.rule_severity" => "RuleSeverity",
48474855
"v2.rules_validate_query_request" => "RulesValidateQueryRequest",
48484856
"v2.rules_validate_query_request_data" => "RulesValidateQueryRequestData",

0 commit comments

Comments
 (0)