v2_security_monitoring_GetSignalNotificationRule/
v2_security-monitoring_GetSignalNotificationRule.rs

1// Get details of a signal-based notification rule returns "Notification rule
2// details." response
3use datadog_api_client::datadog;
4use datadog_api_client::datadogV2::api_security_monitoring::SecurityMonitoringAPI;
5
6#[tokio::main]
7async fn main() {
8    // there is a valid "valid_signal_notification_rule" in the system
9    let valid_signal_notification_rule_data_id =
10        std::env::var("VALID_SIGNAL_NOTIFICATION_RULE_DATA_ID").unwrap();
11    let configuration = datadog::Configuration::new();
12    let api = SecurityMonitoringAPI::with_config(configuration);
13    let resp = api
14        .get_signal_notification_rule(valid_signal_notification_rule_data_id.clone())
15        .await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}