Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add timeframe_type param for cost monitors #2030

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-29 14:55:55.254252",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 13:13:49.060132",
"spec_repo_commit": "833109b8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-29 14:55:55.270118",
"spec_repo_commit": "14f5d952"
"regenerated": "2025-01-30 13:13:49.075985",
"spec_repo_commit": "833109b8"
}
}
}
27 changes: 15 additions & 12 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29252,19 +29252,22 @@ paths:
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)
Query**\n\nExample: `formula(query).timeframe_type(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."
`timeframe_type` The timeframe type to evaluate the cost\n - for `forecast`
supports `current`\n - for `change`, `anomaly`, `threshold` supports
`last`\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:
Expand Down
5 changes: 4 additions & 1 deletion packages/datadog-api-client-v1/apis/MonitorsApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1606,9 +1606,12 @@ export class MonitorsApi {
*
* **Cost Alert Query**
*
* Example: `formula(query).last(time_window).function(parameter) operator #`
* Example: `formula(query).timeframe_type(time_window).function(parameter) operator #`
*
* - `query` The search query - following the [Log search syntax](https://docs.datadoghq.com/logs/search_syntax/).
* - `timeframe_type` The timeframe type to evaluate the cost
* - for `forecast` supports `current`
* - for `change`, `anomaly`, `threshold` supports `last`
* - `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
Expand Down
Loading