Skip to content

Commit 04a5cdb

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

19 files changed

+463
-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.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Get usage attribution types returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
const apiInstance = new v2.UsageMeteringApi(configuration);
9+
10+
apiInstance
11+
.getUsageAttributionTypes()
12+
.then((data: v2.UsageAttributionTypesResponse) => {
13+
console.log(
14+
"API called successfully. Returned data: " + JSON.stringify(data)
15+
);
16+
})
17+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5615,6 +5615,9 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
56155615
},
56165616
"operationResponseType": "ProjectedCostResponse",
56175617
},
5618+
"v2.GetUsageAttributionTypes": {
5619+
"operationResponseType": "UsageAttributionTypesResponse",
5620+
},
56185621
"v2.ListAllCSMAgents": {
56195622
"page": {
56205623
"type": "number",

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

packages/datadog-api-client-v1/apis/UsageMeteringApi.ts

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4408,8 +4408,10 @@ export interface UsageMeteringApiGetHourlyUsageAttributionRequest {
44084408
*/
44094409
startHr: Date;
44104410
/**
4411-
* Usage type to retrieve. The following values have been **deprecated**:
4412-
* `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
4411+
* Usage type to retrieve. Usage types are in the format `<usage_type>_usage`.
4412+
* Example: `infra_host_usage`
4413+
* To obtain the complete list of active usage types that can be used to replace
4414+
* `<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).
44134415
* @type HourlyUsageAttributionUsageType
44144416
*/
44154417
usageType: HourlyUsageAttributionUsageType;
@@ -4498,8 +4500,10 @@ export interface UsageMeteringApiGetMonthlyUsageAttributionRequest {
44984500
startMonth: Date;
44994501
/**
45004502
* Comma-separated list of usage types to return, or `*` for all usage types.
4501-
* The following values have been **deprecated**:
4502-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
4503+
* Usage types are in the format `<usage_type>_usage` and `<usage_type>_percentage`.
4504+
* Example: `infra_host_usage,infra_host_percentage`
4505+
* To obtain the complete list of usage attribution types that can be used to replace
4506+
* `<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).
45034507
* @type MonthlyUsageAttributionSupportedMetrics
45044508
*/
45054509
fields: MonthlyUsageAttributionSupportedMetrics;
@@ -4514,9 +4518,10 @@ export interface UsageMeteringApiGetMonthlyUsageAttributionRequest {
45144518
*/
45154519
sortDirection?: UsageSortDirection;
45164520
/**
4517-
* The field to sort by.
4518-
* The following values have been **deprecated**:
4519-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
4521+
* The field to sort by. Sort fields are in the format `<usage_type>_usage`.
4522+
* Example: `infra_host_usage`
4523+
* To obtain the complete list of usage attribution types that can be used to replace
4524+
* `<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).
45204525
* @type MonthlyUsageAttributionSupportedMetrics
45214526
*/
45224527
sortName?: MonthlyUsageAttributionSupportedMetrics;
@@ -5040,8 +5045,6 @@ export class UsageMeteringApi {
50405045
* cursor := response.metadata.pagination.next_record_id
50415046
* END
50425047
* ```
5043-
* The following values have been **deprecated**:
5044-
* `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
50455048
* @param param The request object
50465049
*/
50475050
public getHourlyUsageAttribution(

packages/datadog-api-client-v1/models/HourlyUsageAttributionBody.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ export class HourlyUsageAttributionBody {
4848
*/
4949
"updatedAt"?: string;
5050
/**
51-
* Supported products for hourly usage attribution requests.
52-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
51+
* Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
52+
* 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).
5353
*/
5454
"usageType"?: HourlyUsageAttributionUsageType;
5555

packages/datadog-api-client-v1/models/HourlyUsageAttributionUsageType.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
import { UnparsedObject } from "../../datadog-api-client-common/util";
88

99
/**
10-
* Supported products for hourly usage attribution requests.
11-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
10+
* Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
11+
* 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).
1212
*/
1313

1414
export type HourlyUsageAttributionUsageType =

packages/datadog-api-client-v1/models/MonthlyUsageAttributionBody.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export class MonthlyUsageAttributionBody {
4545
"updatedAt"?: Date;
4646
/**
4747
* Fields in Usage Summary by tag(s).
48-
* The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
4948
*/
5049
"values"?: MonthlyUsageAttributionValues;
5150

0 commit comments

Comments
 (0)