Skip to content

Commit 07c117c

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Regenerate client from commit abcc1ed of spec repo (#342)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 031a42f commit 07c117c

20 files changed

+794
-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.dev6",
7-
"regenerated": "2021-03-25 11:07:51.194255",
8-
"spec_repo_commit": "20f68cb"
7+
"regenerated": "2021-03-26 09:50:29.916648",
8+
"spec_repo_commit": "abcc1ed"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev6",
12-
"regenerated": "2021-03-25 11:08:34.265135",
13-
"spec_repo_commit": "20f68cb"
12+
"regenerated": "2021-03-26 09:51:13.983094",
13+
"spec_repo_commit": "abcc1ed"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ Class | Method | HTTP request | Description
257257
*UsageMeteringApi* | [**get_usage_analyzed_logs**](UsageMeteringApi.md#get_usage_analyzed_logs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
258258
*UsageMeteringApi* | [**get_usage_attribution**](UsageMeteringApi.md#get_usage_attribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
259259
*UsageMeteringApi* | [**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
260+
*UsageMeteringApi* | [**get_usage_compliance_monitoring**](UsageMeteringApi.md#get_usage_compliance_monitoring) | **GET** /api/v1/usage/compliance-monitoring | Get hourly usage for Compliance Monitoring
260261
*UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
261262
*UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
262263
*UsageMeteringApi* | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
@@ -687,6 +688,8 @@ Class | Method | HTTP request | Description
687688
- [UsageBillableSummaryHour](UsageBillableSummaryHour.md)
688689
- [UsageBillableSummaryKeys](UsageBillableSummaryKeys.md)
689690
- [UsageBillableSummaryResponse](UsageBillableSummaryResponse.md)
691+
- [UsageComplianceHour](UsageComplianceHour.md)
692+
- [UsageComplianceResponse](UsageComplianceResponse.md)
690693
- [UsageCustomReportsAttributes](UsageCustomReportsAttributes.md)
691694
- [UsageCustomReportsData](UsageCustomReportsData.md)
692695
- [UsageCustomReportsMeta](UsageCustomReportsMeta.md)

docs/v1/UsageComplianceHour.md

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

docs/v1/UsageComplianceResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageComplianceResponse
2+
3+
The response containing the Compliance Monitoring usage for each hour for a given organization.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**usage** | [**[UsageComplianceHour]**](UsageComplianceHour.md) | Get hourly usage for Compliance Monitoring. | [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/UsageMeteringApi.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Method | HTTP request | Description
1414
[**get_usage_analyzed_logs**](UsageMeteringApi.md#get_usage_analyzed_logs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
1515
[**get_usage_attribution**](UsageMeteringApi.md#get_usage_attribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
1616
[**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
17+
[**get_usage_compliance_monitoring**](UsageMeteringApi.md#get_usage_compliance_monitoring) | **GET** /api/v1/usage/compliance-monitoring | Get hourly usage for Compliance Monitoring
1718
[**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
1819
[**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
1920
[**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
@@ -865,6 +866,93 @@ Name | Type | Description | Notes
865866
- **Accept**: application/json;datetime-format=rfc3339
866867

867868

869+
### HTTP response details
870+
| Status code | Description | Response headers |
871+
|-------------|-------------|------------------|
872+
**200** | OK | - |
873+
**400** | Bad Request | - |
874+
**403** | Forbidden - User is not authorized | - |
875+
876+
[[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)
877+
878+
# **get_usage_compliance_monitoring**
879+
> UsageComplianceResponse get_usage_compliance_monitoring(start_hr)
880+
881+
Get hourly usage for Compliance Monitoring
882+
883+
Get hourly usage for Compliance Monitoring.
884+
885+
### Example
886+
887+
* Api Key Authentication (apiKeyAuth):
888+
* Api Key Authentication (appKeyAuth):
889+
```python
890+
import os
891+
from dateutil.parser import parse as dateutil_parser
892+
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
893+
from datadog_api_client.v1.api import usage_metering_api
894+
from datadog_api_client.v1.models import *
895+
from pprint import pprint
896+
# See configuration.py for a list of all supported configuration parameters.
897+
configuration = Configuration()
898+
899+
# Defining the site is optional and defaults to datadoghq.com
900+
if "DD_SITE" in os.environ:
901+
configuration.server_variables["site"] = os.environ["DD_SITE"]
902+
903+
# Configure API key authorization: apiKeyAuth
904+
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')
905+
906+
# Configure API key authorization: appKeyAuth
907+
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')
908+
909+
# Enter a context with an instance of the API client
910+
with ApiClient(configuration) as api_client:
911+
# Create an instance of the API class
912+
api_instance = usage_metering_api.UsageMeteringApi(api_client)
913+
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.
914+
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)
915+
916+
# example passing only required values which don't have defaults set
917+
try:
918+
# Get hourly usage for Compliance Monitoring
919+
api_response = api_instance.get_usage_compliance_monitoring(start_hr)
920+
pprint(api_response)
921+
except ApiException as e:
922+
print("Exception when calling UsageMeteringApi->get_usage_compliance_monitoring: %s\n" % e)
923+
924+
# example passing only required values which don't have defaults set
925+
# and optional values
926+
try:
927+
# Get hourly usage for Compliance Monitoring
928+
api_response = api_instance.get_usage_compliance_monitoring(start_hr, end_hr=end_hr)
929+
pprint(api_response)
930+
except ApiException as e:
931+
print("Exception when calling UsageMeteringApi->get_usage_compliance_monitoring: %s\n" % e)
932+
```
933+
934+
935+
### Parameters
936+
937+
Name | Type | Description | Notes
938+
------------- | ------------- | ------------- | -------------
939+
**start_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour. |
940+
**end_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour. | [optional]
941+
942+
### Return type
943+
944+
[**UsageComplianceResponse**](UsageComplianceResponse.md)
945+
946+
### Authorization
947+
948+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
949+
950+
### HTTP request headers
951+
952+
- **Content-Type**: Not defined
953+
- **Accept**: application/json;datetime-format=rfc3339
954+
955+
868956
### HTTP response details
869957
| Status code | Description | Response headers |
870958
|-------------|-------------|------------------|

docs/v1/UsageSummaryDate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**aws_lambda_invocations_sum** | **int** | Shows the sum of all AWS Lambda invocations over all hours in the current date for all organizations. | [optional]
1414
**azure_app_service_top99p** | **int** | Shows the 99th percentile of all Azure app services over all hours in the current date for all organizations. | [optional]
1515
**billable_ingested_bytes_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional]
16+
**compliance_container_count_sum** | **bool, date, datetime, dict, float, int, list, str, none_type** | Shows the sum of compliance containers over all hours in the current date for all organizations. | [optional]
17+
**compliance_host_count_sum** | **int** | Shows the sum of compliance hosts over all hours in the current date for all organizations. | [optional]
1618
**container_avg** | **int** | Shows the average of all distinct containers over all hours in the current date for all organizations. | [optional]
1719
**container_hwm** | **int** | Shows the high-water mark of all distinct containers over all hours in the current date for all organizations. | [optional]
1820
**custom_ts_avg** | **int** | Shows the average number of distinct custom metrics 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
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**aws_lambda_invocations_sum** | **int** | Shows the sum of all AWS Lambda invocations over all hours in the current date for the given org. | [optional]
1414
**azure_app_service_top99p** | **int** | Shows the 99th percentile of all Azure app services over all hours in the current date for the given org. | [optional]
1515
**billable_ingested_bytes_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional]
16+
**compliance_container_agg_sum** | **bool, date, datetime, dict, float, int, list, str, none_type** | Shows the sum of all compliance containers over all hours in the current date for the given org. | [optional]
17+
**compliance_host_agg_sum** | **int** | Shows the sum of all compliance hosts over all hours in the current date for the given org. | [optional]
1618
**container_avg** | **int** | Shows the average of all distinct containers over all hours in the current date for the given org. | [optional]
1719
**container_hwm** | **int** | Shows the high-water mark of all distinct containers over all hours in the current date for the given org. | [optional]
1820
**custom_ts_avg** | **int** | Shows the average number of distinct custom metrics 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
@@ -14,6 +14,8 @@ Name | Type | Description | Notes
1414
**azure_app_service_top99p_sum** | **int** | Shows the 99th percentile of all Azure app services over all hours in the current months for all organizations. | [optional]
1515
**azure_host_top99p_sum** | **int** | Shows the 99th percentile of all Azure hosts over all hours in the current months for all organizations. | [optional]
1616
**billable_ingested_bytes_agg_sum** | **int** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional]
17+
**compliance_container_agg_sum** | **bool, date, datetime, dict, float, int, list, str, none_type** | Shows the sum of all compliance containers over all hours in the current months for all organizations. | [optional]
18+
**compliance_host_agg_sum** | **int** | Shows the sum of all compliance hosts over all hours in the current months for all organizations. | [optional]
1719
**container_avg_sum** | **int** | Shows the average of all distinct containers over all hours in the current months for all organizations. | [optional]
1820
**container_hwm_sum** | **int** | Shows the sum of the high-water marks of all distinct containers over all hours in the current months for all organizations. | [optional]
1921
**custom_ts_sum** | **int** | Shows the average number of distinct custom metrics over all hours in the current months for all organizations. | [optional]

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from datadog_api_client.v1.model.usage_attribution_response import UsageAttributionResponse
2222
from datadog_api_client.v1.model.usage_attribution_sort import UsageAttributionSort
2323
from datadog_api_client.v1.model.usage_billable_summary_response import UsageBillableSummaryResponse
24+
from datadog_api_client.v1.model.usage_compliance_response import UsageComplianceResponse
2425
from datadog_api_client.v1.model.usage_custom_reports_response import UsageCustomReportsResponse
2526
from datadog_api_client.v1.model.usage_fargate_response import UsageFargateResponse
2627
from datadog_api_client.v1.model.usage_hosts_response import UsageHostsResponse
@@ -1031,6 +1032,102 @@ def __get_usage_billable_summary(self, **kwargs):
10311032
callable=__get_usage_billable_summary,
10321033
)
10331034

1035+
def __get_usage_compliance_monitoring(self, start_hr, **kwargs):
1036+
"""Get hourly usage for Compliance Monitoring # noqa: E501
1037+
1038+
Get hourly usage for Compliance Monitoring. # noqa: E501
1039+
This method makes a synchronous HTTP request by default. To make an
1040+
asynchronous HTTP request, please pass async_req=True
1041+
1042+
>>> thread = api.get_usage_compliance_monitoring(start_hr, async_req=True)
1043+
>>> result = thread.get()
1044+
1045+
Args:
1046+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
1047+
1048+
Keyword Args:
1049+
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
1050+
_return_http_data_only (bool): response data without head status
1051+
code and headers. Default is True.
1052+
_preload_content (bool): if False, the urllib3.HTTPResponse object
1053+
will be returned without reading/decoding response data.
1054+
Default is True.
1055+
_request_timeout (float/tuple): timeout setting for this request. If one
1056+
number provided, it will be total request timeout. It can also
1057+
be a pair (tuple) of (connection, read) timeouts.
1058+
Default is None.
1059+
_check_input_type (bool): specifies if type checking
1060+
should be done one the data sent to the server.
1061+
Default is True.
1062+
_check_return_type (bool): specifies if type checking
1063+
should be done one the data received from the server.
1064+
Default is True.
1065+
_host_index (int/None): specifies the index of the server
1066+
that we want to use.
1067+
Default is read from the configuration.
1068+
async_req (bool): execute request asynchronously
1069+
1070+
Returns:
1071+
UsageComplianceResponse
1072+
If the method is called asynchronously, returns the request
1073+
thread.
1074+
"""
1075+
kwargs["async_req"] = kwargs.get("async_req", False)
1076+
kwargs["_return_http_data_only"] = kwargs.get("_return_http_data_only", True)
1077+
kwargs["_preload_content"] = kwargs.get("_preload_content", True)
1078+
kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
1079+
kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
1080+
kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
1081+
kwargs["_host_index"] = kwargs.get("_host_index")
1082+
kwargs["start_hr"] = start_hr
1083+
return self.call_with_http_info(**kwargs)
1084+
1085+
self.get_usage_compliance_monitoring = _Endpoint(
1086+
settings={
1087+
"response_type": (UsageComplianceResponse,),
1088+
"auth": ["apiKeyAuth", "appKeyAuth"],
1089+
"endpoint_path": "/api/v1/usage/compliance-monitoring",
1090+
"operation_id": "get_usage_compliance_monitoring",
1091+
"http_method": "GET",
1092+
"servers": None,
1093+
},
1094+
params_map={
1095+
"all": [
1096+
"start_hr",
1097+
"end_hr",
1098+
],
1099+
"required": [
1100+
"start_hr",
1101+
],
1102+
"nullable": [],
1103+
"enum": [],
1104+
"validation": [],
1105+
},
1106+
root_map={
1107+
"validations": {},
1108+
"allowed_values": {},
1109+
"openapi_types": {
1110+
"start_hr": (datetime,),
1111+
"end_hr": (datetime,),
1112+
},
1113+
"attribute_map": {
1114+
"start_hr": "start_hr",
1115+
"end_hr": "end_hr",
1116+
},
1117+
"location_map": {
1118+
"start_hr": "query",
1119+
"end_hr": "query",
1120+
},
1121+
"collection_format_map": {},
1122+
},
1123+
headers_map={
1124+
"accept": ["application/json;datetime-format=rfc3339"],
1125+
"content_type": [],
1126+
},
1127+
api_client=api_client,
1128+
callable=__get_usage_compliance_monitoring,
1129+
)
1130+
10341131
def __get_usage_fargate(self, start_hr, **kwargs):
10351132
"""Get hourly usage for Fargate # noqa: E501
10361133

0 commit comments

Comments
 (0)