Skip to content

Commit 4d4f6a6

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6890e667 of spec repo
1 parent 5f043c2 commit 4d4f6a6

16 files changed

+782
-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-28 10:23:25.177654",
8-
"spec_repo_commit": "2e09a3ec"
7+
"regenerated": "2024-10-28 17:46:44.695974",
8+
"spec_repo_commit": "6890e667"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2024-10-28 10:23:25.196971",
13-
"spec_repo_commit": "2e09a3ec"
12+
"regenerated": "2024-10-28 17:46:44.714224",
13+
"spec_repo_commit": "6890e667"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,6 +2165,73 @@ components:
21652165
- storage_account
21662166
- storage_container
21672167
type: object
2168+
BillingDimensionsMappingBody:
2169+
description: Billing dimensions mapping data.
2170+
items:
2171+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItem'
2172+
type: array
2173+
BillingDimensionsMappingBodyItem:
2174+
description: The mapping data for each billing dimension.
2175+
properties:
2176+
attributes:
2177+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributes'
2178+
id:
2179+
description: ID of the billing dimension.
2180+
type: string
2181+
type:
2182+
$ref: '#/components/schemas/ActiveBillingDimensionsType'
2183+
type: object
2184+
BillingDimensionsMappingBodyItemAttributes:
2185+
description: Mapping of billing dimensions to endpoint keys.
2186+
properties:
2187+
endpoints:
2188+
description: List of supported endpoints with their keys mapped to the billing_dimension.
2189+
items:
2190+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItems'
2191+
type: array
2192+
in_app_label:
2193+
description: Label used for the billing dimension in the Plan & Usage charts.
2194+
example: APM Hosts
2195+
type: string
2196+
timestamp:
2197+
description: 'Month in ISO-8601 format, UTC, precise to second: `[YYYY-MM-DDThh:mm:ss]`.'
2198+
format: date-time
2199+
type: string
2200+
type: object
2201+
BillingDimensionsMappingBodyItemAttributesEndpointsItems:
2202+
description: An endpoint's keys mapped to the billing_dimension.
2203+
properties:
2204+
id:
2205+
description: The URL for the endpoint.
2206+
example: api/v1/usage/billable-summary
2207+
type: string
2208+
keys:
2209+
description: The billing dimension.
2210+
example:
2211+
- apm_host_top99p
2212+
- apm_host_sum
2213+
items:
2214+
example: apm_host_top99p
2215+
type: string
2216+
type: array
2217+
status:
2218+
$ref: '#/components/schemas/BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus'
2219+
type: object
2220+
BillingDimensionsMappingBodyItemAttributesEndpointsItemsStatus:
2221+
description: Denotes whether or not mapping keys were available for this endpoint.
2222+
enum:
2223+
- OK
2224+
- NOT_FOUND
2225+
type: string
2226+
x-enum-varnames:
2227+
- OK
2228+
- NOT_FOUND
2229+
BillingDimensionsMappingResponse:
2230+
description: Billing dimensions mapping response.
2231+
properties:
2232+
data:
2233+
$ref: '#/components/schemas/BillingDimensionsMappingBody'
2234+
type: object
21682235
BulkMuteFindingsRequest:
21692236
description: The new bulk mute finding request.
21702237
properties:
@@ -40070,6 +40137,70 @@ paths:
4007040137
operator: OR
4007140138
permissions:
4007240139
- usage_read
40140+
/api/v2/usage/billing_dimension_mapping:
40141+
get:
40142+
description: 'Get a mapping of billing dimensions to the corresponding keys
40143+
for the supported usage metering public API endpoints.
40144+
40145+
Mapping data is updated on a monthly cadence.
40146+
40147+
40148+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).'
40149+
operationId: GetBillingDimensionMapping
40150+
parameters:
40151+
- description: Datetime in ISO-8601 format, UTC, for mappings beginning this
40152+
month. Defaults to the current month.
40153+
in: query
40154+
name: filter[month]
40155+
required: false
40156+
schema:
40157+
format: date-time
40158+
type: string
40159+
- description: String to specify whether to retrieve active billing dimension
40160+
mappings for the contract or all available mappings. Allowed views are `active`
40161+
and `all`. Defaults to `active`.
40162+
in: query
40163+
name: filter[view]
40164+
required: false
40165+
schema:
40166+
default: active
40167+
type: string
40168+
responses:
40169+
'200':
40170+
content:
40171+
application/json;datetime-format=rfc3339:
40172+
schema:
40173+
$ref: '#/components/schemas/BillingDimensionsMappingResponse'
40174+
description: OK
40175+
'400':
40176+
content:
40177+
application/json;datetime-format=rfc3339:
40178+
schema:
40179+
$ref: '#/components/schemas/APIErrorResponse'
40180+
description: Bad Request
40181+
'403':
40182+
content:
40183+
application/json;datetime-format=rfc3339:
40184+
schema:
40185+
$ref: '#/components/schemas/APIErrorResponse'
40186+
description: Forbidden - User is not authorized
40187+
'429':
40188+
content:
40189+
application/json;datetime-format=rfc3339:
40190+
schema:
40191+
$ref: '#/components/schemas/APIErrorResponse'
40192+
description: Too many requests
40193+
security:
40194+
- apiKeyAuth: []
40195+
appKeyAuth: []
40196+
- AuthZ:
40197+
- usage_read
40198+
summary: Get billing dimension mapping for usage endpoints
40199+
tags:
40200+
- Usage Metering
40201+
x-unstable: '**Note**: This endpoint is in Preview.
40202+
40203+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
4007340204
/api/v2/usage/cost_by_org:
4007440205
get:
4007540206
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
@@ -2408,6 +2408,12 @@
24082408
"type": "safe"
24092409
}
24102410
},
2411+
"GetBillingDimensionMapping": {
2412+
"tag": "Usage Metering",
2413+
"undo": {
2414+
"type": "safe"
2415+
}
2416+
},
24112417
"GetCostByOrg": {
24122418
"tag": "Usage Metering",
24132419
"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)