Skip to content

Commit 192604a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6003aae of spec repo
1 parent 8f65703 commit 192604a

17 files changed

Lines changed: 894 additions & 14 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 243 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31063,9 +31063,17 @@ components:
3106331063
type: string
3106431064
values:
3106531065
description: |-
31066-
Column values in row order. The element type matches the column's `type`;
31067-
for example a `VARCHAR` column carries strings, a `TIMESTAMP` column carries
31068-
Unix-millisecond integers. `null` is allowed for missing values.
31066+
Column values in row order, one entry per result row. The element type
31067+
follows the column's `type`. The following serialization rules should be
31068+
taken into account:
31069+
31070+
- `BIGINT` values are encoded as JSON numbers in the signed 64-bit integer range.
31071+
- `DECIMAL` values are encoded as JSON numbers with 64-bit double precision.
31072+
- `TIMESTAMP` and `DATE` values are encoded as Unix-millisecond integers; a
31073+
`DATE` resolves to midnight UTC.
31074+
- `JSON` values are returned as a JSON-encoded string.
31075+
31076+
`null` is allowed for any column type where a value is missing.
3106931077
example:
3107031078
- web-store
3107131079
- checkout
@@ -44858,6 +44866,66 @@ components:
4485844866
type:
4485944867
$ref: "#/components/schemas/HistoricalJobDataType"
4486044868
type: object
44869+
HistoricalMetricsConfigurationAttributes:
44870+
description: Attributes of a historical metrics configuration.
44871+
properties:
44872+
created_at:
44873+
description: Timestamp when historical metrics ingestion was enabled for the metric.
44874+
example: "2024-01-15T12:00:00.000Z"
44875+
format: date-time
44876+
readOnly: true
44877+
type: string
44878+
type: object
44879+
HistoricalMetricsConfigurationCreateData:
44880+
description: Data object for enabling historical metrics ingestion for a metric.
44881+
properties:
44882+
id:
44883+
description: The metric name, used as the resource ID.
44884+
example: dd.test.metric
44885+
type: string
44886+
type:
44887+
$ref: "#/components/schemas/HistoricalMetricsConfigurationType"
44888+
required:
44889+
- id
44890+
- type
44891+
type: object
44892+
HistoricalMetricsConfigurationCreateRequest:
44893+
description: Request body for enabling historical metrics ingestion for a metric.
44894+
properties:
44895+
data:
44896+
$ref: "#/components/schemas/HistoricalMetricsConfigurationCreateData"
44897+
required:
44898+
- data
44899+
type: object
44900+
HistoricalMetricsConfigurationData:
44901+
description: >-
44902+
A historical metrics configuration resource object. Existence of this resource means historical metrics ingestion is enabled for the metric; there is no separate enabled attribute.
44903+
properties:
44904+
attributes:
44905+
$ref: "#/components/schemas/HistoricalMetricsConfigurationAttributes"
44906+
id:
44907+
description: The metric name, used as the resource ID.
44908+
example: dd.test.metric
44909+
type: string
44910+
type:
44911+
$ref: "#/components/schemas/HistoricalMetricsConfigurationType"
44912+
type: object
44913+
HistoricalMetricsConfigurationResponse:
44914+
description: Response containing a historical metrics configuration.
44915+
properties:
44916+
data:
44917+
$ref: "#/components/schemas/HistoricalMetricsConfigurationData"
44918+
readOnly: true
44919+
type: object
44920+
HistoricalMetricsConfigurationType:
44921+
default: historical_metrics_configurations
44922+
description: The historical metrics configuration resource type.
44923+
enum:
44924+
- historical_metrics_configurations
44925+
example: historical_metrics_configurations
44926+
type: string
44927+
x-enum-varnames:
44928+
- HISTORICAL_METRICS_CONFIGURATIONS
4486144929
HourlyUsage:
4486244930
description: Hourly usage for a product family for an org.
4486344931
properties:
@@ -135602,9 +135670,6 @@ paths:
135602135670
summary: Execute a tabular DDSQL query
135603135671
tags:
135604135672
- DDSQL
135605-
x-unstable: |-
135606-
**Note**: This endpoint is in preview and is subject to change.
135607-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
135608135673
/api/v2/ddsql/query/tabular/fetch:
135609135674
post:
135610135675
description: |-
@@ -135713,9 +135778,6 @@ paths:
135713135778
summary: Fetch the result of a DDSQL query
135714135779
tags:
135715135780
- DDSQL
135716-
x-unstable: |-
135717-
**Note**: This endpoint is in preview and is subject to change.
135718-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
135719135781
/api/v2/deletion/data/{product}:
135720135782
post:
135721135783
description: Creates a data deletion request by providing a query and a timeframe targeting the proper data.
@@ -159550,6 +159612,178 @@ paths:
159550159612
permissions:
159551159613
- metric_tags_write
159552159614
x-sunset: "2027-01-01"
159615+
/api/v2/metrics/historical-metrics-configurations:
159616+
post:
159617+
description: |-
159618+
Enable historical metrics ingestion (late data ingestion) for a metric. Idempotent:
159619+
enabling an already-enabled metric returns 200 instead of 201. Not supported for
159620+
distribution metrics, metrics with an existing tag configuration, or most standard
159621+
(non-custom) metrics.
159622+
operationId: CreateHistoricalMetricsConfiguration
159623+
requestBody:
159624+
content:
159625+
application/json:
159626+
examples:
159627+
default:
159628+
value:
159629+
data:
159630+
id: dd.test.metric
159631+
type: historical_metrics_configurations
159632+
schema:
159633+
$ref: "#/components/schemas/HistoricalMetricsConfigurationCreateRequest"
159634+
required: true
159635+
responses:
159636+
"200":
159637+
content:
159638+
application/json:
159639+
examples:
159640+
default:
159641+
value:
159642+
data:
159643+
attributes:
159644+
created_at: "2024-01-15T12:00:00.000Z"
159645+
id: dd.test.metric
159646+
type: historical_metrics_configurations
159647+
schema:
159648+
$ref: "#/components/schemas/HistoricalMetricsConfigurationResponse"
159649+
description: OK
159650+
"201":
159651+
content:
159652+
application/json:
159653+
examples:
159654+
default:
159655+
value:
159656+
data:
159657+
attributes:
159658+
created_at: "2024-01-15T12:00:00.000Z"
159659+
id: dd.test.metric
159660+
type: historical_metrics_configurations
159661+
schema:
159662+
$ref: "#/components/schemas/HistoricalMetricsConfigurationResponse"
159663+
description: Created
159664+
"400":
159665+
content:
159666+
application/json:
159667+
schema:
159668+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159669+
description: Bad Request
159670+
"404":
159671+
content:
159672+
application/json:
159673+
schema:
159674+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159675+
description: Not Found
159676+
"422":
159677+
content:
159678+
application/json:
159679+
schema:
159680+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159681+
description: Unprocessable Entity
159682+
"429":
159683+
$ref: "#/components/responses/TooManyRequestsResponse"
159684+
security:
159685+
- apiKeyAuth: []
159686+
appKeyAuth: []
159687+
- AuthZ:
159688+
- late_metrics_config_write
159689+
summary: Enable historical metrics ingestion
159690+
tags:
159691+
- Metrics
159692+
x-codegen-request-body-name: body
159693+
"x-permission":
159694+
operator: OR
159695+
permissions:
159696+
- late_metrics_config_write
159697+
x-unstable: |-
159698+
**Note**: This endpoint is in preview and is subject to change.
159699+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
159700+
/api/v2/metrics/historical-metrics-configurations/{metric_name}:
159701+
delete:
159702+
description: |-
159703+
Disable historical metrics ingestion for a metric. Idempotent: always returns 204,
159704+
whether or not the configuration existed or the metric itself still exists, so that
159705+
Terraform destroy succeeds for a metric removed out-of-band.
159706+
operationId: DeleteHistoricalMetricsConfiguration
159707+
parameters:
159708+
- $ref: "#/components/parameters/MetricName"
159709+
responses:
159710+
"204":
159711+
description: No Content
159712+
"400":
159713+
content:
159714+
application/json:
159715+
schema:
159716+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159717+
description: Bad Request
159718+
"429":
159719+
$ref: "#/components/responses/TooManyRequestsResponse"
159720+
security:
159721+
- apiKeyAuth: []
159722+
appKeyAuth: []
159723+
- AuthZ:
159724+
- late_metrics_config_write
159725+
summary: Delete a historical metrics configuration
159726+
tags:
159727+
- Metrics
159728+
"x-permission":
159729+
operator: OR
159730+
permissions:
159731+
- late_metrics_config_write
159732+
x-unstable: |-
159733+
**Note**: This endpoint is in preview and is subject to change.
159734+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
159735+
get:
159736+
description: |-
159737+
Get the historical metrics ingestion configuration for a metric. Existence of the
159738+
resource means historical metrics ingestion is enabled; returns 404 when it is not
159739+
enabled for the metric.
159740+
operationId: GetHistoricalMetricsConfiguration
159741+
parameters:
159742+
- $ref: "#/components/parameters/MetricName"
159743+
responses:
159744+
"200":
159745+
content:
159746+
application/json:
159747+
examples:
159748+
default:
159749+
value:
159750+
data:
159751+
attributes:
159752+
created_at: "2024-01-15T12:00:00.000Z"
159753+
id: dd.test.metric
159754+
type: historical_metrics_configurations
159755+
schema:
159756+
$ref: "#/components/schemas/HistoricalMetricsConfigurationResponse"
159757+
description: OK
159758+
"400":
159759+
content:
159760+
application/json:
159761+
schema:
159762+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159763+
description: Bad Request
159764+
"404":
159765+
content:
159766+
application/json:
159767+
schema:
159768+
$ref: "#/components/schemas/JSONAPIErrorResponse"
159769+
description: Not Found
159770+
"429":
159771+
$ref: "#/components/responses/TooManyRequestsResponse"
159772+
security:
159773+
- apiKeyAuth: []
159774+
appKeyAuth: []
159775+
- AuthZ:
159776+
- metrics_read
159777+
summary: Get a historical metrics configuration
159778+
tags:
159779+
- Metrics
159780+
"x-permission":
159781+
operator: OR
159782+
permissions:
159783+
- metrics_read
159784+
x-unstable: |-
159785+
**Note**: This endpoint is in preview and is subject to change.
159786+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
159553159787
/api/v2/metrics/tag-indexing-rules:
159554159788
get:
159555159789
description: List tag indexing rules for an org, sorted by `rule_order`, with offset/limit pagination.

docs/datadog_api_client.v2.model.rst

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17952,6 +17952,48 @@ datadog\_api\_client.v2.model.historical\_job\_response\_data module
1795217952
:members:
1795317953
:show-inheritance:
1795417954

17955+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_attributes module
17956+
-----------------------------------------------------------------------------------
17957+
17958+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_attributes
17959+
:members:
17960+
:show-inheritance:
17961+
17962+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_create\_data module
17963+
-------------------------------------------------------------------------------------
17964+
17965+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_create_data
17966+
:members:
17967+
:show-inheritance:
17968+
17969+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_create\_request module
17970+
----------------------------------------------------------------------------------------
17971+
17972+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_create_request
17973+
:members:
17974+
:show-inheritance:
17975+
17976+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_data module
17977+
-----------------------------------------------------------------------------
17978+
17979+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_data
17980+
:members:
17981+
:show-inheritance:
17982+
17983+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_response module
17984+
---------------------------------------------------------------------------------
17985+
17986+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_response
17987+
:members:
17988+
:show-inheritance:
17989+
17990+
datadog\_api\_client.v2.model.historical\_metrics\_configuration\_type module
17991+
-----------------------------------------------------------------------------
17992+
17993+
.. automodule:: datadog_api_client.v2.model.historical_metrics_configuration_type
17994+
:members:
17995+
:show-inheritance:
17996+
1795517997
datadog\_api\_client.v2.model.hourly\_usage module
1795617998
--------------------------------------------------
1795717999

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
"""
2+
Enable historical metrics ingestion returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.metrics_api import MetricsApi
7+
from datadog_api_client.v2.model.historical_metrics_configuration_create_data import (
8+
HistoricalMetricsConfigurationCreateData,
9+
)
10+
from datadog_api_client.v2.model.historical_metrics_configuration_create_request import (
11+
HistoricalMetricsConfigurationCreateRequest,
12+
)
13+
from datadog_api_client.v2.model.historical_metrics_configuration_type import HistoricalMetricsConfigurationType
14+
15+
body = HistoricalMetricsConfigurationCreateRequest(
16+
data=HistoricalMetricsConfigurationCreateData(
17+
id="dd.test.metric",
18+
type=HistoricalMetricsConfigurationType.HISTORICAL_METRICS_CONFIGURATIONS,
19+
),
20+
)
21+
22+
configuration = Configuration()
23+
configuration.unstable_operations["create_historical_metrics_configuration"] = True
24+
with ApiClient(configuration) as api_client:
25+
api_instance = MetricsApi(api_client)
26+
response = api_instance.create_historical_metrics_configuration(body=body)
27+
28+
print(response)
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
Delete a historical metrics configuration returns "No Content" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.metrics_api import MetricsApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["delete_historical_metrics_configuration"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = MetricsApi(api_client)
12+
api_instance.delete_historical_metrics_configuration(
13+
metric_name="metric_name",
14+
)
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
Get a historical metrics configuration returns "OK" response
3+
"""
4+
5+
from datadog_api_client import ApiClient, Configuration
6+
from datadog_api_client.v2.api.metrics_api import MetricsApi
7+
8+
configuration = Configuration()
9+
configuration.unstable_operations["get_historical_metrics_configuration"] = True
10+
with ApiClient(configuration) as api_client:
11+
api_instance = MetricsApi(api_client)
12+
response = api_instance.get_historical_metrics_configuration(
13+
metric_name="metric_name",
14+
)
15+
16+
print(response)

0 commit comments

Comments
 (0)