Skip to content

Commit 4f1c5d0

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit b0dd9845 of spec repo (#978)
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 4dafb1a commit 4f1c5d0

16 files changed

+306
-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-05-03 07:52:47.817555",
8-
"spec_repo_commit": "31bcc455"
7+
"regenerated": "2022-05-03 09:44:37.404709",
8+
"spec_repo_commit": "b0dd9845"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-05-03 07:52:47.832455",
13-
"spec_repo_commit": "31bcc455"
12+
"regenerated": "2022-05-03 09:44:37.416812",
13+
"spec_repo_commit": "b0dd9845"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,10 +1666,12 @@ components:
16661666
HourlyUsageType:
16671667
description: Usage type that is being measured.
16681668
enum:
1669+
- app_sec_host_count
16691670
- observability_pipelines_bytes_processed
16701671
example: observability_pipelines_bytes_processed
16711672
type: string
16721673
x-enum-varnames:
1674+
- APP_SEC_HOST_COUNT
16731675
- OBSERVABILITY_PIPELINES_BYTES_PROCESSSED
16741676
IdPMetadataFormData:
16751677
description: The form data submitted to upload IdP metadata
@@ -6531,6 +6533,15 @@ components:
65316533
required:
65326534
- data
65336535
type: object
6536+
UsageApplicationSecurityMonitoringResponse:
6537+
description: Application Security Monitoring usage response.
6538+
properties:
6539+
data:
6540+
description: Response containing Application Security Monitoring usage.
6541+
items:
6542+
$ref: '#/components/schemas/UsageDataObject'
6543+
type: array
6544+
type: object
65346545
UsageAttributesObject:
65356546
description: Usage attributes data.
65366547
properties:
@@ -12070,6 +12081,65 @@ paths:
1207012081
x-unstable: '**Note**: This endpoint is in public beta.
1207112082
1207212083
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
12084+
/api/v2/usage/application_security:
12085+
get:
12086+
description: Get hourly usage for Application Security .
12087+
operationId: GetUsageApplicationSecurityMonitoring
12088+
parameters:
12089+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12090+
for usage beginning at this hour.'
12091+
in: query
12092+
name: start_hr
12093+
required: true
12094+
schema:
12095+
format: date-time
12096+
type: string
12097+
- description: 'Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]`
12098+
for usage ending
12099+
12100+
**before** this hour.'
12101+
in: query
12102+
name: end_hr
12103+
required: false
12104+
schema:
12105+
format: date-time
12106+
type: string
12107+
responses:
12108+
'200':
12109+
content:
12110+
application/json;datetime-format=rfc3339:
12111+
schema:
12112+
$ref: '#/components/schemas/UsageApplicationSecurityMonitoringResponse'
12113+
description: OK
12114+
'400':
12115+
content:
12116+
application/json;datetime-format=rfc3339:
12117+
schema:
12118+
$ref: '#/components/schemas/APIErrorResponse'
12119+
description: Bad Request
12120+
'403':
12121+
content:
12122+
application/json;datetime-format=rfc3339:
12123+
schema:
12124+
$ref: '#/components/schemas/APIErrorResponse'
12125+
description: Forbidden - User is not authorized
12126+
'429':
12127+
content:
12128+
application/json;datetime-format=rfc3339:
12129+
schema:
12130+
$ref: '#/components/schemas/APIErrorResponse'
12131+
description: Too many requests
12132+
security:
12133+
- apiKeyAuth: []
12134+
appKeyAuth: []
12135+
- AuthZ:
12136+
- usage_read
12137+
summary: Get hourly usage for Application Security
12138+
tags:
12139+
- Usage Metering
12140+
x-menu-order: 38
12141+
x-undo:
12142+
type: safe
1207312143
/api/v2/usage/cost_by_org:
1207412144
get:
1207512145
description: Get Cost Across Multi-Org Account.

docs/datadog_api_client.v2.model.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3329,6 +3329,14 @@ service\_account\_create\_request
33293329
:undoc-members:
33303330
:show-inheritance:
33313331

3332+
usage\_application\_security\_monitoring\_response
3333+
--------------------------------------------------
3334+
3335+
.. automodule:: datadog_api_client.v2.model.usage_application_security_monitoring_response
3336+
:members:
3337+
:undoc-members:
3338+
:show-inheritance:
3339+
33323340
usage\_attributes\_object
33333341
-------------------------
33343342

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
"""
2+
Get hourly usage for Application Security 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_application_security_monitoring(
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: 80 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: 8 additions & 2 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/usage_application_security_monitoring_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: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-03-29T08:59:44.790Z
1+
2022-03-28T15:06:36.041Z

tests/v2/cassettes/test_scenarios/test_aggregate_rum_events_returns_ok_response.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ interactions:
1111
uri: https://api.datadoghq.com/api/v2/rum/analytics/aggregate
1212
response:
1313
body:
14-
string: '{"meta":{"status":"done","request_id":"pddv1ChZiX1d1RWNfM1JuaURhSkJ6elFsRHpnIi0KHQJFlSKZaC6T1BR15cquEEJdzvJ8iKfJO5Kr37vkEgyJYfau6iiq_M5ftbo","elapsed":0},"data":{"buckets":[]}}
14+
string: '{"meta":{"status":"done","request_id":"pddv1ChZyS2R0R2cwbFNTR3dXWHE0T1V4SkV3IiwKHO-LyxpZr85euhVxgr_zcJZpbjq-uQVUzkFlD0ISDPnlZXRCg4-gaoMc2w","elapsed":0},"data":{"buckets":[]}}
1515
1616
'
1717
headers:

0 commit comments

Comments
 (0)