Skip to content

Commit 49147e8

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit f1e731d3 of spec repo (#984)
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 28bd80a commit 49147e8

14 files changed

+294
-5
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-05-09 16:43:08.287596",
8-
"spec_repo_commit": "a3819bf3"
7+
"regenerated": "2022-05-10 15:39:32.481628",
8+
"spec_repo_commit": "f1e731d3"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-09 16:43:08.299729",
13-
"spec_repo_commit": "a3819bf3"
12+
"regenerated": "2022-05-10 15:39:32.498242",
13+
"spec_repo_commit": "f1e731d3"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,11 +1668,13 @@ components:
16681668
enum:
16691669
- app_sec_host_count
16701670
- observability_pipelines_bytes_processed
1671+
- lambda_traced_invocations_count
16711672
example: observability_pipelines_bytes_processed
16721673
type: string
16731674
x-enum-varnames:
16741675
- APP_SEC_HOST_COUNT
16751676
- OBSERVABILITY_PIPELINES_BYTES_PROCESSSED
1677+
- LAMBDA_TRACED_INVOCATIONS_COUNT
16761678
IdPMetadataFormData:
16771679
description: The form data submitted to upload IdP metadata
16781680
properties:
@@ -6585,6 +6587,15 @@ components:
65856587
type:
65866588
$ref: '#/components/schemas/UsageTimeSeriesType'
65876589
type: object
6590+
UsageLambdaTracedInvocationsResponse:
6591+
description: Lambda Traced Invocations usage response.
6592+
properties:
6593+
data:
6594+
description: Response containing Lambda Traced Invocations usage.
6595+
items:
6596+
$ref: '#/components/schemas/UsageDataObject'
6597+
type: array
6598+
type: object
65886599
UsageObservabilityPipelinesResponse:
65896600
description: Observability Pipelines usage response.
65906601
properties:
@@ -12209,6 +12220,65 @@ paths:
1220912220
x-menu-order: 39
1221012221
x-undo:
1221112222
type: safe
12223+
/api/v2/usage/lambda_traced_invocations:
12224+
get:
12225+
description: Get hourly usage for Lambda Traced Invocations.
12226+
operationId: GetUsageLambdaTracedInvocations
12227+
parameters:
12228+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12229+
for usage beginning at this hour.'
12230+
in: query
12231+
name: start_hr
12232+
required: true
12233+
schema:
12234+
format: date-time
12235+
type: string
12236+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12237+
for usage ending
12238+
12239+
**before** this hour.'
12240+
in: query
12241+
name: end_hr
12242+
required: false
12243+
schema:
12244+
format: date-time
12245+
type: string
12246+
responses:
12247+
'200':
12248+
content:
12249+
application/json;datetime-format=rfc3339:
12250+
schema:
12251+
$ref: '#/components/schemas/UsageLambdaTracedInvocationsResponse'
12252+
description: OK
12253+
'400':
12254+
content:
12255+
application/json;datetime-format=rfc3339:
12256+
schema:
12257+
$ref: '#/components/schemas/APIErrorResponse'
12258+
description: Bad Request
12259+
'403':
12260+
content:
12261+
application/json;datetime-format=rfc3339:
12262+
schema:
12263+
$ref: '#/components/schemas/APIErrorResponse'
12264+
description: Forbidden - User is not authorized
12265+
'429':
12266+
content:
12267+
application/json;datetime-format=rfc3339:
12268+
schema:
12269+
$ref: '#/components/schemas/APIErrorResponse'
12270+
description: Too many requests
12271+
security:
12272+
- apiKeyAuth: []
12273+
appKeyAuth: []
12274+
- AuthZ:
12275+
- usage_read
12276+
summary: Get hourly usage for Lambda Traced Invocations
12277+
tags:
12278+
- Usage Metering
12279+
x-menu-order: 38
12280+
x-undo:
12281+
type: safe
1221212282
/api/v2/usage/observability_pipelines:
1221312283
get:
1221412284
description: Get hourly usage for Observability Pipelines.

docs/datadog_api_client.v2.model.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3353,6 +3353,14 @@ usage\_data\_object
33533353
:undoc-members:
33543354
:show-inheritance:
33553355

3356+
usage\_lambda\_traced\_invocations\_response
3357+
--------------------------------------------
3358+
3359+
.. automodule:: datadog_api_client.v2.model.usage_lambda_traced_invocations_response
3360+
:members:
3361+
:undoc-members:
3362+
:show-inheritance:
3363+
33563364
usage\_observability\_pipelines\_response
33573365
-----------------------------------------
33583366

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get hourly usage for Lambda Traced Invocations 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_lambda_traced_invocations(
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/v2/api/usage_metering_api.py

Lines changed: 78 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/model/hourly_usage_type.py

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

src/datadog_api_client/v2/model/usage_lambda_traced_invocations_response.py

Lines changed: 49 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/models/__init__.py

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-05-06T18:07:36.174Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json;datetime-format=rfc3339
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/usage/lambda_traced_invocations?start_hr=2022-05-03T18%3A07%3A36.174Z&end_hr=2022-05-01T18%3A07%3A36.174Z
9+
response:
10+
body:
11+
string: '{"errors":["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}
12+
13+
'
14+
headers:
15+
content-type:
16+
- application/json
17+
status:
18+
code: 400
19+
message: Bad Request
20+
version: 1

0 commit comments

Comments
 (0)