Skip to content

Commit 3a1151d

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
add timeframe_type param for cost monitors (#2686)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 34f0e67 commit 3a1151d

File tree

3 files changed

+24
-17
lines changed

3 files changed

+24
-17
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.6",
7-
"regenerated": "2025-01-29 14:56:05.546786",
8-
"spec_repo_commit": "14f5d952"
7+
"regenerated": "2025-01-30 13:13:45.639832",
8+
"spec_repo_commit": "833109b8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-29 14:56:05.561740",
13-
"spec_repo_commit": "14f5d952"
12+
"regenerated": "2025-01-30 13:13:45.655185",
13+
"spec_repo_commit": "833109b8"
1414
}
1515
}
1616
}

.generator/schemas/v1/openapi.yaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29252,19 +29252,22 @@ paths:
2925229252
or the facet name you want to use.\n- `time_window` #m (between 1 and 2880),
2925329253
#h (between 1 and 48).\n- `operator` `<`, `<=`, `>`, `>=`, `==`, or `!=`.\n-
2925429254
`#` an integer or decimal number used to set the threshold.\n\n**Cost Alert
29255-
Query**\n\nExample: `formula(query).last(time_window).function(parameter)
29255+
Query**\n\nExample: `formula(query).timeframe_type(time_window).function(parameter)
2925629256
operator #`\n\n- `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).\n-
29257-
`time_window` - supports daily roll-up e.g. `7d`\n- `function` - [optional,
29258-
defaults to `threshold` monitor if omitted] supports `change`, `anomaly`,
29259-
`forecast`\n- `parameter` Specify the parameter of the type\n - for `change`:\n
29260-
\ - supports `relative`, `absolute`\n - [optional] supports `#`,
29261-
where `#` is an integer or decimal number used to set the threshold\n -
29262-
for `anomaly`:\n - supports `direction=both`, `direction=above`, `direction=below`\n
29263-
\ - [optional] supports `threshold=#`, where `#` is an integer or decimal
29264-
number used to set the threshold\n- `operator`\n - for `threshold` supports
29265-
`<`, `<=`, `>`, `>=`, `==`, or `!=`\n - for `change` supports `>`, `<`\n
29266-
\ - for `anomaly` supports `>=`\n - for `forecast` supports `>`\n- `#`
29267-
an integer or decimal number used to set the threshold."
29257+
`timeframe_type` The timeframe type to evaluate the cost\n - for `forecast`
29258+
supports `current`\n - for `change`, `anomaly`, `threshold` supports
29259+
`last`\n- `time_window` - supports daily roll-up e.g. `7d`\n- `function` -
29260+
[optional, defaults to `threshold` monitor if omitted] supports `change`,
29261+
`anomaly`, `forecast`\n- `parameter` Specify the parameter of the type\n -
29262+
for `change`:\n - supports `relative`, `absolute`\n - [optional]
29263+
supports `#`, where `#` is an integer or decimal number used to set the threshold\n
29264+
\ - for `anomaly`:\n - supports `direction=both`, `direction=above`,
29265+
`direction=below`\n - [optional] supports `threshold=#`, where `#`
29266+
is an integer or decimal number used to set the threshold\n- `operator`\n
29267+
\ - for `threshold` supports `<`, `<=`, `>`, `>=`, `==`, or `!=`\n -
29268+
for `change` supports `>`, `<`\n - for `anomaly` supports `>=`\n - for
29269+
`forecast` supports `>`\n- `#` an integer or decimal number used to set the
29270+
threshold."
2926829271
operationId: CreateMonitor
2926929272
requestBody:
2927029273
content:

src/main/java/com/datadog/api/client/v1/api/MonitorsApi.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,11 +526,15 @@ public CompletableFuture<Monitor> createMonitorAsync(Monitor body) {
526526
*
527527
* <p><strong>Cost Alert Query</strong>
528528
*
529-
* <p>Example: <code>formula(query).last(time_window).function(parameter) operator #</code>
529+
* <p>Example: <code>formula(query).timeframe_type(time_window).function(parameter) operator #
530+
* </code>
530531
*
531532
* <ul>
532533
* <li><code>query</code> The search query - following the <a
533534
* href="https://docs.datadoghq.com/logs/search_syntax/">Log search syntax</a>.
535+
* <li><code>timeframe_type</code> The timeframe type to evaluate the cost - for <code>forecast
536+
* </code> supports <code>current</code> - for <code>change</code>, <code>anomaly</code>,
537+
* <code>threshold</code> supports <code>last</code>
534538
* <li><code>time_window</code> - supports daily roll-up e.g. <code>7d</code>
535539
* <li><code>function</code> - [optional, defaults to <code>threshold</code> monitor if omitted]
536540
* supports <code>change</code>, <code>anomaly</code>, <code>forecast</code>

0 commit comments

Comments
 (0)