Skip to content

Commit

Permalink
Remove preview status for GetBillingDimensionMapping endpoint (#2892)
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 23, 2025
1 parent 0af7262 commit 201ca63
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 22 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-22 15:54:14.899066",
"spec_repo_commit": "7a8ea4b1"
"regenerated": "2025-01-23 20:01:34.590919",
"spec_repo_commit": "f985f8bc"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-22 15:54:14.915479",
"spec_repo_commit": "7a8ea4b1"
"regenerated": "2025-01-23 20:01:34.606317",
"spec_repo_commit": "f985f8bc"
}
}
}
3 changes: 0 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47793,9 +47793,6 @@ paths:
operator: OR
permissions:
- usage_read
x-unstable: '**Note**: This endpoint is in Preview.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/usage/cost_by_org:
get:
deprecated: true
Expand Down
1 change: 0 additions & 1 deletion api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,6 @@ func NewConfiguration() *Configuration {
"v2.ListApps": false,
"v2.UpdateApp": false,
"v2.GetActiveBillingDimensions": false,
"v2.GetBillingDimensionMapping": false,
"v2.GetMonthlyCostAttribution": false,
"v2.CancelDataDeletionRequest": false,
"v2.CreateDataDeletionRequest": false,
Expand Down
9 changes: 0 additions & 9 deletions api/datadogV2/api_usage_metering.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,6 @@ func (a *UsageMeteringApi) GetBillingDimensionMapping(ctx _context.Context, o ..
optionalParams = o[0]
}

operationId := "v2.GetBillingDimensionMapping"
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
if !isOperationEnabled {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
}
if isOperationEnabled && a.Client.Cfg.Debug {
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.UsageMeteringApi.GetBillingDimensionMapping")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down
1 change: 0 additions & 1 deletion examples/v2/usage-metering/GetBillingDimensionMapping.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.GetBillingDimensionMapping", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewUsageMeteringApi(apiClient)
resp, r, err := api.GetBillingDimensionMapping(ctx, *datadogV2.NewGetBillingDimensionMappingOptionalParameters())
Expand Down
6 changes: 2 additions & 4 deletions tests/scenarios/features/v2/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,13 @@ Feature: Usage Metering

@team:DataDog/revenue-query
Scenario: Get billing dimension mapping for usage endpoints returns "Bad Request" response
Given operation "GetBillingDimensionMapping" enabled
And new "GetBillingDimensionMapping" request
Given new "GetBillingDimensionMapping" request
When the request is sent
Then the response status is 400 Bad Request

@skip @team:DataDog/revenue-query
Scenario: Get billing dimension mapping for usage endpoints returns "OK" response
Given operation "GetBillingDimensionMapping" enabled
And new "GetBillingDimensionMapping" request
Given new "GetBillingDimensionMapping" request
When the request is sent
Then the response status is 200 OK

Expand Down

0 comments on commit 201ca63

Please sign in to comment.