Skip to content

Commit a9659a9

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Regenerate client from commit bc876ff of spec repo (#251)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9a09e39 commit a9659a9

20 files changed

+781
-4
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.dev2",
7-
"regenerated": "2021-01-29 07:52:53.496255",
8-
"spec_repo_commit": "6dc3341"
7+
"regenerated": "2021-01-29 12:49:08.176509",
8+
"spec_repo_commit": "bc876ff"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev2",
12-
"regenerated": "2021-01-29 07:53:05.627056",
13-
"spec_repo_commit": "6dc3341"
12+
"regenerated": "2021-01-29 12:49:19.740192",
13+
"spec_repo_commit": "bc876ff"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ Class | Method | HTTP request | Description
249249
*UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
250250
*UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
251251
*UsageMeteringApi* | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
252+
*UsageMeteringApi* | [**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT
252253
*UsageMeteringApi* | [**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda
253254
*UsageMeteringApi* | [**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs
254255
*UsageMeteringApi* | [**get_usage_logs_by_index**](UsageMeteringApi.md#get_usage_logs_by_index) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index
@@ -669,6 +670,8 @@ Class | Method | HTTP request | Description
669670
- [UsageIndexedSpansResponse](UsageIndexedSpansResponse.md)
670671
- [UsageIngestedSpansHour](UsageIngestedSpansHour.md)
671672
- [UsageIngestedSpansResponse](UsageIngestedSpansResponse.md)
673+
- [UsageIoTHour](UsageIoTHour.md)
674+
- [UsageIoTResponse](UsageIoTResponse.md)
672675
- [UsageLambdaHour](UsageLambdaHour.md)
673676
- [UsageLambdaResponse](UsageLambdaResponse.md)
674677
- [UsageLogsByIndexHour](UsageLogsByIndexHour.md)

docs/v1/UsageIoTHour.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageIoTHour
2+
3+
IoT usage for a given organization for a given hour.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**hour** | **datetime** | The hour for the usage. | [optional]
8+
**iot_device_count** | **int** | The total number of IoT device hours from the start of the given hour&#39;s month until the given hour. | [optional]
9+
10+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
11+
12+

docs/v1/UsageIoTResponse.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UsageIoTResponse
2+
3+
Response containing the IoT usage for each hour for a given organization.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**usage** | [**[UsageIoTHour]**](UsageIoTHour.md) | Get hourly usage for IoT. | [optional]
8+
9+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
10+
11+

docs/v1/UsageMeteringApi.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Method | HTTP request | Description
1717
[**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
1818
[**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
1919
[**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
20+
[**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT
2021
[**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda
2122
[**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs
2223
[**get_usage_logs_by_index**](UsageMeteringApi.md#get_usage_logs_by_index) | **GET** /api/v1/usage/logs_by_index | Get hourly usage for Logs by Index
@@ -1095,6 +1096,90 @@ Name | Type | Description | Notes
10951096

10961097
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
10971098

1099+
# **get_usage_internet_of_things**
1100+
> UsageIoTResponse get_usage_internet_of_things(start_hr)
1101+
1102+
Get hourly usage for IoT
1103+
1104+
Get hourly usage for IoT.
1105+
1106+
### Example
1107+
1108+
* Api Key Authentication (apiKeyAuth):
1109+
* Api Key Authentication (appKeyAuth):
1110+
```python
1111+
import os
1112+
from dateutil.parser import parse as dateutil_parser
1113+
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
1114+
from datadog_api_client.v1.api import usage_metering_api
1115+
from datadog_api_client.v1.models import *
1116+
from pprint import pprint
1117+
# Defining the host is optional and defaults to https://api.datadoghq.com
1118+
# See configuration.py for a list of all supported configuration parameters.
1119+
configuration = datadog_api_client.v1.Configuration(
1120+
host="https://api.datadoghq.com"
1121+
)
1122+
1123+
# Configure API key authorization: apiKeyAuth
1124+
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')
1125+
1126+
# Configure API key authorization: appKeyAuth
1127+
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')
1128+
1129+
# Enter a context with an instance of the API client
1130+
with ApiClient(configuration) as api_client:
1131+
# Create an instance of the API class
1132+
api_instance = usage_metering_api.UsageMeteringApi(api_client)
1133+
start_hr = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
1134+
end_hr = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
1135+
1136+
# example passing only required values which don't have defaults set
1137+
try:
1138+
# Get hourly usage for IoT
1139+
api_response = api_instance.get_usage_internet_of_things(start_hr)
1140+
pprint(api_response)
1141+
except ApiException as e:
1142+
print("Exception when calling UsageMeteringApi->get_usage_internet_of_things: %s\n" % e)
1143+
1144+
# example passing only required values which don't have defaults set
1145+
# and optional values
1146+
try:
1147+
# Get hourly usage for IoT
1148+
api_response = api_instance.get_usage_internet_of_things(start_hr, end_hr=end_hr)
1149+
pprint(api_response)
1150+
except ApiException as e:
1151+
print("Exception when calling UsageMeteringApi->get_usage_internet_of_things: %s\n" % e)
1152+
```
1153+
1154+
### Parameters
1155+
1156+
Name | Type | Description | Notes
1157+
------------- | ------------- | ------------- | -------------
1158+
**start_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour. |
1159+
**end_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour. | [optional]
1160+
1161+
### Return type
1162+
1163+
[**UsageIoTResponse**](UsageIoTResponse.md)
1164+
1165+
### Authorization
1166+
1167+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
1168+
1169+
### HTTP request headers
1170+
1171+
- **Content-Type**: Not defined
1172+
- **Accept**: application/json;datetime-format=rfc3339
1173+
1174+
### HTTP response details
1175+
| Status code | Description | Response headers |
1176+
|-------------|-------------|------------------|
1177+
**200** | OK | - |
1178+
**400** | Bad Request | - |
1179+
**403** | Forbidden - User is not authorized | - |
1180+
1181+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1182+
10981183
# **get_usage_lambda**
10991184
> UsageLambdaResponse get_usage_lambda(start_hr)
11001185

docs/v1/UsageSummaryDate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
2323
**indexed_events_count_sum** | **int** | Shows the sum of all log events indexed over all hours in the current date for all organizations. | [optional]
2424
**infra_host_top99p** | **int** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for all organizations. | [optional]
2525
**ingested_events_bytes_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional]
26+
**iot_device_agg_sum** | **int** | Shows the sum of all IoT devices over all hours in the current date for all organizations. | [optional]
27+
**iot_device_top99p_sum** | **int** | Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. | [optional]
2628
**mobile_rum_session_count_android_sum** | **int** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. | [optional]
2729
**mobile_rum_session_count_ios_sum** | **int** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all organizations. | [optional]
2830
**mobile_rum_session_count_sum** | **int** | Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations | [optional]

docs/v1/UsageSummaryDateOrg.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
2323
**indexed_events_count_sum** | **int** | Shows the sum of all log events indexed over all hours in the current date for the given org. | [optional]
2424
**infra_host_top99p** | **int** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for the given org. | [optional]
2525
**ingested_events_bytes_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional]
26+
**iot_device_agg_sum** | **int** | Shows the sum of all IoT devices over all hours in the current date for the given org. | [optional]
27+
**iot_device_top99p_sum** | **int** | Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. | [optional]
2628
**mobile_rum_session_count_android_sum** | **int** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. | [optional]
2729
**mobile_rum_session_count_ios_sum** | **int** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the given org. | [optional]
2830
**mobile_rum_session_count_sum** | **int** | Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. | [optional]

docs/v1/UsageSummaryResponse.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ Name | Type | Description | Notes
2424
**indexed_events_count_agg_sum** | **int** | Shows the sum of all log events indexed over all hours in the current months for all organizations. | [optional]
2525
**infra_host_top99p_sum** | **int** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current months for all organizations. | [optional]
2626
**ingested_events_bytes_agg_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional]
27+
**iot_device_agg_sum** | **int** | Shows the sum of all IoT devices over all hours in the current months for all organizations. | [optional]
28+
**iot_device_top99p_sum** | **int** | Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. | [optional]
2729
**last_updated** | **datetime** | Shows the the most recent hour in the current months for all organizations for which all usages were calculated. | [optional]
2830
**live_indexed_events_agg_sum** | **int** | Shows the sum of all live logs indexed over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional]
2931
**live_ingested_bytes_agg_sum** | **int** | Shows the sum of all live logs bytes ingested over all hours in the current months for all organizations (data available as of December 1, 2020). | [optional]

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
from datadog_api_client.v1.model.usage_incident_management_response import UsageIncidentManagementResponse
2828
from datadog_api_client.v1.model.usage_indexed_spans_response import UsageIndexedSpansResponse
2929
from datadog_api_client.v1.model.usage_ingested_spans_response import UsageIngestedSpansResponse
30+
from datadog_api_client.v1.model.usage_io_t_response import UsageIoTResponse
3031
from datadog_api_client.v1.model.usage_lambda_response import UsageLambdaResponse
3132
from datadog_api_client.v1.model.usage_logs_by_index_response import UsageLogsByIndexResponse
3233
from datadog_api_client.v1.model.usage_logs_response import UsageLogsResponse
@@ -1708,6 +1709,132 @@ def __get_usage_indexed_spans(
17081709
callable=__get_usage_indexed_spans
17091710
)
17101711

1712+
def __get_usage_internet_of_things(
1713+
self,
1714+
start_hr,
1715+
**kwargs
1716+
):
1717+
"""Get hourly usage for IoT # noqa: E501
1718+
1719+
Get hourly usage for IoT. # noqa: E501
1720+
This method makes a synchronous HTTP request by default. To make an
1721+
asynchronous HTTP request, please pass async_req=True
1722+
1723+
>>> thread = api.get_usage_internet_of_things(start_hr, async_req=True)
1724+
>>> result = thread.get()
1725+
1726+
Args:
1727+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
1728+
1729+
Keyword Args:
1730+
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
1731+
_return_http_data_only (bool): response data without head status
1732+
code and headers. Default is True.
1733+
_preload_content (bool): if False, the urllib3.HTTPResponse object
1734+
will be returned without reading/decoding response data.
1735+
Default is True.
1736+
_request_timeout (float/tuple): timeout setting for this request. If one
1737+
number provided, it will be total request timeout. It can also
1738+
be a pair (tuple) of (connection, read) timeouts.
1739+
Default is None.
1740+
_check_input_type (bool): specifies if type checking
1741+
should be done one the data sent to the server.
1742+
Default is True.
1743+
_check_return_type (bool): specifies if type checking
1744+
should be done one the data received from the server.
1745+
Default is True.
1746+
_host_index (int/None): specifies the index of the server
1747+
that we want to use.
1748+
Default is read from the configuration.
1749+
async_req (bool): execute request asynchronously
1750+
1751+
Returns:
1752+
UsageIoTResponse
1753+
If the method is called asynchronously, returns the request
1754+
thread.
1755+
"""
1756+
kwargs['async_req'] = kwargs.get(
1757+
'async_req', False
1758+
)
1759+
kwargs['_return_http_data_only'] = kwargs.get(
1760+
'_return_http_data_only', True
1761+
)
1762+
kwargs['_preload_content'] = kwargs.get(
1763+
'_preload_content', True
1764+
)
1765+
kwargs['_request_timeout'] = kwargs.get(
1766+
'_request_timeout', None
1767+
)
1768+
kwargs['_check_input_type'] = kwargs.get(
1769+
'_check_input_type', True
1770+
)
1771+
kwargs['_check_return_type'] = kwargs.get(
1772+
'_check_return_type', True
1773+
)
1774+
kwargs['_host_index'] = kwargs.get('_host_index')
1775+
kwargs['start_hr'] = \
1776+
start_hr
1777+
return self.call_with_http_info(**kwargs)
1778+
1779+
self.get_usage_internet_of_things = _Endpoint(
1780+
settings={
1781+
'response_type': (UsageIoTResponse,),
1782+
'auth': [
1783+
'apiKeyAuth',
1784+
'appKeyAuth'
1785+
],
1786+
'endpoint_path': '/api/v1/usage/iot',
1787+
'operation_id': 'get_usage_internet_of_things',
1788+
'http_method': 'GET',
1789+
'servers': None,
1790+
},
1791+
params_map={
1792+
'all': [
1793+
'start_hr',
1794+
'end_hr',
1795+
],
1796+
'required': [
1797+
'start_hr',
1798+
],
1799+
'nullable': [
1800+
],
1801+
'enum': [
1802+
],
1803+
'validation': [
1804+
]
1805+
},
1806+
root_map={
1807+
'validations': {
1808+
},
1809+
'allowed_values': {
1810+
},
1811+
'openapi_types': {
1812+
'start_hr':
1813+
(datetime,),
1814+
'end_hr':
1815+
(datetime,),
1816+
},
1817+
'attribute_map': {
1818+
'start_hr': 'start_hr',
1819+
'end_hr': 'end_hr',
1820+
},
1821+
'location_map': {
1822+
'start_hr': 'query',
1823+
'end_hr': 'query',
1824+
},
1825+
'collection_format_map': {
1826+
}
1827+
},
1828+
headers_map={
1829+
'accept': [
1830+
'application/json;datetime-format=rfc3339'
1831+
],
1832+
'content_type': [],
1833+
},
1834+
api_client=api_client,
1835+
callable=__get_usage_internet_of_things
1836+
)
1837+
17111838
def __get_usage_lambda(
17121839
self,
17131840
start_hr,

0 commit comments

Comments
 (0)