v2_fleet_automation_CancelFleetDeployment/
v2_fleet-automation_CancelFleetDeployment.rs

1// Cancel a deployment returns "Deployment successfully canceled." response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_fleet_automation::FleetAutomationAPI;
4
5#[tokio::main]
6async fn main() {
7    let mut configuration = datadog::Configuration::new();
8    configuration.set_unstable_operation_enabled("v2.CancelFleetDeployment", true);
9    let api = FleetAutomationAPI::with_config(configuration);
10    let resp = api
11        .cancel_fleet_deployment("deployment_id".to_string())
12        .await;
13    if let Ok(value) = resp {
14        println!("{:#?}", value);
15    } else {
16        println!("{:#?}", resp.unwrap_err());
17    }
18}