Skip to content

remove flag Beta for cost-by-tag endpoint #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-28 14:57:27.977823",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:43.694070",
"spec_repo_commit": "a492a6f8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-28 14:57:27.993052",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:43.709051",
"spec_repo_commit": "a492a6f8"
}
}
}
6 changes: 0 additions & 6 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34557,9 +34557,6 @@ paths:
operator: OR
permissions:
- usage_read
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/cost_by_tag/monthly_cost_attribution:
get:
description: "Get monthly cost attribution by tag across multi-org and single
Expand Down Expand Up @@ -34685,9 +34682,6 @@ paths:
operator: OR
permissions:
- usage_read
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/csm/onboarding/agents:
get:
description: Get the list of all CSM Agents running on your hosts and containers.
Expand Down
3 changes: 1 addition & 2 deletions examples/v2_usage-metering_GetActiveBillingDimensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ use datadog_api_client::datadogV2::api_usage_metering::UsageMeteringAPI;

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.GetActiveBillingDimensions", true);
let configuration = datadog::Configuration::new();
let api = UsageMeteringAPI::with_config(configuration);
let resp = api.get_active_billing_dimensions().await;
if let Ok(value) = resp {
Expand Down
3 changes: 1 addition & 2 deletions examples/v2_usage-metering_GetMonthlyCostAttribution.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ use datadog_api_client::datadogV2::api_usage_metering::UsageMeteringAPI;

#[tokio::main]
async fn main() {
let mut configuration = datadog::Configuration::new();
configuration.set_unstable_operation_enabled("v2.GetMonthlyCostAttribution", true);
let configuration = datadog::Configuration::new();
let api = UsageMeteringAPI::with_config(configuration);
let resp = api
.get_monthly_cost_attribution(
Expand Down
2 changes: 0 additions & 2 deletions src/datadog/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ impl Default for Configuration {
("v2.publish_app".to_owned(), false),
("v2.unpublish_app".to_owned(), false),
("v2.update_app".to_owned(), false),
("v2.get_active_billing_dimensions".to_owned(), false),
("v2.get_monthly_cost_attribution".to_owned(), false),
("v2.cancel_data_deletion_request".to_owned(), false),
("v2.create_data_deletion_request".to_owned(), false),
("v2.get_data_deletion_requests".to_owned(), false),
Expand Down
17 changes: 0 additions & 17 deletions src/datadogV2/api/api_usage_metering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.
use crate::datadog;
use log::warn;
use reqwest::header::{HeaderMap, HeaderValue};
use serde::{Deserialize, Serialize};

Expand Down Expand Up @@ -510,14 +509,6 @@ impl UsageMeteringAPI {
> {
let local_configuration = &self.config;
let operation_id = "v2.get_active_billing_dimensions";
if local_configuration.is_unstable_operation_enabled(operation_id) {
warn!("Using unstable operation {operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.get_active_billing_dimensions' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

let local_client = &self.client;

Expand Down Expand Up @@ -1416,14 +1407,6 @@ impl UsageMeteringAPI {
> {
let local_configuration = &self.config;
let operation_id = "v2.get_monthly_cost_attribution";
if local_configuration.is_unstable_operation_enabled(operation_id) {
warn!("Using unstable operation {operation_id}");
} else {
let local_error = datadog::UnstableOperationDisabledError {
msg: "Operation 'v2.get_monthly_cost_attribution' is not enabled".to_string(),
};
return Err(datadog::Error::UnstableOperationDisabledError(local_error));
}

// unbox and build optional parameters
let end_month = params.end_month;
Expand Down
12 changes: 4 additions & 8 deletions tests/scenarios/features/v2/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ Feature: Usage Metering

@replay-only @team:DataDog/revenue-query
Scenario: Get Monthly Cost Attribution returns "Bad Request" response
Given operation "GetMonthlyCostAttribution" enabled
And new "GetMonthlyCostAttribution" request
Given new "GetMonthlyCostAttribution" request
And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}"
And request contains "fields" parameter with value "not_a_product"
And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}"
Expand All @@ -26,8 +25,7 @@ Feature: Usage Metering

@replay-only @team:DataDog/revenue-query
Scenario: Get Monthly Cost Attribution returns "OK" response
Given operation "GetMonthlyCostAttribution" enabled
And new "GetMonthlyCostAttribution" request
Given new "GetMonthlyCostAttribution" request
And request contains "start_month" parameter with value "{{ timeISO('now - 5d') }}"
And request contains "fields" parameter with value "infra_host_total_cost"
And request contains "end_month" parameter with value "{{ timeISO('now - 3d') }}"
Expand All @@ -36,15 +34,13 @@ Feature: Usage Metering

@generated @skip @team:DataDog/revenue-query
Scenario: Get active billing dimensions for cost attribution returns "Bad Request" response
Given operation "GetActiveBillingDimensions" enabled
And new "GetActiveBillingDimensions" request
Given new "GetActiveBillingDimensions" request
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/revenue-query
Scenario: Get active billing dimensions for cost attribution returns "OK" response
Given operation "GetActiveBillingDimensions" enabled
And new "GetActiveBillingDimensions" request
Given new "GetActiveBillingDimensions" request
When the request is sent
Then the response status is 200 OK

Expand Down
Loading