v2_cloud_cost_management_CreateCostAzureUCConfigs/
v2_cloud-cost-management_CreateCostAzureUCConfigs.rs1use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4use datadog_api_client::datadogV2::model::AzureUCConfigPostData;
5use datadog_api_client::datadogV2::model::AzureUCConfigPostRequest;
6use datadog_api_client::datadogV2::model::AzureUCConfigPostRequestAttributes;
7use datadog_api_client::datadogV2::model::AzureUCConfigPostRequestType;
8use datadog_api_client::datadogV2::model::BillConfig;
9
10#[tokio::main]
11async fn main() {
12 let body = AzureUCConfigPostRequest::new(
13 AzureUCConfigPostData::new(AzureUCConfigPostRequestType::AZURE_UC_CONFIG_POST_REQUEST)
14 .attributes(AzureUCConfigPostRequestAttributes::new(
15 "1234abcd-1234-abcd-1234-1234abcd1234".to_string(),
16 BillConfig::new(
17 "dd-actual-export".to_string(),
18 "dd-export-path".to_string(),
19 "dd-storage-account".to_string(),
20 "dd-storage-container".to_string(),
21 ),
22 BillConfig::new(
23 "dd-actual-export".to_string(),
24 "dd-export-path".to_string(),
25 "dd-storage-account".to_string(),
26 "dd-storage-container".to_string(),
27 ),
28 "1234abcd-1234-abcd-1234-1234abcd1234".to_string(),
29 "subscriptions/1234abcd-1234-abcd-1234-1234abcd1234".to_string(),
30 )),
31 );
32 let configuration = datadog::Configuration::new();
33 let api = CloudCostManagementAPI::with_config(configuration);
34 let resp = api.create_cost_azure_uc_configs(body).await;
35 if let Ok(value) = resp {
36 println!("{:#?}", value);
37 } else {
38 println!("{:#?}", resp.unwrap_err());
39 }
40}