From 6f88f068390bf1dde56d62bc6b9ef386082c7cae Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 15 Jan 2025 09:48:32 +0000 Subject: [PATCH] Regenerate client from commit 21b02fc5 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v1/openapi.yaml | 538 +++++------------- .../datadog-api-client-v1/apis/MonitorsApi.ts | 21 + ...nitorFormulaAndFunctionEventsDataSource.ts | 2 + .../models/MonitorType.ts | 2 + .../models/ObjectSerializer.ts | 2 + 6 files changed, 176 insertions(+), 397 deletions(-) diff --git a/.apigentools-info b/.apigentools-info index 8b269a67e363..3e4c2ada1f89 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-14 15:59:07.108645", - "spec_repo_commit": "0457044b" + "regenerated": "2025-01-15 09:47:01.880563", + "spec_repo_commit": "21b02fc5" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2025-01-14 15:59:07.123971", - "spec_repo_commit": "0457044b" + "regenerated": "2025-01-15 09:47:01.895832", + "spec_repo_commit": "21b02fc5" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4c79ef3ea2ef..e931a047c12d 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -6918,6 +6918,7 @@ components: - spans - database_queries - network + - cost example: rum type: string x-enum-varnames: @@ -6930,6 +6931,7 @@ components: - SPANS - DATABASE_QUERIES - NETWORK + - COST MonitorFormulaAndFunctionQueryDefinition: description: A formula and function query. oneOf: @@ -7755,6 +7757,7 @@ components: - error-tracking alert - database-monitoring alert - network-performance alert + - cost alert example: query alert type: string x-enum-varnames: @@ -7776,6 +7779,7 @@ components: - ERROR_TRACKING_ALERT - DATABASE_MONITORING_ALERT - NETWORK_PERFORMANCE_ALERT + - COST_ALERT MonitorUpdateRequest: description: Object describing a monitor update request. properties: @@ -29036,399 +29040,147 @@ paths: permissions: - monitors_read post: - description: 'Create a monitor using the specified options. - - - #### Monitor Types - - - The type of monitor chosen from: - - - - anomaly: `query alert` - - - APM: `query alert` or `trace-analytics alert` - - - composite: `composite` - - - custom: `service check` - - - forecast: `query alert` - - - host: `service check` - - - integration: `query alert` or `service check` - - - live process: `process alert` - - - logs: `log alert` - - - metric: `query alert` - - - network: `service check` - - - outlier: `query alert` - - - process: `service check` - - - rum: `rum alert` - - - SLO: `slo alert` - - - watchdog: `event-v2 alert` - - - event-v2: `event-v2 alert` - - - audit: `audit alert` - - - error-tracking: `error-tracking alert` - - - database-monitoring: `database-monitoring alert` - - - network-performance: `network-performance alert` - - - cloud cost: `cost 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. - - - Log monitors require an unscoped App Key. - - - #### Query Types - - - ##### Metric Alert Query - - - Example: `time_aggr(time_window):space_aggr:metric{tags} [by {key}] operator - #` - - - - `time_aggr`: avg, sum, max, min, change, or pct_change - - - `time_window`: `last_#m` (with `#` between 1 and 10080 depending on the - monitor type) or `last_#h`(with `#` between 1 and 168 depending on the monitor - type) or `last_1d`, or `last_1w` - - - `space_aggr`: avg, sum, min, or max - - - `tags`: one or more tags (comma-separated), or * - - - `key`: a ''key'' in key:value tag syntax; defines a separate alert for each - tag in the group (multi-alert) - - - `operator`: <, <=, >, >=, ==, or != - - - `#`: an integer or decimal number used to set the threshold - - - If you are using the `_change_` or `_pct_change_` time aggregator, instead - use `change_aggr(time_aggr(time_window), - - timeshift):space_aggr:metric{tags} [by {key}] operator #` with: - - - - `change_aggr` change, pct_change - - - `time_aggr` avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/create/types/#define-the-conditions) - - - `time_window` last\_#m (between 1 and 2880 depending on the monitor type), - last\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 or - 2) - - - `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago - - - Use this to create an outlier monitor using the following query: - - `avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} by {host}, - ''dbscan'', 7) > 0` - - - ##### Service Check Query - - - Example: `"check".over(tags).last(count).by(group).count_by_status()` - - - - `check` name of the check, for example `datadog.agent.up` - - - `tags` one or more quoted tags (comma-separated), or "*". for example: `.over("env:prod", - "role:db")`; `over` cannot be blank. - - - `count` must be at greater than or equal to your max threshold (defined - in the `options`). It is limited to 100. - - For example, if you''ve specified to notify on 1 critical, 3 ok, and 2 warn - statuses, `count` should be at least 3. - - - `group` must be specified for check monitors. Per-check grouping is already - explicitly known for some service checks. - - For example, Postgres integration monitors are tagged by `db`, `host`, and - `port`, and Network monitors by `host`, `instance`, and `url`. See [Service - Checks](https://docs.datadoghq.com/api/latest/service-checks/) documentation - for more information. - - - ##### Event Alert Query - - - **Note:** The Event Alert Query has been replaced by the Event V2 Alert Query. - For more information, see the [Event Migration guide](https://docs.datadoghq.com/service_management/events/guides/migrating_to_new_events_features/). - - - ##### Event V2 Alert Query - - - Example: `events(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. - - - ##### Process Alert Query - - - Example: `processes(search).over(tags).rollup(''count'').last(timeframe) operator - #` - - - - `search` free text search string for querying processes. - - Matching processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) - page. - - - `tags` one or more tags (comma-separated) - - - `timeframe` the timeframe to roll up the counts. Examples: 10m, 4h. Supported - timeframes: s, m, h and d - - - `operator` <, <=, >, >=, ==, or != - - - `#` an integer or decimal number used to set the threshold - - - ##### Logs Alert Query - - - Example: `logs(query).index(index_name).rollup(rollup_method[, measure]).last(time_window) - operator #` - - - - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - - - `index_name` For multi-index organizations, the log index in which the request - is performed. - - - `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. - - - ##### Composite Query - - - Example: `12345 && 67890`, where `12345` and `67890` are the IDs of non-composite - monitors - - - * `name` [*required*, *default* = **dynamic, based on query**]: The name of - the alert. - - * `message` [*required*, *default* = **dynamic, based on query**]: A message - to include with notifications for this monitor. - - Email notifications can be sent to specific users by using the same ''@username'' - notation as events. - - * `tags` [*optional*, *default* = **empty list**]: A list of tags to associate - with your monitor. - - When getting all monitor details via the API, use the `monitor_tags` argument - to filter results by these tags. - - It is only available via the API and isn''t visible or editable in the Datadog - UI. - - - ##### SLO Alert Query - - - Example: `error_budget("slo_id").over("time_window") operator #` - - - - `slo_id`: The alphanumeric SLO ID of the SLO you are configuring the alert - for. - - - `time_window`: The time window of the SLO target you wish to alert on. Valid - options: `7d`, `30d`, `90d`. - - - `operator`: `>=` or `>` - - - ##### Audit Alert Query - - - Example: `audits(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. - - - ##### CI Pipelines Alert Query - - - Example: `ci-pipelines(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. - - - ##### CI Tests Alert Query - - - Example: `ci-tests(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. - - - ##### Error Tracking Alert Query - - - "New issue" example: `error-tracking(query).source(issue_source).new().rollup(rollup_method[, - measure]).by(group_by).last(time_window) operator #` - - "High impact issue" example: `error-tracking(query).source(issue_source).impact().rollup(rollup_method[, - measure]).by(group_by).last(time_window) operator #` - - - - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). - - - `issue_source` The issue source - supports `all`, `browser`, `mobile` and - `backend` and defaults to `all` if omitted. - - - `rollup_method` The stats roll-up method - supports `count`, `avg`, and - `cardinality` and defaults to `count` if omitted. - - - `measure` For `avg` and cardinality `rollup_method` - specify the measure - or the facet name you want to use. - - - `group by` Comma-separated list of attributes to group by - should contain - at least `issue.id`. - - - `time_window` #m (between 1 and 2880), #h (between 1 and 48). - - - `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`. - - - `#` an integer or decimal number used to set the threshold. - - - **Database Monitoring Alert Query** - - - Example: `database-monitoring(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. - - - **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.' + description: "Create a monitor using the specified options.\n\n#### Monitor + Types\n\nThe type of monitor chosen from:\n\n- anomaly: `query alert`\n- APM: + `query alert` or `trace-analytics alert`\n- composite: `composite`\n- custom: + `service check`\n- forecast: `query alert`\n- host: `service check`\n- integration: + `query alert` or `service check`\n- live process: `process alert`\n- logs: + `log alert`\n- metric: `query alert`\n- network: `service check`\n- outlier: + `query alert`\n- process: `service check`\n- rum: `rum alert`\n- SLO: `slo + alert`\n- watchdog: `event-v2 alert`\n- event-v2: `event-v2 alert`\n- audit: + `audit alert`\n- error-tracking: `error-tracking alert`\n- database-monitoring: + `database-monitoring alert`\n- network-performance: `network-performance alert`\n- + cloud cost: `cost alert`\n\n**Notes**:\n- Synthetic monitors are created through + the Synthetics API. See the [Synthetics API](https://docs.datadoghq.com/api/latest/synthetics/) + documentation for more information.\n- Log monitors require an unscoped App + Key.\n\n#### Query Types\n\n##### Metric Alert Query\n\nExample: `time_aggr(time_window):space_aggr:metric{tags} + [by {key}] operator #`\n\n- `time_aggr`: avg, sum, max, min, change, or pct_change\n- + `time_window`: `last_#m` (with `#` between 1 and 10080 depending on the monitor + type) or `last_#h`(with `#` between 1 and 168 depending on the monitor type) + or `last_1d`, or `last_1w`\n- `space_aggr`: avg, sum, min, or max\n- `tags`: + one or more tags (comma-separated), or *\n- `key`: a 'key' in key:value tag + syntax; defines a separate alert for each tag in the group (multi-alert)\n- + `operator`: <, <=, >, >=, ==, or !=\n- `#`: an integer or decimal number used + to set the threshold\n\nIf you are using the `_change_` or `_pct_change_` + time aggregator, instead use `change_aggr(time_aggr(time_window),\ntimeshift):space_aggr:metric{tags} + [by {key}] operator #` with:\n\n- `change_aggr` change, pct_change\n- `time_aggr` + avg, sum, max, min [Learn more](https://docs.datadoghq.com/monitors/create/types/#define-the-conditions)\n- + `time_window` last\\_#m (between 1 and 2880 depending on the monitor type), + last\\_#h (between 1 and 48 depending on the monitor type), or last_#d (1 + or 2)\n- `timeshift` #m_ago (5, 10, 15, or 30), #h_ago (1, 2, or 4), or 1d_ago\n\nUse + this to create an outlier monitor using the following query:\n`avg(last_30m):outliers(avg:system.cpu.user{role:es-events-data} + by {host}, 'dbscan', 7) > 0`\n\n##### Service Check Query\n\nExample: `\"check\".over(tags).last(count).by(group).count_by_status()`\n\n- + `check` name of the check, for example `datadog.agent.up`\n- `tags` one or + more quoted tags (comma-separated), or \"*\". for example: `.over(\"env:prod\", + \"role:db\")`; `over` cannot be blank.\n- `count` must be at greater than + or equal to your max threshold (defined in the `options`). It is limited to + 100.\nFor example, if you've specified to notify on 1 critical, 3 ok, and + 2 warn statuses, `count` should be at least 3.\n- `group` must be specified + for check monitors. Per-check grouping is already explicitly known for some + service checks.\nFor example, Postgres integration monitors are tagged by + `db`, `host`, and `port`, and Network monitors by `host`, `instance`, and + `url`. See [Service Checks](https://docs.datadoghq.com/api/latest/service-checks/) + documentation for more information.\n\n##### Event Alert Query\n\n**Note:** + The Event Alert Query has been replaced by the Event V2 Alert Query. For more + information, see the [Event Migration guide](https://docs.datadoghq.com/service_management/events/guides/migrating_to_new_events_features/).\n\n##### + Event V2 Alert Query\n\nExample: `events(query).rollup(rollup_method[, measure]).last(time_window) + operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n##### Process + Alert Query\n\nExample: `processes(search).over(tags).rollup('count').last(timeframe) + operator #`\n\n- `search` free text search string for querying processes.\nMatching + processes match results on the [Live Processes](https://docs.datadoghq.com/infrastructure/process/?tab=linuxwindows) + page.\n- `tags` one or more tags (comma-separated)\n- `timeframe` the timeframe + to roll up the counts. Examples: 10m, 4h. Supported timeframes: s, m, h and + d\n- `operator` <, <=, >, >=, ==, or !=\n- `#` an integer or decimal number + used to set the threshold\n\n##### Logs Alert Query\n\nExample: `logs(query).index(index_name).rollup(rollup_method[, + measure]).last(time_window) operator #`\n\n- `query` The search query - following + the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `index_name` For multi-index organizations, the log index in which the request + is performed.\n- `rollup_method` The stats roll-up method - supports `count`, + `avg` and `cardinality`.\n- `measure` For `avg` and cardinality `rollup_method` + - specify the measure or the facet name you want to use.\n- `time_window` + #m (between 1 and 2880), #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, + `>=`, `==`, or `!=`.\n- `#` an integer or decimal number used to set the threshold.\n\n##### + Composite Query\n\nExample: `12345 && 67890`, where `12345` and `67890` are + the IDs of non-composite monitors\n\n* `name` [*required*, *default* = **dynamic, + based on query**]: The name of the alert.\n* `message` [*required*, *default* + = **dynamic, based on query**]: A message to include with notifications for + this monitor.\nEmail notifications can be sent to specific users by using + the same '@username' notation as events.\n* `tags` [*optional*, *default* + = **empty list**]: A list of tags to associate with your monitor.\nWhen getting + all monitor details via the API, use the `monitor_tags` argument to filter + results by these tags.\nIt is only available via the API and isn't visible + or editable in the Datadog UI.\n\n##### SLO Alert Query\n\nExample: `error_budget(\"slo_id\").over(\"time_window\") + operator #`\n\n- `slo_id`: The alphanumeric SLO ID of the SLO you are configuring + the alert for.\n- `time_window`: The time window of the SLO target you wish + to alert on. Valid options: `7d`, `30d`, `90d`.\n- `operator`: `>=` or `>`\n\n##### + Audit Alert Query\n\nExample: `audits(query).rollup(rollup_method[, measure]).last(time_window) + operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg` and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n##### CI Pipelines + Alert Query\n\nExample: `ci-pipelines(query).rollup(rollup_method[, measure]).last(time_window) + operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n##### CI Tests + Alert Query\n\nExample: `ci-tests(query).rollup(rollup_method[, measure]).last(time_window) + operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n##### Error + Tracking Alert Query\n\n\"New issue\" example: `error-tracking(query).source(issue_source).new().rollup(rollup_method[, + measure]).by(group_by).last(time_window) operator #`\n\"High impact issue\" + example: `error-tracking(query).source(issue_source).impact().rollup(rollup_method[, + measure]).by(group_by).last(time_window) operator #`\n\n- `query` The search + query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `issue_source` The issue source - supports `all`, `browser`, `mobile` and + `backend` and defaults to `all` if omitted.\n- `rollup_method` The stats roll-up + method - supports `count`, `avg`, and `cardinality` and defaults to `count` + if omitted.\n- `measure` For `avg` and cardinality `rollup_method` - specify + the measure or the facet name you want to use.\n- `group by` Comma-separated + list of attributes to group by - should contain at least `issue.id`.\n- `time_window` + #m (between 1 and 2880), #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, + `>=`, `==`, or `!=`.\n- `#` an integer or decimal number used to set the threshold.\n\n**Database + Monitoring Alert Query**\n\nExample: `database-monitoring(query).rollup(rollup_method[, + measure]).last(time_window) operator #`\n\n- `query` The search query - following + the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n**Network Performance + Alert Query**\n\nExample: `network-performance(query).rollup(rollup_method[, + measure]).last(time_window) operator #`\n\n- `query` The search query - following + the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `rollup_method` The stats roll-up method - supports `count`, `avg`, and `cardinality`.\n- + `measure` For `avg` and cardinality `rollup_method` - specify the measure + or the facet name you want to use.\n- `time_window` #m (between 1 and 2880), + #h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n- + `#` an integer or decimal number used to set the threshold.\n\n**Cost Alert + Query**\n\nExample: `formula(query).last(time_window).function(parameter) + operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n- + `time_window` - supports daily roll-up e.g. `7d`\n- `function` - [optional, + defaults to `threshold` monitor if omitted] supports `change`, `anomaly`, + `forecast`\n- `parameter` Specify the parameter of the type\n - for `change`:\n + \ - supports `relative`, `absolute`\n - [optional] supports `#`, + where `#` is an integer or decimal number used to set the threshold\n - + for `anomaly`:\n - supports `direction=both`, `direction=above`, `direction=below`\n + \ - [optional] supports `threshold=#`, where `#` is an integer or decimal + number used to set the threshold\n- `operator`\n - for `threshold` supports + `<`, `<=`, `>`, `>=`, `==`, or `!=`\n - for `change` supports `>`, `<`\n + \ - for `anomaly` supports `>=`\n - for `forecast` supports `>`\n- `#` + an integer or decimal number used to set the threshold." operationId: CreateMonitor requestBody: content: diff --git a/packages/datadog-api-client-v1/apis/MonitorsApi.ts b/packages/datadog-api-client-v1/apis/MonitorsApi.ts index 7b766a7ed04b..d941bddf7384 100644 --- a/packages/datadog-api-client-v1/apis/MonitorsApi.ts +++ b/packages/datadog-api-client-v1/apis/MonitorsApi.ts @@ -1603,6 +1603,27 @@ 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. + * + * **Cost Alert Query** + * + * Example: `formula(query).last(time_window).function(parameter) operator #` + * + * - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/). + * - `time_window` - supports daily roll-up e.g. `7d` + * - `function` - [optional, defaults to `threshold` monitor if omitted] supports `change`, `anomaly`, `forecast` + * - `parameter` Specify the parameter of the type + * - for `change`: + * - supports `relative`, `absolute` + * - [optional] supports `#`, where `#` is an integer or decimal number used to set the threshold + * - for `anomaly`: + * - supports `direction=both`, `direction=above`, `direction=below` + * - [optional] supports `threshold=#`, where `#` is an integer or decimal number used to set the threshold + * - `operator` + * - for `threshold` supports `<`, `<=`, `>`, `>=`, `==`, or `!=` + * - for `change` supports `>`, `<` + * - for `anomaly` supports `>=` + * - for `forecast` supports `>` + * - `#` 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 ad09d431ad0f..493c4967cecc 100644 --- a/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts +++ b/packages/datadog-api-client-v1/models/MonitorFormulaAndFunctionEventsDataSource.ts @@ -20,6 +20,7 @@ export type MonitorFormulaAndFunctionEventsDataSource = | typeof SPANS | typeof DATABASE_QUERIES | typeof NETWORK + | typeof COST | UnparsedObject; export const RUM = "rum"; export const CI_PIPELINES = "ci_pipelines"; @@ -30,3 +31,4 @@ export const LOGS = "logs"; export const SPANS = "spans"; export const DATABASE_QUERIES = "database_queries"; export const NETWORK = "network"; +export const COST = "cost"; diff --git a/packages/datadog-api-client-v1/models/MonitorType.ts b/packages/datadog-api-client-v1/models/MonitorType.ts index ce3443e654e3..29fa55f9f943 100644 --- a/packages/datadog-api-client-v1/models/MonitorType.ts +++ b/packages/datadog-api-client-v1/models/MonitorType.ts @@ -29,6 +29,7 @@ export type MonitorType = | typeof ERROR_TRACKING_ALERT | typeof DATABASE_MONITORING_ALERT | typeof NETWORK_PERFORMANCE_ALERT + | typeof COST_ALERT | UnparsedObject; export const COMPOSITE = "composite"; export const EVENT_ALERT = "event alert"; @@ -48,3 +49,4 @@ 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"; +export const COST_ALERT = "cost alert"; diff --git a/packages/datadog-api-client-v1/models/ObjectSerializer.ts b/packages/datadog-api-client-v1/models/ObjectSerializer.ts index 13eaf4d429ea..a9c60c1c0b05 100644 --- a/packages/datadog-api-client-v1/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v1/models/ObjectSerializer.ts @@ -959,6 +959,7 @@ const enumsMap: { [key: string]: any[] } = { "spans", "database_queries", "network", + "cost", ], MonitorOptionsNotificationPresets: [ "show_all", @@ -996,6 +997,7 @@ const enumsMap: { [key: string]: any[] } = { "error-tracking alert", "database-monitoring alert", "network-performance alert", + "cost alert", ], MonthlyUsageAttributionSupportedMetrics: [ "api_usage",