Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.4.1.dev2",
"regenerated": "2021-01-29 07:52:52.536777",
"spec_repo_commit": "6dc3341"
"regenerated": "2021-01-29 12:49:08.865785",
"spec_repo_commit": "bc876ff"
},
"v2": {
"apigentools_version": "1.4.1.dev2",
"regenerated": "2021-01-29 07:53:05.048276",
"spec_repo_commit": "6dc3341"
"regenerated": "2021-01-29 12:49:21.065278",
"spec_repo_commit": "bc876ff"
}
}
}
99 changes: 99 additions & 0 deletions data/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8483,6 +8483,28 @@ components:
$ref: '#/components/schemas/UsageIngestedSpansHour'
type: array
type: object
UsageIoTHour:
description: IoT usage for a given organization for a given hour.
properties:
hour:
description: The hour for the usage.
format: date-time
type: string
iot_device_count:
description: The total number of IoT device hours from the start of the
given hour's month until the given hour.
format: int64
type: integer
type: object
UsageIoTResponse:
description: Response containing the IoT usage for each hour for a given organization.
properties:
usage:
description: Get hourly usage for IoT.
items:
$ref: '#/components/schemas/UsageIoTHour'
type: array
type: object
UsageLambdaHour:
description: 'Number of lambda functions and sum of the invocations of all lambda
functions
Expand Down Expand Up @@ -8922,6 +8944,16 @@ components:
current date for all organizations.
format: int64
type: integer
iot_device_agg_sum:
description: Shows the sum of all IoT devices over all hours in the current
date for all organizations.
format: int64
type: integer
iot_device_top99p_sum:
description: Shows the 99th percentile of all IoT devices over all hours
in the current date all organizations.
format: int64
type: integer
mobile_rum_session_count_android_sum:
description: Shows the sum of all mobile RUM Sessions on Android over all
hours in the current date for all organizations.
Expand Down Expand Up @@ -9084,6 +9116,16 @@ components:
current date for the given org.
format: int64
type: integer
iot_device_agg_sum:
description: Shows the sum of all IoT devices over all hours in the current
date for the given org.
format: int64
type: integer
iot_device_top99p_sum:
description: Shows the 99th percentile of all IoT devices over all hours
in the current date for the given org.
format: int64
type: integer
mobile_rum_session_count_android_sum:
description: Shows the sum of all mobile RUM Sessions on Android over all
hours in the current date for the given org.
Expand Down Expand Up @@ -9254,6 +9296,16 @@ components:
current months for all organizations.
format: int64
type: integer
iot_device_agg_sum:
description: Shows the sum of all IoT devices over all hours in the current
months for all organizations.
format: int64
type: integer
iot_device_top99p_sum:
description: Shows the 99th percentile of all IoT devices over all hours
in the current months of all organizations.
format: int64
type: integer
last_updated:
description: Shows the the most recent hour in the current months for all
organizations for which all usages were calculated.
Expand Down Expand Up @@ -16744,6 +16796,53 @@ paths:
- Usage Metering
x-undo:
type: safe
/api/v1/usage/iot:
get:
description: Get hourly usage for IoT.
operationId: GetUsageInternetOfThings
parameters:
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
for usage beginning at this hour.'
in: query
name: start_hr
required: true
schema:
format: date-time
type: string
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
for usage ending

**before** this hour.'
in: query
name: end_hr
required: false
schema:
format: date-time
type: string
responses:
'200':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/UsageIoTResponse'
description: OK
'400':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json;datetime-format=rfc3339:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden - User is not authorized
summary: Get hourly usage for IoT
tags:
- Usage Metering
x-undo:
type: safe
/api/v1/usage/logs:
get:
description: Get hourly usage for logs.
Expand Down
3 changes: 3 additions & 0 deletions docs/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Class | Method | HTTP request | Description
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda
*DatadogAPIClient::V1::UsageMeteringApi* | [**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs
*DatadogAPIClient::V1::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
Expand Down Expand Up @@ -644,6 +645,8 @@ Class | Method | HTTP request | Description
- [DatadogAPIClient::V1::UsageIndexedSpansResponse](UsageIndexedSpansResponse.md)
- [DatadogAPIClient::V1::UsageIngestedSpansHour](UsageIngestedSpansHour.md)
- [DatadogAPIClient::V1::UsageIngestedSpansResponse](UsageIngestedSpansResponse.md)
- [DatadogAPIClient::V1::UsageIoTHour](UsageIoTHour.md)
- [DatadogAPIClient::V1::UsageIoTResponse](UsageIoTResponse.md)
- [DatadogAPIClient::V1::UsageLambdaHour](UsageLambdaHour.md)
- [DatadogAPIClient::V1::UsageLambdaResponse](UsageLambdaResponse.md)
- [DatadogAPIClient::V1::UsageLogsByIndexHour](UsageLogsByIndexHour.md)
Expand Down
20 changes: 20 additions & 0 deletions docs/v1/UsageIoTHour.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# DatadogAPIClient::V1::UsageIoTHour

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **hour** | **Time** | The hour for the usage. | [optional] |
| **iot_device_count** | **Integer** | The total number of IoT device hours from the start of the given hour's month until the given hour. | [optional] |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::UsageIoTHour.new(
hour: null,
iot_device_count: null
)
```

18 changes: 18 additions & 0 deletions docs/v1/UsageIoTResponse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# DatadogAPIClient::V1::UsageIoTResponse

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **usage** | [**Array<UsageIoTHour>**](UsageIoTHour.md) | Get hourly usage for IoT. | [optional] |

## Example

```ruby
require 'datadog_api_client/v1'

instance = DatadogAPIClient::V1::UsageIoTResponse.new(
usage: null
)
```

77 changes: 77 additions & 0 deletions docs/v1/UsageMeteringApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ All URIs are relative to *https://api.datadoghq.com*
| [**get_usage_fargate**](UsageMeteringApi.md#get_usage_fargate) | **GET** /api/v1/usage/fargate | Get hourly usage for Fargate |
| [**get_usage_hosts**](UsageMeteringApi.md#get_usage_hosts) | **GET** /api/v1/usage/hosts | Get hourly usage for hosts and containers |
| [**get_usage_indexed_spans**](UsageMeteringApi.md#get_usage_indexed_spans) | **GET** /api/v1/usage/indexed-spans | Get hourly usage for indexed spans |
| [**get_usage_internet_of_things**](UsageMeteringApi.md#get_usage_internet_of_things) | **GET** /api/v1/usage/iot | Get hourly usage for IoT |
| [**get_usage_lambda**](UsageMeteringApi.md#get_usage_lambda) | **GET** /api/v1/usage/aws_lambda | Get hourly usage for Lambda |
| [**get_usage_logs**](UsageMeteringApi.md#get_usage_logs) | **GET** /api/v1/usage/logs | Get hourly usage for Logs |
| [**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 |
Expand Down Expand Up @@ -1036,6 +1037,82 @@ end
- **Accept**: application/json;datetime-format=rfc3339


## get_usage_internet_of_things

> <UsageIoTResponse> get_usage_internet_of_things(start_hr, opts)

Get hourly usage for IoT

Get hourly usage for IoT.

### Examples

```ruby
require 'time'
require 'datadog_api_client/v1'
# setup authorization
DatadogAPIClient::V1.configure do |config|
# Configure API key authorization: apiKeyAuth
config.api_key['apiKeyAuth'] = ENV["DD_CLIENT_API_KEY"]

# Configure API key authorization: appKeyAuth
config.api_key['appKeyAuth'] = ENV["DD_CLIENT_APP_KEY"]
end

api_instance = DatadogAPIClient::V1::UsageMeteringApi.new
start_hr = Time.parse('2013-10-20T19:20:30+01:00') # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
opts = {
end_hr: Time.parse('2013-10-20T19:20:30+01:00') # Time | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour.
}

begin
# Get hourly usage for IoT
result = api_instance.get_usage_internet_of_things(start_hr, opts)
p result
rescue DatadogAPIClient::V1::ApiError => e
puts "Error when calling UsageMeteringApi->get_usage_internet_of_things: #{e}"
end
```

#### Using the get_usage_internet_of_things_with_http_info variant

This returns an Array which contains the response data, status code and headers.

> <Array(<UsageIoTResponse>, Integer, Hash)> get_usage_internet_of_things_with_http_info(start_hr, opts)

```ruby
begin
# Get hourly usage for IoT
data, status_code, headers = api_instance.get_usage_internet_of_things_with_http_info(start_hr, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <UsageIoTResponse>
rescue DatadogAPIClient::V1::ApiError => e
puts "Error when calling UsageMeteringApi->get_usage_internet_of_things_with_http_info: #{e}"
end
```

### Parameters

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **start_hr** | **Time** | Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage beginning at this hour. | |
| **end_hr** | **Time** | Datetime in ISO-8601 format, UTC, precise to hour: &#x60;[YYYY-MM-DDThh]&#x60; for usage ending **before** this hour. | [optional] |

### Return type

[**UsageIoTResponse**](UsageIoTResponse.md)

### Authorization

[apiKeyAuth](README.md#apiKeyAuth), [appKeyAuth](README.md#appKeyAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json;datetime-format=rfc3339


## get_usage_lambda

> <UsageLambdaResponse> get_usage_lambda(start_hr, opts)
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/UsageSummaryDate.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
| **indexed_events_count_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current date for all organizations. | [optional] |
| **infra_host_top99p** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for all organizations. | [optional] |
| **ingested_events_bytes_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current date for all organizations. | [optional] |
| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current date for all organizations. | [optional] |
| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current date all organizations. | [optional] |
| **mobile_rum_session_count_android_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for all organizations. | [optional] |
| **mobile_rum_session_count_ios_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for all organizations. | [optional] |
| **mobile_rum_session_count_sum** | **Integer** | Shows the sum of all mobile RUM Sessions over all hours in the current date for all organizations | [optional] |
Expand Down Expand Up @@ -62,6 +64,8 @@ instance = DatadogAPIClient::V1::UsageSummaryDate.new(
indexed_events_count_sum: null,
infra_host_top99p: null,
ingested_events_bytes_sum: null,
iot_device_agg_sum: null,
iot_device_top99p_sum: null,
mobile_rum_session_count_android_sum: null,
mobile_rum_session_count_ios_sum: null,
mobile_rum_session_count_sum: null,
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/UsageSummaryDateOrg.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
| **indexed_events_count_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current date for the given org. | [optional] |
| **infra_host_top99p** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current date for the given org. | [optional] |
| **ingested_events_bytes_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current date for the given org. | [optional] |
| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current date for the given org. | [optional] |
| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current date for the given org. | [optional] |
| **mobile_rum_session_count_android_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on Android over all hours in the current date for the given org. | [optional] |
| **mobile_rum_session_count_ios_sum** | **Integer** | Shows the sum of all mobile RUM Sessions on iOS over all hours in the current date for the given org. | [optional] |
| **mobile_rum_session_count_sum** | **Integer** | Shows the sum of all mobile RUM Sessions over all hours in the current date for the given org. | [optional] |
Expand Down Expand Up @@ -63,6 +65,8 @@ instance = DatadogAPIClient::V1::UsageSummaryDateOrg.new(
indexed_events_count_sum: null,
infra_host_top99p: null,
ingested_events_bytes_sum: null,
iot_device_agg_sum: null,
iot_device_top99p_sum: null,
mobile_rum_session_count_android_sum: null,
mobile_rum_session_count_ios_sum: null,
mobile_rum_session_count_sum: null,
Expand Down
4 changes: 4 additions & 0 deletions docs/v1/UsageSummaryResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
| **indexed_events_count_agg_sum** | **Integer** | Shows the sum of all log events indexed over all hours in the current months for all organizations. | [optional] |
| **infra_host_top99p_sum** | **Integer** | Shows the 99th percentile of all distinct infrastructure hosts over all hours in the current months for all organizations. | [optional] |
| **ingested_events_bytes_agg_sum** | **Integer** | Shows the sum of all log bytes ingested over all hours in the current months for all organizations. | [optional] |
| **iot_device_agg_sum** | **Integer** | Shows the sum of all IoT devices over all hours in the current months for all organizations. | [optional] |
| **iot_device_top99p_sum** | **Integer** | Shows the 99th percentile of all IoT devices over all hours in the current months of all organizations. | [optional] |
| **last_updated** | **Time** | Shows the the most recent hour in the current months for all organizations for which all usages were calculated. | [optional] |
| **live_indexed_events_agg_sum** | **Integer** | 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] |
| **live_ingested_bytes_agg_sum** | **Integer** | 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] |
Expand Down Expand Up @@ -71,6 +73,8 @@ instance = DatadogAPIClient::V1::UsageSummaryResponse.new(
indexed_events_count_agg_sum: null,
infra_host_top99p_sum: null,
ingested_events_bytes_agg_sum: null,
iot_device_agg_sum: null,
iot_device_top99p_sum: null,
last_updated: null,
live_indexed_events_agg_sum: null,
live_ingested_bytes_agg_sum: null,
Expand Down
6 changes: 6 additions & 0 deletions features/v1/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,12 @@
"type": "safe"
}
},
"GetUsageInternetOfThings": {
"tag": "Usage Metering",
"undo": {
"type": "safe"
}
},
"GetUsageLogs": {
"tag": "Usage Metering",
"undo": {
Expand Down
12 changes: 12 additions & 0 deletions features/v1/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ Feature: Usage Metering
When the request is sent
Then the response status is 200 OK

@generated @skip
Scenario: Get hourly usage for IoT returns "Bad Request" response
Given new "GetUsageInternetOfThings" request
When the request is sent
Then the response status is 400 Bad Request

@generated @skip
Scenario: Get hourly usage for IoT returns "OK" response
Given new "GetUsageInternetOfThings" request
When the request is sent
Then the response status is 200 OK

@generated @skip
Scenario: Get hourly usage for Lambda returns "Bad Request" response
Given new "GetUsageLambda" request
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog_api_client/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,8 @@
require 'datadog_api_client/v1/models/usage_indexed_spans_response'
require 'datadog_api_client/v1/models/usage_ingested_spans_hour'
require 'datadog_api_client/v1/models/usage_ingested_spans_response'
require 'datadog_api_client/v1/models/usage_io_t_hour'
require 'datadog_api_client/v1/models/usage_io_t_response'
require 'datadog_api_client/v1/models/usage_lambda_hour'
require 'datadog_api_client/v1/models/usage_lambda_response'
require 'datadog_api_client/v1/models/usage_logs_by_index_hour'
Expand Down
Loading