From 84500a9b059051f1640a2832ca601f92d121a419 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, 2 Jul 2024 18:46:18 +0000 Subject: [PATCH] Add network performance monitor type to API spec (#1674) Co-authored-by: ci.datadog-api-spec --- .apigentools-info | 8 +++--- .generator/schemas/v1/openapi.yaml | 28 +++++++++++++++++++ .../datadog-api-client-v1/apis/MonitorsApi.ts | 12 ++++++++ ...nitorFormulaAndFunctionEventsDataSource.ts | 2 ++ .../models/MonitorType.ts | 2 ++ .../models/ObjectSerializer.ts | 2 ++ 6 files changed, 50 insertions(+), 4 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 0e0ef91bc3a..97f270933e6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-02 14:51:00.055693", - "spec_repo_commit": "1e8d5fca" + "regenerated": "2024-07-02 18:17:50.120632", + "spec_repo_commit": "464f0cec" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-07-02 14:51:00.073237", - "spec_repo_commit": "1e8d5fca" + "regenerated": "2024-07-02 18:17:50.138246", + "spec_repo_commit": "464f0cec" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 53920ec20c3..99057418012 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6831,6 +6831,7 @@ components: - logs - spans - database_queries + - network_performance_queries example: rum type: string x-enum-varnames: @@ -6842,6 +6843,7 @@ components: - LOGS - SPANS - DATABASE_QUERIES + - NETWORK_PERFORMANCE_QUERIES MonitorFormulaAndFunctionQueryDefinition: description: A formula and function query. oneOf: @@ -7665,6 +7667,7 @@ components: - ci-tests alert - error-tracking alert - database-monitoring alert + - network-performance alert example: query alert type: string x-enum-varnames: @@ -7685,6 +7688,7 @@ components: - CI_TESTS_ALERT - ERROR_TRACKING_ALERT - DATABASE_MONITORING_ALERT + - NETWORK_PERFORMANCE_ALERT MonitorUpdateRequest: description: Object describing a monitor update request. properties: @@ -27009,6 +27013,8 @@ paths: - database-monitoring: `database-monitoring alert` + - network-performance: `network-performance alert` + **Notes**: @@ -27308,6 +27314,28 @@ paths: operator #` + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + + - `rollup_method` The stats roll-up method - supports `count`, `avg`, and + `cardinality`. + + - `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use. + + - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + + - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + + - `#` an integer or decimal number used to set the threshold. + + + **Network Performance Alert Query** + + + Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window) + operator #` + + - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - `rollup_method` The stats roll-up method - supports `count`, `avg`, and diff --git a/packages/datadog-api-client-v1/apis/MonitorsApi.ts b/packages/datadog-api-client-v1/apis/MonitorsApi.ts index 3050afeeea0..4ba7198b6e5 100644 --- a/packages/datadog-api-client-v1/apis/MonitorsApi.ts +++ b/packages/datadog-api-client-v1/apis/MonitorsApi.ts @@ -1416,6 +1416,7 @@ export class MonitorsApi { * - audit: `audit alert` * - error-tracking: `error-tracking alert` * - database-monitoring: `database-monitoring alert` + * - network-performance: `network-performance alert` * * **Notes**: * - Synthetic monitors are created through the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/) documentation for more information. @@ -1569,6 +1570,17 @@ export class MonitorsApi { * - `time_window` #m (between 1 and 2880), #h (between 1 and 48). * - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. * - `#` an integer or decimal number used to set the threshold. + * + * **Network Performance Alert Query** + * + * Example: `network-performance(query).rollup(rollup_method[, measure]).last(time_window) operator #` + * + * - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + * - `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`. + * - `measure` For `avg` and cardinality `rollup_method` - specify the measure or the facet name you want to use. + * - `time_window` #m (between 1 and 2880), #h (between 1 and 48). + * - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. + * - `#` an integer or decimal number used to set the threshold. * @param param The request object */ public createMonitor( diff --git a/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts b/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts index 38836024b7a..7023b3b2e43 100644 --- a/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts +++ b/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts @@ -19,6 +19,7 @@ export type MonitorFormulaAndFunctionEventsDataSource = | typeof LOGS | typeof SPANS | typeof DATABASE_QUERIES + | typeof NETWORK_PERFORMANCE_QUERIES | UnparsedObject; export const RUM = "rum"; export const CI_PIPELINES = "ci_pipelines"; @@ -28,3 +29,4 @@ export const EVENTS = "events"; export const LOGS = "logs"; export const SPANS = "spans"; export const DATABASE_QUERIES = "database_queries"; +export const NETWORK_PERFORMANCE_QUERIES = "network_performance_queries"; diff --git a/packages/datadog-api-client-v1/models/MonitorType.ts b/packages/datadog-api-client-v1/models/MonitorType.ts index 54c4ff62c69..ce3443e654e 100644 --- a/packages/datadog-api-client-v1/models/MonitorType.ts +++ b/packages/datadog-api-client-v1/models/MonitorType.ts @@ -28,6 +28,7 @@ export type MonitorType = | typeof CI_TESTS_ALERT | typeof ERROR_TRACKING_ALERT | typeof DATABASE_MONITORING_ALERT + | typeof NETWORK_PERFORMANCE_ALERT | UnparsedObject; export const COMPOSITE = "composite"; export const EVENT_ALERT = "event alert"; @@ -46,3 +47,4 @@ export const CI_PIPELINES_ALERT = "ci-pipelines alert"; export const CI_TESTS_ALERT = "ci-tests alert"; export const ERROR_TRACKING_ALERT = "error-tracking alert"; export const DATABASE_MONITORING_ALERT = "database-monitoring alert"; +export const NETWORK_PERFORMANCE_ALERT = "network-performance alert"; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index 82de7bfb11a..a59d050d000 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -924,6 +924,7 @@ const enumsMap: { [key: string]: any[] } = { "logs", "spans", "database_queries", + "network_performance_queries", ], MonitorOptionsNotificationPresets: [ "show_all", @@ -960,6 +961,7 @@ const enumsMap: { [key: string]: any[] } = { "ci-tests alert", "error-tracking alert", "database-monitoring alert", + "network-performance alert", ], MonthlyUsageAttributionSupportedMetrics: [ "api_usage",