Skip to content
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

remove x-unstable property for usage attribution endpoints #990

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.2",
"regenerated": "2022-07-15 12:26:22.259153",
"spec_repo_commit": "d854c667"
"regenerated": "2022-07-18 17:54:18.638583",
"spec_repo_commit": "f486a915"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-07-15 12:26:22.275913",
"spec_repo_commit": "d854c667"
"regenerated": "2022-07-18 17:54:18.655829",
"spec_repo_commit": "f486a915"
}
}
}
6 changes: 0 additions & 6 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27461,9 +27461,6 @@ paths:
x-menu-order: 30
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/usage/incident-management:
get:
description: Get hourly usage for incident management.
Expand Down Expand Up @@ -27989,9 +27986,6 @@ paths:
x-menu-order: 31
x-undo:
type: safe
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v1/usage/network_flows:
get:
description: Get hourly usage for network flows.
Expand Down
3 changes: 0 additions & 3 deletions examples/v1/usage-metering/GetHourlyUsageAttribution.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get hourly usage attribution returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations[:get_hourly_usage_attribution] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_hourly_usage_attribution((Time.now + -3 * 86400), HourlyUsageAttributionUsageType::INFRA_HOST_USAGE)
3 changes: 0 additions & 3 deletions examples/v1/usage-metering/GetMonthlyUsageAttribution.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Get monthly usage attribution returns "OK" response

require "datadog_api_client"
DatadogAPIClient::V2.configure do |config|
config.unstable_operations[:get_monthly_usage_attribution] = true
end
api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new
p api_instance.get_monthly_usage_attribution((Time.now + -3 * 86400), MonthlyUsageAttributionSupportedMetrics::INFRA_HOST_USAGE)
12 changes: 4 additions & 8 deletions features/v1/usage_metering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ Feature: Usage Metering

@skip @team:DataDog/red-zone-revenue-query
Scenario: Get hourly usage attribution returns "Bad Request" response
Given operation "GetHourlyUsageAttribution" enabled
And new "GetHourlyUsageAttribution" request
Given new "GetHourlyUsageAttribution" request
And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "usage_type" parameter with value "not_a_product"
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/red-zone-revenue-query
Scenario: Get hourly usage attribution returns "OK" response
Given operation "GetHourlyUsageAttribution" enabled
And new "GetHourlyUsageAttribution" request
Given new "GetHourlyUsageAttribution" request
And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "usage_type" parameter with value "infra_host_usage"
When the request is sent
Expand Down Expand Up @@ -507,17 +505,15 @@ Feature: Usage Metering

@skip @team:DataDog/red-zone-revenue-query
Scenario: Get monthly usage attribution returns "Bad Request" response
Given operation "GetMonthlyUsageAttribution" enabled
And new "GetMonthlyUsageAttribution" request
Given new "GetMonthlyUsageAttribution" request
And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "fields" parameter with value "not_a_product"
When the request is sent
Then the response status is 400 Bad Request

@team:DataDog/red-zone-revenue-query
Scenario: Get monthly usage attribution returns "OK" response
Given operation "GetMonthlyUsageAttribution" enabled
And new "GetMonthlyUsageAttribution" request
Given new "GetMonthlyUsageAttribution" request
And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}"
And request contains "fields" parameter with value "infra_host_usage"
When the request is sent
Expand Down
2 changes: 0 additions & 2 deletions lib/datadog_api_client/v1/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ def initialize
search_slo: false,
get_slo_history: false,
get_usage_attribution: false,
get_hourly_usage_attribution: false,
get_monthly_usage_attribution: false,
}
@server_variables[:site] = ENV['DD_SITE'] if ENV.key? 'DD_SITE'
@api_key['apiKeyAuth'] = ENV['DD_API_KEY'] if ENV.key? 'DD_API_KEY'
Expand Down