v1_aws_integration_CreateAWSEventBridgeSource/
v1_aws-integration_CreateAWSEventBridgeSource.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_aws_integration::AWSIntegrationAPI;
4use datadog_api_client::datadogV1::model::AWSEventBridgeCreateRequest;
5
6#[tokio::main]
7async fn main() {
8 let body = AWSEventBridgeCreateRequest::new()
9 .account_id("123456789012".to_string())
10 .create_event_bus(true)
11 .event_generator_name("app-alerts".to_string())
12 .region("us-east-1".to_string());
13 let configuration = datadog::Configuration::new();
14 let api = AWSIntegrationAPI::with_config(configuration);
15 let resp = api.create_aws_event_bridge_source(body).await;
16 if let Ok(value) = resp {
17 println!("{:#?}", value);
18 } else {
19 println!("{:#?}", resp.unwrap_err());
20 }
21}