Skip to content

Commit

Permalink
remove flag Beta for cost-by-tag endpoint (#2023)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <[email protected]>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec authored Jan 28, 2025
1 parent ce3577d commit 34c17f6
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 36 deletions.
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:26.078176",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:39.563163",
"spec_repo_commit": "a492a6f8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-28 14:57:26.093845",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:39.578725",
"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
1 change: 0 additions & 1 deletion examples/v2/usage-metering/GetActiveBillingDimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.getActiveBillingDimensions"] = true;
const apiInstance = new v2.UsageMeteringApi(configuration);

apiInstance
Expand Down
1 change: 0 additions & 1 deletion examples/v2/usage-metering/GetMonthlyCostAttribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
configuration.unstableOperations["v2.getMonthlyCostAttribution"] = true;
const apiInstance = new v2.UsageMeteringApi(configuration);

const params: v2.UsageMeteringApiGetMonthlyCostAttributionRequest = {
Expand Down
12 changes: 4 additions & 8 deletions 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
2 changes: 0 additions & 2 deletions packages/datadog-api-client-common/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,6 @@ export function createConfiguration(
"v2.publishApp": false,
"v2.unpublishApp": false,
"v2.updateApp": false,
"v2.getActiveBillingDimensions": false,
"v2.getMonthlyCostAttribution": false,
"v2.cancelDataDeletionRequest": false,
"v2.createDataDeletionRequest": false,
"v2.getDataDeletionRequests": false,
Expand Down
14 changes: 0 additions & 14 deletions packages/datadog-api-client-v2/apis/UsageMeteringApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,6 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
): Promise<RequestContext> {
const _config = _options || this.configuration;

logger.warn("Using unstable operation 'getActiveBillingDimensions'");
if (!_config.unstableOperations["v2.getActiveBillingDimensions"]) {
throw new Error(
"Unstable operation 'getActiveBillingDimensions' is disabled"
);
}

// Path Params
const localVarPath = "/api/v2/cost_by_tag/active_billing_dimensions";

Expand Down Expand Up @@ -435,13 +428,6 @@ export class UsageMeteringApiRequestFactory extends BaseAPIRequestFactory {
): Promise<RequestContext> {
const _config = _options || this.configuration;

logger.warn("Using unstable operation 'getMonthlyCostAttribution'");
if (!_config.unstableOperations["v2.getMonthlyCostAttribution"]) {
throw new Error(
"Unstable operation 'getMonthlyCostAttribution' is disabled"
);
}

// verify required parameter 'startMonth' is not null or undefined
if (startMonth === null || startMonth === undefined) {
throw new RequiredError("startMonth", "getMonthlyCostAttribution");
Expand Down

0 comments on commit 34c17f6

Please sign in to comment.