Skip to content

Commit ca51ee1

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Add region field and note about multiregion start (#1386)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent ea260e3 commit ca51ee1

File tree

5 files changed

+40
-14
lines changed

5 files changed

+40
-14
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.4",
7-
"regenerated": "2023-04-10 11:13:51.597147",
8-
"spec_repo_commit": "04eeb6ee"
7+
"regenerated": "2023-04-10 15:00:10.961149",
8+
"spec_repo_commit": "615bff17"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.4",
12-
"regenerated": "2023-04-10 11:13:51.609315",
13-
"spec_repo_commit": "04eeb6ee"
12+
"regenerated": "2023-04-10 15:00:11.011293",
13+
"spec_repo_commit": "615bff17"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3606,6 +3606,10 @@ components:
36063606
public_id:
36073607
description: The organization public ID.
36083608
type: string
3609+
region:
3610+
description: The region of the Datadog instance that the organization belongs
3611+
to.
3612+
type: string
36093613
tag_config_source:
36103614
description: The source of the usage attribution tag configuration and the
36113615
selected tags in the format of `<source_org_name>:::<selected tag 1>///<selected
@@ -7068,6 +7072,10 @@ components:
70687072
public_id:
70697073
description: The organization public ID.
70707074
type: string
7075+
region:
7076+
description: The region of the Datadog instance that the organization belongs
7077+
to.
7078+
type: string
70717079
tag_config_source:
70727080
description: The source of the usage attribution tag configuration and the
70737081
selected tags in the format `<source_org_name>:::<selected tag 1>///<selected
@@ -28591,10 +28599,11 @@ paths:
2859128599
- Usage Metering
2859228600
/api/v1/usage/hourly-attribution:
2859328601
get:
28594-
description: "Get hourly usage attribution.\n\nThis API endpoint is paginated.
28595-
To make sure you receive all records, check if the value of `next_record_id`
28596-
is\nset in the response. If it is, make another request and pass `next_record_id`
28597-
as a parameter.\nPseudo code example:\n\n```\nresponse := GetHourlyUsageAttribution(start_month)\ncursor
28602+
description: "Get hourly usage attribution. Multi-region data is available starting
28603+
March 1, 2023.\n\nThis API endpoint is paginated. To make sure you receive
28604+
all records, check if the value of `next_record_id` is\nset in the response.
28605+
If it is, make another request and pass `next_record_id` as a parameter.\nPseudo
28606+
code example:\n\n```\nresponse := GetHourlyUsageAttribution(start_month)\ncursor
2859828607
:= response.metadata.pagination.next_record_id\nWHILE cursor != null BEGIN\n
2859928608
\ sleep(5 seconds) # Avoid running into rate limit\n response := GetHourlyUsageAttribution(start_month,
2860028609
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```"
@@ -29102,10 +29111,11 @@ paths:
2910229111
- Usage Metering
2910329112
/api/v1/usage/monthly-attribution:
2910429113
get:
29105-
description: "Get monthly usage attribution.\n\nThis API endpoint is paginated.
29106-
To make sure you receive all records, check if the value of `next_record_id`
29107-
is\nset in the response. If it is, make another request and pass `next_record_id`
29108-
as a parameter.\nPseudo code example:\n\n```\nresponse := GetMonthlyUsageAttribution(start_month)\ncursor
29114+
description: "Get monthly usage attribution. Multi-region data is available
29115+
starting March 1, 2023.\n\nThis API endpoint is paginated. To make sure you
29116+
receive all records, check if the value of `next_record_id` is\nset in the
29117+
response. If it is, make another request and pass `next_record_id` as a parameter.\nPseudo
29118+
code example:\n\n```\nresponse := GetMonthlyUsageAttribution(start_month)\ncursor
2910929119
:= response.metadata.pagination.next_record_id\nWHILE cursor != null BEGIN\n
2911029120
\ sleep(5 seconds) # Avoid running into rate limit\n response := GetMonthlyUsageAttribution(start_month,
2911129121
next_record_id=cursor)\n cursor := response.metadata.pagination.next_record_id\nEND\n```"

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ def get_hourly_usage_attribution(
13921392
) -> HourlyUsageAttributionResponse:
13931393
"""Get hourly usage attribution.
13941394
1395-
Get hourly usage attribution.
1395+
Get hourly usage attribution. Multi-region data is available starting March 1, 2023.
13961396
13971397
This API endpoint is paginated. To make sure you receive all records, check if the value of ``next_record_id`` is
13981398
set in the response. If it is, make another request and pass ``next_record_id`` as a parameter.
@@ -1550,7 +1550,7 @@ def get_monthly_usage_attribution(
15501550
) -> MonthlyUsageAttributionResponse:
15511551
"""Get monthly usage attribution.
15521552
1553-
Get monthly usage attribution.
1553+
Get monthly usage attribution. Multi-region data is available starting March 1, 2023.
15541554
15551555
This API endpoint is paginated. To make sure you receive all records, check if the value of ``next_record_id`` is
15561556
set in the response. If it is, make another request and pass ``next_record_id`` as a parameter.

src/datadog_api_client/v1/model/hourly_usage_attribution_body.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def openapi_types(_):
2929
"hour": (datetime,),
3030
"org_name": (str,),
3131
"public_id": (str,),
32+
"region": (str,),
3233
"tag_config_source": (str,),
3334
"tags": (UsageAttributionTagNames,),
3435
"total_usage_sum": (float,),
@@ -40,6 +41,7 @@ def openapi_types(_):
4041
"hour": "hour",
4142
"org_name": "org_name",
4243
"public_id": "public_id",
44+
"region": "region",
4345
"tag_config_source": "tag_config_source",
4446
"tags": "tags",
4547
"total_usage_sum": "total_usage_sum",
@@ -52,6 +54,7 @@ def __init__(
5254
hour: Union[datetime, UnsetType] = unset,
5355
org_name: Union[str, UnsetType] = unset,
5456
public_id: Union[str, UnsetType] = unset,
57+
region: Union[str, UnsetType] = unset,
5558
tag_config_source: Union[str, UnsetType] = unset,
5659
tags: Union[UsageAttributionTagNames, UnsetType] = unset,
5760
total_usage_sum: Union[float, UnsetType] = unset,
@@ -71,6 +74,9 @@ def __init__(
7174
:param public_id: The organization public ID.
7275
:type public_id: str, optional
7376
77+
:param region: The region of the Datadog instance that the organization belongs to.
78+
:type region: str, optional
79+
7480
:param tag_config_source: The source of the usage attribution tag configuration and the selected tags in the format of ``<source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3>``.
7581
:type tag_config_source: str, optional
7682
@@ -96,6 +102,8 @@ def __init__(
96102
kwargs["org_name"] = org_name
97103
if public_id is not unset:
98104
kwargs["public_id"] = public_id
105+
if region is not unset:
106+
kwargs["region"] = region
99107
if tag_config_source is not unset:
100108
kwargs["tag_config_source"] = tag_config_source
101109
if tags is not unset:

src/datadog_api_client/v1/model/monthly_usage_attribution_body.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def openapi_types(_):
2929
"month": (datetime,),
3030
"org_name": (str,),
3131
"public_id": (str,),
32+
"region": (str,),
3233
"tag_config_source": (str,),
3334
"tags": (UsageAttributionTagNames,),
3435
"updated_at": (datetime,),
@@ -39,6 +40,7 @@ def openapi_types(_):
3940
"month": "month",
4041
"org_name": "org_name",
4142
"public_id": "public_id",
43+
"region": "region",
4244
"tag_config_source": "tag_config_source",
4345
"tags": "tags",
4446
"updated_at": "updated_at",
@@ -50,6 +52,7 @@ def __init__(
5052
month: Union[datetime, UnsetType] = unset,
5153
org_name: Union[str, UnsetType] = unset,
5254
public_id: Union[str, UnsetType] = unset,
55+
region: Union[str, UnsetType] = unset,
5356
tag_config_source: Union[str, UnsetType] = unset,
5457
tags: Union[UsageAttributionTagNames, UnsetType] = unset,
5558
updated_at: Union[datetime, UnsetType] = unset,
@@ -68,6 +71,9 @@ def __init__(
6871
:param public_id: The organization public ID.
6972
:type public_id: str, optional
7073
74+
:param region: The region of the Datadog instance that the organization belongs to.
75+
:type region: str, optional
76+
7177
:param tag_config_source: The source of the usage attribution tag configuration and the selected tags in the format ``<source_org_name>:::<selected tag 1>///<selected tag 2>///<selected tag 3>``.
7278
:type tag_config_source: str, optional
7379
@@ -90,6 +96,8 @@ def __init__(
9096
kwargs["org_name"] = org_name
9197
if public_id is not unset:
9298
kwargs["public_id"] = public_id
99+
if region is not unset:
100+
kwargs["region"] = region
93101
if tag_config_source is not unset:
94102
kwargs["tag_config_source"] = tag_config_source
95103
if tags is not unset:

0 commit comments

Comments
 (0)