Skip to content

Commit c31198f

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 327c93ca of spec repo
1 parent 375579d commit c31198f

24 files changed

+707
-8
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.6.2",
7-
"regenerated": "2022-04-14 09:34:20.075933",
8-
"spec_repo_commit": "616130a0"
7+
"regenerated": "2022-04-19 09:10:32.278105",
8+
"spec_repo_commit": "327c93ca"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-04-14 09:34:20.088144",
13-
"spec_repo_commit": "616130a0"
12+
"regenerated": "2022-04-19 09:10:32.295000",
13+
"spec_repo_commit": "327c93ca"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14615,6 +14615,11 @@ components:
1461514615
all hours in the current date for all organizations.
1461614616
format: int64
1461714617
type: integer
14618+
observability_pipelines_bytes_processed_sum:
14619+
description: Sum of all observability pipelines bytes processed over all
14620+
hours in the current date for the given org.
14621+
format: int64
14622+
type: integer
1461814623
online_archive_events_count_sum:
1461914624
description: Sum of all online archived events over all hours in the current
1462014625
date for all organizations.
@@ -14932,6 +14937,11 @@ components:
1493214937
all hours in the current date for the given org.
1493314938
format: int64
1493414939
type: integer
14940+
observability_pipelines_bytes_processed_sum:
14941+
description: Sum of all observability pipelines bytes processed over all
14942+
hours in the current date for the given org.
14943+
format: int64
14944+
type: integer
1493514945
online_archive_events_count_sum:
1493614946
description: Sum of all online archived events over all hours in the current
1493714947
date for the given org.
@@ -15273,6 +15283,11 @@ components:
1527315283
all hours in the current months for all organizations.
1527415284
format: int64
1527515285
type: integer
15286+
observability_pipelines_bytes_processed_agg_sum:
15287+
description: Sum of all observability pipelines bytes processed over all
15288+
hours in the current months for all organizations.
15289+
format: int64
15290+
type: integer
1527615291
online_archive_events_count_agg_sum:
1527715292
description: Sum of all online archived events over all hours in the current
1527815293
months for all organizations.
@@ -28437,7 +28452,7 @@ tags:
2843728452

2843828453
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
2843928454

28440-
It is retained for the past 15 months.
28455+
It is retained for 15 months.
2844128456

2844228457

2844328458
You can retrieve up to 24 hours of hourly usage data for multiple organizations,

.generator/schemas/v2/openapi.yaml

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,14 @@ components:
15941594
required:
15951595
- name
15961596
type: object
1597+
HourlyUsageType:
1598+
description: Usage type that is being measured.
1599+
enum:
1600+
- observability_pipelines_bytes_processed
1601+
example: observability_pipelines_bytes_processed
1602+
type: string
1603+
x-enum-varnames:
1604+
- OBSERVABILITY_PIPELINES_BYTES_PROCESSSED
15971605
IdPMetadataFormData:
15981606
description: The form data submitted to upload IdP metadata
15991607
properties:
@@ -6454,6 +6462,61 @@ components:
64546462
required:
64556463
- data
64566464
type: object
6465+
UsageAttributesObject:
6466+
description: Usage attributes data.
6467+
properties:
6468+
org_name:
6469+
description: The organization name.
6470+
type: string
6471+
product_family:
6472+
description: The product for which usage is being reported.
6473+
type: string
6474+
public_id:
6475+
description: The organization public ID.
6476+
type: string
6477+
timeseries:
6478+
description: List of usage data reported for each requested hour.
6479+
items:
6480+
$ref: '#/components/schemas/UsageTimeSeriesObject'
6481+
type: array
6482+
usage_type:
6483+
$ref: '#/components/schemas/HourlyUsageType'
6484+
type: object
6485+
UsageDataObject:
6486+
description: Usage data.
6487+
properties:
6488+
attributes:
6489+
$ref: '#/components/schemas/UsageAttributesObject'
6490+
id:
6491+
description: Unique ID of the response.
6492+
type: string
6493+
type:
6494+
description: Type of usage data.
6495+
type: string
6496+
type: object
6497+
UsageObservabilityPipelinesResponse:
6498+
description: Observability Pipelines usage response.
6499+
properties:
6500+
data:
6501+
description: Response containing Observability Pipelines usage.
6502+
items:
6503+
$ref: '#/components/schemas/UsageDataObject'
6504+
type: array
6505+
type: object
6506+
UsageTimeSeriesObject:
6507+
description: Usage timeseries data.
6508+
properties:
6509+
timestamp:
6510+
description: Datetime in ISO-8601 format, UTC. The hour for the usage.
6511+
format: date-time
6512+
type: string
6513+
value:
6514+
description: Contains the number measured for the given usage_type during
6515+
the hour.
6516+
format: int64
6517+
nullable: true
6518+
type: integer
6519+
type: object
64576520
User:
64586521
description: User object returned by the API.
64596522
properties:
@@ -11930,6 +11993,65 @@ paths:
1193011993
x-unstable: '**Note**: This endpoint is in public beta.
1193111994
1193211995
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
11996+
/api/v2/usage/observability-pipelines:
11997+
get:
11998+
description: Get hourly usage for Observability Pipelines.
11999+
operationId: GetUsageObservabilityPipelines
12000+
parameters:
12001+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12002+
for usage beginning at this hour.'
12003+
in: query
12004+
name: start_hr
12005+
required: true
12006+
schema:
12007+
format: date-time
12008+
type: string
12009+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12010+
for usage ending
12011+
12012+
**before** this hour.'
12013+
in: query
12014+
name: end_hr
12015+
required: false
12016+
schema:
12017+
format: date-time
12018+
type: string
12019+
responses:
12020+
'200':
12021+
content:
12022+
application/json;datetime-format=rfc3339:
12023+
schema:
12024+
$ref: '#/components/schemas/UsageObservabilityPipelinesResponse'
12025+
description: OK
12026+
'400':
12027+
content:
12028+
application/json;datetime-format=rfc3339:
12029+
schema:
12030+
$ref: '#/components/schemas/APIErrorResponse'
12031+
description: Bad Request
12032+
'403':
12033+
content:
12034+
application/json;datetime-format=rfc3339:
12035+
schema:
12036+
$ref: '#/components/schemas/APIErrorResponse'
12037+
description: Forbidden - User is not authorized
12038+
'429':
12039+
content:
12040+
application/json;datetime-format=rfc3339:
12041+
schema:
12042+
$ref: '#/components/schemas/APIErrorResponse'
12043+
description: Too many requests
12044+
security:
12045+
- apiKeyAuth: []
12046+
appKeyAuth: []
12047+
- AuthZ:
12048+
- usage_read
12049+
summary: Get hourly usage for Observability Pipelines
12050+
tags:
12051+
- Usage Metering
12052+
x-menu-order: 38
12053+
x-undo:
12054+
type: safe
1193312055
/api/v2/user_invitations:
1193412056
post:
1193512057
description: Sends emails to one or more users inviting them to join the organization.
@@ -12501,6 +12623,27 @@ tags:
1250112623
name: Security Monitoring
1250212624
- description: Create, edit, and disable service accounts.
1250312625
name: Service Accounts
12626+
- description: 'The usage metering API allows you to get hourly, daily, and
12627+
12628+
monthly usage across multiple facets of Datadog.
12629+
12630+
This API is available to all Pro and Enterprise customers.
12631+
12632+
Usage is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
12633+
12634+
12635+
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
12636+
12637+
It is retained for 15 months.
12638+
12639+
12640+
You can retrieve up to 24 hours of hourly usage data for multiple organizations,
12641+
12642+
and up to two months of hourly usage data for a single organization in one request.'
12643+
externalDocs:
12644+
description: Find out more at
12645+
url: https://docs.datadoghq.com/account_management/billing/usage_details/
12646+
name: Usage Metering
1250412647
- description: Create, edit, and disable users.
1250512648
externalDocs:
1250612649
url: https://docs.datadoghq.com/account_management/users

docs/datadog_api_client.v2.api.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ service\_accounts\_api
145145
:undoc-members:
146146
:show-inheritance:
147147

148+
usage\_metering\_api
149+
--------------------
150+
151+
.. automodule:: datadog_api_client.v2.api.usage_metering_api
152+
:members:
153+
:undoc-members:
154+
:show-inheritance:
155+
148156
users\_api
149157
----------
150158

docs/datadog_api_client.v2.model.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,14 @@ full\_application\_key\_attributes
673673
:undoc-members:
674674
:show-inheritance:
675675

676+
hourly\_usage\_type
677+
-------------------
678+
679+
.. automodule:: datadog_api_client.v2.model.hourly_usage_type
680+
:members:
681+
:undoc-members:
682+
:show-inheritance:
683+
676684
http\_log
677685
---------
678686

@@ -3281,6 +3289,38 @@ service\_account\_create\_request
32813289
:undoc-members:
32823290
:show-inheritance:
32833291

3292+
usage\_attributes\_object
3293+
-------------------------
3294+
3295+
.. automodule:: datadog_api_client.v2.model.usage_attributes_object
3296+
:members:
3297+
:undoc-members:
3298+
:show-inheritance:
3299+
3300+
usage\_data\_object
3301+
-------------------
3302+
3303+
.. automodule:: datadog_api_client.v2.model.usage_data_object
3304+
:members:
3305+
:undoc-members:
3306+
:show-inheritance:
3307+
3308+
usage\_observability\_pipelines\_response
3309+
-----------------------------------------
3310+
3311+
.. automodule:: datadog_api_client.v2.model.usage_observability_pipelines_response
3312+
:members:
3313+
:undoc-members:
3314+
:show-inheritance:
3315+
3316+
usage\_time\_series\_object
3317+
---------------------------
3318+
3319+
.. automodule:: datadog_api_client.v2.model.usage_time_series_object
3320+
:members:
3321+
:undoc-members:
3322+
:show-inheritance:
3323+
32843324
user
32853325
----
32863326

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get hourly usage for Observability Pipelines returns "OK" response
3+
"""
4+
5+
from datetime import datetime
6+
from dateutil.relativedelta import relativedelta
7+
from datadog_api_client.v2 import ApiClient, Configuration
8+
from datadog_api_client.v2.api.usage_metering_api import UsageMeteringApi
9+
10+
configuration = Configuration()
11+
with ApiClient(configuration) as api_client:
12+
api_instance = UsageMeteringApi(api_client)
13+
response = api_instance.get_usage_observability_pipelines(
14+
start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"),
15+
end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"),
16+
)
17+
18+
print(response)

src/datadog_api_client/v1/model/usage_summary_date.py

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/datadog_api_client/v1/model/usage_summary_date_org.py

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)