Skip to content

Commit 949ec8a

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 82432e90 of spec repo (#1009)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 385674c commit 949ec8a

20 files changed

+146
-106
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-05-23 07:09:50.387461",
8-
"spec_repo_commit": "4797abcd"
7+
"regenerated": "2022-05-23 09:02:38.469124",
8+
"spec_repo_commit": "82432e90"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-23 07:09:50.399835",
13-
"spec_repo_commit": "4797abcd"
12+
"regenerated": "2022-05-23 09:02:38.480267",
13+
"spec_repo_commit": "82432e90"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6683,7 +6683,7 @@ components:
66836683
metadata:
66846684
$ref: '#/components/schemas/MonthlyUsageAttributionMetadata'
66856685
usage:
6686-
description: Get Usage Summary by tag(s).
6686+
description: Get usage summary by tag(s).
66876687
items:
66886688
$ref: '#/components/schemas/MonthlyUsageAttributionBody'
66896689
type: array
@@ -13056,7 +13056,7 @@ components:
1305613056
metadata:
1305713057
$ref: '#/components/schemas/UsageAttributionMetadata'
1305813058
usage:
13059-
description: Get Usage Summary by tag(s).
13059+
description: Get usage summary by tag(s).
1306013060
items:
1306113061
$ref: '#/components/schemas/UsageAttributionBody'
1306213062
type: array
@@ -26026,7 +26026,7 @@ paths:
2602626026
/api/v1/usage/attribution:
2602726027
get:
2602826028
deprecated: true
26029-
description: Get Usage Attribution.
26029+
description: Get usage attribution.
2603026030
operationId: GetUsageAttribution
2603126031
parameters:
2603226032
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -26109,7 +26109,7 @@ paths:
2610926109
appKeyAuth: []
2611026110
- AuthZ:
2611126111
- usage_read
26112-
summary: Get Usage Attribution
26112+
summary: Get usage attribution
2611326113
tags:
2611426114
- Usage Metering
2611526115
x-menu-order: 29
@@ -26635,7 +26635,7 @@ paths:
2663526635
type: safe
2663626636
/api/v1/usage/hourly-attribution:
2663726637
get:
26638-
description: "Get Hourly Usage Attribution.\n\nThis API endpoint is paginated.
26638+
description: "Get hourly usage attribution.\n\nThis API endpoint is paginated.
2663926639
To make sure you receive all records, check if the value of `next_record_id`
2664026640
is\nset in the response. If it is, make another request and pass `next_record_id`
2664126641
as a parameter.\nPseudo code example:\n\n```\nresponse := GetHourlyUsageAttribution(start_month)\ncursor
@@ -26710,7 +26710,7 @@ paths:
2671026710
appKeyAuth: []
2671126711
- AuthZ:
2671226712
- usage_read
26713-
summary: Get Hourly Usage Attribution
26713+
summary: Get hourly usage attribution
2671426714
tags:
2671526715
- Usage Metering
2671626716
x-menu-order: 30
@@ -27135,7 +27135,7 @@ paths:
2713527135
type: safe
2713627136
/api/v1/usage/monthly-attribution:
2713727137
get:
27138-
description: "Get Monthly Usage Attribution.\n\nThis API endpoint is paginated.
27138+
description: "Get monthly usage attribution.\n\nThis API endpoint is paginated.
2713927139
To make sure you receive all records, check if the value of `next_record_id`
2714027140
is\nset in the response. If it is, make another request and pass `next_record_id`
2714127141
as a parameter.\nPseudo code example:\n\n```\nresponse := GetMonthlyUsageAttribution(start_month)\ncursor
@@ -27223,7 +27223,7 @@ paths:
2722327223
appKeyAuth: []
2722427224
- AuthZ:
2722527225
- usage_read
27226-
summary: Get Monthly Usage Attribution
27226+
summary: Get monthly usage attribution
2722727227
tags:
2722827228
- Usage Metering
2722927229
x-given:

.generator/schemas/v2/openapi.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12559,7 +12559,7 @@ paths:
1255912559
type: safe
1256012560
/api/v2/usage/cost_by_org:
1256112561
get:
12562-
description: Get Cost Across Multi-Org Account.
12562+
description: Get cost across multi-org account.
1256312563
operationId: GetCostByOrg
1256412564
parameters:
1256512565
- description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]`
@@ -12608,7 +12608,7 @@ paths:
1260812608
appKeyAuth: []
1260912609
- AuthZ:
1261012610
- usage_read
12611-
summary: Get Cost Across Multi-Org Account
12611+
summary: Get cost across multi-org account
1261212612
tags:
1261312613
- Usage Metering
1261412614
x-menu-order: 39

examples/v1/usage-metering/GetHourlyUsageAttribution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get Hourly Usage Attribution returns "OK" response
2+
Get hourly usage attribution returns "OK" response
33
"""
44

55
from datetime import datetime

examples/v1/usage-metering/GetMonthlyUsageAttribution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get Monthly Usage Attribution returns "OK" response
2+
Get monthly usage attribution returns "OK" response
33
"""
44

55
from datetime import datetime
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
Paginate monthly usage attribution
3+
"""
4+
5+
from datetime import datetime
6+
from dateutil.relativedelta import relativedelta
7+
from os import environ
8+
from datadog_api_client import ApiClient, Configuration
9+
from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi
10+
from datadog_api_client.v1.model.monthly_usage_attribution_supported_metrics import (
11+
MonthlyUsageAttributionSupportedMetrics,
12+
)
13+
14+
# there is a valid "monthly_usage_attribution" response
15+
MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID = environ[
16+
"MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID"
17+
]
18+
19+
configuration = Configuration()
20+
with ApiClient(configuration) as api_client:
21+
api_instance = UsageMeteringApi(api_client)
22+
response = api_instance.get_monthly_usage_attribution(
23+
start_month=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"),
24+
fields=MonthlyUsageAttributionSupportedMetrics("infra_host_usage"),
25+
next_record_id=MONTHLY_USAGE_ATTRIBUTION_METADATA_PAGINATION_NEXT_RECORD_ID,
26+
)
27+
28+
print(response)

examples/v1/usage-metering/GetUsageAttribution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get Usage Attribution returns "OK" response
2+
Get usage attribution returns "OK" response
33
"""
44

55
from datetime import datetime

examples/v2/usage-metering/GetCostByOrg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Get Cost Across Multi-Org Account returns "OK" response
2+
Get cost across multi-org account returns "OK" response
33
"""
44

55
from datetime import datetime

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datadog_api_client/v1/model/monthly_usage_attribution_response.py

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)