Skip to content

Commit 12e65a2

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit 28778f1 of spec repo (#809)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 4c9bfa9 commit 12e65a2

File tree

52 files changed

+771
-18
lines changed

Some content is hidden

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

52 files changed

+771
-18
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.1",
7-
"regenerated": "2022-01-27 16:02:03.387181",
8-
"spec_repo_commit": "c738c50"
7+
"regenerated": "2022-01-31 10:15:57.942418",
8+
"spec_repo_commit": "28778f1"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.1",
12-
"regenerated": "2022-01-27 16:02:03.911147",
13-
"spec_repo_commit": "c738c50"
12+
"regenerated": "2022-01-31 10:15:58.422149",
13+
"spec_repo_commit": "28778f1"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12428,6 +12428,12 @@ components:
1242812428
description: The hour for the usage.
1242912429
format: date-time
1243012430
type: string
12431+
org_name:
12432+
description: The organization name.
12433+
type: string
12434+
public_id:
12435+
description: The organization public ID.
12436+
type: string
1243112437
type: object
1243212438
UsageAnalyzedLogsResponse:
1243312439
description: A response containing the number of analyzed logs for each hour
@@ -13347,6 +13353,12 @@ components:
1334713353
of the given hour's month until the given hour.
1334813354
format: int64
1334913355
type: integer
13356+
org_name:
13357+
description: The organization name.
13358+
type: string
13359+
public_id:
13360+
description: The organization public ID.
13361+
type: string
1335013362
type: object
1335113363
UsageIncidentManagementResponse:
1335213364
description: Response containing the incident management usage for each hour
@@ -13369,6 +13381,12 @@ components:
1336913381
description: Contains the number of spans indexed.
1337013382
format: int64
1337113383
type: integer
13384+
org_name:
13385+
description: The organization name.
13386+
type: string
13387+
public_id:
13388+
description: The organization public ID.
13389+
type: string
1337213390
type: object
1337313391
UsageIndexedSpansResponse:
1337413392
description: A response containing indexed spans usage.
@@ -13392,6 +13410,12 @@ components:
1339213410
hour.
1339313411
format: int64
1339413412
type: integer
13413+
org_name:
13414+
description: The organization name.
13415+
type: string
13416+
public_id:
13417+
description: The organization public ID.
13418+
type: string
1339513419
type: object
1339613420
UsageIngestedSpansResponse:
1339713421
description: Response containing the ingested spans usage for each hour for
@@ -13414,6 +13438,12 @@ components:
1341413438
description: The total number of IoT devices during a given hour.
1341513439
format: int64
1341613440
type: integer
13441+
org_name:
13442+
description: The organization name.
13443+
type: string
13444+
public_id:
13445+
description: The organization public ID.
13446+
type: string
1341713447
type: object
1341813448
UsageIoTResponse:
1341913449
description: Response containing the IoT usage for each hour for a given organization.
@@ -13641,6 +13671,12 @@ components:
1364113671
description: The hour for the usage.
1364213672
format: date-time
1364313673
type: string
13674+
org_name:
13675+
description: The organization name.
13676+
type: string
13677+
public_id:
13678+
description: The organization public ID.
13679+
type: string
1364413680
type: object
1364513681
UsageProfilingResponse:
1364613682
description: Response containing the number of profiled hosts for each hour
@@ -13782,6 +13818,12 @@ components:
1378213818
description: The hour for the usage.
1378313819
format: date-time
1378413820
type: string
13821+
org_name:
13822+
description: The organization name.
13823+
type: string
13824+
public_id:
13825+
description: The organization public ID.
13826+
type: string
1378513827
snmp_devices:
1378613828
description: Contains the number of SNMP devices.
1378713829
format: int64

docs/v1/UsageAnalyzedLogsHour.md

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

docs/v1/UsageIncidentManagementHour.md

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

docs/v1/UsageIndexedSpansHour.md

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

docs/v1/UsageIngestedSpansHour.md

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

docs/v1/UsageIoTHour.md

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

docs/v1/UsageProfilingHour.md

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

docs/v1/UsageSNMPHour.md

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get hourly usage for incident management returns "OK" response
3+
"""
4+
5+
from datetime import datetime
6+
from dateutil.relativedelta import relativedelta
7+
from datadog_api_client.v1 import ApiClient, Configuration
8+
from datadog_api_client.v1.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_incident_management(
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)

0 commit comments

Comments
 (0)