Skip to content

Commit aef283f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
and
ci.datadog-api-spec
authored
Regenerate client from commit 171775a of spec repo (#161)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 9e8a43d commit aef283f

34 files changed

+2632
-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.3.0",
7-
"regenerated": "2020-11-18 17:04:46.172436",
8-
"spec_repo_commit": "e3c8008"
7+
"regenerated": "2020-11-19 18:22:25.812062",
8+
"spec_repo_commit": "171775a"
99
},
1010
"v2": {
1111
"apigentools_version": "1.3.0",
12-
"regenerated": "2020-11-18 17:04:56.312456",
13-
"spec_repo_commit": "e3c8008"
12+
"regenerated": "2020-11-19 18:22:36.800055",
13+
"spec_repo_commit": "171775a"
1414
}
1515
}
1616
}

docs/v1/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ Class | Method | HTTP request | Description
245245
*UsageMeteringApi* | [**get_specified_monthly_custom_reports**](UsageMeteringApi.md#get_specified_monthly_custom_reports) | **GET** /api/v1/monthly_custom_reports/{report_id} | Get specified monthly custom reports
246246
*UsageMeteringApi* | [**get_tracing_without_limits**](UsageMeteringApi.md#get_tracing_without_limits) | **GET** /api/v1/usage/tracing-without-limits | Get hourly usage for tracing without limits
247247
*UsageMeteringApi* | [**get_usage_analyzed_logs**](UsageMeteringApi.md#get_usage_analyzed_logs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
248+
*UsageMeteringApi* | [**get_usage_attribution**](UsageMeteringApi.md#get_usage_attribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
248249
*UsageMeteringApi* | [**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your multi-org account
249250
*UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
250251
*UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
@@ -598,6 +599,15 @@ Class | Method | HTTP request | Description
598599
- [ToplistWidgetRequest](ToplistWidgetRequest.md)
599600
- [UsageAnalyzedLogsHour](UsageAnalyzedLogsHour.md)
600601
- [UsageAnalyzedLogsResponse](UsageAnalyzedLogsResponse.md)
602+
- [UsageAttributionAggregates](UsageAttributionAggregates.md)
603+
- [UsageAttributionAggregatesBody](UsageAttributionAggregatesBody.md)
604+
- [UsageAttributionBody](UsageAttributionBody.md)
605+
- [UsageAttributionMetadata](UsageAttributionMetadata.md)
606+
- [UsageAttributionPagination](UsageAttributionPagination.md)
607+
- [UsageAttributionResponse](UsageAttributionResponse.md)
608+
- [UsageAttributionSort](UsageAttributionSort.md)
609+
- [UsageAttributionTagNames](UsageAttributionTagNames.md)
610+
- [UsageAttributionValues](UsageAttributionValues.md)
601611
- [UsageBillableSummaryBody](UsageBillableSummaryBody.md)
602612
- [UsageBillableSummaryHour](UsageBillableSummaryHour.md)
603613
- [UsageBillableSummaryKeys](UsageBillableSummaryKeys.md)

docs/v1/UsageAttributionAggregates.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UsageAttributionAggregates
2+
3+
An array of available aggregates.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | [**[UsageAttributionAggregatesBody]**](UsageAttributionAggregatesBody.md) | An array of available aggregates. |
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+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# UsageAttributionAggregatesBody
2+
3+
The object containing the aggregates.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**agg_type** | **str** | The aggregate type. | [optional]
8+
**field** | **str** | The field. | [optional]
9+
**value** | **float** | The value for a given field. | [optional]
10+
11+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
12+
13+

docs/v1/UsageAttributionBody.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# UsageAttributionBody
2+
3+
Usage Summary by tag for a given organization.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**month** | **datetime** | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM]. | [optional]
8+
**public_id** | **str** | The organization public ID. | [optional]
9+
**tags** | [**UsageAttributionTagNames**](UsageAttributionTagNames.md) | | [optional]
10+
**updated_at** | **str** | Shows the the most recent hour in the current months for all organizations for which all usages were calculated. | [optional]
11+
**values** | [**UsageAttributionValues**](UsageAttributionValues.md) | | [optional]
12+
13+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
14+
15+

docs/v1/UsageAttributionMetadata.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageAttributionMetadata
2+
3+
The object containing document metadata.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**aggregates** | [**UsageAttributionAggregates**](UsageAttributionAggregates.md) | | [optional]
8+
**pagination** | [**UsageAttributionPagination**](UsageAttributionPagination.md) | | [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/UsageAttributionPagination.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# UsageAttributionPagination
2+
3+
The page count for the current pagination.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**limit** | **int** | Maximum amount of records to be returned. | [optional]
8+
**offset** | **int** | Records to be skipped before beginning to return. | [optional]
9+
**sort_direction** | **str** | Direction to sort by. | [optional]
10+
**sort_name** | **str** | Field to sort by. | [optional]
11+
**total_number_of_records** | **int** | Total number of records. | [optional]
12+
13+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
14+
15+

docs/v1/UsageAttributionResponse.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# UsageAttributionResponse
2+
3+
Response containing the Usage Summary by tag(s).
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**metadata** | [**UsageAttributionMetadata**](UsageAttributionMetadata.md) | | [optional]
8+
**usage** | [**[UsageAttributionBody]**](UsageAttributionBody.md) | Get Usage Summary by tag(s). | [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/UsageAttributionSort.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UsageAttributionSort
2+
3+
The field to sort by.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**value** | **str** | The field to sort by. | defaults to "custom_timeseries_usage", must be one of ["api_percentage", "snmp_usage", "lambda_percentage", "apm_host_usage", "api_usage", "container_usage", "custom_timeseries_percentage", "container_percentage", "lambda_usage", "apm_host_percentage", "npm_host_percentage", "browser_percentage", "browser_usage", "infra_host_percentage", "snmp_percentage", "npm_host_usage", "infra_host_usage", "custom_timeseries_usage", ]
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/UsageAttributionTagNames.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# UsageAttributionTagNames
2+
3+
Usage Summary by tag name.
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**any string name** | **[str]** | any string name can be used but the value must be the correct type | [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/UsageAttributionValues.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# UsageAttributionValues
2+
3+
Fields in Usage Summary by tag(s).
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**api_percentage** | **float** | The percentage of synthetic API test usage by tag(s). | [optional]
8+
**api_usage** | **float** | The synthetic API test usage by tag(s). | [optional]
9+
**apm_host_percentage** | **float** | The percentage of APM host usage by tag(s). | [optional]
10+
**apm_host_usage** | **float** | The APM host usage by tag(s). | [optional]
11+
**browser_percentage** | **float** | The percentage of synthetic browser test usage by tag(s). | [optional]
12+
**browser_usage** | **float** | The synthetic browser test usage by tag(s). | [optional]
13+
**container_percentage** | **float** | The percentage of container usage by tag(s). | [optional]
14+
**container_usage** | **float** | The container usage by tag(s). | [optional]
15+
**custom_timeseries_percentage** | **float** | The percentage of custom metrics usage by tag(s). | [optional]
16+
**custom_timeseries_usage** | **float** | The custom metrics usage by tag(s). | [optional]
17+
**infra_host_percentage** | **float** | The percentage of infrastructure host usage by tag(s). | [optional]
18+
**infra_host_usage** | **float** | The infrastructure host usage by tag(s). | [optional]
19+
**lambda_percentage** | **float** | The percentage of lambda function usage by tag(s). | [optional]
20+
**lambda_usage** | **float** | The lambda function usage by tag(s). | [optional]
21+
**npm_host_percentage** | **float** | The percentage of network host usage by tag(s). | [optional]
22+
**npm_host_usage** | **float** | The network host usage by tag(s). | [optional]
23+
**snmp_percentage** | **float** | The percentage of network device usage by tag(s). | [optional]
24+
**snmp_usage** | **float** | The network device usage by tag(s). | [optional]
25+
26+
[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md)
27+
28+

docs/v1/UsageMeteringApi.md

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Method | HTTP request | Description
1212
[**get_specified_monthly_custom_reports**](UsageMeteringApi.md#get_specified_monthly_custom_reports) | **GET** /api/v1/monthly_custom_reports/{report_id} | Get specified monthly custom reports
1313
[**get_tracing_without_limits**](UsageMeteringApi.md#get_tracing_without_limits) | **GET** /api/v1/usage/tracing-without-limits | Get hourly usage for tracing without limits
1414
[**get_usage_analyzed_logs**](UsageMeteringApi.md#get_usage_analyzed_logs) | **GET** /api/v1/usage/analyzed_logs | Get hourly usage for analyzed logs
15+
[**get_usage_attribution**](UsageMeteringApi.md#get_usage_attribution) | **GET** /api/v1/usage/attribution | Get Usage Attribution
1516
[**get_usage_billable_summary**](UsageMeteringApi.md#get_usage_billable_summary) | **GET** /api/v1/usage/billable-summary | Get billable usage across your multi-org account
1617
[**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
1718
[**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
@@ -762,6 +763,108 @@ Name | Type | Description | Notes
762763

763764
[[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)
764765

766+
# **get_usage_attribution**
767+
> UsageAttributionResponse get_usage_attribution(start_month, fields)
768+
769+
Get Usage Attribution
770+
771+
Get Usage Attribution.
772+
773+
### Example
774+
775+
* Api Key Authentication (apiKeyAuth):
776+
* Api Key Authentication (appKeyAuth):
777+
```python
778+
import os
779+
from dateutil.parser import parse as dateutil_parser
780+
import datadog_api_client.v1
781+
from datadog_api_client.v1.api import usage_metering_api
782+
from datadog_api_client.v1.models import *
783+
from pprint import pprint
784+
# Defining the host is optional and defaults to https://api.datadoghq.com
785+
# See configuration.py for a list of all supported configuration parameters.
786+
configuration = datadog_api_client.v1.Configuration(
787+
host = "https://api.datadoghq.com"
788+
)
789+
790+
# The client must configure the authentication and authorization parameters
791+
# in accordance with the API server security policy.
792+
# Examples for each auth method are provided below, use the example that
793+
# satisfies your auth use case.
794+
795+
# Configure API key authorization: apiKeyAuth
796+
configuration.api_key['apiKeyAuth'] = os.getenv('DD_CLIENT_API_KEY')
797+
798+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
799+
# configuration.api_key_prefix['apiKeyAuth'] = 'Bearer'
800+
801+
# Configure API key authorization: appKeyAuth
802+
configuration.api_key['appKeyAuth'] = os.getenv('DD_CLIENT_APP_KEY')
803+
804+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
805+
# configuration.api_key_prefix['appKeyAuth'] = 'Bearer'
806+
807+
# Enter a context with an instance of the API client
808+
with datadog_api_client.v1.ApiClient(configuration) as api_client:
809+
# Create an instance of the API class
810+
api_instance = usage_metering_api.UsageMeteringApi(api_client)
811+
start_month = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
812+
fields = "fields_example" # str | The specified field to search results for.
813+
end_month = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional)
814+
org_id = 1 # int | Include usage summaries for each sub-org. (optional)
815+
sort_direction = UsageSortDirection("desc") # UsageSortDirection | The direction to sort by: `[desc, asc]`. (optional)
816+
sort_name = UsageAttributionSort("custom_timeseries_usage") # UsageAttributionSort | The field to sort by. (optional)
817+
818+
# example passing only required values which don't have defaults set
819+
try:
820+
# Get Usage Attribution
821+
api_response = api_instance.get_usage_attribution(start_month, fields)
822+
pprint(api_response)
823+
except datadog_api_client.v1.ApiException as e:
824+
print("Exception when calling UsageMeteringApi->get_usage_attribution: %s\n" % e)
825+
826+
# example passing only required values which don't have defaults set
827+
# and optional values
828+
try:
829+
# Get Usage Attribution
830+
api_response = api_instance.get_usage_attribution(start_month, fields, end_month=end_month, org_id=org_id, sort_direction=sort_direction, sort_name=sort_name)
831+
pprint(api_response)
832+
except datadog_api_client.v1.ApiException as e:
833+
print("Exception when calling UsageMeteringApi->get_usage_attribution: %s\n" % e)
834+
```
835+
836+
### Parameters
837+
838+
Name | Type | Description | Notes
839+
------------- | ------------- | ------------- | -------------
840+
**start_month** | **datetime**| Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage beginning in this month. Maximum of 15 months ago. |
841+
**fields** | **str**| The specified field to search results for. |
842+
**end_month** | **datetime**| Datetime in ISO-8601 format, UTC, precise to month: &#x60;[YYYY-MM]&#x60; for usage ending this month. | [optional]
843+
**org_id** | **int**| Include usage summaries for each sub-org. | [optional]
844+
**sort_direction** | **UsageSortDirection**| The direction to sort by: &#x60;[desc, asc]&#x60;. | [optional]
845+
**sort_name** | **UsageAttributionSort**| The field to sort by. | [optional]
846+
847+
### Return type
848+
849+
[**UsageAttributionResponse**](UsageAttributionResponse.md)
850+
851+
### Authorization
852+
853+
[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)
854+
855+
### HTTP request headers
856+
857+
- **Content-Type**: Not defined
858+
- **Accept**: application/json;datetime-format=rfc3339
859+
860+
### HTTP response details
861+
| Status code | Description | Response headers |
862+
|-------------|-------------|------------------|
863+
**200** | OK | - |
864+
**403** | Forbidden - User is not authorized | - |
865+
866+
[[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)
867+
765868
# **get_usage_billable_summary**
766869
> UsageBillableSummaryResponse get_usage_billable_summary()
767870

0 commit comments

Comments
 (0)