v2_on_call_DeleteOnCallEscalationPolicy/
v2_on-call_DeleteOnCallEscalationPolicy.rs

1// Delete On-Call escalation policy returns "No Content" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_on_call::OnCallAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "escalation_policy" in the system
8    let escalation_policy_data_id = std::env::var("ESCALATION_POLICY_DATA_ID").unwrap();
9    let configuration = datadog::Configuration::new();
10    let api = OnCallAPI::with_config(configuration);
11    let resp = api
12        .delete_on_call_escalation_policy(escalation_policy_data_id.clone())
13        .await;
14    if let Ok(value) = resp {
15        println!("{:#?}", value);
16    } else {
17        println!("{:#?}", resp.unwrap_err());
18    }
19}