v2_case_management_attribute_DeleteCustomAttributeConfig/
v2_case-management-attribute_DeleteCustomAttributeConfig.rs

1// Delete custom attributes config returns "No Content" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_case_management_attribute::CaseManagementAttributeAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "case_type" in the system
8    let case_type_id = std::env::var("CASE_TYPE_ID").unwrap();
9
10    // there is a valid "custom_attribute" in the system
11    let custom_attribute_id = std::env::var("CUSTOM_ATTRIBUTE_ID").unwrap();
12    let configuration = datadog::Configuration::new();
13    let api = CaseManagementAttributeAPI::with_config(configuration);
14    let resp = api
15        .delete_custom_attribute_config(case_type_id.clone(), custom_attribute_id.clone())
16        .await;
17    if let Ok(value) = resp {
18        println!("{:#?}", value);
19    } else {
20        println!("{:#?}", resp.unwrap_err());
21    }
22}