Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
146 changes: 146 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15600,6 +15600,98 @@ components:
type: string
x-enum-varnames:
- COST_BY_ORG
CostTagDescription:
description: A Cloud Cost Management tag key description, either cross-cloud or scoped to a single cloud provider.
properties:
attributes:
$ref: "#/components/schemas/CostTagDescriptionAttributes"
id:
description: Stable identifier of the tag description. Equals the tag key when the description is the cross-cloud default; encodes both the cloud and the tag key when the description is cloud-specific.
example: account_id
type: string
type:
$ref: "#/components/schemas/CostTagDescriptionType"
required:
- attributes
- id
- type
type: object
CostTagDescriptionAttributes:
description: Human-readable description and metadata attached to a Cloud Cost Management tag key, optionally scoped to a single cloud provider.
properties:
cloud:
description: Cloud provider this description applies to (for example, `aws`). Empty when the description is the cross-cloud default for the tag key.
example: aws
type: string
created_at:
description: Timestamp when the description was created, in RFC 3339 format.
example: "2026-01-01T12:00:00Z"
type: string
description:
description: The human-readable description for the tag key.
example: AWS account that owns this cost.
type: string
source:
$ref: "#/components/schemas/CostTagDescriptionSource"
tag_key:
description: The tag key this description applies to.
example: account_id
type: string
updated_at:
description: Timestamp when the description was last updated, in RFC 3339 format.
example: "2026-01-01T12:00:00Z"
type: string
required:
- cloud
- created_at
- description
- source
- tag_key
- updated_at
type: object
CostTagDescriptionSource:
description: Origin of the description. `human` indicates the description was written by a user, `ai_generated` was produced by AI, and `datadog` is a default supplied by Datadog.
enum:
- human
- ai_generated
- datadog
example: human
type: string
x-enum-varnames:
- HUMAN
- AI_GENERATED
- DATADOG
CostTagDescriptionType:
default: tag_description
description: Type of the Cloud Cost Management tag description resource.
enum:
- tag_description
example: tag_description
type: string
x-enum-varnames:
- TAG_DESCRIPTION
CostTagDescriptionsResponse:
description: List of Cloud Cost Management tag key descriptions for the organization, optionally filtered to a single cloud provider.
example:
data:
- attributes:
cloud: aws
created_at: "2026-01-01T12:00:00Z"
description: AWS account that owns this cost.
source: human
tag_key: account_id
updated_at: "2026-01-01T12:00:00Z"
id: account_id
type: tag_description
properties:
data:
description: List of tag key descriptions.
items:
$ref: "#/components/schemas/CostTagDescription"
type: array
required:
- data
type: object
CoverageSummaryAttributes:
description: Attributes object for code coverage summary response.
properties:
Expand Down Expand Up @@ -96737,6 +96829,60 @@ paths:
operator: OR
permissions:
- cloud_cost_management_read
/api/v2/cost/tag_descriptions:
get:
description: List Cloud Cost Management tag key descriptions for the organization. Use `filter[cloud]` to scope the result to a single cloud provider; when omitted, both cross-cloud defaults and cloud-specific descriptions are returned.
operationId: ListCostTagDescriptions
parameters:
- description: Filter descriptions to a specific cloud provider (for example, `aws`). Omit to return descriptions across all clouds.
in: query
name: filter[cloud]
required: false
schema:
type: string
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
- attributes:
cloud: aws
created_at: "2026-01-01T12:00:00Z"
description: AWS account that owns this cost.
source: human
tag_key: account_id
updated_at: "2026-01-01T12:00:00Z"
id: account_id
type: tag_description
schema:
$ref: "#/components/schemas/CostTagDescriptionsResponse"
description: OK
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- cloud_cost_management_read
summary: List Cloud Cost Management tag descriptions
tags:
- Cloud Cost Management
"x-permission":
operator: OR
permissions:
- cloud_cost_management_read
x-unstable: |-
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
/api/v2/cost_by_tag/active_billing_dimensions:
get:
description: |-
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# List Cloud Cost Management tag descriptions returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.list_cost_tag_descriptions".to_sym] = true
end
api_instance = DatadogAPIClient::V2::CloudCostManagementAPI.new
p api_instance.list_cost_tag_descriptions()
3 changes: 3 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2182,6 +2182,9 @@
"cloud_account_id" => "Integer",
"body" => "GCPUsageCostConfigPatchRequest",
},
"v2.ListCostTagDescriptions" => {
"filter_cloud" => "String",
},
"v2.CreateTagPipelinesRuleset" => {
"body" => "CreateRulesetRequest",
},
Expand Down
7 changes: 7 additions & 0 deletions features/v2/cloud_cost_management.feature
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,13 @@ Feature: Cloud Cost Management
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/cloud-cost-management
Scenario: List Cloud Cost Management tag descriptions returns "OK" response
Given operation "ListCostTagDescriptions" enabled
And new "ListCostTagDescriptions" request
When the request is sent
Then the response status is 200 OK

@replay-only @team:DataDog/cloud-cost-management
Scenario: List Custom Costs Files returns "OK" response
Given new "ListCustomCostsFiles" request
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1470,6 +1470,12 @@
"type": "safe"
}
},
"ListCostTagDescriptions": {
"tag": "Cloud Cost Management",
"undo": {
"type": "safe"
}
},
"GetActiveBillingDimensions": {
"tag": "Usage Metering",
"undo": {
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ def initialize
"v2.search_security_monitoring_histsignals": false,
"v2.get_code_coverage_branch_summary": false,
"v2.get_code_coverage_commit_summary": false,
"v2.list_cost_tag_descriptions": false,
"v2.create_dashboard_secure_embed": false,
"v2.delete_dashboard_secure_embed": false,
"v2.get_dashboard_secure_embed": false,
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,11 @@ def overrides
"v2.cost_by_org_attributes" => "CostByOrgAttributes",
"v2.cost_by_org_response" => "CostByOrgResponse",
"v2.cost_by_org_type" => "CostByOrgType",
"v2.cost_tag_description" => "CostTagDescription",
"v2.cost_tag_description_attributes" => "CostTagDescriptionAttributes",
"v2.cost_tag_description_source" => "CostTagDescriptionSource",
"v2.cost_tag_descriptions_response" => "CostTagDescriptionsResponse",
"v2.cost_tag_description_type" => "CostTagDescriptionType",
"v2.coverage_summary_attributes" => "CoverageSummaryAttributes",
"v2.coverage_summary_codeowner_stats" => "CoverageSummaryCodeownerStats",
"v2.coverage_summary_data" => "CoverageSummaryData",
Expand Down
68 changes: 68 additions & 0 deletions lib/datadog_api_client/v2/api/cloud_cost_management_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1580,6 +1580,74 @@ def list_cost_oci_configs_with_http_info(opts = {})
return data, status_code, headers
end

# List Cloud Cost Management tag descriptions.
#
# @see #list_cost_tag_descriptions_with_http_info
def list_cost_tag_descriptions(opts = {})
data, _status_code, _headers = list_cost_tag_descriptions_with_http_info(opts)
data
end

# List Cloud Cost Management tag descriptions.
#
# List Cloud Cost Management tag key descriptions for the organization. Use `filter[cloud]` to scope the result to a single cloud provider; when omitted, both cross-cloud defaults and cloud-specific descriptions are returned.
#
# @param opts [Hash] the optional parameters
# @option opts [String] :filter_cloud Filter descriptions to a specific cloud provider (for example, `aws`). Omit to return descriptions across all clouds.
# @return [Array<(CostTagDescriptionsResponse, Integer, Hash)>] CostTagDescriptionsResponse data, response status code and response headers
def list_cost_tag_descriptions_with_http_info(opts = {})
unstable_enabled = @api_client.config.unstable_operations["v2.list_cost_tag_descriptions".to_sym]
if unstable_enabled
@api_client.config.logger.warn format("Using unstable operation '%s'", "v2.list_cost_tag_descriptions")
else
raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v2.list_cost_tag_descriptions"))
end

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: CloudCostManagementAPI.list_cost_tag_descriptions ...'
end
# resource path
local_var_path = '/api/v2/cost/tag_descriptions'

# query parameters
query_params = opts[:query_params] || {}
query_params[:'filter[cloud]'] = opts[:'filter_cloud'] if !opts[:'filter_cloud'].nil?

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'CostTagDescriptionsResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth, :AuthZ]

new_options = opts.merge(
:operation => :list_cost_tag_descriptions,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type,
:api_version => "V2"
)

data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: CloudCostManagementAPI#list_cost_tag_descriptions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List custom allocation rules.
#
# @see #list_custom_allocation_rules_with_http_info
Expand Down
Loading
Loading