v1_aws_integration_DeleteAWSAccount/
v1_aws-integration_DeleteAWSAccount.rs

1// Delete an AWS integration returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_aws_integration::AWSIntegrationAPI;
4use datadog_api_client::datadogV1::model::AWSAccountDeleteRequest;
5
6#[tokio::main]
7async fn main() {
8    let body = AWSAccountDeleteRequest::new()
9        .account_id("163662907100".to_string())
10        .role_name("DatadogAWSIntegrationRole".to_string());
11    let configuration = datadog::Configuration::new();
12    let api = AWSIntegrationAPI::with_config(configuration);
13    let resp = api.delete_aws_account(body).await;
14    if let Ok(value) = resp {
15        println!("{:#?}", value);
16    } else {
17        println!("{:#?}", resp.unwrap_err());
18    }
19}