From 68f86515cf7821e8d07abb2981be33dc6aee6fd3 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Tue, 16 Jun 2026 20:18:37 +0000 Subject: [PATCH] Regenerate client from commit 1a314fa of spec repo --- .generator/schemas/v1/openapi.yaml | 38 ++++++++++--------- .generator/schemas/v2/openapi.yaml | 31 +++++++++++++++ .../v1/api/usage_metering_api.py | 11 +++--- .../v1/model/usage_summary_date.py | 9 +++-- .../v1/model/usage_summary_date_org.py | 9 +++-- .../v1/model/usage_summary_response.py | 9 +++-- .../v2/api/usage_metering_api.py | 31 +++++++++++++++ 7 files changed, 104 insertions(+), 34 deletions(-) diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index e9a5dfa9bc..2673dc1a13 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -22813,10 +22813,11 @@ components: description: |- Response with hourly report of all data billed by Datadog for all organizations. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: agent_host_top99p: description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations. @@ -24115,10 +24116,11 @@ components: description: |- Global hourly report of all data billed by Datadog for a given organization. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: account_name: description: The account name. @@ -25436,10 +25438,11 @@ components: Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at this response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields at this response level are accessible through the + `additionalProperties` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key. properties: agent_host_top99p_sum: description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations. @@ -43215,11 +43218,12 @@ paths: description: |- Get all usage across your account. - Newly added billing dimensions and usage types appear as untyped keys on the - `additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and - `UsageSummaryDateOrg` instead of as typed fields. Call - `GET /api/v2/usage/summary/available_fields` to enumerate every key returned - at each response level—both typed fields and `additionalProperties` keys. + For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and + `UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map. + Existing typed-field getters are unchanged. New billing dimensions will not have + typed-field getters. Use + [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields) + to enumerate every available key at each response level. This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). operationId: GetUsageSummary diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 607e2e287b..849192b537 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -187306,6 +187306,37 @@ paths: dimensions and usage types added after the v1 schema freeze). This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). + + Go example: + + ```go + fields, _, err := api.GetUsageSummaryAvailableFields(ctx) + attr := fields.Data.GetAttributes() + + // resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...) + // Layer 1: UsageSummaryResponse + for _, key := range attr.GetResponseFields() { + if val, ok := resp.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 2: UsageSummaryDate (per month) + for _, date := range resp.GetUsage() { + for _, key := range attr.GetDateFields() { + if val, ok := date.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 3: UsageSummaryDateOrg (per org per month) + for _, org := range date.GetOrgs() { + for _, key := range attr.GetDateOrgFields() { + if val, ok := org.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + } + } + ``` operationId: GetUsageSummaryAvailableFields responses: "200": diff --git a/src/datadog_api_client/v1/api/usage_metering_api.py b/src/datadog_api_client/v1/api/usage_metering_api.py index 45cacc4100..a4bf8f2ff3 100644 --- a/src/datadog_api_client/v1/api/usage_metering_api.py +++ b/src/datadog_api_client/v1/api/usage_metering_api.py @@ -2170,11 +2170,12 @@ def get_usage_summary( Get all usage across your account. - Newly added billing dimensions and usage types appear as untyped keys on the - ``additionalProperties`` map of ``UsageSummaryResponse`` , ``UsageSummaryDate`` , and - ``UsageSummaryDateOrg`` instead of as typed fields. Call - ``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned - at each response level—both typed fields and ``additionalProperties`` keys. + For SDK users only: all fields on ``UsageSummaryResponse`` , ``UsageSummaryDate`` , and + ``UsageSummaryDateOrg`` are accessible through each object's ``additionalProperties`` map. + Existing typed-field getters are unchanged. New billing dimensions will not have + typed-field getters. Use + `Get available fields for usage summary `_ + to enumerate every available key at each response level. This endpoint is only accessible for `parent-level organizations `_. diff --git a/src/datadog_api_client/v1/model/usage_summary_date.py b/src/datadog_api_client/v1/model/usage_summary_date.py index 801d1fece8..28bad50cbc 100644 --- a/src/datadog_api_client/v1/model/usage_summary_date.py +++ b/src/datadog_api_client/v1/model/usage_summary_date.py @@ -943,10 +943,11 @@ def __init__( """ Response with hourly report of all data billed by Datadog for all organizations. - Newly added billing dimensions and usage types appear as untyped keys on the - ``additionalProperties`` map instead of as typed fields. Call - ``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned - at this response level—both typed fields and ``additionalProperties`` keys. + For SDK users only: all fields at this response level are accessible through the + ``additionalProperties`` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + `Get available fields for usage summary `_ + to enumerate every available key. :param agent_host_top99p: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations. :type agent_host_top99p: int, optional diff --git a/src/datadog_api_client/v1/model/usage_summary_date_org.py b/src/datadog_api_client/v1/model/usage_summary_date_org.py index 6a75999bc4..52f743de6e 100644 --- a/src/datadog_api_client/v1/model/usage_summary_date_org.py +++ b/src/datadog_api_client/v1/model/usage_summary_date_org.py @@ -954,10 +954,11 @@ def __init__( """ Global hourly report of all data billed by Datadog for a given organization. - Newly added billing dimensions and usage types appear as untyped keys on the - ``additionalProperties`` map instead of as typed fields. Call - ``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned - at this response level—both typed fields and ``additionalProperties`` keys. + For SDK users only: all fields at this response level are accessible through the + ``additionalProperties`` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + `Get available fields for usage summary `_ + to enumerate every available key. :param account_name: The account name. :type account_name: str, optional diff --git a/src/datadog_api_client/v1/model/usage_summary_response.py b/src/datadog_api_client/v1/model/usage_summary_response.py index 5d64021191..c8d7a4a4c4 100644 --- a/src/datadog_api_client/v1/model/usage_summary_response.py +++ b/src/datadog_api_client/v1/model/usage_summary_response.py @@ -979,10 +979,11 @@ def __init__( Response summarizing all usage aggregated across the months in the request for all organizations, and broken down by month and by organization. - Newly added billing dimensions and usage types appear as untyped keys on the - ``additionalProperties`` map instead of as typed fields. Call - ``GET /api/v2/usage/summary/available_fields`` to enumerate every key returned - at this response level—both typed fields and ``additionalProperties`` keys. + For SDK users only: all fields at this response level are accessible through the + ``additionalProperties`` map. Existing typed-field getters are unchanged. New billing + dimensions will not have typed-field getters. Use + `Get available fields for usage summary `_ + to enumerate every available key. :param agent_host_top99p_sum: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations. :type agent_host_top99p_sum: int, optional diff --git a/src/datadog_api_client/v2/api/usage_metering_api.py b/src/datadog_api_client/v2/api/usage_metering_api.py index 0d107ba77f..0bea5d7cb1 100644 --- a/src/datadog_api_client/v2/api/usage_metering_api.py +++ b/src/datadog_api_client/v2/api/usage_metering_api.py @@ -941,6 +941,37 @@ def get_usage_summary_available_fields( This endpoint is only accessible for `parent-level organizations `_. + Go example: + + .. code-block:: go + + fields, _, err := api.GetUsageSummaryAvailableFields(ctx) + attr := fields.Data.GetAttributes() + + // resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...) + // Layer 1: UsageSummaryResponse + for _, key := range attr.GetResponseFields() { + if val, ok := resp.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 2: UsageSummaryDate (per month) + for _, date := range resp.GetUsage() { + for _, key := range attr.GetDateFields() { + if val, ok := date.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + // Layer 3: UsageSummaryDateOrg (per org per month) + for _, org := range date.GetOrgs() { + for _, key := range attr.GetDateOrgFields() { + if val, ok := org.AdditionalProperties[key]; ok { + fmt.Println(key, val.(json.Number)) + } + } + } + } + :rtype: UsageSummaryAvailableFieldsResponse """ kwargs: Dict[str, Any] = {}