Skip to content

Commit db8a5fc

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 0f3171c9 of spec repo
1 parent 5ec9710 commit db8a5fc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+340
-10533
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-04 08:22:32.909165",
8-
"spec_repo_commit": "42159e33"
7+
"regenerated": "2022-04-04 09:27:13.763934",
8+
"spec_repo_commit": "0f3171c9"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-04-04 08:22:32.923119",
13-
"spec_repo_commit": "42159e33"
12+
"regenerated": "2022-04-04 09:27:13.780157",
13+
"spec_repo_commit": "0f3171c9"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14570,6 +14570,11 @@ components:
1457014570
all hours in the current date for all organizations.
1457114571
format: int64
1457214572
type: integer
14573+
observability_pipelines_bytes_processed_sum:
14574+
description: Sum of all observability pipelines bytes processed over all
14575+
hours in the current date for the given org.
14576+
format: int64
14577+
type: integer
1457314578
online_archive_events_count_sum:
1457414579
description: Sum of all online archived events over all hours in the current
1457514580
date for all organizations.
@@ -14887,6 +14892,11 @@ components:
1488714892
all hours in the current date for the given org.
1488814893
format: int64
1488914894
type: integer
14895+
observability_pipelines_bytes_processed_sum:
14896+
description: Sum of all observability pipelines bytes processed over all
14897+
hours in the current date for the given org.
14898+
format: int64
14899+
type: integer
1489014900
online_archive_events_count_sum:
1489114901
description: Sum of all online archived events over all hours in the current
1489214902
date for the given org.
@@ -15228,6 +15238,11 @@ components:
1522815238
all hours in the current months for all organizations.
1522915239
format: int64
1523015240
type: integer
15241+
observability_pipelines_bytes_processed_agg_sum:
15242+
description: Sum of all observability pipelines bytes processed over all
15243+
hours in the current months for all organizations.
15244+
format: int64
15245+
type: integer
1523115246
online_archive_events_count_agg_sum:
1523215247
description: Sum of all online archived events over all hours in the current
1523315248
months for all organizations.

.generator/schemas/v2/openapi.yaml

Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,6 +1594,11 @@ 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+
type: string
15971602
IncidentCreateAttributes:
15981603
description: The incident's attributes for a create request.
15991604
properties:
@@ -6441,6 +6446,60 @@ components:
64416446
required:
64426447
- data
64436448
type: object
6449+
UsageAttributesObject:
6450+
description: Usage attributes data.
6451+
properties:
6452+
org_name:
6453+
description: The organization name.
6454+
type: string
6455+
product_family:
6456+
description: The product for which usage is being reported.
6457+
type: string
6458+
public_id:
6459+
description: The organization public ID.
6460+
type: string
6461+
timeseries:
6462+
description: List of usage data reported for each requested hour.
6463+
items:
6464+
$ref: '#/components/schemas/UsageTimeSeriesObject'
6465+
type: array
6466+
usage_type:
6467+
$ref: '#/components/schemas/HourlyUsageType'
6468+
type: object
6469+
UsageDataObject:
6470+
description: Usage data.
6471+
properties:
6472+
attributes:
6473+
$ref: '#/components/schemas/UsageAttributesObject'
6474+
id:
6475+
description: Unique ID of the response.
6476+
type: string
6477+
type:
6478+
description: Type of usage data.
6479+
type: string
6480+
type: object
6481+
UsageObservabilityPipelinesResponse:
6482+
description: Observability Pipelines usage response.
6483+
properties:
6484+
data:
6485+
description: Response containing Observability Pipelines usage.
6486+
items:
6487+
$ref: '#/components/schemas/UsageDataObject'
6488+
type: array
6489+
type: object
6490+
UsageTimeSeriesObject:
6491+
description: Usage timeseries data.
6492+
properties:
6493+
timestamp:
6494+
description: Datetime in ISO-8601 format, UTC. The hour for the usage.
6495+
format: date-time
6496+
type: string
6497+
value:
6498+
description: Contains the number measured for the given usage_type during
6499+
the hour.
6500+
format: int64
6501+
type: integer
6502+
type: object
64446503
User:
64456504
description: User object returned by the API.
64466505
properties:
@@ -11830,6 +11889,68 @@ paths:
1183011889
type: idempotent
1183111890
x-unstable: '**Note**: This endpoint is in public beta.
1183211891
11892+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
11893+
/api/v2/usage/observability-pipelines:
11894+
get:
11895+
description: Get hourly usage for Observability Pipelines.
11896+
operationId: GetUsageObservabilityPipelines
11897+
parameters:
11898+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
11899+
for usage beginning at this hour.'
11900+
in: query
11901+
name: start_hr
11902+
required: true
11903+
schema:
11904+
format: date-time
11905+
type: string
11906+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
11907+
for usage ending
11908+
11909+
**before** this hour.'
11910+
in: query
11911+
name: end_hr
11912+
required: false
11913+
schema:
11914+
format: date-time
11915+
type: string
11916+
responses:
11917+
'200':
11918+
content:
11919+
application/json;datetime-format=rfc3339:
11920+
schema:
11921+
$ref: '#/components/schemas/UsageObservabilityPipelinesResponse'
11922+
description: OK
11923+
'400':
11924+
content:
11925+
application/json;datetime-format=rfc3339:
11926+
schema:
11927+
$ref: '#/components/schemas/APIErrorResponse'
11928+
description: Bad Request
11929+
'403':
11930+
content:
11931+
application/json;datetime-format=rfc3339:
11932+
schema:
11933+
$ref: '#/components/schemas/APIErrorResponse'
11934+
description: Forbidden - User is not authorized
11935+
'429':
11936+
content:
11937+
application/json;datetime-format=rfc3339:
11938+
schema:
11939+
$ref: '#/components/schemas/APIErrorResponse'
11940+
description: Too many requests
11941+
security:
11942+
- apiKeyAuth: []
11943+
appKeyAuth: []
11944+
- AuthZ:
11945+
- usage_read
11946+
summary: Get hourly usage for Observability Pipelines.
11947+
tags:
11948+
- Usage Metering
11949+
x-menu-order: 38
11950+
x-undo:
11951+
type: safe
11952+
x-unstable: '**Note**: This endpoint is in public beta.
11953+
1183311954
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
1183411955
/api/v2/user_invitations:
1183511956
post:
@@ -12396,6 +12517,27 @@ tags:
1239612517
name: Security Monitoring
1239712518
- description: Create, edit, and disable service accounts.
1239812519
name: Service Accounts
12520+
- description: 'The usage metering API allows you to get hourly, daily, and
12521+
12522+
monthly usage across multiple facets of Datadog.
12523+
12524+
This API is available to all Pro and Enterprise customers.
12525+
12526+
Usage is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
12527+
12528+
12529+
**Note**: Usage data is delayed by up to 72 hours from when it was incurred.
12530+
12531+
It is retained for the past 15 months.
12532+
12533+
12534+
You can retrieve up to 24 hours of hourly usage data for multiple organizations,
12535+
12536+
and up to two months of hourly usage data for a single organization in one request.'
12537+
externalDocs:
12538+
description: Find out more at
12539+
url: https://docs.datadoghq.com/account_management/billing/usage_details/
12540+
name: Usage Metering
1239912541
- description: Create, edit, and disable users.
1240012542
externalDocs:
1240112543
url: https://docs.datadoghq.com/account_management/users

docs/datadog_api_client.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ datadog\_api\_client
55
:maxdepth: 4
66

77
datadog_api_client.v1
8-
datadog_api_client.v2
98

109

1110
api\_client
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.

src/datadog_api_client/v1/model/usage_summary_response.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/v2/__init__.py

Lines changed: 0 additions & 14 deletions
This file was deleted.

0 commit comments

Comments
 (0)