Skip to content

Commit ba9861a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit cd218893 of spec repo
1 parent fe66ded commit ba9861a

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-30 18:58:10.241853",
8-
"spec_repo_commit": "755120dd"
7+
"regenerated": "2024-10-31 12:23:25.902014",
8+
"spec_repo_commit": "cd218893"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-30 18:58:10.260831",
13-
"spec_repo_commit": "755120dd"
12+
"regenerated": "2024-10-31 12:23:25.921106",
13+
"spec_repo_commit": "cd218893"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2179,6 +2179,74 @@ components:
21792179
- storage_account
21802180
- storage_container
21812181
type: object
2182+
BillingDimensionsMappingBody:
2183+
description: Billing dimensions mapping data.
2184+
items:
2185+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItem'
2186+
type: array
2187+
BillingDimensionsMappingBodyItem:
2188+
description: The mapping data for each billing dimension.
2189+
properties:
2190+
attributes:
2191+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributes'
2192+
id:
2193+
description: ID of the billing dimension.
2194+
type: string
2195+
type:
2196+
$ref: '#/components/schemas/ActiveBillingDimensionsType'
2197+
type: object
2198+
BillingDimensionsMappingBodyItemAttributes:
2199+
description: Mapping of billing dimensions to endpoint keys.
2200+
properties:
2201+
endpoints:
2202+
description: List of supported endpoints with their keys mapped to the billing_dimension.
2203+
items:
2204+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItems'
2205+
type: array
2206+
in_app_label:
2207+
description: Label used for the billing dimension in the Plan & Usage charts.
2208+
example: APM Hosts
2209+
type: string
2210+
timestamp:
2211+
description: 'Month in ISO-8601 format, UTC, and precise to the second:
2212+
`[YYYY-MM-DDThh:mm:ss]`.'
2213+
format: date-time
2214+
type: string
2215+
type: object
2216+
BillingDimensionsMappingBodyItemAttributesEndpointsItems:
2217+
description: An endpoint's keys mapped to the billing_dimension.
2218+
properties:
2219+
id:
2220+
description: The URL for the endpoint.
2221+
example: api/v1/usage/billable-summary
2222+
type: string
2223+
keys:
2224+
description: The billing dimension.
2225+
example:
2226+
- apm_host_top99p
2227+
- apm_host_sum
2228+
items:
2229+
example: apm_host_top99p
2230+
type: string
2231+
type: array
2232+
status:
2233+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus'
2234+
type: object
2235+
BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus:
2236+
description: Denotes whether mapping keys were available for this endpoint.
2237+
enum:
2238+
- OK
2239+
- NOT_FOUND
2240+
type: string
2241+
x-enum-varnames:
2242+
- OK
2243+
- NOT_FOUND
2244+
BillingDimensionsMappingResponse:
2245+
description: Billing dimensions mapping response.
2246+
properties:
2247+
data:
2248+
$ref: '#/components/schemas/BillingDimensionsMappingBody'
2249+
type: object
21822250
BulkMuteFindingsRequest:
21832251
description: The new bulk mute finding request.
21842252
properties:
@@ -40615,6 +40683,70 @@ paths:
4061540683
operator: OR
4061640684
permissions:
4061740685
- usage_read
40686+
/api/v2/usage/billing_dimension_mapping:
40687+
get:
40688+
description: 'Get a mapping of billing dimensions to the corresponding keys
40689+
for the supported usage metering public API endpoints.
40690+
40691+
Mapping data is updated on a monthly cadence.
40692+
40693+
40694+
This endpoint is only accessible to [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
40695+
operationId: GetBillingDimensionMapping
40696+
parameters:
40697+
- description: Datetime in ISO-8601 format, UTC, and for mappings beginning
40698+
this month. Defaults to the current month.
40699+
in: query
40700+
name: filter[month]
40701+
required: false
40702+
schema:
40703+
format: date-time
40704+
type: string
40705+
- description: String to specify whether to retrieve active billing dimension
40706+
mappings for the contract or for all available mappings. Allowed views have
40707+
the string `active` or `all`. Defaults to `active`.
40708+
in: query
40709+
name: filter[view]
40710+
required: false
40711+
schema:
40712+
default: active
40713+
type: string
40714+
responses:
40715+
'200':
40716+
content:
40717+
application/json;datetime-format=rfc3339:
40718+
schema:
40719+
$ref: '#/components/schemas/BillingDimensionsMappingResponse'
40720+
description: OK
40721+
'400':
40722+
content:
40723+
application/json;datetime-format=rfc3339:
40724+
schema:
40725+
$ref: '#/components/schemas/APIErrorResponse'
40726+
description: Bad Request
40727+
'403':
40728+
content:
40729+
application/json;datetime-format=rfc3339:
40730+
schema:
40731+
$ref: '#/components/schemas/APIErrorResponse'
40732+
description: Forbidden - User is not authorized
40733+
'429':
40734+
content:
40735+
application/json;datetime-format=rfc3339:
40736+
schema:
40737+
$ref: '#/components/schemas/APIErrorResponse'
40738+
description: Too many requests
40739+
security:
40740+
- apiKeyAuth: []
40741+
appKeyAuth: []
40742+
- AuthZ:
40743+
- usage_read
40744+
summary: Get billing dimension mapping for usage endpoints
40745+
tags:
40746+
- Usage Metering
40747+
x-unstable: '**Note**: This endpoint is in Preview.
40748+
40749+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4061840750
/api/v2/usage/cost_by_org:
4061940751
get:
4062040752
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
@@ -2457,6 +2457,12 @@
24572457
"type": "safe"
24582458
}
24592459
},
2460+
"GetBillingDimensionMapping": {
2461+
"tag": "Usage Metering",
2462+
"undo": {
2463+
"type": "safe"
2464+
}
2465+
},
24602466
"GetCostByOrg": {
24612467
"tag": "Usage Metering",
24622468
"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
@@ -1006,6 +1006,11 @@ def overrides
10061006
"v2.azure_uc_config_post_request_type" => "AzureUCConfigPostRequestType",
10071007
"v2.azure_uc_configs_response" => "AzureUCConfigsResponse",
10081008
"v2.bill_config" => "BillConfig",
1009+
"v2.billing_dimensions_mapping_body_item" => "BillingDimensionsMappingBodyItem",
1010+
"v2.billing_dimensions_mapping_body_item_attributes" => "BillingDimensionsMappingBodyItemAttributes",
1011+
"v2.billing_dimensions_mapping_body_item_attributes_endpoints_items" => "BillingDimensionsMappingBodyItemAttributesEndpointsItems",
1012+
"v2.billing_dimensions_mapping_body_item_attributes_endpoints_items_status" => "BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus",
1013+
"v2.billing_dimensions_mapping_response" => "BillingDimensionsMappingResponse",
10091014
"v2.bulk_mute_findings_request" => "BulkMuteFindingsRequest",
10101015
"v2.bulk_mute_findings_request_attributes" => "BulkMuteFindingsRequestAttributes",
10111016
"v2.bulk_mute_findings_request_data" => "BulkMuteFindingsRequestData",

0 commit comments

Comments
 (0)