v1_aws_logs_integration_CheckAWSLogsLambdaAsync/
v1_aws-logs-integration_CheckAWSLogsLambdaAsync.rs

1// Check that an AWS Lambda Function exists returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_aws_logs_integration::AWSLogsIntegrationAPI;
4use datadog_api_client::datadogV1::model::AWSAccountAndLambdaRequest;
5
6#[tokio::main]
7async fn main() {
8    let body = AWSAccountAndLambdaRequest::new(
9        "1234567".to_string(),
10        "arn:aws:lambda:us-east-1:1234567:function:LogsCollectionAPITest".to_string(),
11    );
12    let configuration = datadog::Configuration::new();
13    let api = AWSLogsIntegrationAPI::with_config(configuration);
14    let resp = api.check_aws_logs_lambda_async(body).await;
15    if let Ok(value) = resp {
16        println!("{:#?}", value);
17    } else {
18        println!("{:#?}", resp.unwrap_err());
19    }
20}