Skip to content

Commit 8615871

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

17 files changed

+557
-33
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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Get usage attribution types returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::UsageMeteringAPI.new
5+
p api_instance.get_usage_attribution_types()

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

lib/datadog_api_client/inflector.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5398,6 +5398,10 @@ def overrides
53985398
"v2.url_param_update" => "UrlParamUpdate",
53995399
"v2.usage_application_security_monitoring_response" => "UsageApplicationSecurityMonitoringResponse",
54005400
"v2.usage_attributes_object" => "UsageAttributesObject",
5401+
"v2.usage_attribution_types_attributes" => "UsageAttributionTypesAttributes",
5402+
"v2.usage_attribution_types_body" => "UsageAttributionTypesBody",
5403+
"v2.usage_attribution_types_response" => "UsageAttributionTypesResponse",
5404+
"v2.usage_attribution_types_type" => "UsageAttributionTypesType",
54015405
"v2.usage_data_object" => "UsageDataObject",
54025406
"v2.usage_lambda_traced_invocations_response" => "UsageLambdaTracedInvocationsResponse",
54035407
"v2.usage_observability_pipelines_response" => "UsageObservabilityPipelinesResponse",

lib/datadog_api_client/v1/api/usage_metering_api.rb

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,9 @@ def get_hourly_usage_attribution(start_hr, usage_type, opts = {})
129129
# cursor := response.metadata.pagination.next_record_id
130130
# END
131131
# ```
132-
# The following values have been **deprecated**:
133-
# `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
134132
#
135133
# @param start_hr [Time] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
136-
# @param usage_type [HourlyUsageAttributionUsageType] Usage type to retrieve. The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
134+
# @param usage_type [HourlyUsageAttributionUsageType] Usage type to retrieve. Usage types are in the format `<usage_type>_usage`. Example: `infra_host_usage` To obtain the complete list of active usage types that can be used to replace `<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).
137135
# @param opts [Hash] the optional parameters
138136
# @option opts [Time] :end_hr Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
139137
# @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
@@ -457,11 +455,11 @@ def get_monthly_usage_attribution(start_month, fields, opts = {})
457455
# ```
458456
#
459457
# @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
460-
# @param fields [MonthlyUsageAttributionSupportedMetrics] Comma-separated list of usage types to return, or `*` for all usage types. The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`, `llm_observability_usage`, `llm_observability_percentage`.
458+
# @param fields [MonthlyUsageAttributionSupportedMetrics] Comma-separated list of usage types to return, or `*` for all usage types. Usage types are in the format `<usage_type>_usage` and `<usage_type>_percentage`. Example: `infra_host_usage,infra_host_percentage` To obtain the complete list of usage attribution types that can be used to replace `<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).
461459
# @param opts [Hash] the optional parameters
462460
# @option opts [Time] :end_month Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month.
463461
# @option opts [UsageSortDirection] :sort_direction The direction to sort by: `[desc, asc]`.
464-
# @option opts [MonthlyUsageAttributionSupportedMetrics] :sort_name The field to sort by. The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
462+
# @option opts [MonthlyUsageAttributionSupportedMetrics] :sort_name The field to sort by. Sort fields are in the format `<usage_type>_usage`. Example: `infra_host_usage` To obtain the complete list of usage attribution types that can be used to replace `<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).
465463
# @option opts [String] :tag_breakdown_keys Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags. To see which tags are available, look for the value of `tag_config_source` in the API response.
466464
# @option opts [String] :next_record_id List following results with a next_record_id provided in the previous query.
467465
# @option opts [Boolean] :include_descendants Include child org usage in the response. Defaults to `true`.

lib/datadog_api_client/v1/models/hourly_usage_attribution_body.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ class HourlyUsageAttributionBody
4949
# Shows the most recent hour in the current month for all organizations where usages are calculated.
5050
attr_accessor :updated_at
5151

52-
# Supported products for hourly usage attribution requests.
53-
# The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
52+
# Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
53+
# 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).
5454
attr_accessor :usage_type
5555

5656
attr_accessor :additional_properties

lib/datadog_api_client/v1/models/hourly_usage_attribution_usage_type.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
require 'time'
1818

1919
module DatadogAPIClient::V1
20-
# Supported products for hourly usage attribution requests.
21-
# The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_ingested_spans_usage`.
20+
# Supported products for hourly usage attribution requests. Usage types are in the format `<usage_type>_usage`.
21+
# 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).
2222
class HourlyUsageAttributionUsageType
2323
include BaseEnumModel
2424

lib/datadog_api_client/v1/models/monthly_usage_attribution_body.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ class MonthlyUsageAttributionBody
4747
attr_accessor :updated_at
4848

4949
# Fields in Usage Summary by tag(s).
50-
# The following values have been **deprecated**: `estimated_indexed_spans_usage`, `estimated_indexed_spans_percentage`, `estimated_ingested_spans_usage`, `estimated_ingested_spans_percentage`.
5150
attr_accessor :values
5251

5352
attr_accessor :additional_properties

0 commit comments

Comments
 (0)