v2_org_connections_DeleteOrgConnections/
v2_org-connections_DeleteOrgConnections.rs

1// Delete Org Connection returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_org_connections::OrgConnectionsAPI;
4
5#[tokio::main]
6async fn main() {
7    // there is a valid "org_connection" in the system
8    let org_connection_data_id =
9        uuid::Uuid::parse_str(&std::env::var("ORG_CONNECTION_DATA_ID").unwrap())
10            .expect("Invalid UUID");
11    let configuration = datadog::Configuration::new();
12    let api = OrgConnectionsAPI::with_config(configuration);
13    let resp = api
14        .delete_org_connections(org_connection_data_id.clone())
15        .await;
16    if let Ok(value) = resp {
17        println!("{:#?}", value);
18    } else {
19        println!("{:#?}", resp.unwrap_err());
20    }
21}