v1_aws_logs_integration_CheckAWSLogsServicesAsync/
v1_aws-logs-integration_CheckAWSLogsServicesAsync.rs

1// Check permissions for log services returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_aws_logs_integration::AWSLogsIntegrationAPI;
4use datadog_api_client::datadogV1::model::AWSLogsServicesRequest;
5
6#[tokio::main]
7async fn main() {
8    let body = AWSLogsServicesRequest::new(
9        "1234567".to_string(),
10        vec![
11            "s3".to_string(),
12            "elb".to_string(),
13            "elbv2".to_string(),
14            "cloudfront".to_string(),
15            "redshift".to_string(),
16            "lambda".to_string(),
17        ],
18    );
19    let configuration = datadog::Configuration::new();
20    let api = AWSLogsIntegrationAPI::with_config(configuration);
21    let resp = api.check_aws_logs_services_async(body).await;
22    if let Ok(value) = resp {
23        println!("{:#?}", value);
24    } else {
25        println!("{:#?}", resp.unwrap_err());
26    }
27}