Skip to content

Commit e1123a3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 1a314fa of spec repo (DataDog#3451)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3558c35 commit e1123a3

7 files changed

Lines changed: 104 additions & 34 deletions

File tree

.generator/schemas/v1/openapi.yaml

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22813,10 +22813,11 @@ components:
2281322813
description: |-
2281422814
Response with hourly report of all data billed by Datadog for all organizations.
2281522815

22816-
Newly added billing dimensions and usage types appear as untyped keys on the
22817-
`additionalProperties` map instead of as typed fields. Call
22818-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
22819-
at this response level—both typed fields and `additionalProperties` keys.
22816+
For SDK users only: all fields at this response level are accessible through the
22817+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
22818+
dimensions will not have typed-field getters. Use
22819+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
22820+
to enumerate every available key.
2282022821
properties:
2282122822
agent_host_top99p:
2282222823
description: Shows the 99th percentile of all agent hosts over all hours in the current date for all organizations.
@@ -24115,10 +24116,11 @@ components:
2411524116
description: |-
2411624117
Global hourly report of all data billed by Datadog for a given organization.
2411724118

24118-
Newly added billing dimensions and usage types appear as untyped keys on the
24119-
`additionalProperties` map instead of as typed fields. Call
24120-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
24121-
at this response level—both typed fields and `additionalProperties` keys.
24119+
For SDK users only: all fields at this response level are accessible through the
24120+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
24121+
dimensions will not have typed-field getters. Use
24122+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
24123+
to enumerate every available key.
2412224124
properties:
2412324125
account_name:
2412424126
description: The account name.
@@ -25436,10 +25438,11 @@ components:
2543625438
Response summarizing all usage aggregated across the months in the request for
2543725439
all organizations, and broken down by month and by organization.
2543825440

25439-
Newly added billing dimensions and usage types appear as untyped keys on the
25440-
`additionalProperties` map instead of as typed fields. Call
25441-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
25442-
at this response level—both typed fields and `additionalProperties` keys.
25441+
For SDK users only: all fields at this response level are accessible through the
25442+
`additionalProperties` map. Existing typed-field getters are unchanged. New billing
25443+
dimensions will not have typed-field getters. Use
25444+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
25445+
to enumerate every available key.
2544325446
properties:
2544425447
agent_host_top99p_sum:
2544525448
description: Shows the 99th percentile of all agent hosts over all hours in the current month for all organizations.
@@ -43215,11 +43218,12 @@ paths:
4321543218
description: |-
4321643219
Get all usage across your account.
4321743220

43218-
Newly added billing dimensions and usage types appear as untyped keys on the
43219-
`additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and
43220-
`UsageSummaryDateOrg` instead of as typed fields. Call
43221-
`GET /api/v2/usage/summary/available_fields` to enumerate every key returned
43222-
at each response level—both typed fields and `additionalProperties` keys.
43221+
For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and
43222+
`UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map.
43223+
Existing typed-field getters are unchanged. New billing dimensions will not have
43224+
typed-field getters. Use
43225+
[Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
43226+
to enumerate every available key at each response level.
4322343227

4322443228
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
4322543229
operationId: GetUsageSummary

.generator/schemas/v2/openapi.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187306,6 +187306,37 @@ paths:
187306187306
dimensions and usage types added after the v1 schema freeze).
187307187307

187308187308
This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
187309+
187310+
Go example:
187311+
187312+
```go
187313+
fields, _, err := api.GetUsageSummaryAvailableFields(ctx)
187314+
attr := fields.Data.GetAttributes()
187315+
187316+
// resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...)
187317+
// Layer 1: UsageSummaryResponse
187318+
for _, key := range attr.GetResponseFields() {
187319+
if val, ok := resp.AdditionalProperties[key]; ok {
187320+
fmt.Println(key, val.(json.Number))
187321+
}
187322+
}
187323+
// Layer 2: UsageSummaryDate (per month)
187324+
for _, date := range resp.GetUsage() {
187325+
for _, key := range attr.GetDateFields() {
187326+
if val, ok := date.AdditionalProperties[key]; ok {
187327+
fmt.Println(key, val.(json.Number))
187328+
}
187329+
}
187330+
// Layer 3: UsageSummaryDateOrg (per org per month)
187331+
for _, org := range date.GetOrgs() {
187332+
for _, key := range attr.GetDateOrgFields() {
187333+
if val, ok := org.AdditionalProperties[key]; ok {
187334+
fmt.Println(key, val.(json.Number))
187335+
}
187336+
}
187337+
}
187338+
}
187339+
```
187309187340
operationId: GetUsageSummaryAvailableFields
187310187341
responses:
187311187342
"200":

lib/datadog_api_client/v1/api/usage_metering_api.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2342,11 +2342,12 @@ def get_usage_summary(start_month, opts = {})
23422342
#
23432343
# Get all usage across your account.
23442344
#
2345-
# Newly added billing dimensions and usage types appear as untyped keys on the
2346-
# `additionalProperties` map of `UsageSummaryResponse`, `UsageSummaryDate`, and
2347-
# `UsageSummaryDateOrg` instead of as typed fields. Call
2348-
# `GET /api/v2/usage/summary/available_fields` to enumerate every key returned
2349-
# at each response level—both typed fields and `additionalProperties` keys.
2345+
# For SDK users only: all fields on `UsageSummaryResponse`, `UsageSummaryDate`, and
2346+
# `UsageSummaryDateOrg` are accessible through each object's `additionalProperties` map.
2347+
# Existing typed-field getters are unchanged. New billing dimensions will not have
2348+
# typed-field getters. Use
2349+
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
2350+
# to enumerate every available key at each response level.
23502351
#
23512352
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
23522353
#

lib/datadog_api_client/v1/models/usage_summary_date.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
module DatadogAPIClient::V1
2020
# Response with hourly report of all data billed by Datadog for all organizations.
2121
#
22-
# Newly added billing dimensions and usage types appear as untyped keys on the
23-
# `additionalProperties` map instead of as typed fields. Call
24-
# `GET /api/v2/usage/summary/available_fields` to enumerate every key returned
25-
# at this response level—both typed fields and `additionalProperties` keys.
22+
# For SDK users only: all fields at this response level are accessible through the
23+
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
24+
# dimensions will not have typed-field getters. Use
25+
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
26+
# to enumerate every available key.
2627
class UsageSummaryDate
2728
include BaseGenericModel
2829

lib/datadog_api_client/v1/models/usage_summary_date_org.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,11 @@
1919
module DatadogAPIClient::V1
2020
# Global hourly report of all data billed by Datadog for a given organization.
2121
#
22-
# Newly added billing dimensions and usage types appear as untyped keys on the
23-
# `additionalProperties` map instead of as typed fields. Call
24-
# `GET /api/v2/usage/summary/available_fields` to enumerate every key returned
25-
# at this response level—both typed fields and `additionalProperties` keys.
22+
# For SDK users only: all fields at this response level are accessible through the
23+
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
24+
# dimensions will not have typed-field getters. Use
25+
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
26+
# to enumerate every available key.
2627
class UsageSummaryDateOrg
2728
include BaseGenericModel
2829

lib/datadog_api_client/v1/models/usage_summary_response.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ module DatadogAPIClient::V1
2020
# Response summarizing all usage aggregated across the months in the request for
2121
# all organizations, and broken down by month and by organization.
2222
#
23-
# Newly added billing dimensions and usage types appear as untyped keys on the
24-
# `additionalProperties` map instead of as typed fields. Call
25-
# `GET /api/v2/usage/summary/available_fields` to enumerate every key returned
26-
# at this response level—both typed fields and `additionalProperties` keys.
23+
# For SDK users only: all fields at this response level are accessible through the
24+
# `additionalProperties` map. Existing typed-field getters are unchanged. New billing
25+
# dimensions will not have typed-field getters. Use
26+
# [Get available fields for usage summary](https://docs.datadoghq.com/api/latest/usage-metering/#get-usage-summary-available-fields)
27+
# to enumerate every available key.
2728
class UsageSummaryResponse
2829
include BaseGenericModel
2930

lib/datadog_api_client/v2/api/usage_metering_api.rb

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -941,6 +941,37 @@ def get_usage_summary_available_fields(opts = {})
941941
#
942942
# This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
943943
#
944+
# Go example:
945+
#
946+
# ```go
947+
# fields, _, err := api.GetUsageSummaryAvailableFields(ctx)
948+
# attr := fields.Data.GetAttributes()
949+
#
950+
# // resp is the *UsageSummaryResponse returned by api.GetUsageSummary(ctx, ...)
951+
# // Layer 1: UsageSummaryResponse
952+
# for _, key := range attr.GetResponseFields() {
953+
# if val, ok := resp.AdditionalProperties[key]; ok {
954+
# fmt.Println(key, val.(json.Number))
955+
# }
956+
# }
957+
# // Layer 2: UsageSummaryDate (per month)
958+
# for _, date := range resp.GetUsage() {
959+
# for _, key := range attr.GetDateFields() {
960+
# if val, ok := date.AdditionalProperties[key]; ok {
961+
# fmt.Println(key, val.(json.Number))
962+
# }
963+
# }
964+
# // Layer 3: UsageSummaryDateOrg (per org per month)
965+
# for _, org := range date.GetOrgs() {
966+
# for _, key := range attr.GetDateOrgFields() {
967+
# if val, ok := org.AdditionalProperties[key]; ok {
968+
# fmt.Println(key, val.(json.Number))
969+
# }
970+
# }
971+
# }
972+
# }
973+
# ```
974+
#
944975
# @param opts [Hash] the optional parameters
945976
# @return [Array<(UsageSummaryAvailableFieldsResponse, Integer, Hash)>] UsageSummaryAvailableFieldsResponse data, response status code and response headers
946977
def get_usage_summary_available_fields_with_http_info(opts = {})

0 commit comments

Comments
 (0)