v1_azure_integration_CreateAzureIntegration/
v1_azure-integration_CreateAzureIntegration.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV1::api_azure_integration::AzureIntegrationAPI;
4use datadog_api_client::datadogV1::model::AzureAccount;
5
6#[tokio::main]
7async fn main() {
8 let body = AzureAccount::new()
9 .app_service_plan_filters("key:value,filter:example".to_string())
10 .automute(true)
11 .client_id("".to_string())
12 .client_secret("TestingRh2nx664kUy5dIApvM54T4AtO".to_string())
13 .container_app_filters("key:value,filter:example".to_string())
14 .cspm_enabled(true)
15 .custom_metrics_enabled(true)
16 .errors(vec!["*".to_string()])
17 .host_filters("key:value,filter:example".to_string())
18 .new_client_id("".to_string())
19 .new_tenant_name("".to_string())
20 .resource_collection_enabled(true)
21 .tenant_name("".to_string());
22 let configuration = datadog::Configuration::new();
23 let api = AzureIntegrationAPI::with_config(configuration);
24 let resp = api.create_azure_integration(body).await;
25 if let Ok(value) = resp {
26 println!("{:#?}", value);
27 } else {
28 println!("{:#?}", resp.unwrap_err());
29 }
30}