Skip to content

Commit 5a086d1

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0ec9a04 of spec repo
1 parent f3bb71d commit 5a086d1

11 files changed

Lines changed: 502 additions & 0 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18517,6 +18517,45 @@ components:
1851718517
x-enum-varnames:
1851818518
- "TRUE"
1851918519
- "FALSE"
18520+
CostTagMetadataMonth:
18521+
description: A month that has Cloud Cost Management tag metadata available for a given provider.
18522+
properties:
18523+
id:
18524+
description: The month, in `YYYY-MM` format.
18525+
example: "2026-04"
18526+
type: string
18527+
type:
18528+
$ref: "#/components/schemas/CostTagMetadataMonthType"
18529+
required:
18530+
- id
18531+
- type
18532+
type: object
18533+
CostTagMetadataMonthType:
18534+
default: cost_tag_metadata_month
18535+
description: Type of the Cloud Cost Management tag metadata month resource.
18536+
enum:
18537+
- cost_tag_metadata_month
18538+
example: cost_tag_metadata_month
18539+
type: string
18540+
x-enum-varnames:
18541+
- COST_TAG_METADATA_MONTH
18542+
CostTagMetadataMonthsResponse:
18543+
description: List of months that have Cloud Cost Management tag metadata for the requested provider, ordered most-recent first and capped at 36 months.
18544+
example:
18545+
data:
18546+
- id: "2026-04"
18547+
type: cost_tag_metadata_month
18548+
- id: "2026-03"
18549+
type: cost_tag_metadata_month
18550+
properties:
18551+
data:
18552+
description: List of months that have tag metadata available.
18553+
items:
18554+
$ref: "#/components/schemas/CostTagMetadataMonth"
18555+
type: array
18556+
required:
18557+
- data
18558+
type: object
1852018559
CostTagType:
1852118560
default: cost_tag
1852218561
description: Type of the Cloud Cost Management tag resource.
@@ -108781,6 +108820,64 @@ paths:
108781108820
x-unstable: |-
108782108821
**Note**: This endpoint is in preview and is subject to change.
108783108822
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108823+
/api/v2/cost/tag_metadata/months:
108824+
get:
108825+
description: |-
108826+
List months that have Cloud Cost Management tag metadata for a given provider,
108827+
ordered most-recent first. The response is capped at 36 months.
108828+
operationId: ListCostTagMetadataMonths
108829+
parameters:
108830+
- description: Provider to scope the query to. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. Values are case-sensitive.
108831+
example: aws
108832+
in: query
108833+
name: filter[provider]
108834+
required: true
108835+
schema:
108836+
type: string
108837+
responses:
108838+
"200":
108839+
content:
108840+
application/json:
108841+
examples:
108842+
default:
108843+
value:
108844+
data:
108845+
- id: "2026-04"
108846+
type: cost_tag_metadata_month
108847+
- id: "2026-03"
108848+
type: cost_tag_metadata_month
108849+
schema:
108850+
$ref: "#/components/schemas/CostTagMetadataMonthsResponse"
108851+
description: OK
108852+
"400":
108853+
content:
108854+
application/json:
108855+
schema:
108856+
$ref: "#/components/schemas/APIErrorResponse"
108857+
description: Bad Request
108858+
"403":
108859+
content:
108860+
application/json:
108861+
schema:
108862+
$ref: "#/components/schemas/APIErrorResponse"
108863+
description: Forbidden
108864+
"429":
108865+
$ref: "#/components/responses/TooManyRequestsResponse"
108866+
security:
108867+
- apiKeyAuth: []
108868+
appKeyAuth: []
108869+
- AuthZ:
108870+
- cloud_cost_management_read
108871+
summary: List Cloud Cost Management tag metadata months
108872+
tags:
108873+
- Cloud Cost Management
108874+
"x-permission":
108875+
operator: OR
108876+
permissions:
108877+
- cloud_cost_management_read
108878+
x-unstable: |-
108879+
**Note**: This endpoint is in preview and is subject to change.
108880+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
108784108881
/api/v2/cost/tag_metadata/orchestrators:
108785108882
get:
108786108883
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
@@ -2576,6 +2576,9 @@
25762576
"filter_month" => "String",
25772577
"filter_provider" => "String",
25782578
},
2579+
"v2.ListCostTagMetadataMonths" => {
2580+
"filter_provider" => "String",
2581+
},
25792582
"v2.ListCostTagMetadataOrchestrators" => {
25802583
"filter_month" => "String",
25812584
"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
@@ -368,6 +368,7 @@ def initialize
368368
"v2.list_cost_tag_key_sources": false,
369369
"v2.list_cost_tag_metadata": false,
370370
"v2.list_cost_tag_metadata_metrics": false,
371+
"v2.list_cost_tag_metadata_months": false,
371372
"v2.list_cost_tag_metadata_orchestrators": false,
372373
"v2.search_cost_recommendations": false,
373374
"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
@@ -2159,6 +2159,9 @@ def overrides
21592159
"v2.cost_tag_keys_response" => "CostTagKeysResponse",
21602160
"v2.cost_tag_key_type" => "CostTagKeyType",
21612161
"v2.cost_tag_metadata_daily_filter" => "CostTagMetadataDailyFilter",
2162+
"v2.cost_tag_metadata_month" => "CostTagMetadataMonth",
2163+
"v2.cost_tag_metadata_months_response" => "CostTagMetadataMonthsResponse",
2164+
"v2.cost_tag_metadata_month_type" => "CostTagMetadataMonthType",
21622165
"v2.cost_tags_response" => "CostTagsResponse",
21632166
"v2.cost_tag_type" => "CostTagType",
21642167
"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. Common cloud values are `aws`, `azure`, `gcp`, `Oracle` (OCI), and `custom`. SaaS billing integrations (for example, `Snowflake`, `MongoDB`, `Databricks`) are also accepted using their display-name string. 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)