Skip to content

Commit d2932ff

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6c05087 of spec repo
1 parent 9250f01 commit d2932ff

20 files changed

+724
-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.dev8",
7-
"regenerated": "2021-06-02 15:25:12.861970",
8-
"spec_repo_commit": "ea553b9"
7+
"regenerated": "2021-06-03 07:57:56.613553",
8+
"spec_repo_commit": "6c05087"
99
},
1010
"v2": {
1111
"apigentools_version": "1.4.1.dev8",
12-
"regenerated": "2021-06-02 15:25:40.405619",
13-
"spec_repo_commit": "ea553b9"
12+
"regenerated": "2021-06-03 07:58:23.253702",
13+
"spec_repo_commit": "6c05087"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ Class | Method | HTTP request | Description
260260
*UsageMeteringApi* | [**get_usage_audit_logs**](UsageMeteringApi.md#get_usage_audit_logs) | **GET** /api/v1/usage/audit_logs | Get hourly usage for audit logs
261261
*UsageMeteringApi* | [**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
262262
*UsageMeteringApi* | [**get_usage_cloud_security_posture_management**](UsageMeteringApi.md#get_usage_cloud_security_posture_management) | **GET** /api/v1/usage/cspm | Get hourly usage for CSPM
263+
*UsageMeteringApi* | [**get_usage_cws**](UsageMeteringApi.md#get_usage_cws) | **GET** /api/v1/usage/cws | Get hourly usage for Cloud Workload Security
263264
*UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
264265
*UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
265266
*UsageMeteringApi* | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
@@ -768,6 +769,8 @@ Class | Method | HTTP request | Description
768769
- [UsageBillableSummaryHour](UsageBillableSummaryHour.md)
769770
- [UsageBillableSummaryKeys](UsageBillableSummaryKeys.md)
770771
- [UsageBillableSummaryResponse](UsageBillableSummaryResponse.md)
772+
- [UsageCWSHour](UsageCWSHour.md)
773+
- [UsageCWSResponse](UsageCWSResponse.md)
771774
- [UsageCloudSecurityPostureManagementHour](UsageCloudSecurityPostureManagementHour.md)
772775
- [UsageCloudSecurityPostureManagementResponse](UsageCloudSecurityPostureManagementResponse.md)
773776
- [UsageCustomReportsAttributes](UsageCustomReportsAttributes.md)

docs/v1/UsageAttributionValues.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Name | Type | Description | Notes
1515
**container_usage** | **float** | The container usage by tag(s). | [optional]
1616
**custom_timeseries_percentage** | **float** | The percentage of custom metrics usage by tag(s). | [optional]
1717
**custom_timeseries_usage** | **float** | The custom metrics usage by tag(s). | [optional]
18+
**cws_container_percentage** | **float** | The percentage of Cloud Workload Security container usage by tag(s) | [optional]
19+
**cws_container_usage** | **float** | The Cloud Workload Security container usage by tag(s) | [optional]
20+
**cws_host_percentage** | **float** | The percentage of Cloud Workload Security host usage by tag(s) | [optional]
21+
**cws_host_usage** | **float** | The Cloud Workload Security host usage by tag(s) | [optional]
1822
**infra_host_percentage** | **float** | The percentage of infrastructure host usage by tag(s). | [optional]
1923
**infra_host_usage** | **float** | The infrastructure host usage by tag(s). | [optional]
2024
**lambda_functions_percentage** | **float** | The percentage of Lambda function usage by tag(s). | [optional]

docs/v1/UsageCWSHour.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# UsageCWSHour
2+
3+
Cloud Workload Security usage for a given organization for a given hour.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**cws_container_count** | **int** | The total number of Cloud Workload Security container hours from the start of the given hour’s month until the given hour. | [optional]
9+
**cws_host_count** | **int** | The total number of Cloud Workload Security host hours from the start of the given hour’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/UsageCWSResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageCWSResponse
2+
3+
Response containing the Cloud Workload Security usage for each hour for a given organization.
4+
5+
## Properties
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**usage** | [**[UsageCWSHour]**](UsageCWSHour.md) | Get hourly usage for Cloud Workload Security. | [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: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Method | HTTP request | Description
1616
[**get_usage_audit_logs**](UsageMeteringApi.md#get_usage_audit_logs) | **GET** /api/v1/usage/audit_logs | Get hourly usage for audit logs
1717
[**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your account
1818
[**get_usage_cloud_security_posture_management**](UsageMeteringApi.md#get_usage_cloud_security_posture_management) | **GET** /api/v1/usage/cspm | Get hourly usage for CSPM
19+
[**get_usage_cws**](UsageMeteringApi.md#get_usage_cws) | **GET** /api/v1/usage/cws | Get hourly usage for Cloud Workload Security
1920
[**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
2021
[**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
2122
[**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
@@ -922,6 +923,83 @@ Name | Type | Description | Notes
922923
- **Accept**: application/json;datetime-format=rfc3339
923924

924925

926+
### HTTP response details
927+
| Status code | Description | Response headers |
928+
|-------------|-------------|------------------|
929+
**200** | OK | - |
930+
**400** | Bad Request | - |
931+
**403** | Forbidden - User is not authorized | - |
932+
933+
[[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)
934+
935+
# **get_usage_cws**
936+
> UsageCWSResponse get_usage_cws(start_hr)
937+
938+
Get hourly usage for Cloud Workload Security
939+
940+
Get hourly usage for Cloud Workload Security.
941+
942+
### Example
943+
944+
* Api Key Authentication (apiKeyAuth):
945+
* Api Key Authentication (appKeyAuth):
946+
```python
947+
import os
948+
from dateutil.parser import parse as dateutil_parser
949+
from datadog_api_client.v1 import ApiClient, ApiException, Configuration
950+
from datadog_api_client.v1.api import usage_metering_api
951+
from datadog_api_client.v1.models import *
952+
from pprint import pprint
953+
# See configuration.py for a list of all supported configuration parameters.
954+
configuration = Configuration()
955+
956+
# Enter a context with an instance of the API client
957+
with ApiClient(configuration) as api_client:
958+
# Create an instance of the API class
959+
api_instance = usage_metering_api.UsageMeteringApi(api_client)
960+
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.
961+
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)
962+
963+
# example passing only required values which don't have defaults set
964+
try:
965+
# Get hourly usage for Cloud Workload Security
966+
api_response = api_instance.get_usage_cws(start_hr)
967+
pprint(api_response)
968+
except ApiException as e:
969+
print("Exception when calling UsageMeteringApi->get_usage_cws: %s\n" % e)
970+
971+
# example passing only required values which don't have defaults set
972+
# and optional values
973+
try:
974+
# Get hourly usage for Cloud Workload Security
975+
api_response = api_instance.get_usage_cws(start_hr, end_hr=end_hr)
976+
pprint(api_response)
977+
except ApiException as e:
978+
print("Exception when calling UsageMeteringApi->get_usage_cws: %s\n" % e)
979+
```
980+
981+
982+
### Parameters
983+
984+
Name | Type | Description | Notes
985+
------------- | ------------- | ------------- | -------------
986+
**start_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. |
987+
**end_hr** | **datetime**| Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. | [optional]
988+
989+
### Return type
990+
991+
[**UsageCWSResponse**](UsageCWSResponse.md)
992+
993+
### Authorization
994+
995+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
996+
997+
### HTTP request headers
998+
999+
- **Content-Type**: Not defined
1000+
- **Accept**: application/json;datetime-format=rfc3339
1001+
1002+
9251003
### HTTP response details
9261004
| Status code | Description | Response headers |
9271005
|-------------|-------------|------------------|

docs/v1/UsageSummaryDate.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ Name | Type | Description | Notes
2020
**cspm_container_hwm** | **int** | Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for all organizations. | [optional]
2121
**cspm_host_top99p** | **int** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for all organizations. | [optional]
2222
**custom_ts_avg** | **int** | Shows the average number of distinct custom metrics over all hours in the current date for all organizations. | [optional]
23+
**cws_container_count_avg** | **int** | Shows the average of all distinct Cloud Workload Security containers over all hours in the current date for all organizations. | [optional]
24+
**cws_host_top99p** | **int** | Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for all organizations. | [optional]
2325
**date** | **datetime** | The date for the usage. | [optional]
2426
**fargate_tasks_count_avg** | **int** | Shows the high-watermark of all Fargate tasks over all hours in the current date for all organizations. | [optional]
2527
**fargate_tasks_count_hwm** | **int** | Shows the average of all Fargate tasks 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
@@ -20,6 +20,8 @@ Name | Type | Description | Notes
2020
**cspm_container_hwm** | **int** | Shows the high-water mark of Cloud Security Posture Management containers over all hours in the current date for the given org. | [optional]
2121
**cspm_host_top99p** | **int** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current date for the given org. | [optional]
2222
**custom_ts_avg** | **int** | Shows the average number of distinct custom metrics over all hours in the current date for the given org. | [optional]
23+
**cws_container_count_avg** | **int** | Shows the average of all distinct Cloud Workload Security containers over all hours in the current date for the given org. | [optional]
24+
**cws_host_top99p** | **int** | Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current date for the given org. | [optional]
2325
**fargate_tasks_count_avg** | **int** | The average task count for Fargate. | [optional]
2426
**fargate_tasks_count_hwm** | **int** | Shows the high-water mark of all Fargate tasks over all hours in the current date for the given org. | [optional]
2527
**gcp_host_top99p** | **int** | Shows the 99th percentile of all GCP hosts 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
@@ -21,6 +21,8 @@ Name | Type | Description | Notes
2121
**cspm_container_hwm_sum** | **int** | Shows the sum of the the high-water marks of Cloud Security Posture Management containers over all hours in the current months for all organizations. | [optional]
2222
**cspm_host_top99p_sum** | **int** | Shows the 99th percentile of all Cloud Security Posture Management hosts over all hours in the current months for all organizations. | [optional]
2323
**custom_ts_sum** | **int** | Shows the average number of distinct custom metrics over all hours in the current months for all organizations. | [optional]
24+
**cws_containers_avg_sum** | **int** | Shows the average of all distinct Cloud Workload Security containers over all hours in the current months for all organizations. | [optional]
25+
**cws_host_top99p_sum** | **int** | Shows the 99th percentile of all Cloud Workload Security hosts over all hours in the current months for all organizations. | [optional]
2426
**end_date** | **datetime** | Shows the last date of usage in the current months for all organizations. | [optional]
2527
**fargate_tasks_count_avg_sum** | **int** | Shows the average of all Fargate tasks over all hours in the current months for all organizations. | [optional]
2628
**fargate_tasks_count_hwm_sum** | **int** | Shows the sum of the high-water marks of all Fargate tasks over all hours in the current months for all organizations. | [optional]

src/datadog_api_client/v1/api/usage_metering_api.py

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
from datadog_api_client.v1.model.usage_attribution_supported_metrics import UsageAttributionSupportedMetrics
2424
from datadog_api_client.v1.model.usage_audit_logs_response import UsageAuditLogsResponse
2525
from datadog_api_client.v1.model.usage_billable_summary_response import UsageBillableSummaryResponse
26+
from datadog_api_client.v1.model.usage_cws_response import UsageCWSResponse
2627
from datadog_api_client.v1.model.usage_cloud_security_posture_management_response import (
2728
UsageCloudSecurityPostureManagementResponse,
2829
)
@@ -618,6 +619,51 @@ def __init__(self, api_client=None):
618619
api_client=api_client,
619620
)
620621

622+
self._get_usage_cws_endpoint = _Endpoint(
623+
settings={
624+
"response_type": (UsageCWSResponse,),
625+
"auth": ["apiKeyAuth", "appKeyAuth"],
626+
"endpoint_path": "/api/v1/usage/cws",
627+
"operation_id": "get_usage_cws",
628+
"http_method": "GET",
629+
"servers": None,
630+
},
631+
params_map={
632+
"all": [
633+
"start_hr",
634+
"end_hr",
635+
],
636+
"required": [
637+
"start_hr",
638+
],
639+
"nullable": [],
640+
"enum": [],
641+
"validation": [],
642+
},
643+
root_map={
644+
"validations": {},
645+
"allowed_values": {},
646+
"openapi_types": {
647+
"start_hr": (datetime,),
648+
"end_hr": (datetime,),
649+
},
650+
"attribute_map": {
651+
"start_hr": "start_hr",
652+
"end_hr": "end_hr",
653+
},
654+
"location_map": {
655+
"start_hr": "query",
656+
"end_hr": "query",
657+
},
658+
"collection_format_map": {},
659+
},
660+
headers_map={
661+
"accept": ["application/json;datetime-format=rfc3339"],
662+
"content_type": [],
663+
},
664+
api_client=api_client,
665+
)
666+
621667
self._get_usage_fargate_endpoint = _Endpoint(
622668
settings={
623669
"response_type": (UsageFargateResponse,),
@@ -2078,6 +2124,50 @@ def get_usage_cloud_security_posture_management(self, start_hr, **kwargs):
20782124
kwargs["start_hr"] = start_hr
20792125
return self._get_usage_cloud_security_posture_management_endpoint.call_with_http_info(**kwargs)
20802126

2127+
def get_usage_cws(self, start_hr, **kwargs):
2128+
"""Get hourly usage for Cloud Workload Security # noqa: E501
2129+
2130+
Get hourly usage for Cloud Workload Security. # noqa: E501
2131+
This method makes a synchronous HTTP request by default. To make an
2132+
asynchronous HTTP request, please pass async_req=True
2133+
2134+
>>> thread = api.get_usage_cws(start_hr, async_req=True)
2135+
>>> result = thread.get()
2136+
2137+
Args:
2138+
start_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
2139+
2140+
Keyword Args:
2141+
end_hr (datetime): Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.. [optional]
2142+
_return_http_data_only (bool): response data without head status
2143+
code and headers. Default is True.
2144+
_preload_content (bool): if False, the urllib3.HTTPResponse object
2145+
will be returned without reading/decoding response data.
2146+
Default is True.
2147+
_request_timeout (float/tuple): timeout setting for this request. If one
2148+
number provided, it will be total request timeout. It can also
2149+
be a pair (tuple) of (connection, read) timeouts.
2150+
Default is None.
2151+
_check_input_type (bool): specifies if type checking
2152+
should be done one the data sent to the server.
2153+
Default is True.
2154+
_check_return_type (bool): specifies if type checking
2155+
should be done one the data received from the server.
2156+
Default is True.
2157+
_host_index (int/None): specifies the index of the server
2158+
that we want to use.
2159+
Default is read from the configuration.
2160+
async_req (bool): execute request asynchronously
2161+
2162+
Returns:
2163+
UsageCWSResponse
2164+
If the method is called asynchronously, returns the request
2165+
thread.
2166+
"""
2167+
kwargs = self._get_usage_cws_endpoint.default_arguments(kwargs)
2168+
kwargs["start_hr"] = start_hr
2169+
return self._get_usage_cws_endpoint.call_with_http_info(**kwargs)
2170+
20812171
def get_usage_fargate(self, start_hr, **kwargs):
20822172
"""Get hourly usage for Fargate # noqa: E501
20832173

0 commit comments

Comments
 (0)