Skip to content

Commit b412de1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b5e5ace of spec repo (#3582)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 4aad888 commit b412de1

18 files changed

+426
-37
lines changed

.generator/schemas/v1/openapi.yaml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4608,10 +4608,11 @@ components:
46084608
type: array
46094609
type: object
46104610
HourlyUsageAttributionUsageType:
4611-
description: 'Supported products for hourly usage attribution requests.
4611+
description: 'Supported products for hourly usage attribution requests. Usage
4612+
types are in the format `<usage_type>_usage`.
46124613

4613-
The following values have been **deprecated**: `estimated_indexed_spans_usage`,
4614-
`estimated_ingested_spans_usage`.'
4614+
To obtain the complete list of valid usage types, make a request to the [Get
4615+
usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
46154616
enum:
46164617
- api_usage
46174618
- apm_fargate_usage
@@ -9161,7 +9162,11 @@ components:
91619162
type: array
91629163
type: object
91639164
MonthlyUsageAttributionSupportedMetrics:
9164-
description: Supported metrics for monthly usage attribution requests.
9165+
description: 'Supported metrics for monthly usage attribution requests. Usage
9166+
types are in the format `<usage_type>_usage`.
9167+
9168+
To obtain the complete list of valid usage types, make a request to the [Get
9169+
usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
91659170
enum:
91669171
- api_usage
91679172
- api_percentage
@@ -9492,10 +9497,7 @@ components:
94929497
- SCA_FARGATE_PERCENTAGE
94939498
- ALL
94949499
MonthlyUsageAttributionValues:
9495-
description: 'Fields in Usage Summary by tag(s).
9496-
9497-
The following values have been **deprecated**: `estimated_indexed_spans_usage`,
9498-
`estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.'
9500+
description: Fields in Usage Summary by tag(s).
94999501
properties:
95009502
api_percentage:
95019503
description: The percentage of synthetic API test usage by tag(s).
@@ -37493,10 +37495,7 @@ paths:
3749337495
code example:\n\n```\nresponse := GetHourlyUsageAttribution(start_month)\ncursor
3749437496
:= response.metadata.pagination.next_record_id\nWHILE cursor != null BEGIN\n
3749537497
\ sleep(5 seconds) # Avoid running into rate limit\n response := GetHourlyUsageAttribution(start_month,
37496-
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```\nThe
37497-
following values have been **deprecated**:\n `estimated_indexed_spans_usage`,
37498-
`estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`,
37499-
`llm_observability_usage`, `llm_observability_percentage`."
37498+
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```"
3750037499
operationId: GetHourlyUsageAttribution
3750137500
parameters:
3750237501
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
@@ -37517,9 +37516,14 @@ paths:
3751737516
schema:
3751837517
format: date-time
3751937518
type: string
37520-
- description: 'Usage type to retrieve. The following values have been **deprecated**:
37519+
- description: 'Usage type to retrieve. Usage types are in the format `<usage_type>_usage`.
37520+
37521+
Example: `infra_host_usage`
3752137522

37522-
`estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.'
37523+
To obtain the complete list of active usage types that can be used to replace
37524+
37525+
`<usage_type>` in the field names, make a request to the [Get usage attribution
37526+
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
3752337527
in: query
3752437528
name: usage_type
3752537529
required: true
@@ -38072,10 +38076,15 @@ paths:
3807238076
- description: 'Comma-separated list of usage types to return, or `*` for all
3807338077
usage types.
3807438078

38075-
The following values have been **deprecated**:
38079+
Usage types are in the format `<usage_type>_usage` and `<usage_type>_percentage`.
38080+
38081+
Example: `infra_host_usage,infra_host_percentage`
3807638082

38077-
`estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`,
38078-
`estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.'
38083+
To obtain the complete list of usage attribution types that can be used
38084+
to replace
38085+
38086+
`<usage_type>` in the field names, make a request to the [Get usage attribution
38087+
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
3807938088
in: query
3808038089
name: fields
3808138090
required: true
@@ -38087,12 +38096,15 @@ paths:
3808738096
required: false
3808838097
schema:
3808938098
$ref: '#/components/schemas/UsageSortDirection'
38090-
- description: 'The field to sort by.
38099+
- description: 'The field to sort by. Sort fields are in the format `<usage_type>_usage`.
38100+
38101+
Example: `infra_host_usage`
3809138102

38092-
The following values have been **deprecated**:
38103+
To obtain the complete list of usage attribution types that can be used
38104+
to replace
3809338105

38094-
`estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`,
38095-
`estimated_ingested_spans_percentage`.'
38106+
`<usage_type>` in the field names, make a request to the [Get usage attribution
38107+
types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).'
3809638108
in: query
3809738109
name: sort_name
3809838110
required: false

.generator/schemas/v2/openapi.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70690,6 +70690,42 @@ components:
7069070690
usage_type:
7069170691
$ref: '#/components/schemas/HourlyUsageType'
7069270692
type: object
70693+
UsageAttributionTypesAttributes:
70694+
description: List of usage attribution types.
70695+
properties:
70696+
values:
70697+
description: List of usage attribution types.
70698+
items:
70699+
description: A given usage type in a list.
70700+
example: infra_host
70701+
type: string
70702+
type: array
70703+
type: object
70704+
UsageAttributionTypesBody:
70705+
description: Usage attribution types data.
70706+
properties:
70707+
attributes:
70708+
$ref: '#/components/schemas/UsageAttributionTypesAttributes'
70709+
id:
70710+
description: Unique ID of the response.
70711+
type: string
70712+
type:
70713+
$ref: '#/components/schemas/UsageAttributionTypesType'
70714+
type: object
70715+
UsageAttributionTypesResponse:
70716+
description: Usage attribution types response.
70717+
properties:
70718+
data:
70719+
$ref: '#/components/schemas/UsageAttributionTypesBody'
70720+
type: object
70721+
UsageAttributionTypesType:
70722+
default: usage_attribution_types
70723+
description: Type of usage attribution types data.
70724+
enum:
70725+
- usage_attribution_types
70726+
type: string
70727+
x-enum-varnames:
70728+
- USAGE_ATTRIBUTION_TYPES
7069370729
UsageDataObject:
7069470730
description: Usage data.
7069570731
properties:
@@ -109764,6 +109800,41 @@ paths:
109764109800
permissions:
109765109801
- usage_read
109766109802
- billing_read
109803+
/api/v2/usage/usage-attribution-types:
109804+
get:
109805+
description: Get usage attribution types.
109806+
operationId: GetUsageAttributionTypes
109807+
responses:
109808+
'200':
109809+
content:
109810+
application/json;datetime-format=rfc3339:
109811+
schema:
109812+
$ref: '#/components/schemas/UsageAttributionTypesResponse'
109813+
description: OK
109814+
'403':
109815+
content:
109816+
application/json;datetime-format=rfc3339:
109817+
schema:
109818+
$ref: '#/components/schemas/APIErrorResponse'
109819+
description: Forbidden - User is not authorized
109820+
'429':
109821+
content:
109822+
application/json;datetime-format=rfc3339:
109823+
schema:
109824+
$ref: '#/components/schemas/APIErrorResponse'
109825+
description: Too many requests
109826+
security:
109827+
- apiKeyAuth: []
109828+
appKeyAuth: []
109829+
- AuthZ:
109830+
- usage_read
109831+
summary: Get usage attribution types
109832+
tags:
109833+
- Usage Metering
109834+
x-permission:
109835+
operator: OR
109836+
permissions:
109837+
- usage_read
109767109838
/api/v2/user_invitations:
109768109839
post:
109769109840
description: Sends emails to one or more users inviting them to join the organization.

features/v2/undo.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6104,6 +6104,12 @@
61046104
"type": "safe"
61056105
}
61066106
},
6107+
"GetUsageAttributionTypes": {
6108+
"tag": "Usage Metering",
6109+
"undo": {
6110+
"type": "safe"
6111+
}
6112+
},
61076113
"SendInvitations": {
61086114
"tag": "Users",
61096115
"undo": {

features/v2/usage_metering.feature

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ Feature: Usage Metering
197197
When the request is sent
198198
Then the response status is 200 OK
199199

200+
@generated @skip @team:DataDog/revenue-query
201+
Scenario: Get usage attribution types returns "OK" response
202+
Given new "GetUsageAttributionTypes" request
203+
When the request is sent
204+
Then the response status is 200 OK
205+
200206
@team:DataDog/revenue-query
201207
Scenario: GetEstimatedCostByOrg with both start_month and start_date returns "Bad Request" response
202208
Given new "GetEstimatedCostByOrg" request

private/bdd_runner/src/support/scenarios_model_mapping.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5625,6 +5625,9 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
56255625
},
56265626
operationResponseType: "ProjectedCostResponse",
56275627
},
5628+
"UsageMeteringApi.V2.GetUsageAttributionTypes": {
5629+
operationResponseType: "UsageAttributionTypesResponse",
5630+
},
56285631
"CSMAgentsApi.V2.ListAllCSMAgents": {
56295632
page: {
56305633
type: "number",

services/usage_metering/src/v1/UsageMeteringApi.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4744,8 +4744,10 @@ export interface UsageMeteringApiGetHourlyUsageAttributionRequest {
47444744
*/
47454745
startHr: Date;
47464746
/**
4747-
* Usage type to retrieve. The following values have been **deprecated**:
4748-
* `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
4747+
* Usage type to retrieve. Usage types are in the format `<usage_type>_usage`.
4748+
* Example: `infra_host_usage`
4749+
* To obtain the complete list of active usage types that can be used to replace
4750+
* `<usage_type>` in the field names, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
47494751
* @type HourlyUsageAttributionUsageType
47504752
*/
47514753
usageType: HourlyUsageAttributionUsageType;
@@ -4834,8 +4836,10 @@ export interface UsageMeteringApiGetMonthlyUsageAttributionRequest {
48344836
startMonth: Date;
48354837
/**
48364838
* Comma-separated list of usage types to return, or `*` for all usage types.
4837-
* The following values have been **deprecated**:
4838-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
4839+
* Usage types are in the format `<usage_type>_usage` and `<usage_type>_percentage`.
4840+
* Example: `infra_host_usage,infra_host_percentage`
4841+
* To obtain the complete list of usage attribution types that can be used to replace
4842+
* `<usage_type>` in the field names, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
48394843
* @type MonthlyUsageAttributionSupportedMetrics
48404844
*/
48414845
fields: MonthlyUsageAttributionSupportedMetrics;
@@ -4850,9 +4854,10 @@ export interface UsageMeteringApiGetMonthlyUsageAttributionRequest {
48504854
*/
48514855
sortDirection?: UsageSortDirection;
48524856
/**
4853-
* The field to sort by.
4854-
* The following values have been **deprecated**:
4855-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
4857+
* The field to sort by. Sort fields are in the format `<usage_type>_usage`.
4858+
* Example: `infra_host_usage`
4859+
* To obtain the complete list of usage attribution types that can be used to replace
4860+
* `<usage_type>` in the field names, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
48564861
* @type MonthlyUsageAttributionSupportedMetrics
48574862
*/
48584863
sortName?: MonthlyUsageAttributionSupportedMetrics;
@@ -5378,8 +5383,6 @@ export class UsageMeteringApi {
53785383
* cursor := response.metadata.pagination.next_record_id
53795384
* END
53805385
* ```
5381-
* The following values have been **deprecated**:
5382-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
53835386
* @param param The request object
53845387
*/
53855388
public getHourlyUsageAttribution(

services/usage_metering/src/v1/models/HourlyUsageAttributionBody.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ export class HourlyUsageAttributionBody {
4343
*/
4444
"updatedAt"?: string;
4545
/**
46-
* Supported products for hourly usage attribution requests.
47-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
46+
* Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
47+
* To obtain the complete list of valid usage types, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
4848
*/
4949
"usageType"?: HourlyUsageAttributionUsageType;
5050
/**

services/usage_metering/src/v1/models/HourlyUsageAttributionUsageType.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { UnparsedObject } from "@datadog/datadog-api-client";
22

33
/**
4-
* Supported products for hourly usage attribution requests.
5-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
4+
* Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
5+
* To obtain the complete list of valid usage types, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
66
*/
77
export type HourlyUsageAttributionUsageType =
88
| typeof API_USAGE

services/usage_metering/src/v1/models/MonthlyUsageAttributionBody.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ export class MonthlyUsageAttributionBody {
4040
"updatedAt"?: Date;
4141
/**
4242
* Fields in Usage Summary by tag(s).
43-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
4443
*/
4544
"values"?: MonthlyUsageAttributionValues;
4645
/**

services/usage_metering/src/v1/models/MonthlyUsageAttributionSupportedMetrics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import { UnparsedObject } from "@datadog/datadog-api-client";
22

33
/**
4-
* Supported metrics for monthly usage attribution requests.
4+
* Supported metrics for monthly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
5+
* To obtain the complete list of valid usage types, make a request to the [Get usage attribution types API](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-attribution-types).
56
*/
67
export type MonthlyUsageAttributionSupportedMetrics =
78
| typeof API_USAGE

0 commit comments

Comments
 (0)