Skip to content

Commit 9d13c19

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 8df9ca3b of spec repo (#928)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
1 parent 18b8a49 commit 9d13c19

25 files changed

+780
-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-20 13:39:47.339075",
8-
"spec_repo_commit": "7cce8766"
7+
"regenerated": "2022-04-20 18:58:38.947898",
8+
"spec_repo_commit": "8df9ca3b"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-04-20 13:39:47.354440",
13-
"spec_repo_commit": "7cce8766"
12+
"regenerated": "2022-04-20 18:58:38.961982",
13+
"spec_repo_commit": "8df9ca3b"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14613,6 +14613,11 @@ components:
1461314613
all hours in the current date for all organizations.
1461414614
format: int64
1461514615
type: integer
14616+
observability_pipelines_bytes_processed_sum:
14617+
description: Sum of all observability pipelines bytes processed over all
14618+
hours in the current date for the given org.
14619+
format: int64
14620+
type: integer
1461614621
online_archive_events_count_sum:
1461714622
description: Sum of all online archived events over all hours in the current
1461814623
date for all organizations.
@@ -14930,6 +14935,11 @@ components:
1493014935
all hours in the current date for the given org.
1493114936
format: int64
1493214937
type: integer
14938+
observability_pipelines_bytes_processed_sum:
14939+
description: Sum of all observability pipelines bytes processed over all
14940+
hours in the current date for the given org.
14941+
format: int64
14942+
type: integer
1493314943
online_archive_events_count_sum:
1493414944
description: Sum of all online archived events over all hours in the current
1493514945
date for the given org.
@@ -15271,6 +15281,11 @@ components:
1527115281
all hours in the current months for all organizations.
1527215282
format: int64
1527315283
type: integer
15284+
observability_pipelines_bytes_processed_agg_sum:
15285+
description: Sum of all observability pipelines bytes processed over all
15286+
hours in the current months for all organizations.
15287+
format: int64
15288+
type: integer
1527415289
online_archive_events_count_agg_sum:
1527515290
description: Sum of all online archived events over all hours in the current
1527615291
months for all organizations.
@@ -28435,7 +28450,7 @@ tags:
2843528450

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

28438-
It is retained for the past 15 months.
28453+
It is retained for 15 months.
2843928454

2844028455

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

.generator/schemas/v2/openapi.yaml

Lines changed: 151 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,69 @@ 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+
$ref: '#/components/schemas/UsageTimeSeriesType'
6495+
type: object
6496+
UsageObservabilityPipelinesResponse:
6497+
description: Observability Pipelines usage response.
6498+
properties:
6499+
data:
6500+
description: Response containing Observability Pipelines usage.
6501+
items:
6502+
$ref: '#/components/schemas/UsageDataObject'
6503+
type: array
6504+
type: object
6505+
UsageTimeSeriesObject:
6506+
description: Usage timeseries data.
6507+
properties:
6508+
timestamp:
6509+
description: Datetime in ISO-8601 format, UTC. The hour for the usage.
6510+
format: date-time
6511+
type: string
6512+
value:
6513+
description: Contains the number measured for the given usage_type during
6514+
the hour.
6515+
format: int64
6516+
nullable: true
6517+
type: integer
6518+
type: object
6519+
UsageTimeSeriesType:
6520+
default: usage_timeseries
6521+
description: Type of usage data.
6522+
enum:
6523+
- usage_timeseries
6524+
example: usage_timeseries
6525+
type: string
6526+
x-enum-varnames:
6527+
- USAGE_TIMESERIES
64576528
User:
64586529
description: User object returned by the API.
64596530
properties:
@@ -11930,6 +12001,65 @@ paths:
1193012001
x-unstable: '**Note**: This endpoint is in public beta.
1193112002
1193212003
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
12004+
/api/v2/usage/observability_pipelines:
12005+
get:
12006+
description: Get hourly usage for Observability Pipelines.
12007+
operationId: GetUsageObservabilityPipelines
12008+
parameters:
12009+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12010+
for usage beginning at this hour.'
12011+
in: query
12012+
name: start_hr
12013+
required: true
12014+
schema:
12015+
format: date-time
12016+
type: string
12017+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12018+
for usage ending
12019+
12020+
**before** this hour.'
12021+
in: query
12022+
name: end_hr
12023+
required: false
12024+
schema:
12025+
format: date-time
12026+
type: string
12027+
responses:
12028+
'200':
12029+
content:
12030+
application/json;datetime-format=rfc3339:
12031+
schema:
12032+
$ref: '#/components/schemas/UsageObservabilityPipelinesResponse'
12033+
description: OK
12034+
'400':
12035+
content:
12036+
application/json;datetime-format=rfc3339:
12037+
schema:
12038+
$ref: '#/components/schemas/APIErrorResponse'
12039+
description: Bad Request
12040+
'403':
12041+
content:
12042+
application/json;datetime-format=rfc3339:
12043+
schema:
12044+
$ref: '#/components/schemas/APIErrorResponse'
12045+
description: Forbidden - User is not authorized
12046+
'429':
12047+
content:
12048+
application/json;datetime-format=rfc3339:
12049+
schema:
12050+
$ref: '#/components/schemas/APIErrorResponse'
12051+
description: Too many requests
12052+
security:
12053+
- apiKeyAuth: []
12054+
appKeyAuth: []
12055+
- AuthZ:
12056+
- usage_read
12057+
summary: Get hourly usage for Observability Pipelines
12058+
tags:
12059+
- Usage Metering
12060+
x-menu-order: 38
12061+
x-undo:
12062+
type: safe
1193312063
/api/v2/user_invitations:
1193412064
post:
1193512065
description: Sends emails to one or more users inviting them to join the organization.
@@ -12501,6 +12631,27 @@ tags:
1250112631
name: Security Monitoring
1250212632
- description: Create, edit, and disable service accounts.
1250312633
name: Service Accounts
12634+
- description: 'The usage metering API allows you to get hourly, daily, and
12635+
12636+
monthly usage across multiple facets of Datadog.
12637+
12638+
This API is available to all Pro and Enterprise customers.
12639+
12640+
Usage is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
12641+
12642+
12643+
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
12644+
12645+
It is retained for 15 months.
12646+
12647+
12648+
You can retrieve up to 24 hours of hourly usage data for multiple organizations,
12649+
12650+
and up to two months of hourly usage data for a single organization in one request.'
12651+
externalDocs:
12652+
description: Find out more at
12653+
url: https://docs.datadoghq.com/account_management/billing/usage_details/
12654+
name: Usage Metering
1250412655
- description: Create, edit, and disable users.
1250512656
externalDocs:
1250612657
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: 48 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,46 @@ 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+
3324+
usage\_time\_series\_type
3325+
-------------------------
3326+
3327+
.. automodule:: datadog_api_client.v2.model.usage_time_series_type
3328+
:members:
3329+
:undoc-members:
3330+
:show-inheritance:
3331+
32843332
user
32853333
----
32863334

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)