Skip to content

Commit 4626683

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Update description, operationId and examples for tag pipeline and custom allocation rules (#958)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 3a0ec26 commit 4626683

File tree

58 files changed

+1410
-908
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1410
-908
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 293 additions & 41 deletions
Large diffs are not rendered by default.

examples/v2_cloud-cost-management_CreateArbitraryCostRule.rs renamed to examples/v2_cloud-cost-management_CreateCustomAllocationRule.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Create arbitrary cost rule returns "OK" response
1+
// Create custom allocation rule returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44
use datadog_api_client::datadogV2::model::ArbitraryCostUpsertRequest;
@@ -22,8 +22,7 @@ async fn main() {
2222
"is".to_string(),
2323
"account_id".to_string(),
2424
)
25-
.value("123456789".to_string())
26-
.values(Some(vec![])),
25+
.value("123456789".to_string()),
2726
ArbitraryCostUpsertRequestDataAttributesCostsToAllocateItems::new(
2827
"in".to_string(),
2928
"environment".to_string(),
@@ -40,8 +39,7 @@ async fn main() {
4039
"is".to_string(),
4140
"service".to_string(),
4241
)
43-
.value("web-api".to_string())
44-
.values(Some(vec![])),
42+
.value("web-api".to_string()),
4543
ArbitraryCostUpsertRequestDataAttributesStrategyBasedOnCostsItems::new(
4644
"not in".to_string(),
4745
"team".to_string(),
@@ -58,7 +56,7 @@ async fn main() {
5856
);
5957
let configuration = datadog::Configuration::new();
6058
let api = CloudCostManagementAPI::with_config(configuration);
61-
let resp = api.create_arbitrary_cost_rule(body).await;
59+
let resp = api.create_custom_allocation_rule(body).await;
6260
if let Ok(value) = resp {
6361
println!("{:#?}", value);
6462
} else {

examples/v2_cloud-cost-management_CreateRuleset.rs renamed to examples/v2_cloud-cost-management_CreateTagPipelinesRuleset.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Create ruleset returns "OK" response
1+
// Create tag pipeline ruleset returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44
use datadog_api_client::datadogV2::model::CreateRulesetRequest;
@@ -41,7 +41,7 @@ async fn main() {
4141
);
4242
let configuration = datadog::Configuration::new();
4343
let api = CloudCostManagementAPI::with_config(configuration);
44-
let resp = api.create_ruleset(body).await;
44+
let resp = api.create_tag_pipelines_ruleset(body).await;
4545
if let Ok(value) = resp {
4646
println!("{:#?}", value);
4747
} else {

examples/v2_cloud-cost-management_DeleteArbitraryCostRule.rs renamed to examples/v2_cloud-cost-management_DeleteCustomAllocationRule.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Delete arbitrary cost rule returns "No Content" response
1+
// Delete custom allocation rule returns "No Content" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44

55
#[tokio::main]
66
async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
9-
let resp = api.delete_arbitrary_cost_rule(123456).await;
9+
let resp = api.delete_custom_allocation_rule(683).await;
1010
if let Ok(value) = resp {
1111
println!("{:#?}", value);
1212
} else {
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Delete tag pipeline ruleset returns "No Content" response
2+
use datadog_api_client::datadog;
3+
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
4+
5+
#[tokio::main]
6+
async fn main() {
7+
let configuration = datadog::Configuration::new();
8+
let api = CloudCostManagementAPI::with_config(configuration);
9+
let resp = api
10+
.delete_tag_pipelines_ruleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1".to_string())
11+
.await;
12+
if let Ok(value) = resp {
13+
println!("{:#?}", value);
14+
} else {
15+
println!("{:#?}", resp.unwrap_err());
16+
}
17+
}

examples/v2_cloud-cost-management_ListRulesets.rs renamed to examples/v2_cloud-cost-management_GetCustomAllocationRule.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// List rulesets returns "OK" response
1+
// Get custom allocation rule returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44

55
#[tokio::main]
66
async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
9-
let resp = api.list_rulesets().await;
9+
let resp = api.get_custom_allocation_rule(683).await;
1010
if let Ok(value) = resp {
1111
println!("{:#?}", value);
1212
} else {

examples/v2_cloud-cost-management_GetRuleset.rs renamed to examples/v2_cloud-cost-management_GetTagPipelinesRuleset.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
99
let resp = api
10-
.get_ruleset("da0e30e2-615d-4dae-9a22-38cf86a87dde".to_string())
10+
.get_tag_pipelines_ruleset("ruleset_id".to_string())
1111
.await;
1212
if let Ok(value) = resp {
1313
println!("{:#?}", value);

examples/v2_cloud-cost-management_DeleteRuleset.rs renamed to examples/v2_cloud-cost-management_GetTagPipelinesRuleset_2339377367.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Delete ruleset returns "No Content" response
1+
// Get tag pipeline ruleset returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44

@@ -7,7 +7,7 @@ async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
99
let resp = api
10-
.delete_ruleset("1c5dae14-237d-4b9a-a515-aa55b3939142".to_string())
10+
.get_tag_pipelines_ruleset("ee10c3ff-312f-464c-b4f6-46adaa6d00a1".to_string())
1111
.await;
1212
if let Ok(value) = resp {
1313
println!("{:#?}", value);

examples/v2_cloud-cost-management_ListArbitraryCostRules.rs renamed to examples/v2_cloud-cost-management_ListCustomAllocationRules.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// List arbitrary cost rules returns "OK" response
1+
// List custom allocation rules returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44

55
#[tokio::main]
66
async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
9-
let resp = api.list_arbitrary_cost_rules().await;
9+
let resp = api.list_custom_allocation_rules().await;
1010
if let Ok(value) = resp {
1111
println!("{:#?}", value);
1212
} else {

examples/v2_cloud-cost-management_GetArbitraryCostRule.rs renamed to examples/v2_cloud-cost-management_ListTagPipelinesRulesets.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
// Get arbitrary cost rule returns "OK" response
1+
// List tag pipeline rulesets returns "OK" response
22
use datadog_api_client::datadog;
33
use datadog_api_client::datadogV2::api_cloud_cost_management::CloudCostManagementAPI;
44

55
#[tokio::main]
66
async fn main() {
77
let configuration = datadog::Configuration::new();
88
let api = CloudCostManagementAPI::with_config(configuration);
9-
let resp = api.get_arbitrary_cost_rule(123456).await;
9+
let resp = api.list_tag_pipelines_rulesets().await;
1010
if let Ok(value) = resp {
1111
println!("{:#?}", value);
1212
} else {

0 commit comments

Comments
 (0)