Skip to content

Commit 448d83f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Regenerate client from commit a492a6f8 of spec repo (#2900)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 2e1311d commit 448d83f

File tree

7 files changed

+8
-42
lines changed

7 files changed

+8
-42
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.6",
7-
"regenerated": "2025-01-28 14:57:16.777942",
8-
"spec_repo_commit": "f832f43e"
7+
"regenerated": "2025-01-28 19:55:39.484497",
8+
"spec_repo_commit": "a492a6f8"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-28 14:57:16.793569",
13-
"spec_repo_commit": "f832f43e"
12+
"regenerated": "2025-01-28 19:55:39.500099",
13+
"spec_repo_commit": "a492a6f8"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34557,9 +34557,6 @@ paths:
3455734557
operator: OR
3455834558
permissions:
3455934559
- usage_read
34560-
x-unstable: '**Note**: This endpoint is in public beta.
34561-
34562-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
3456334560
/api/v2/cost_by_tag/monthly_cost_attribution:
3456434561
get:
3456534562
description: "Get monthly cost attribution by tag across multi-org and single
@@ -34685,9 +34682,6 @@ paths:
3468534682
operator: OR
3468634683
permissions:
3468734684
- usage_read
34688-
x-unstable: '**Note**: This endpoint is in public beta.
34689-
34690-
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
3469134685
/api/v2/csm/onboarding/agents:
3469234686
get:
3469334687
description: Get the list of all CSM Agents running on your hosts and containers.

api/datadog/configuration.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,8 +336,6 @@ func NewConfiguration() *Configuration {
336336
"v2.PublishApp": false,
337337
"v2.UnpublishApp": false,
338338
"v2.UpdateApp": false,
339-
"v2.GetActiveBillingDimensions": false,
340-
"v2.GetMonthlyCostAttribution": false,
341339
"v2.CancelDataDeletionRequest": false,
342340
"v2.CreateDataDeletionRequest": false,
343341
"v2.GetDataDeletionRequests": false,

api/datadogV2/api_usage_metering.go

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ package datadogV2
66

77
import (
88
_context "context"
9-
_fmt "fmt"
10-
_log "log"
119
_nethttp "net/http"
1210
_neturl "net/url"
1311
"time"
@@ -27,15 +25,6 @@ func (a *UsageMeteringApi) GetActiveBillingDimensions(ctx _context.Context) (Act
2725
localVarReturnValue ActiveBillingDimensionsResponse
2826
)
2927

30-
operationId := "v2.GetActiveBillingDimensions"
31-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
32-
if !isOperationEnabled {
33-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
34-
}
35-
if isOperationEnabled && a.Client.Cfg.Debug {
36-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
37-
}
38-
3928
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.UsageMeteringApi.GetActiveBillingDimensions")
4029
if err != nil {
4130
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
@@ -836,15 +825,6 @@ func (a *UsageMeteringApi) GetMonthlyCostAttribution(ctx _context.Context, start
836825
optionalParams = o[0]
837826
}
838827

839-
operationId := "v2.GetMonthlyCostAttribution"
840-
isOperationEnabled := a.Client.Cfg.IsUnstableOperationEnabled(operationId)
841-
if !isOperationEnabled {
842-
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: _fmt.Sprintf("Unstable operation '%s' is disabled", operationId)}
843-
}
844-
if isOperationEnabled && a.Client.Cfg.Debug {
845-
_log.Printf("WARNING: Using unstable operation '%s'", operationId)
846-
}
847-
848828
localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.UsageMeteringApi.GetMonthlyCostAttribution")
849829
if err != nil {
850830
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}

examples/v2/usage-metering/GetActiveBillingDimensions.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import (
1515
func main() {
1616
ctx := datadog.NewDefaultContext(context.Background())
1717
configuration := datadog.NewConfiguration()
18-
configuration.SetUnstableOperationEnabled("v2.GetActiveBillingDimensions", true)
1918
apiClient := datadog.NewAPIClient(configuration)
2019
api := datadogV2.NewUsageMeteringApi(apiClient)
2120
resp, r, err := api.GetActiveBillingDimensions(ctx)

examples/v2/usage-metering/GetMonthlyCostAttribution.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
func main() {
1717
ctx := datadog.NewDefaultContext(context.Background())
1818
configuration := datadog.NewConfiguration()
19-
configuration.SetUnstableOperationEnabled("v2.GetMonthlyCostAttribution", true)
2019
apiClient := datadog.NewAPIClient(configuration)
2120
api := datadogV2.NewUsageMeteringApi(apiClient)
2221
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)))

tests/scenarios/features/v2/usage_metering.feature

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ Feature: Usage Metering
1616

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

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

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

4441
@team:DataDog/revenue-query
4542
Scenario: Get active billing dimensions for cost attribution returns "OK" response
46-
Given operation "GetActiveBillingDimensions" enabled
47-
And new "GetActiveBillingDimensions" request
43+
Given new "GetActiveBillingDimensions" request
4844
When the request is sent
4945
Then the response status is 200 OK
5046

0 commit comments

Comments
 (0)