Skip to content

Commit e0291e2

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

19 files changed

Lines changed: 538 additions & 5 deletions

.generator/schemas/v1/openapi.yaml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22716,7 +22716,13 @@ components:
2271622716
$ref: "#/components/schemas/UsageSpecifiedCustomReportsMeta"
2271722717
type: object
2271822718
UsageSummaryDate:
22719-
description: Response with hourly report of all data billed by Datadog all organizations.
22719+
description: |-
22720+
Response with hourly report of all data billed by Datadog for all organizations.
22721+
22722+
Newly added billing dimensions and usage types appear as untyped keys on the
22723+
`additionalProperties` map instead of as typed fields. Call
22724+
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
22725+
at this response level—both typed fields and `additionalProperties` keys.
2272022726
properties:
2272122727
agent_host_top99p:
2272222728
description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations.
@@ -23739,7 +23745,13 @@ components:
2373923745
type: integer
2374023746
type: object
2374123747
UsageSummaryDateOrg:
23742-
description: Global hourly report of all data billed by Datadog for a given organization.
23748+
description: |-
23749+
Global hourly report of all data billed by Datadog for a given organization.
23750+
23751+
Newly added billing dimensions and usage types appear as untyped keys on the
23752+
`additionalProperties` map instead of as typed fields. Call
23753+
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
23754+
at this response level—both typed fields and `additionalProperties` keys.
2374323755
properties:
2374423756
account_name:
2374523757
description: The account name.
@@ -24780,7 +24792,14 @@ components:
2478024792
type: integer
2478124793
type: object
2478224794
UsageSummaryResponse:
24783-
description: Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization.
24795+
description: |-
24796+
Response summarizing all usage aggregated across the months in the request for
24797+
all organizations, and broken down by month and by organization.
24798+
24799+
Newly added billing dimensions and usage types appear as untyped keys on the
24800+
`additionalProperties` map instead of as typed fields. Call
24801+
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
24802+
at this response level—both typed fields and `additionalProperties` keys.
2478424803
properties:
2478524804
agent_host_top99p_sum:
2478624805
description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations.
@@ -42260,6 +42279,12 @@ paths:
4226042279
description: |-
4226142280
Get all usage across your account.
4226242281

42282+
Newly added billing dimensions and usage types appear as untyped keys on the
42283+
`additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and
42284+
`UsageSummaryDateOrg` instead of as typed fields. Call
42285+
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
42286+
at each response level—both typed fields and `additionalProperties` keys.
42287+
4226342288
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
4226442289
operationId: GetUsageSummary
4226542290
parameters:

.generator/schemas/v2/openapi.yaml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96978,6 +96978,67 @@ components:
9697896978
$ref: "#/components/schemas/UsageDataObject"
9697996979
type: array
9698096980
type: object
96981+
UsageSummaryAvailableFieldsAttributes:
96982+
description: |-
96983+
The lists of field names returned by `GET /api/v1/usage/summary` at each
96984+
of its three response levels. Each list contains every key the data endpoint
96985+
emits—both typed fields declared in the OpenAPI spec and untyped keys
96986+
exposed through `additionalProperties`.
96987+
properties:
96988+
date_fields:
96989+
description: |-
96990+
Sorted list of every key returned inside each `UsageSummaryDate`
96991+
entry of `usage[]` (typed fields and `additionalProperties` keys
96992+
combined).
96993+
items:
96994+
type: string
96995+
type: array
96996+
date_org_fields:
96997+
description: |-
96998+
Sorted list of every key returned inside each `UsageSummaryDateOrg`
96999+
entry of `usage[].orgs[]` (typed fields and `additionalProperties`
97000+
keys combined).
97001+
items:
97002+
type: string
97003+
type: array
97004+
response_fields:
97005+
description: |-
97006+
Sorted list of every key returned as a direct property of
97007+
`UsageSummaryResponse` (typed fields and `additionalProperties`
97008+
keys combined).
97009+
items:
97010+
type: string
97011+
type: array
97012+
type: object
97013+
UsageSummaryAvailableFieldsBody:
97014+
description: Available-fields data.
97015+
properties:
97016+
attributes:
97017+
$ref: "#/components/schemas/UsageSummaryAvailableFieldsAttributes"
97018+
id:
97019+
description: The identifier for the discovery scope. Always `"all"`.
97020+
example: all
97021+
type: string
97022+
type:
97023+
$ref: "#/components/schemas/UsageSummaryAvailableFieldsType"
97024+
type: object
97025+
UsageSummaryAvailableFieldsResponse:
97026+
description: |-
97027+
Response listing every field name returned by `GET /api/v1/usage/summary`
97028+
at each of its three response levels. Includes both typed fields and untyped
97029+
`additionalProperties` keys.
97030+
properties:
97031+
data:
97032+
$ref: "#/components/schemas/UsageSummaryAvailableFieldsBody"
97033+
type: object
97034+
UsageSummaryAvailableFieldsType:
97035+
default: usage_summary_available_fields
97036+
description: Type of available-fields data.
97037+
enum:
97038+
- usage_summary_available_fields
97039+
type: string
97040+
x-enum-varnames:
97041+
- USAGE_SUMMARY_AVAILABLE_FIELDS
9698197042
UsageTimeSeriesObject:
9698297043
description: Usage timeseries data.
9698397044
properties:
@@ -174018,6 +174079,67 @@ paths:
174018174079
permissions:
174019174080
- usage_read
174020174081
- billing_read
174082+
/api/v2/usage/summary/available_fields:
174083+
get:
174084+
description: |-
174085+
List the field names returned by `GET /api/v1/usage/summary` at each of its
174086+
three response levels. Each list contains every key the data endpoint
174087+
emits—both typed fields declared in the OpenAPI spec and untyped keys
174088+
exposed through `additionalProperties` (the latter used for billing
174089+
dimensions and usage types added after the v1 schema freeze).
174090+
174091+
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
174092+
operationId: GetUsageSummaryAvailableFields
174093+
responses:
174094+
"200":
174095+
content:
174096+
application/json;datetime-format=rfc3339:
174097+
examples:
174098+
default:
174099+
value:
174100+
data:
174101+
attributes:
174102+
date_fields:
174103+
- agent_host_top99p
174104+
- aws_host_top99p
174105+
- ccm_anthropic_spend_last
174106+
date_org_fields:
174107+
- agent_host_top99p
174108+
- aws_host_top99p
174109+
- ccm_anthropic_spend_last
174110+
response_fields:
174111+
- agent_host_top99p_sum
174112+
- aws_host_top99p_sum
174113+
- ccm_anthropic_spend_last_sum
174114+
id: all
174115+
type: usage_summary_available_fields
174116+
schema:
174117+
$ref: "#/components/schemas/UsageSummaryAvailableFieldsResponse"
174118+
description: OK.
174119+
"403":
174120+
content:
174121+
application/json;datetime-format=rfc3339:
174122+
schema:
174123+
$ref: "#/components/schemas/APIErrorResponse"
174124+
description: Forbidden - User is not authorized.
174125+
"429":
174126+
content:
174127+
application/json;datetime-format=rfc3339:
174128+
schema:
174129+
$ref: "#/components/schemas/APIErrorResponse"
174130+
description: Too many requests.
174131+
security:
174132+
- apiKeyAuth: []
174133+
appKeyAuth: []
174134+
- AuthZ:
174135+
- usage_read
174136+
summary: Get available fields for usage summary
174137+
tags:
174138+
- Usage Metering
174139+
"x-permission":
174140+
operator: OR
174141+
permissions:
174142+
- usage_read
174021174143
/api/v2/usage/usage-attribution-types:
174022174144
get:
174023174145
description: |-

docs/datadog_api_client.v2.model.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42074,6 +42074,34 @@ datadog\_api\_client.v2.model.usage\_observability\_pipelines\_response module
4207442074
:members:
4207542075
:show-inheritance:
4207642076

42077+
datadog\_api\_client.v2.model.usage\_summary\_available\_fields\_attributes module
42078+
----------------------------------------------------------------------------------
42079+
42080+
.. automodule:: datadog_api_client.v2.model.usage_summary_available_fields_attributes
42081+
:members:
42082+
:show-inheritance:
42083+
42084+
datadog\_api\_client.v2.model.usage\_summary\_available\_fields\_body module
42085+
----------------------------------------------------------------------------
42086+
42087+
.. automodule:: datadog_api_client.v2.model.usage_summary_available_fields_body
42088+
:members:
42089+
:show-inheritance:
42090+
42091+
datadog\_api\_client.v2.model.usage\_summary\_available\_fields\_response module
42092+
--------------------------------------------------------------------------------
42093+
42094+
.. automodule:: datadog_api_client.v2.model.usage_summary_available_fields_response
42095+
:members:
42096+
:show-inheritance:
42097+
42098+
datadog\_api\_client.v2.model.usage\_summary\_available\_fields\_type module
42099+
----------------------------------------------------------------------------
42100+
42101+
.. automodule:: datadog_api_client.v2.model.usage_summary_available_fields_type
42102+
:members:
42103+
:show-inheritance:
42104+
4207742105
datadog\_api\_client.v2.model.usage\_time\_series\_object module
4207842106
----------------------------------------------------------------
4207942107

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get available fields for usage summary returns "OK." response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = UsageMeteringApi(api_client)
11+
response = api_instance.get_usage_summary_available_fields()
12+
13+
print(response)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""
2+
Get available fields for usage summary returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi
7+
8+
configuration = Configuration()
9+
with ApiClient(configuration) as api_client:
10+
api_instance = UsageMeteringApi(api_client)
11+
response = api_instance.get_usage_summary_available_fields()
12+
13+
print(response)

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,6 +2170,12 @@ def get_usage_summary(
21702170
21712171
Get all usage across your account.
21722172
2173+
Newly added billing dimensions and usage types appear as untyped keys on the
2174+
``additionalProperties`` map of ``UsageSummaryResponse`` , ``UsageSummaryDate`` , and
2175+
``UsageSummaryDateOrg`` instead of as typed fields. Call
2176+
``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned
2177+
at each response level—both typed fields and ``additionalProperties`` keys.
2178+
21732179
This endpoint is only accessible for `parent-level organizations <https://docs.datadoghq.com/account_management/multi_organization/>`_.
21742180
21752181
:param start_month: Datetime in ISO-8601 format, UTC, precise to month: ``[YYYY-MM]`` for usage beginning in this month.

src/datadog_api_client/v1/model/usage_summary_date.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,12 @@ def __init__(
787787
**kwargs,
788788
):
789789
"""
790-
Response with hourly report of all data billed by Datadog all organizations.
790+
Response with hourly report of all data billed by Datadog for all organizations.
791+
792+
Newly added billing dimensions and usage types appear as untyped keys on the
793+
``additionalProperties`` map instead of as typed fields. Call
794+
``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned
795+
at this response level—both typed fields and ``additionalProperties`` keys.
791796
792797
:param agent_host_top99p: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations.
793798
:type agent_host_top99p: int, optional

src/datadog_api_client/v1/model/usage_summary_date_org.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,11 @@ def __init__(
800800
"""
801801
Global hourly report of all data billed by Datadog for a given organization.
802802
803+
Newly added billing dimensions and usage types appear as untyped keys on the
804+
``additionalProperties`` map instead of as typed fields. Call
805+
``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned
806+
at this response level—both typed fields and ``additionalProperties`` keys.
807+
803808
:param account_name: The account name.
804809
:type account_name: str, optional
805810

src/datadog_api_client/v1/model/usage_summary_response.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -822,7 +822,13 @@ def __init__(
822822
**kwargs,
823823
):
824824
"""
825-
Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization.
825+
Response summarizing all usage aggregated across the months in the request for
826+
all organizations, and broken down by month and by organization.
827+
828+
Newly added billing dimensions and usage types appear as untyped keys on the
829+
``additionalProperties`` map instead of as typed fields. Call
830+
``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned
831+
at this response level—both typed fields and ``additionalProperties`` keys.
826832
827833
:param agent_host_top99p_sum: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations.
828834
:type agent_host_top99p_sum: int, optional

src/datadog_api_client/v2/api/usage_metering_api.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from datadog_api_client.v2.model.usage_lambda_traced_invocations_response import UsageLambdaTracedInvocationsResponse
2727
from datadog_api_client.v2.model.usage_observability_pipelines_response import UsageObservabilityPipelinesResponse
2828
from datadog_api_client.v2.model.projected_cost_response import ProjectedCostResponse
29+
from datadog_api_client.v2.model.usage_summary_available_fields_response import UsageSummaryAvailableFieldsResponse
2930
from datadog_api_client.v2.model.usage_attribution_types_response import UsageAttributionTypesResponse
3031

3132

@@ -463,6 +464,22 @@ def __init__(self, api_client=None):
463464
api_client=api_client,
464465
)
465466

467+
self._get_usage_summary_available_fields_endpoint = _Endpoint(
468+
settings={
469+
"response_type": (UsageSummaryAvailableFieldsResponse,),
470+
"auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"],
471+
"endpoint_path": "/api/v2/usage/summary/available_fields",
472+
"operation_id": "get_usage_summary_available_fields",
473+
"http_method": "GET",
474+
"version": "v2",
475+
},
476+
params_map={},
477+
headers_map={
478+
"accept": ["application/json;datetime-format=rfc3339"],
479+
},
480+
api_client=api_client,
481+
)
482+
466483
def get_active_billing_dimensions(
467484
self,
468485
) -> ActiveBillingDimensionsResponse:
@@ -908,3 +925,21 @@ def get_usage_observability_pipelines(
908925

909926
warnings.warn("get_usage_observability_pipelines is deprecated", DeprecationWarning, stacklevel=2)
910927
return self._get_usage_observability_pipelines_endpoint.call_with_http_info(**kwargs)
928+
929+
def get_usage_summary_available_fields(
930+
self,
931+
) -> UsageSummaryAvailableFieldsResponse:
932+
"""Get available fields for usage summary.
933+
934+
List the field names returned by ``GET /api/v1/usage/summary`` at each of its
935+
three response levels. Each list contains every key the data endpoint
936+
emits—both typed fields declared in the OpenAPI spec and untyped keys
937+
exposed through ``additionalProperties`` (the latter used for billing
938+
dimensions and usage types added after the v1 schema freeze).
939+
940+
This endpoint is only accessible for `parent-level organizations <https://docs.datadoghq.com/account_management/multi_organization/>`_.
941+
942+
:rtype: UsageSummaryAvailableFieldsResponse
943+
"""
944+
kwargs: Dict[str, Any] = {}
945+
return self._get_usage_summary_available_fields_endpoint.call_with_http_info(**kwargs)

0 commit comments

Comments
 (0)