From 3a1bfd55aa106e9e73cf4b1bfac2faf617d757d8 Mon Sep 17 00:00:00 2001 From: "api-clients-generation-pipeline[bot]" <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 21:46:52 +0000 Subject: [PATCH] [query] rm note about unstable datasources (#1893) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 ++++---- .generator/schemas/v2/openapi.yaml | 12 ------------ examples/v2/metrics/QueryScalarData.ts | 1 - examples/v2/metrics/QueryScalarData_3112571352.ts | 1 - examples/v2/metrics/QueryTimeseriesData.ts | 1 - examples/v2/metrics/QueryTimeseriesData_301142940.ts | 1 - features/v2/metrics.feature | 8 -------- packages/datadog-api-client-common/configuration.ts | 2 -- packages/datadog-api-client-v2/apis/MetricsApi.ts | 10 ---------- 9 files changed, 4 insertions(+), 40 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index a296496e702..7e042ad8eac 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-11-05 20:16:44.203879", - "spec_repo_commit": "1a56bfda" + "regenerated": "2024-11-05 21:07:10.843952", + "spec_repo_commit": "6c0fa1b6" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-11-05 20:16:44.222969", - "spec_repo_commit": "1a56bfda" + "regenerated": "2024-11-05 21:07:10.862374", + "spec_repo_commit": "6c0fa1b6" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index b98d8711006..925dfca233a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -35699,12 +35699,6 @@ paths: operator: OR permissions: - timeseries_query - x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring - (RUM), Cloud Cost Management, and Log Management data sources. - - We are gradually onboarding support for more sources. If you have any - - feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).' /api/v2/query/timeseries: post: description: 'Query timeseries data across various data sources and @@ -35745,12 +35739,6 @@ paths: operator: OR permissions: - timeseries_query - x-unstable: '**Note**: This endpoint is GA for Metrics, Real User Monitoring - (RUM), Cloud Cost Management, and Log Management data sources. - - We are gradually onboarding support for more sources. If you have any - - feedback, contact [Datadog Support](https://docs.datadoghq.com/help/).' /api/v2/remote_config/products/cws/agent_rules: get: description: Get the list of Cloud Security Management Threats Agent rules. diff --git a/examples/v2/metrics/QueryScalarData.ts b/examples/v2/metrics/QueryScalarData.ts index 80420d6f5ab..7895b507bcb 100644 --- a/examples/v2/metrics/QueryScalarData.ts +++ b/examples/v2/metrics/QueryScalarData.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.queryScalarData"] = true; const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiQueryScalarDataRequest = { diff --git a/examples/v2/metrics/QueryScalarData_3112571352.ts b/examples/v2/metrics/QueryScalarData_3112571352.ts index 6d21e68e9ee..4732b9630a3 100644 --- a/examples/v2/metrics/QueryScalarData_3112571352.ts +++ b/examples/v2/metrics/QueryScalarData_3112571352.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.queryScalarData"] = true; const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiQueryScalarDataRequest = { diff --git a/examples/v2/metrics/QueryTimeseriesData.ts b/examples/v2/metrics/QueryTimeseriesData.ts index 4fbc0c48df1..ab8d4715286 100644 --- a/examples/v2/metrics/QueryTimeseriesData.ts +++ b/examples/v2/metrics/QueryTimeseriesData.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.queryTimeseriesData"] = true; const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiQueryTimeseriesDataRequest = { diff --git a/examples/v2/metrics/QueryTimeseriesData_301142940.ts b/examples/v2/metrics/QueryTimeseriesData_301142940.ts index c591baa58e1..7e23c0bb5eb 100644 --- a/examples/v2/metrics/QueryTimeseriesData_301142940.ts +++ b/examples/v2/metrics/QueryTimeseriesData_301142940.ts @@ -5,7 +5,6 @@ import { client, v2 } from "@datadog/datadog-api-client"; const configuration = client.createConfiguration(); -configuration.unstableOperations["v2.queryTimeseriesData"] = true; const apiInstance = new v2.MetricsApi(configuration); const params: v2.MetricsApiQueryTimeseriesDataRequest = { diff --git a/features/v2/metrics.feature b/features/v2/metrics.feature index 033fe70ef99..d98275fb2de 100644 --- a/features/v2/metrics.feature +++ b/features/v2/metrics.feature @@ -246,7 +246,6 @@ Feature: Metrics @generated @skip @team:Datadog/timeseries-query Scenario: Query scalar data across multiple products returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "QueryScalarData" enabled And new "QueryScalarData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}} When the request is sent @@ -255,7 +254,6 @@ Feature: Metrics @generated @skip @team:Datadog/timeseries-query Scenario: Query scalar data across multiple products returns "OK" response Given a valid "appKeyAuth" key in the system - And operation "QueryScalarData" enabled And new "QueryScalarData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "scalar_request"}} When the request is sent @@ -264,7 +262,6 @@ Feature: Metrics @generated @skip @team:Datadog/timeseries-query Scenario: Query timeseries data across multiple products returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "QueryTimeseriesData" enabled And new "QueryTimeseriesData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}} When the request is sent @@ -273,7 +270,6 @@ Feature: Metrics @generated @skip @team:Datadog/timeseries-query Scenario: Query timeseries data across multiple products returns "OK" response Given a valid "appKeyAuth" key in the system - And operation "QueryTimeseriesData" enabled And new "QueryTimeseriesData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*} by {env}"}], "to": 1568923200000}, "type": "timeseries_request"}} When the request is sent @@ -300,7 +296,6 @@ Feature: Metrics @team:Datadog/timeseries-query Scenario: Scalar cross product query returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "QueryScalarData" enabled And new "QueryScalarData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": 1568899800000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": 1568923200000}, "type": "scalar_request"}} When the request is sent @@ -309,7 +304,6 @@ Feature: Metrics @team:Datadog/timeseries-query Scenario: Scalar cross product query returns "OK" response Given a valid "appKeyAuth" key in the system - And operation "QueryScalarData" enabled And new "QueryScalarData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "queries": [{"aggregator": "avg", "data_source": "metrics", "query": "avg:system.cpu.user{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "scalar_request"}} When the request is sent @@ -374,7 +368,6 @@ Feature: Metrics @skip @team:Datadog/timeseries-query Scenario: Timeseries cross product query returns "Bad Request" response Given a valid "appKeyAuth" key in the system - And operation "QueryTimeseriesData" enabled And new "QueryTimeseriesData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a+b", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:system.cpu.user{*}"}], "to": {{ timestamp('now') }}}, "type": "timeseries_rquest"}} When the request is sent @@ -383,7 +376,6 @@ Feature: Metrics @team:Datadog/timeseries-query Scenario: Timeseries cross product query returns "OK" response Given a valid "appKeyAuth" key in the system - And operation "QueryTimeseriesData" enabled And new "QueryTimeseriesData" request And body with value {"data": {"attributes": {"formulas": [{"formula": "a", "limit": {"count": 10, "order": "desc"}}], "from": {{ timestamp('now - 1h') }}000, "interval": 5000, "queries": [{"data_source": "metrics", "query": "avg:datadog.estimated_usage.metrics.custom{*}", "name": "a"}], "to": {{ timestamp('now') }}000}, "type": "timeseries_request"}} When the request is sent diff --git a/packages/datadog-api-client-common/configuration.ts b/packages/datadog-api-client-common/configuration.ts index 1d877c070e9..db504189d16 100644 --- a/packages/datadog-api-client-common/configuration.ts +++ b/packages/datadog-api-client-common/configuration.ts @@ -255,8 +255,6 @@ export function createConfiguration( "v2.updateIncidentIntegration": false, "v2.updateIncidentTodo": false, "v2.updateIncidentType": false, - "v2.queryScalarData": false, - "v2.queryTimeseriesData": false, "v2.getFinding": false, "v2.listFindings": false, "v2.muteFindings": false, diff --git a/packages/datadog-api-client-v2/apis/MetricsApi.ts b/packages/datadog-api-client-v2/apis/MetricsApi.ts index dcc5ddef2ee..97eb81a2f9d 100644 --- a/packages/datadog-api-client-v2/apis/MetricsApi.ts +++ b/packages/datadog-api-client-v2/apis/MetricsApi.ts @@ -555,11 +555,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'queryScalarData'"); - if (!_config.unstableOperations["v2.queryScalarData"]) { - throw new Error("Unstable operation 'queryScalarData' is disabled"); - } - // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "queryScalarData"); @@ -602,11 +597,6 @@ export class MetricsApiRequestFactory extends BaseAPIRequestFactory { ): Promise { const _config = _options || this.configuration; - logger.warn("Using unstable operation 'queryTimeseriesData'"); - if (!_config.unstableOperations["v2.queryTimeseriesData"]) { - throw new Error("Unstable operation 'queryTimeseriesData' is disabled"); - } - // verify required parameter 'body' is not null or undefined if (body === null || body === undefined) { throw new RequiredError("body", "queryTimeseriesData");