Skip to content

Commit 344ffe3

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b30ab78 of spec repo (#435)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 5d9b157 commit 344ffe3

File tree

8 files changed

+52
-52
lines changed

8 files changed

+52
-52
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.4.1.dev6",
7-
"regenerated": "2021-05-12 18:19:21.712592",
8-
"spec_repo_commit": "3445859"
7+
"regenerated": "2021-05-14 06:52:51.788682",
8+
"spec_repo_commit": "b30ab78"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-05-12 18:19:53.536116",
13-
"spec_repo_commit": "3445859"
12+
"regenerated": "2021-05-14 06:53:21.404107",
13+
"spec_repo_commit": "b30ab78"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Class | Method | HTTP request | Description
274274
*UsageMeteringApi* | [**get_usage_synthetics_api**](UsageMeteringApi.md#get_usage_synthetics_api) | **GET** /api/v1/usage/synthetics_api | Get hourly usage for Synthetics API Checks
275275
*UsageMeteringApi* | [**get_usage_synthetics_browser**](UsageMeteringApi.md#get_usage_synthetics_browser) | **GET** /api/v1/usage/synthetics_browser | Get hourly usage for Synthetics Browser Checks
276276
*UsageMeteringApi* | [**get_usage_timeseries**](UsageMeteringApi.md#get_usage_timeseries) | **GET** /api/v1/usage/timeseries | Get hourly usage for custom metrics
277-
*UsageMeteringApi* | [**get_usage_top_avg_metrics**](UsageMeteringApi.md#get_usage_top_avg_metrics) | **GET** /api/v1/usage/top_avg_metrics | Get top custom metrics by hourly average
277+
*UsageMeteringApi* | [**get_usage_top_avg_metrics**](UsageMeteringApi.md#get_usage_top_avg_metrics) | **GET** /api/v1/usage/top_avg_metrics | Get all custom metrics by hourly average
278278
*UsageMeteringApi* | [**get_usage_trace**](UsageMeteringApi.md#get_usage_trace) | **GET** /api/v1/usage/traces | Get hourly usage for Trace Search
279279
*UsersApi* | [**create_user**](UsersApi.md#create_user) | **POST** /api/v1/user | Create a user
280280
*UsersApi* | [**disable_user**](UsersApi.md#disable_user) | **DELETE** /api/v1/user/{user_handle} | Disable a user

docs/v1/UsageAttributionPagination.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# UsageAttributionPagination
22

3-
The page count for the current pagination.
3+
The metadata for the current pagination.
44

55
## Properties
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**limit** | **int** | Maximum amount of records to be returned. | [optional]
9-
**offset** | **int** | Records to be skipped before beginning to return. | [optional]
10-
**sort_direction** | **str** | Direction to sort by. | [optional]
11-
**sort_name** | **str** | Field to sort by. | [optional]
12-
**total_number_of_records** | **int** | Total number of records. | [optional]
9+
**next_record_id** | **str** | The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of this next_record_id. | [optional]
10+
**total_number_of_records** | **int** | Total number of records. (deprecated after May 1st, 2021) | [optional]
1311

1412
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
1513

docs/v1/UsageMeteringApi.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Method | HTTP request | Description
3333
[**get_usage_synthetics_api**](UsageMeteringApi.md#get_usage_synthetics_api) | **GET** /api/v1/usage/synthetics_api | Get hourly usage for Synthetics API Checks
3434
[**get_usage_synthetics_browser**](UsageMeteringApi.md#get_usage_synthetics_browser) | **GET** /api/v1/usage/synthetics_browser | Get hourly usage for Synthetics Browser Checks
3535
[**get_usage_timeseries**](UsageMeteringApi.md#get_usage_timeseries) | **GET** /api/v1/usage/timeseries | Get hourly usage for custom metrics
36-
[**get_usage_top_avg_metrics**](UsageMeteringApi.md#get_usage_top_avg_metrics) | **GET** /api/v1/usage/top_avg_metrics | Get top custom metrics by hourly average
36+
[**get_usage_top_avg_metrics**](UsageMeteringApi.md#get_usage_top_avg_metrics) | **GET** /api/v1/usage/top_avg_metrics | Get all custom metrics by hourly average
3737
[**get_usage_trace**](UsageMeteringApi.md#get_usage_trace) | **GET** /api/v1/usage/traces | Get hourly usage for Trace Search
3838

3939

@@ -2250,9 +2250,9 @@ Name | Type | Description | Notes
22502250
# **get_usage_top_avg_metrics**
22512251
> UsageTopAvgMetricsResponse get_usage_top_avg_metrics()
22522252
2253-
Get top custom metrics by hourly average
2253+
Get all custom metrics by hourly average
22542254

2255-
Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
2255+
Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.
22562256

22572257
### Example
22582258

@@ -2278,12 +2278,13 @@ with ApiClient(configuration) as api_client:
22782278
"names_example",
22792279
] # [str] | Comma-separated list of metric names. (optional)
22802280
limit = 500 # int | Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. (optional) if omitted the server will use the default value of 500
2281+
next_record_id = "next_record_id_example" # str | List following results with a next_record_id provided in the previous query. (optional)
22812282

22822283
# example passing only required values which don't have defaults set
22832284
# and optional values
22842285
try:
2285-
# Get top custom metrics by hourly average
2286-
api_response = api_instance.get_usage_top_avg_metrics(month=month, day=day, names=names, limit=limit)
2286+
# Get all custom metrics by hourly average
2287+
api_response = api_instance.get_usage_top_avg_metrics(month=month, day=day, names=names, limit=limit, next_record_id=next_record_id)
22872288
pprint(api_response)
22882289
except ApiException as e:
22892290
print("Exception when calling UsageMeteringApi->get_usage_top_avg_metrics: %s\n" % e)
@@ -2298,6 +2299,7 @@ Name | Type | Description | Notes
22982299
**day** | **datetime**| Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) | [optional]
22992300
**names** | **[str]**| Comma-separated list of metric names. | [optional]
23002301
**limit** | **int**| Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. | [optional] if omitted the server will use the default value of 500
2302+
**next_record_id** | **str**| List following results with a next_record_id provided in the previous query. | [optional]
23012303

23022304
### Return type
23032305

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,6 +1409,7 @@ def __init__(self, api_client=None):
14091409
"day",
14101410
"names",
14111411
"limit",
1412+
"next_record_id",
14121413
],
14131414
"required": [],
14141415
"nullable": [],
@@ -1430,18 +1431,21 @@ def __init__(self, api_client=None):
14301431
"day": (datetime,),
14311432
"names": ([str],),
14321433
"limit": (int,),
1434+
"next_record_id": (str,),
14331435
},
14341436
"attribute_map": {
14351437
"month": "month",
14361438
"day": "day",
14371439
"names": "names",
14381440
"limit": "limit",
1441+
"next_record_id": "next_record_id",
14391442
},
14401443
"location_map": {
14411444
"month": "query",
14421445
"day": "query",
14431446
"names": "query",
14441447
"limit": "query",
1448+
"next_record_id": "query",
14451449
},
14461450
"collection_format_map": {
14471451
"names": "multi",
@@ -2778,9 +2782,9 @@ def get_usage_timeseries(self, start_hr, **kwargs):
27782782
return self._get_usage_timeseries_endpoint.call_with_http_info(**kwargs)
27792783

27802784
def get_usage_top_avg_metrics(self, **kwargs):
2781-
"""Get top custom metrics by hourly average # noqa: E501
2785+
"""Get all custom metrics by hourly average # noqa: E501
27822786
2783-
Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed. # noqa: E501
2787+
Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/) by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed. # noqa: E501
27842788
This method makes a synchronous HTTP request by default. To make an
27852789
asynchronous HTTP request, please pass async_req=True
27862790
@@ -2793,6 +2797,7 @@ def get_usage_top_avg_metrics(self, **kwargs):
27932797
day (datetime): Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both). [optional]
27942798
names ([str]): Comma-separated list of metric names.. [optional]
27952799
limit (int): Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified.. [optional] if omitted the server will use the default value of 500
2800+
next_record_id (str): List following results with a next_record_id provided in the previous query.. [optional]
27962801
_return_http_data_only (bool): response data without head status
27972802
code and headers. Default is True.
27982803
_preload_content (bool): if False, the urllib3.HTTPResponse object

src/datadog_api_client/v1/model/usage_attribution_pagination.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def openapi_types():
6666
"""
6767
return {
6868
"limit": (int,), # noqa: E501
69-
"offset": (int,), # noqa: E501
70-
"sort_direction": (str,), # noqa: E501
71-
"sort_name": (str,), # noqa: E501
69+
"next_record_id": (str,), # noqa: E501
7270
"total_number_of_records": (int,), # noqa: E501
7371
}
7472

@@ -78,9 +76,7 @@ def discriminator():
7876

7977
attribute_map = {
8078
"limit": "limit", # noqa: E501
81-
"offset": "offset", # noqa: E501
82-
"sort_direction": "sort_direction", # noqa: E501
83-
"sort_name": "sort_name", # noqa: E501
79+
"next_record_id": "next_record_id", # noqa: E501
8480
"total_number_of_records": "total_number_of_records", # noqa: E501
8581
}
8682

@@ -133,10 +129,8 @@ def __init__(self, *args, **kwargs): # noqa: E501
133129
through its discriminator because we passed in
134130
_visited_composed_classes = (Animal,)
135131
limit (int): Maximum amount of records to be returned.. [optional] # noqa: E501
136-
offset (int): Records to be skipped before beginning to return.. [optional] # noqa: E501
137-
sort_direction (str): Direction to sort by.. [optional] # noqa: E501
138-
sort_name (str): Field to sort by.. [optional] # noqa: E501
139-
total_number_of_records (int): Total number of records.. [optional] # noqa: E501
132+
next_record_id (str): The cursor to use to get the next results, if any. To make the next request, use the same parameters with the addition of this next_record_id.. [optional] # noqa: E501
133+
total_number_of_records (int): Total number of records. (deprecated after May 1st, 2021). [optional] # noqa: E501
140134
"""
141135

142136
_check_type = kwargs.pop("_check_type", True)

src/datadog_api_client/v1/openapi.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10170,24 +10170,18 @@ components:
1017010170
$ref: '#/components/schemas/UsageAttributionPagination'
1017110171
type: object
1017210172
UsageAttributionPagination:
10173-
description: The page count for the current pagination.
10173+
description: The metadata for the current pagination.
1017410174
properties:
1017510175
limit:
1017610176
description: Maximum amount of records to be returned.
1017710177
format: int64
1017810178
type: integer
10179-
offset:
10180-
description: Records to be skipped before beginning to return.
10181-
format: int64
10182-
type: integer
10183-
sort_direction:
10184-
description: Direction to sort by.
10185-
type: string
10186-
sort_name:
10187-
description: Field to sort by.
10179+
next_record_id:
10180+
description: The cursor to use to get the next results, if any. To make
10181+
the next request, use the same parameters with the addition of this next_record_id.
1018810182
type: string
1018910183
total_number_of_records:
10190-
description: Total number of records.
10184+
description: Total number of records. (deprecated after May 1st, 2021)
1019110185
format: int64
1019210186
type: integer
1019310187
type: object
@@ -21158,7 +21152,7 @@ paths:
2115821152
type: safe
2115921153
/api/v1/usage/top_avg_metrics:
2116021154
get:
21161-
description: Get top [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/)
21155+
description: Get all [custom metrics](https://docs.datadoghq.com/developers/metrics/custom_metrics/)
2116221156
by hourly average. Use the month parameter to get a month-to-date data resolution
2116321157
or use the day parameter to get a daily resolution. One of the two is required,
2116421158
and only one of the two is allowed.
@@ -21199,6 +21193,13 @@ paths:
2119921193
maximum: 5000
2120021194
minimum: 1
2120121195
type: integer
21196+
- description: List following results with a next_record_id provided in the
21197+
previous query.
21198+
in: query
21199+
name: next_record_id
21200+
required: false
21201+
schema:
21202+
type: string
2120221203
responses:
2120321204
'200':
2120421205
content:
@@ -21218,7 +21219,7 @@ paths:
2121821219
schema:
2121921220
$ref: '#/components/schemas/APIErrorResponse'
2122021221
description: Forbidden - User is not authorized
21221-
summary: Get top custom metrics by hourly average
21222+
summary: Get all custom metrics by hourly average
2122221223
tags:
2122321224
- Usage Metering
2122421225
x-menu-order: 5

tests/v1/features/usage_metering.feature

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,18 @@ Feature: Usage Metering
1919
When the request is sent
2020
Then the response status is 200 OK
2121

22+
@generated @skip
23+
Scenario: Get all custom metrics by hourly average returns "Bad Request" response
24+
Given new "GetUsageTopAvgMetrics" request
25+
When the request is sent
26+
Then the response status is 400 Bad Request
27+
28+
@generated @skip
29+
Scenario: Get all custom metrics by hourly average returns "OK" response
30+
Given new "GetUsageTopAvgMetrics" request
31+
When the request is sent
32+
Then the response status is 200 OK
33+
2234
@generated @skip
2335
Scenario: Get billable usage across your account returns "Bad Request" response
2436
Given new "GetUsageBillableSummary" request
@@ -361,18 +373,6 @@ Feature: Usage Metering
361373
When the request is sent
362374
Then the response status is 200 OK
363375

364-
@generated @skip
365-
Scenario: Get top custom metrics by hourly average returns "Bad Request" response
366-
Given new "GetUsageTopAvgMetrics" request
367-
When the request is sent
368-
Then the response status is 400 Bad Request
369-
370-
@generated @skip
371-
Scenario: Get top custom metrics by hourly average returns "OK" response
372-
Given new "GetUsageTopAvgMetrics" request
373-
When the request is sent
374-
Then the response status is 200 OK
375-
376376
@generated @skip
377377
Scenario: Get usage across your multi-org account returns "Bad Request" response
378378
Given new "GetUsageSummary" request

0 commit comments

Comments
 (0)