Skip to content

Commit f3e737c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 622be32 of spec repo (DataDog#3379)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 32ed184 commit f3e737c

11 files changed

Lines changed: 506 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19897,6 +19897,45 @@ components:
1989719897
x-enum-varnames:
1989819898
- "TRUE"
1989919899
- "FALSE"
19900+
CostTagMetadataMonth:
19901+
description: A month that has Cloud Cost Management tag metadata available for a given provider.
19902+
properties:
19903+
id:
19904+
description: The month, in `YYYY-MM` format.
19905+
example: "2026-04"
19906+
type: string
19907+
type:
19908+
$ref: "#/components/schemas/CostTagMetadataMonthType"
19909+
required:
19910+
- id
19911+
- type
19912+
type: object
19913+
CostTagMetadataMonthType:
19914+
default: cost_tag_metadata_month
19915+
description: Type of the Cloud Cost Management tag metadata month resource.
19916+
enum:
19917+
- cost_tag_metadata_month
19918+
example: cost_tag_metadata_month
19919+
type: string
19920+
x-enum-varnames:
19921+
- COST_TAG_METADATA_MONTH
19922+
CostTagMetadataMonthsResponse:
19923+
description: List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
19924+
example:
19925+
data:
19926+
- id: "2026-04"
19927+
type: cost_tag_metadata_month
19928+
- id: "2026-03"
19929+
type: cost_tag_metadata_month
19930+
properties:
19931+
data:
19932+
description: List of months that have tag metadata available.
19933+
items:
19934+
$ref: "#/components/schemas/CostTagMetadataMonth"
19935+
type: array
19936+
required:
19937+
- data
19938+
type: object
1990019939
CostTagType:
1990119940
default: cost_tag
1990219941
description: Type of the Cloud Cost Management tag resource.
@@ -111135,6 +111174,68 @@ paths:
111135111174
x-unstable: |-
111136111175
**Note**: This endpoint is in preview and is subject to change.
111137111176
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
111177+
/api/v2/cost/tag_metadata/months:
111178+
get:
111179+
description: |-
111180+
List months that have Cloud Cost Management tag metadata for a given provider,
111181+
ordered most-recent first. The response is capped at 36 months.
111182+
operationId: ListCostTagMetadataMonths
111183+
parameters:
111184+
- description: |-
111185+
Provider to scope the query to. Use the value of the `providername` tag in CCM
111186+
(for example, `aws`, `azure`, `gcp`, `Oracle`, `Confluent Cloud`, `Snowflake`).
111187+
For costs uploaded through the Custom Costs API, use `custom`.
111188+
Values are case-sensitive.
111189+
example: aws
111190+
in: query
111191+
name: filter[provider]
111192+
required: true
111193+
schema:
111194+
type: string
111195+
responses:
111196+
"200":
111197+
content:
111198+
application/json:
111199+
examples:
111200+
default:
111201+
value:
111202+
data:
111203+
- id: "2026-04"
111204+
type: cost_tag_metadata_month
111205+
- id: "2026-03"
111206+
type: cost_tag_metadata_month
111207+
schema:
111208+
$ref: "#/components/schemas/CostTagMetadataMonthsResponse"
111209+
description: OK
111210+
"400":
111211+
content:
111212+
application/json:
111213+
schema:
111214+
$ref: "#/components/schemas/APIErrorResponse"
111215+
description: Bad Request
111216+
"403":
111217+
content:
111218+
application/json:
111219+
schema:
111220+
$ref: "#/components/schemas/APIErrorResponse"
111221+
description: Forbidden
111222+
"429":
111223+
$ref: "#/components/responses/TooManyRequestsResponse"
111224+
security:
111225+
- apiKeyAuth: []
111226+
appKeyAuth: []
111227+
- AuthZ:
111228+
- cloud_cost_management_read
111229+
summary: List Cloud Cost Management tag metadata months
111230+
tags:
111231+
- Cloud Cost Management
111232+
"x-permission":
111233+
operator: OR
111234+
permissions:
111235+
- cloud_cost_management_read
111236+
x-unstable: |-
111237+
**Note**: This endpoint is in preview and is subject to change.
111238+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
111138111239
/api/v2/cost/tag_metadata/orchestrators:
111139111240
get:
111140111241
description: List container orchestrators (for example, `kubernetes`, `ecs`) detected in Cloud Cost Management data for the requested period.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# List Cloud Cost Management tag metadata months returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.list_cost_tag_metadata_months".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
8+
p api_instance.list_cost_tag_metadata_months("filter[provider]")

features/scenarios_model_mapping.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2643,6 +2643,9 @@
26432643
"filter_month" => "String",
26442644
"filter_provider" => "String",
26452645
},
2646+
"v2.ListCostTagMetadataMonths" => {
2647+
"filter_provider" => "String",
2648+
},
26462649
"v2.ListCostTagMetadataOrchestrators" => {
26472650
"filter_month" => "String",
26482651
"filter_provider" => "String",

features/v2/cloud_cost_management.feature

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -606,6 +606,22 @@ Feature: Cloud Cost Management
606606
When the request is sent
607607
Then the response status is 200 OK
608608

609+
@generated @skip @team:DataDog/cloud-cost-management
610+
Scenario: List Cloud Cost Management tag metadata months returns "Bad Request" response
611+
Given operation "ListCostTagMetadataMonths" enabled
612+
And new "ListCostTagMetadataMonths" request
613+
And request contains "filter[provider]" parameter from "REPLACE.ME"
614+
When the request is sent
615+
Then the response status is 400 Bad Request
616+
617+
@generated @skip @team:DataDog/cloud-cost-management
618+
Scenario: List Cloud Cost Management tag metadata months returns "OK" response
619+
Given operation "ListCostTagMetadataMonths" enabled
620+
And new "ListCostTagMetadataMonths" request
621+
And request contains "filter[provider]" parameter from "REPLACE.ME"
622+
When the request is sent
623+
Then the response status is 200 OK
624+
609625
@generated @skip @team:DataDog/cloud-cost-management
610626
Scenario: List Cloud Cost Management tag sources returns "Bad Request" response
611627
Given operation "ListCostTagKeySources" enabled

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1898,6 +1898,12 @@
18981898
"type": "safe"
18991899
}
19001900
},
1901+
"ListCostTagMetadataMonths": {
1902+
"tag": "Cloud Cost Management",
1903+
"undo": {
1904+
"type": "safe"
1905+
}
1906+
},
19011907
"ListCostTagMetadataOrchestrators": {
19021908
"tag": "Cloud Cost Management",
19031909
"undo": {

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ def initialize
387387
"v2.list_cost_tag_key_sources": false,
388388
"v2.list_cost_tag_metadata": false,
389389
"v2.list_cost_tag_metadata_metrics": false,
390+
"v2.list_cost_tag_metadata_months": false,
390391
"v2.list_cost_tag_metadata_orchestrators": false,
391392
"v2.search_cost_recommendations": false,
392393
"v2.create_dashboard_secure_embed": false,

lib/datadog_api_client/inflector.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,6 +2234,9 @@ def overrides
22342234
"v2.cost_tag_keys_response" => "CostTagKeysResponse",
22352235
"v2.cost_tag_key_type" => "CostTagKeyType",
22362236
"v2.cost_tag_metadata_daily_filter" => "CostTagMetadataDailyFilter",
2237+
"v2.cost_tag_metadata_month" => "CostTagMetadataMonth",
2238+
"v2.cost_tag_metadata_months_response" => "CostTagMetadataMonthsResponse",
2239+
"v2.cost_tag_metadata_month_type" => "CostTagMetadataMonthType",
22372240
"v2.cost_tags_response" => "CostTagsResponse",
22382241
"v2.cost_tag_type" => "CostTagType",
22392242
"v2.coverage_summary_attributes" => "CoverageSummaryAttributes",

lib/datadog_api_client/v2/api/cloud_cost_management_api.rb

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,6 +3039,79 @@ def list_cost_tag_metadata_metrics_with_http_info(filter_month, opts = {})
30393039
return data, status_code, headers
30403040
end
30413041

3042+
# List Cloud Cost Management tag metadata months.
3043+
#
3044+
# @see #list_cost_tag_metadata_months_with_http_info
3045+
def list_cost_tag_metadata_months(filter_provider, opts = {})
3046+
data, _status_code, _headers = list_cost_tag_metadata_months_with_http_info(filter_provider, opts)
3047+
data
3048+
end
3049+
3050+
# List Cloud Cost Management tag metadata months.
3051+
#
3052+
# List months that have Cloud Cost Management tag metadata for a given provider,
3053+
# ordered most-recent first. The response is capped at 36 months.
3054+
#
3055+
# @param filter_provider [String] Provider to scope the query to. Use the value of the `providername` tag in CCM (for example, `aws`, `azure`, `gcp`, `Oracle`, `Confluent Cloud`, `Snowflake`). For costs uploaded through the Custom Costs API, use `custom`. Values are case-sensitive.
3056+
# @param opts [Hash] the optional parameters
3057+
# @return [Array<(CostTagMetadataMonthsResponse, Integer, Hash)>] CostTagMetadataMonthsResponse data, response status code and response headers
3058+
def list_cost_tag_metadata_months_with_http_info(filter_provider, opts = {})
3059+
unstable_enabled = @api_client.config.unstable_operations["v2.list_cost_tag_metadata_months".to_sym]
3060+
if unstable_enabled
3061+
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_cost_tag_metadata_months")
3062+
else
3063+
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_cost_tag_metadata_months"))
3064+
end
3065+
3066+
if @api_client.config.debugging
3067+
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_tag_metadata_months ...'
3068+
end
3069+
# verify the required parameter 'filter_provider' is set
3070+
if @api_client.config.client_side_validation && filter_provider.nil?
3071+
fail ArgumentError, "Missing the required parameter 'filter_provider' when calling CloudCostManagementAPI.list_cost_tag_metadata_months"
3072+
end
3073+
# resource path
3074+
local_var_path = '/api/v2/cost/tag_metadata/months'
3075+
3076+
# query parameters
3077+
query_params = opts[:query_params] || {}
3078+
query_params[:'filter[provider]'] = filter_provider
3079+
3080+
# header parameters
3081+
header_params = opts[:header_params] || {}
3082+
# HTTP header 'Accept' (if needed)
3083+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3084+
3085+
# form parameters
3086+
form_params = opts[:form_params] || {}
3087+
3088+
# http body (model)
3089+
post_body = opts[:debug_body]
3090+
3091+
# return_type
3092+
return_type = opts[:debug_return_type] || 'CostTagMetadataMonthsResponse'
3093+
3094+
# auth_names
3095+
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]
3096+
3097+
new_options = opts.merge(
3098+
:operation => :list_cost_tag_metadata_months,
3099+
:header_params => header_params,
3100+
:query_params => query_params,
3101+
:form_params => form_params,
3102+
:body => post_body,
3103+
:auth_names => auth_names,
3104+
:return_type => return_type,
3105+
:api_version => "V2"
3106+
)
3107+
3108+
data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
3109+
if @api_client.config.debugging
3110+
@api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_tag_metadata_months\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3111+
end
3112+
return data, status_code, headers
3113+
end
3114+
30423115
# List Cloud Cost Management orchestrators.
30433116
#
30443117
# @see #list_cost_tag_metadata_orchestrators_with_http_info

0 commit comments

Comments
 (0)