Skip to content

Commit ce5a4fc

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

17 files changed

Lines changed: 695 additions & 31 deletions

.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.

api/datadogV1/api_usage_metering.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,6 @@ func (r *GetHourlyUsageAttributionOptionalParameters) WithIncludeDescendants(inc
212212
//
213213
// END
214214
// ```
215-
// The following values have been **deprecated**:
216-
//
217-
// `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
218215
func (a *UsageMeteringApi) GetHourlyUsageAttribution(ctx _context.Context, startHr time.Time, usageType HourlyUsageAttributionUsageType, o ...GetHourlyUsageAttributionOptionalParameters) (HourlyUsageAttributionResponse, *_nethttp.Response, error) {
219216
var (
220217
localVarHTTPMethod = _nethttp.MethodGet

api/datadogV1/model_hourly_usage_attribution_body.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ type HourlyUsageAttributionBody struct {
3232
TotalUsageSum *float64 `json:"total_usage_sum,omitempty"`
3333
// Shows the most recent hour in the current month for all organizations where usages are calculated.
3434
UpdatedAt *string `json:"updated_at,omitempty"`
35-
// Supported products for hourly usage attribution requests.
36-
// The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
35+
// Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
36+
// 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).
3737
UsageType *HourlyUsageAttributionUsageType `json:"usage_type,omitempty"`
3838
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3939
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV1/model_hourly_usage_attribution_usage_type.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// HourlyUsageAttributionUsageType Supported products for hourly usage attribution requests.
14-
// The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
13+
// HourlyUsageAttributionUsageType Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
14+
// 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).
1515
type HourlyUsageAttributionUsageType string
1616

1717
// List of HourlyUsageAttributionUsageType.

api/datadogV1/model_monthly_usage_attribution_body.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ type MonthlyUsageAttributionBody struct {
3131
// Datetime of the most recent update to the usage values.
3232
UpdatedAt *time.Time `json:"updated_at,omitempty"`
3333
// Fields in Usage Summary by tag(s).
34-
// The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
3534
Values *MonthlyUsageAttributionValues `json:"values,omitempty"`
3635
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
3736
UnparsedObject map[string]interface{} `json:"-"`

api/datadogV1/model_monthly_usage_attribution_supported_metrics.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import (
1010
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
1111
)
1212

13-
// MonthlyUsageAttributionSupportedMetrics Supported metrics for monthly usage attribution requests.
13+
// MonthlyUsageAttributionSupportedMetrics Supported metrics for monthly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
14+
// 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).
1415
type MonthlyUsageAttributionSupportedMetrics string
1516

1617
// List of MonthlyUsageAttributionSupportedMetrics.

api/datadogV1/model_monthly_usage_attribution_values.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import (
99
)
1010

1111
// MonthlyUsageAttributionValues Fields in Usage Summary by tag(s).
12-
// The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
1312
type MonthlyUsageAttributionValues struct {
1413
// The percentage of synthetic API test usage by tag(s).
1514
ApiPercentage *float64 `json:"api_percentage,omitempty"`

api/datadogV2/api_usage_metering.go

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,83 @@ func (a *UsageMeteringApi) GetUsageApplicationSecurityMonitoring(ctx _context.Co
11821182
return localVarReturnValue, localVarHTTPResponse, nil
11831183
}
11841184

1185+
// GetUsageAttributionTypes Get usage attribution types.
1186+
// Get usage attribution types.
1187+
func (a *UsageMeteringApi) GetUsageAttributionTypes(ctx _context.Context) (UsageAttributionTypesResponse, *_nethttp.Response, error) {
1188+
var (
1189+
localVarHTTPMethod = _nethttp.MethodGet
1190+
localVarPostBody interface{}
1191+
localVarReturnValue UsageAttributionTypesResponse
1192+
)
1193+
1194+
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.UsageMeteringApi.GetUsageAttributionTypes")
1195+
if err != nil {
1196+
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
1197+
}
1198+
1199+
localVarPath := localBasePath + "/api/v2/usage/usage-attribution-types"
1200+
1201+
localVarHeaderParams := make(map[string]string)
1202+
localVarQueryParams := _neturl.Values{}
1203+
localVarFormParams := _neturl.Values{}
1204+
localVarHeaderParams["Accept"] = "application/json;datetime-format=rfc3339"
1205+
1206+
if a.Client.Cfg.DelegatedTokenConfig != nil {
1207+
err = datadog.UseDelegatedTokenAuth(ctx, &localVarHeaderParams, a.Client.Cfg.DelegatedTokenConfig)
1208+
if err != nil {
1209+
return localVarReturnValue, nil, err
1210+
}
1211+
} else {
1212+
datadog.SetAuthKeys(
1213+
ctx,
1214+
&localVarHeaderParams,
1215+
[2]string{"apiKeyAuth", "DD-API-KEY"},
1216+
[2]string{"appKeyAuth", "DD-APPLICATION-KEY"},
1217+
)
1218+
}
1219+
req, err := a.Client.PrepareRequest(ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, nil)
1220+
if err != nil {
1221+
return localVarReturnValue, nil, err
1222+
}
1223+
1224+
localVarHTTPResponse, err := a.Client.CallAPI(req)
1225+
if err != nil || localVarHTTPResponse == nil {
1226+
return localVarReturnValue, localVarHTTPResponse, err
1227+
}
1228+
1229+
localVarBody, err := datadog.ReadBody(localVarHTTPResponse)
1230+
if err != nil {
1231+
return localVarReturnValue, localVarHTTPResponse, err
1232+
}
1233+
1234+
if localVarHTTPResponse.StatusCode >= 300 {
1235+
newErr := datadog.GenericOpenAPIError{
1236+
ErrorBody: localVarBody,
1237+
ErrorMessage: localVarHTTPResponse.Status,
1238+
}
1239+
if localVarHTTPResponse.StatusCode == 403 || localVarHTTPResponse.StatusCode == 429 {
1240+
var v APIErrorResponse
1241+
err = a.Client.Decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
1242+
if err != nil {
1243+
return localVarReturnValue, localVarHTTPResponse, newErr
1244+
}
1245+
newErr.ErrorModel = v
1246+
}
1247+
return localVarReturnValue, localVarHTTPResponse, newErr
1248+
}
1249+
1250+
err = a.Client.Decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type"))
1251+
if err != nil {
1252+
newErr := datadog.GenericOpenAPIError{
1253+
ErrorBody: localVarBody,
1254+
ErrorMessage: err.Error(),
1255+
}
1256+
return localVarReturnValue, localVarHTTPResponse, newErr
1257+
}
1258+
1259+
return localVarReturnValue, localVarHTTPResponse, nil
1260+
}
1261+
11851262
// GetUsageLambdaTracedInvocationsOptionalParameters holds optional parameters for GetUsageLambdaTracedInvocations.
11861263
type GetUsageLambdaTracedInvocationsOptionalParameters struct {
11871264
EndHr *time.Time

api/datadogV2/doc.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -871,6 +871,7 @@
871871
// - [UsageMeteringApi.GetMonthlyCostAttribution]
872872
// - [UsageMeteringApi.GetProjectedCost]
873873
// - [UsageMeteringApi.GetUsageApplicationSecurityMonitoring]
874+
// - [UsageMeteringApi.GetUsageAttributionTypes]
874875
// - [UsageMeteringApi.GetUsageLambdaTracedInvocations]
875876
// - [UsageMeteringApi.GetUsageObservabilityPipelines]
876877
// - [UsersApi.CreateUser]

0 commit comments

Comments
 (0)