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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 15:33:00.389365",
"spec_repo_commit": "a7602fa1"
"regenerated": "2024-10-31 16:03:59.333672",
"spec_repo_commit": "a11da7b5"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-10-31 15:33:00.408035",
"spec_repo_commit": "a7602fa1"
"regenerated": "2024-10-31 16:03:59.352181",
"spec_repo_commit": "a11da7b5"
}
}
}
132 changes: 132 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2186,6 +2186,74 @@ components:
- storage_account
- storage_container
type: object
BillingDimensionsMappingBody:
description: Billing dimensions mapping data.
items:
$ref: '#/components/schemas/BillingDimensionsMappingBodyItem'
type: array
BillingDimensionsMappingBodyItem:
description: The mapping data for each billing dimension.
properties:
attributes:
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributes'
id:
description: ID of the billing dimension.
type: string
type:
$ref: '#/components/schemas/ActiveBillingDimensionsType'
type: object
BillingDimensionsMappingBodyItemAttributes:
description: Mapping of billing dimensions to endpoint keys.
properties:
endpoints:
description: List of supported endpoints with their keys mapped to the billing_dimension.
items:
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItems'
type: array
in_app_label:
description: Label used for the billing dimension in the Plan & Usage charts.
example: APM Hosts
type: string
timestamp:
description: 'Month in ISO-8601 format, UTC, and precise to the second:
`[YYYY-MM-DDThh:mm:ss]`.'
format: date-time
type: string
type: object
BillingDimensionsMappingBodyItemAttributesEndpointsItems:
description: An endpoint's keys mapped to the billing_dimension.
properties:
id:
description: The URL for the endpoint.
example: api/v1/usage/billable-summary
type: string
keys:
description: The billing dimension.
example:
- apm_host_top99p
- apm_host_sum
items:
example: apm_host_top99p
type: string
type: array
status:
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus'
type: object
BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus:
description: Denotes whether mapping keys were available for this endpoint.
enum:
- OK
- NOT_FOUND
type: string
x-enum-varnames:
- OK
- NOT_FOUND
BillingDimensionsMappingResponse:
description: Billing dimensions mapping response.
properties:
data:
$ref: '#/components/schemas/BillingDimensionsMappingBody'
type: object
BulkMuteFindingsRequest:
description: The new bulk mute finding request.
properties:
Expand Down Expand Up @@ -41037,6 +41105,70 @@ paths:
operator: OR
permissions:
- usage_read
/api/v2/usage/billing_dimension_mapping:
get:
description: 'Get a mapping of billing dimensions to the corresponding keys
for the supported usage metering public API endpoints.

Mapping data is updated on a monthly cadence.


This endpoint is only accessible to [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
operationId: GetBillingDimensionMapping
parameters:
- description: Datetime in ISO-8601 format, UTC, and for mappings beginning
this month. Defaults to the current month.
in: query
name: filter[month]
required: false
schema:
format: date-time
type: string
- description: String to specify whether to retrieve active billing dimension
mappings for the contract or for all available mappings. Allowed views have
the string `active` or `all`. Defaults to `active`.
in: query
name: filter[view]
required: false
schema:
default: active
type: string
responses:
'200':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/BillingDimensionsMappingResponse'
description: OK
'400':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden - User is not authorized
'429':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Too many requests
security:
- apiKeyAuth: []
appKeyAuth: []
- AuthZ:
- usage_read
summary: Get billing dimension mapping for usage endpoints
tags:
- Usage Metering
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/usage/cost_by_org:
get:
deprecated: true
Expand Down
25 changes: 25 additions & 0 deletions examples/v2/usage-metering/GetBillingDimensionMapping.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Get billing dimension mapping for usage endpoints returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.UsageMeteringApi;
import com.datadog.api.client.v2.model.BillingDimensionsMappingResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getBillingDimensionMapping", true);
UsageMeteringApi apiInstance = new UsageMeteringApi(defaultClient);

try {
BillingDimensionsMappingResponse result = apiInstance.getBillingDimensionMapping();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsageMeteringApi#getBillingDimensionMapping");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ public class ApiClient {
put("v2.listAPIs", false);
put("v2.updateOpenAPI", false);
put("v2.getActiveBillingDimensions", false);
put("v2.getBillingDimensionMapping", false);
put("v2.getMonthlyCostAttribution", false);
put("v2.createDORADeployment", false);
put("v2.createDORAIncident", false);
Expand Down
Loading
Loading