v2_service_level_objectives_GetSLOReportJobStatus/
v2_service-level-objectives_GetSLOReportJobStatus.rs

1// Get SLO report status returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_service_level_objectives::ServiceLevelObjectivesAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "report" in the system
8    let report_data_id = std::env::var("REPORT_DATA_ID").unwrap();
9    let mut configuration = datadog::Configuration::new();
10    configuration.set_unstable_operation_enabled("v2.GetSLOReportJobStatus", true);
11    let api = ServiceLevelObjectivesAPI::with_config(configuration);
12    let resp = api.get_slo_report_job_status(report_data_id.clone()).await;
13    if let Ok(value) = resp {
14        println!("{:#?}", value);
15    } else {
16        println!("{:#?}", resp.unwrap_err());
17    }
18}