Skip to content

Commit

Permalink
Regenerate client from commit a492a6f8 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 28, 2025
1 parent 2e1311d commit 747833a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 42 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:16.777942",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:39.484497",
"spec_repo_commit": "a492a6f8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-01-28 14:57:16.793569",
"spec_repo_commit": "f832f43e"
"regenerated": "2025-01-28 19:55:39.500099",
"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
2 changes: 0 additions & 2 deletions api/datadog/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ func NewConfiguration() *Configuration {
"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
20 changes: 0 additions & 20 deletions api/datadogV2/api_usage_metering.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ package datadogV2

import (
_context "context"
_fmt "fmt"
_log "log"
_nethttp "net/http"
_neturl "net/url"
"time"
Expand All @@ -27,15 +25,6 @@ func (a *UsageMeteringApi) GetActiveBillingDimensions(ctx _context.Context) (Act
localVarReturnValue ActiveBillingDimensionsResponse
)

operationId := "v2.GetActiveBillingDimensions"
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.GetActiveBillingDimensions")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down Expand Up @@ -836,15 +825,6 @@ func (a *UsageMeteringApi) GetMonthlyCostAttribution(ctx _context.Context, start
optionalParams = o[0]
}

operationId := "v2.GetMonthlyCostAttribution"
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.GetMonthlyCostAttribution")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand Down
1 change: 0 additions & 1 deletion examples/v2/usage-metering/GetActiveBillingDimensions.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.GetActiveBillingDimensions", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewUsageMeteringApi(apiClient)
resp, r, err := api.GetActiveBillingDimensions(ctx)
Expand Down
1 change: 0 additions & 1 deletion examples/v2/usage-metering/GetMonthlyCostAttribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
func main() {
ctx := datadog.NewDefaultContext(context.Background())
configuration := datadog.NewConfiguration()
configuration.SetUnstableOperationEnabled("v2.GetMonthlyCostAttribution", true)
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewUsageMeteringApi(apiClient)
resp, r, err := api.GetMonthlyCostAttribution(ctx, time.Now().AddDate(0, 0, -5), "infra_host_total_cost", *datadogV2.NewGetMonthlyCostAttributionOptionalParameters().WithEndMonth(time.Now().AddDate(0, 0, -3)))
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

0 comments on commit 747833a

Please sign in to comment.