Skip to content

Commit 9e64ada

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fbb0fbd9 of spec repo
1 parent dcbfbb7 commit 9e64ada

16 files changed

+783
-4
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2024-10-31 14:51:29.321354",
8-
"spec_repo_commit": "e9cc5e6a"
7+
"regenerated": "2024-10-31 15:34:03.234360",
8+
"spec_repo_commit": "fbb0fbd9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-31 14:51:29.340011",
13-
"spec_repo_commit": "e9cc5e6a"
12+
"regenerated": "2024-10-31 15:34:03.252385",
13+
"spec_repo_commit": "fbb0fbd9"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,74 @@ components:
21862186
- storage_account
21872187
- storage_container
21882188
type: object
2189+
BillingDimensionsMappingBody:
2190+
description: Billing dimensions mapping data.
2191+
items:
2192+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItem'
2193+
type: array
2194+
BillingDimensionsMappingBodyItem:
2195+
description: The mapping data for each billing dimension.
2196+
properties:
2197+
attributes:
2198+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributes'
2199+
id:
2200+
description: ID of the billing dimension.
2201+
type: string
2202+
type:
2203+
$ref: '#/components/schemas/ActiveBillingDimensionsType'
2204+
type: object
2205+
BillingDimensionsMappingBodyItemAttributes:
2206+
description: Mapping of billing dimensions to endpoint keys.
2207+
properties:
2208+
endpoints:
2209+
description: List of supported endpoints with their keys mapped to the billing_dimension.
2210+
items:
2211+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItems'
2212+
type: array
2213+
in_app_label:
2214+
description: Label used for the billing dimension in the Plan & Usage charts.
2215+
example: APM Hosts
2216+
type: string
2217+
timestamp:
2218+
description: 'Month in ISO-8601 format, UTC, and precise to the second:
2219+
`[YYYY-MM-DDThh:mm:ss]`.'
2220+
format: date-time
2221+
type: string
2222+
type: object
2223+
BillingDimensionsMappingBodyItemAttributesEndpointsItems:
2224+
description: An endpoint's keys mapped to the billing_dimension.
2225+
properties:
2226+
id:
2227+
description: The URL for the endpoint.
2228+
example: api/v1/usage/billable-summary
2229+
type: string
2230+
keys:
2231+
description: The billing dimension.
2232+
example:
2233+
- apm_host_top99p
2234+
- apm_host_sum
2235+
items:
2236+
example: apm_host_top99p
2237+
type: string
2238+
type: array
2239+
status:
2240+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus'
2241+
type: object
2242+
BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus:
2243+
description: Denotes whether mapping keys were available for this endpoint.
2244+
enum:
2245+
- OK
2246+
- NOT_FOUND
2247+
type: string
2248+
x-enum-varnames:
2249+
- OK
2250+
- NOT_FOUND
2251+
BillingDimensionsMappingResponse:
2252+
description: Billing dimensions mapping response.
2253+
properties:
2254+
data:
2255+
$ref: '#/components/schemas/BillingDimensionsMappingBody'
2256+
type: object
21892257
BulkMuteFindingsRequest:
21902258
description: The new bulk mute finding request.
21912259
properties:
@@ -41028,6 +41096,70 @@ paths:
4102841096
operator: OR
4102941097
permissions:
4103041098
- usage_read
41099+
/api/v2/usage/billing_dimension_mapping:
41100+
get:
41101+
description: 'Get a mapping of billing dimensions to the corresponding keys
41102+
for the supported usage metering public API endpoints.
41103+
41104+
Mapping data is updated on a monthly cadence.
41105+
41106+
41107+
This endpoint is only accessible to [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
41108+
operationId: GetBillingDimensionMapping
41109+
parameters:
41110+
- description: Datetime in ISO-8601 format, UTC, and for mappings beginning
41111+
this month. Defaults to the current month.
41112+
in: query
41113+
name: filter[month]
41114+
required: false
41115+
schema:
41116+
format: date-time
41117+
type: string
41118+
- description: String to specify whether to retrieve active billing dimension
41119+
mappings for the contract or for all available mappings. Allowed views have
41120+
the string `active` or `all`. Defaults to `active`.
41121+
in: query
41122+
name: filter[view]
41123+
required: false
41124+
schema:
41125+
default: active
41126+
type: string
41127+
responses:
41128+
'200':
41129+
content:
41130+
application/json;datetime-format=rfc3339:
41131+
schema:
41132+
$ref: '#/components/schemas/BillingDimensionsMappingResponse'
41133+
description: OK
41134+
'400':
41135+
content:
41136+
application/json;datetime-format=rfc3339:
41137+
schema:
41138+
$ref: '#/components/schemas/APIErrorResponse'
41139+
description: Bad Request
41140+
'403':
41141+
content:
41142+
application/json;datetime-format=rfc3339:
41143+
schema:
41144+
$ref: '#/components/schemas/APIErrorResponse'
41145+
description: Forbidden - User is not authorized
41146+
'429':
41147+
content:
41148+
application/json;datetime-format=rfc3339:
41149+
schema:
41150+
$ref: '#/components/schemas/APIErrorResponse'
41151+
description: Too many requests
41152+
security:
41153+
- apiKeyAuth: []
41154+
appKeyAuth: []
41155+
- AuthZ:
41156+
- usage_read
41157+
summary: Get billing dimension mapping for usage endpoints
41158+
tags:
41159+
- Usage Metering
41160+
x-unstable: '**Note**: This endpoint is in Preview.
41161+
41162+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4103141163
/api/v2/usage/cost_by_org:
4103241164
get:
4103341165
deprecated: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2024-10-28T16:04:40.774Z

cassettes/features/v2/usage_metering/Get-billing-dimension-mapping-for-usage-endpoints-returns-Bad-Request-response.yml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Get billing dimension mapping for usage endpoints returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.get_billing_dimension_mapping".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
8+
p api_instance.get_billing_dimension_mapping()

features/scenarios_model_mapping.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1129,6 +1129,10 @@
11291129
"start_hr" => "Time",
11301130
"end_hr" => "Time",
11311131
},
1132+
"v2.GetBillingDimensionMapping" => {
1133+
"filter_month" => "Time",
1134+
"filter_view" => "String",
1135+
},
11321136
"v2.GetCostByOrg" => {
11331137
"start_month" => "Time",
11341138
"end_month" => "Time",

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2494,6 +2494,12 @@
24942494
"type": "safe"
24952495
}
24962496
},
2497+
"GetBillingDimensionMapping": {
2498+
"tag": "Usage Metering",
2499+
"undo": {
2500+
"type": "safe"
2501+
}
2502+
},
24972503
"GetCostByOrg": {
24982504
"tag": "Usage Metering",
24992505
"undo": {

features/v2/usage_metering.feature

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,20 @@ Feature: Usage Metering
4848
When the request is sent
4949
Then the response status is 200 OK
5050

51+
@team:DataDog/revenue-query
52+
Scenario: Get billing dimension mapping for usage endpoints returns "Bad Request" response
53+
Given operation "GetBillingDimensionMapping" enabled
54+
And new "GetBillingDimensionMapping" request
55+
When the request is sent
56+
Then the response status is 400 Bad Request
57+
58+
@skip @team:DataDog/revenue-query
59+
Scenario: Get billing dimension mapping for usage endpoints returns "OK" response
60+
Given operation "GetBillingDimensionMapping" enabled
61+
And new "GetBillingDimensionMapping" request
62+
When the request is sent
63+
Then the response status is 200 OK
64+
5165
@generated @skip @team:DataDog/revenue-query
5266
Scenario: Get cost across multi-org account returns "Bad Request" response
5367
Given new "GetCostByOrg" request

lib/datadog_api_client/configuration.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ def initialize
195195
"v2.list_apis": false,
196196
"v2.update_open_api": false,
197197
"v2.get_active_billing_dimensions": false,
198+
"v2.get_billing_dimension_mapping": false,
198199
"v2.get_monthly_cost_attribution": false,
199200
"v2.create_dora_deployment": false,
200201
"v2.create_dora_incident": false,

lib/datadog_api_client/inflector.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,11 @@ def overrides
10071007
"v2.azure_uc_config_post_request_type" => "AzureUCConfigPostRequestType",
10081008
"v2.azure_uc_configs_response" => "AzureUCConfigsResponse",
10091009
"v2.bill_config" => "BillConfig",
1010+
"v2.billing_dimensions_mapping_body_item" => "BillingDimensionsMappingBodyItem",
1011+
"v2.billing_dimensions_mapping_body_item_attributes" => "BillingDimensionsMappingBodyItemAttributes",
1012+
"v2.billing_dimensions_mapping_body_item_attributes_endpoints_items" => "BillingDimensionsMappingBodyItemAttributesEndpointsItems",
1013+
"v2.billing_dimensions_mapping_body_item_attributes_endpoints_items_status" => "BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus",
1014+
"v2.billing_dimensions_mapping_response" => "BillingDimensionsMappingResponse",
10101015
"v2.bulk_mute_findings_request" => "BulkMuteFindingsRequest",
10111016
"v2.bulk_mute_findings_request_attributes" => "BulkMuteFindingsRequestAttributes",
10121017
"v2.bulk_mute_findings_request_data" => "BulkMuteFindingsRequestData",

0 commit comments

Comments
 (0)