v2_cloud_cost_management_UpdateCostAzureUCConfigs/
v2_cloud-cost-management_UpdateCostAzureUCConfigs.rs

1// Update Cloud Cost Management Azure config returns "OK" response
2use datadog_api_client::datadog;
3use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4use datadog_api_client::datadogV2::model::AzureUCConfigPatchData;
5use datadog_api_client::datadogV2::model::AzureUCConfigPatchRequest;
6use datadog_api_client::datadogV2::model::AzureUCConfigPatchRequestAttributes;
7use datadog_api_client::datadogV2::model::AzureUCConfigPatchRequestType;
8
9#[tokio::main]
10async fn main() {
11    let body = AzureUCConfigPatchRequest::new(
12        AzureUCConfigPatchData::new(AzureUCConfigPatchRequestType::AZURE_UC_CONFIG_PATCH_REQUEST)
13            .attributes(AzureUCConfigPatchRequestAttributes::new(true)),
14    );
15    let configuration = datadog::Configuration::new();
16    let api = CloudCostManagementAPI::with_config(configuration);
17    let resp = api.update_cost_azure_uc_configs(100, body).await;
18    if let Ok(value) = resp {
19        println!("{:#?}", value);
20    } else {
21        println!("{:#?}", resp.unwrap_err());
22    }
23}