v2_case_management_DeleteCaseComment/
v2_case-management_DeleteCaseComment.rs

1// Delete case comment returns "No Content" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_case_management::CaseManagementAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "case" in the system
8    let case_id = std::env::var("CASE_ID").unwrap();
9
10    // there is a valid "comment" in the system
11    let comment_id = std::env::var("COMMENT_ID").unwrap();
12    let configuration = datadog::Configuration::new();
13    let api = CaseManagementAPI::with_config(configuration);
14    let resp = api
15        .delete_case_comment(case_id.clone(), comment_id.clone())
16        .await;
17    if let Ok(value) = resp {
18        println!("{:#?}", value);
19    } else {
20        println!("{:#?}", resp.unwrap_err());
21    }
22}