Skip to content

Commit 51c701f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Cloud Cost Management tag_metadata endpoints (#1599)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent a0a7757 commit 51c701f

30 files changed

Lines changed: 3583 additions & 26 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 653 additions & 1 deletion
Large diffs are not rendered by default.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// Get the Cloud Cost Management billing currency returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
use datadog_api_client::datadogV2::api_cloud_cost_management::GetCostTagMetadataCurrencyOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.GetCostTagMetadataCurrency", true);
10+
let api = CloudCostManagementAPI::with_config(configuration);
11+
let resp = api
12+
.get_cost_tag_metadata_currency(
13+
"filter[month]".to_string(),
14+
GetCostTagMetadataCurrencyOptionalParams::default(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// List Cloud Cost Management tag sources returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
use datadog_api_client::datadogV2::api_cloud_cost_management::ListCostTagKeySourcesOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.ListCostTagKeySources", true);
10+
let api = CloudCostManagementAPI::with_config(configuration);
11+
let resp = api
12+
.list_cost_tag_key_sources(
13+
"filter[month]".to_string(),
14+
ListCostTagKeySourcesOptionalParams::default(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// List Cloud Cost Management tag key metadata returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
use datadog_api_client::datadogV2::api_cloud_cost_management::ListCostTagMetadataOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.ListCostTagMetadata", true);
10+
let api = CloudCostManagementAPI::with_config(configuration);
11+
let resp = api
12+
.list_cost_tag_metadata(
13+
"filter[month]".to_string(),
14+
ListCostTagMetadataOptionalParams::default(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// List available Cloud Cost Management metrics returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
use datadog_api_client::datadogV2::api_cloud_cost_management::ListCostTagMetadataMetricsOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.ListCostTagMetadataMetrics", true);
10+
let api = CloudCostManagementAPI::with_config(configuration);
11+
let resp = api
12+
.list_cost_tag_metadata_metrics(
13+
"filter[month]".to_string(),
14+
ListCostTagMetadataMetricsOptionalParams::default(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// List Cloud Cost Management orchestrators returns "OK" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
use datadog_api_client::datadogV2::api_cloud_cost_management::ListCostTagMetadataOrchestratorsOptionalParams;
5+
6+
#[tokio::main]
7+
async fn main() {
8+
let mut configuration = datadog::Configuration::new();
9+
configuration.set_unstable_operation_enabled("v2.ListCostTagMetadataOrchestrators", true);
10+
let api = CloudCostManagementAPI::with_config(configuration);
11+
let resp = api
12+
.list_cost_tag_metadata_orchestrators(
13+
"filter[month]".to_string(),
14+
ListCostTagMetadataOrchestratorsOptionalParams::default(),
15+
)
16+
.await;
17+
if let Ok(value) = resp {
18+
println!("{:#?}", value);
19+
} else {
20+
println!("{:#?}", resp.unwrap_err());
21+
}
22+
}

src/datadog/configuration.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,12 @@ impl Default for Configuration {
269269
false,
270270
),
271271
("v2.get_cost_anomaly".to_owned(), false),
272+
("v2.get_cost_tag_metadata_currency".to_owned(), false),
272273
("v2.list_cost_anomalies".to_owned(), false),
274+
("v2.list_cost_tag_key_sources".to_owned(), false),
275+
("v2.list_cost_tag_metadata".to_owned(), false),
276+
("v2.list_cost_tag_metadata_metrics".to_owned(), false),
277+
("v2.list_cost_tag_metadata_orchestrators".to_owned(), false),
273278
("v2.create_dashboard_secure_embed".to_owned(), false),
274279
("v2.delete_dashboard_secure_embed".to_owned(), false),
275280
("v2.get_dashboard_secure_embed".to_owned(), false),

0 commit comments

Comments
 (0)