Skip to content

Commit

Permalink
Add missing measures for SLOs data source (#372)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Nov 11, 2024
1 parent 2c08ad5 commit 05da3b0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
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": "2024-11-08 19:36:27.945748",
"spec_repo_commit": "ae3b5463"
"regenerated": "2024-11-11 17:25:20.073695",
"spec_repo_commit": "9de1804a"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-08 19:36:27.964476",
"spec_repo_commit": "ae3b5463"
"regenerated": "2024-11-11 17:25:20.093231",
"spec_repo_commit": "9de1804a"
}
}
}
4 changes: 4 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3040,6 +3040,8 @@ components:
enum:
- good_events
- bad_events
- good_minutes
- bad_minutes
- slo_status
- error_budget_remaining
- burn_rate
Expand All @@ -3049,6 +3051,8 @@ components:
x-enum-varnames:
- GOOD_EVENTS
- BAD_EVENTS
- GOOD_MINUTES
- BAD_MINUTES
- SLO_STATUS
- ERROR_BUDGET_REMAINING
- BURN_RATE
Expand Down
2 changes: 1 addition & 1 deletion examples/v2_security-monitoring_GetHistoricalJob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ async fn main() {
// there is a valid "historical_job" in the system
let historical_job_data_id = std::env::var("HISTORICAL_JOB_DATA_ID").unwrap();
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.GetHistoricalJob", true);
configuration.set_unstable_operation_enabled("v2.RunHistoricalJob", true);
configuration.set_unstable_operation_enabled("v2.GetHistoricalJob", true);
let api = SecurityMonitoringAPI::with_config(configuration);
let resp = api.get_historical_job(historical_job_data_id.clone()).await;
if let Ok(value) = resp {
Expand Down
6 changes: 6 additions & 0 deletions src/datadogV1/model/model_formula_and_function_slo_measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ use serde::{Deserialize, Deserializer, Serialize, Serializer};
pub enum FormulaAndFunctionSLOMeasure {
GOOD_EVENTS,
BAD_EVENTS,
GOOD_MINUTES,
BAD_MINUTES,
SLO_STATUS,
ERROR_BUDGET_REMAINING,
BURN_RATE,
Expand All @@ -21,6 +23,8 @@ impl ToString for FormulaAndFunctionSLOMeasure {
match self {
Self::GOOD_EVENTS => String::from("good_events"),
Self::BAD_EVENTS => String::from("bad_events"),
Self::GOOD_MINUTES => String::from("good_minutes"),
Self::BAD_MINUTES => String::from("bad_minutes"),
Self::SLO_STATUS => String::from("slo_status"),
Self::ERROR_BUDGET_REMAINING => String::from("error_budget_remaining"),
Self::BURN_RATE => String::from("burn_rate"),
Expand Down Expand Up @@ -51,6 +55,8 @@ impl<'de> Deserialize<'de> for FormulaAndFunctionSLOMeasure {
Ok(match s.as_str() {
"good_events" => Self::GOOD_EVENTS,
"bad_events" => Self::BAD_EVENTS,
"good_minutes" => Self::GOOD_MINUTES,
"bad_minutes" => Self::BAD_MINUTES,
"slo_status" => Self::SLO_STATUS,
"error_budget_remaining" => Self::ERROR_BUDGET_REMAINING,
"burn_rate" => Self::BURN_RATE,
Expand Down

0 comments on commit 05da3b0

Please sign in to comment.