Skip to content
Merged
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
143 changes: 143 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: cost_tag_description
description: Type of the Cloud Cost Management tag description resource.
enum:
- cost_tag_description
example: cost_tag_description
type: string
x-enum-varnames:
- COST_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: cost_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 @@ -96749,6 +96841,57 @@ 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: cost_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
/api/v2/cost_by_tag/active_billing_dimensions:
get:
description: |-
Expand Down
24 changes: 24 additions & 0 deletions examples/v2/cloud-cost-management/ListCostTagDescriptions.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// List Cloud Cost Management tag descriptions returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CloudCostManagementApi;
import com.datadog.api.client.v2.model.CostTagDescriptionsResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
CloudCostManagementApi apiInstance = new CloudCostManagementApi(defaultClient);

try {
CostTagDescriptionsResponse result = apiInstance.listCostTagDescriptions();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CloudCostManagementApi#listCostTagDescriptions");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.datadog.api.client.v2.model.BudgetValidationRequest;
import com.datadog.api.client.v2.model.BudgetValidationResponse;
import com.datadog.api.client.v2.model.BudgetWithEntries;
import com.datadog.api.client.v2.model.CostTagDescriptionsResponse;
import com.datadog.api.client.v2.model.CreateRulesetRequest;
import com.datadog.api.client.v2.model.CustomCostsFileGetResponse;
import com.datadog.api.client.v2.model.CustomCostsFileLineItem;
Expand Down Expand Up @@ -3211,6 +3212,180 @@ public CompletableFuture<ApiResponse<OCIConfigsResponse>> listCostOCIConfigsWith
new GenericType<OCIConfigsResponse>() {});
}

/** Manage optional parameters to listCostTagDescriptions. */
public static class ListCostTagDescriptionsOptionalParameters {
private String filterCloud;

/**
* Set filterCloud.
*
* @param filterCloud Filter descriptions to a specific cloud provider (for example, <code>aws
* </code>). Omit to return descriptions across all clouds. (optional)
* @return ListCostTagDescriptionsOptionalParameters
*/
public ListCostTagDescriptionsOptionalParameters filterCloud(String filterCloud) {
this.filterCloud = filterCloud;
return this;
}
}

/**
* List Cloud Cost Management tag descriptions.
*
* <p>See {@link #listCostTagDescriptionsWithHttpInfo}.
*
* @return CostTagDescriptionsResponse
* @throws ApiException if fails to make API call
*/
public CostTagDescriptionsResponse listCostTagDescriptions() throws ApiException {
return listCostTagDescriptionsWithHttpInfo(new ListCostTagDescriptionsOptionalParameters())
.getData();
}

/**
* List Cloud Cost Management tag descriptions.
*
* <p>See {@link #listCostTagDescriptionsWithHttpInfoAsync}.
*
* @return CompletableFuture&lt;CostTagDescriptionsResponse&gt;
*/
public CompletableFuture<CostTagDescriptionsResponse> listCostTagDescriptionsAsync() {
return listCostTagDescriptionsWithHttpInfoAsync(new ListCostTagDescriptionsOptionalParameters())
.thenApply(
response -> {
return response.getData();
});
}

/**
* List Cloud Cost Management tag descriptions.
*
* <p>See {@link #listCostTagDescriptionsWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
* @return CostTagDescriptionsResponse
* @throws ApiException if fails to make API call
*/
public CostTagDescriptionsResponse listCostTagDescriptions(
ListCostTagDescriptionsOptionalParameters parameters) throws ApiException {
return listCostTagDescriptionsWithHttpInfo(parameters).getData();
}

/**
* List Cloud Cost Management tag descriptions.
*
* <p>See {@link #listCostTagDescriptionsWithHttpInfoAsync}.
*
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;CostTagDescriptionsResponse&gt;
*/
public CompletableFuture<CostTagDescriptionsResponse> listCostTagDescriptionsAsync(
ListCostTagDescriptionsOptionalParameters parameters) {
return listCostTagDescriptionsWithHttpInfoAsync(parameters)
.thenApply(
response -> {
return response.getData();
});
}

/**
* List Cloud Cost Management tag key descriptions for the organization. Use <code>filter[cloud]
* </code> to scope the result to a single cloud provider; when omitted, both cross-cloud defaults
* and cloud-specific descriptions are returned.
*
* @param parameters Optional parameters for the request.
* @return ApiResponse&lt;CostTagDescriptionsResponse&gt;
* @throws ApiException if fails to make API call
* @http.response.details
* <table border="1">
* <caption>Response details</caption>
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
* </table>
*/
public ApiResponse<CostTagDescriptionsResponse> listCostTagDescriptionsWithHttpInfo(
ListCostTagDescriptionsOptionalParameters parameters) throws ApiException {
Object localVarPostBody = null;
String filterCloud = parameters.filterCloud;
// create path and map variables
String localVarPath = "/api/v2/cost/tag_descriptions";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[cloud]", filterCloud));

Invocation.Builder builder =
apiClient.createBuilder(
"v2.CloudCostManagementApi.listCostTagDescriptions",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
return apiClient.invokeAPI(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<CostTagDescriptionsResponse>() {});
}

/**
* List Cloud Cost Management tag descriptions.
*
* <p>See {@link #listCostTagDescriptionsWithHttpInfo}.
*
* @param parameters Optional parameters for the request.
* @return CompletableFuture&lt;ApiResponse&lt;CostTagDescriptionsResponse&gt;&gt;
*/
public CompletableFuture<ApiResponse<CostTagDescriptionsResponse>>
listCostTagDescriptionsWithHttpInfoAsync(
ListCostTagDescriptionsOptionalParameters parameters) {
Object localVarPostBody = null;
String filterCloud = parameters.filterCloud;
// create path and map variables
String localVarPath = "/api/v2/cost/tag_descriptions";

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();

localVarQueryParams.addAll(apiClient.parameterToPairs("", "filter[cloud]", filterCloud));

Invocation.Builder builder;
try {
builder =
apiClient.createBuilder(
"v2.CloudCostManagementApi.listCostTagDescriptions",
localVarPath,
localVarQueryParams,
localVarHeaderParams,
new HashMap<String, String>(),
new String[] {"application/json"},
new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"});
} catch (ApiException ex) {
CompletableFuture<ApiResponse<CostTagDescriptionsResponse>> result =
new CompletableFuture<>();
result.completeExceptionally(ex);
return result;
}
return apiClient.invokeAPIAsync(
"GET",
builder,
localVarHeaderParams,
new String[] {},
localVarPostBody,
new HashMap<String, Object>(),
false,
new GenericType<CostTagDescriptionsResponse>() {});
}

/**
* List custom allocation rules.
*
Expand Down
Loading
Loading