diff --git a/.apigentools-info b/.apigentools-info index a4319b1086f2..21a2e8796a4a 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.2", - "regenerated": "2022-08-16 17:55:56.837263", - "spec_repo_commit": "56625080" + "regenerated": "2022-08-17 14:32:13.711845", + "spec_repo_commit": "a957cd49" }, "v2": { "apigentools_version": "1.6.2", - "regenerated": "2022-08-16 17:55:56.854866", - "spec_repo_commit": "56625080" + "regenerated": "2022-08-17 14:32:13.727125", + "spec_repo_commit": "a957cd49" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index bdf3365608f6..4b7b6e4cc8b7 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -17919,7 +17919,12 @@ paths: /api/v1/daily_custom_reports: get: deprecated: true - description: Get daily custom reports. + description: 'Get daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetDailyCustomReports parameters: - description: The number of files to return in the response. `[default=60]`. @@ -17979,13 +17984,15 @@ paths: x-menu-order: 41 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/daily_custom_reports/{report_id}: get: deprecated: true - description: Get specified daily custom reports. + description: 'Get specified daily custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetSpecifiedDailyCustomReports parameters: - description: Date of the report in the format `YYYY-MM-DD`. @@ -18030,9 +18037,6 @@ paths: x-menu-order: 42 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/dashboard: delete: description: Delete dashboards using the specified IDs. If there are any failures, @@ -23175,7 +23179,12 @@ paths: /api/v1/monthly_custom_reports: get: deprecated: true - description: Get monthly custom reports. + description: 'Get monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetMonthlyCustomReports parameters: - description: The number of files to return in the response `[default=60].` @@ -23235,13 +23244,15 @@ paths: x-menu-order: 43 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/monthly_custom_reports/{report_id}: get: deprecated: true - description: Get specified monthly custom reports. + description: 'Get specified monthly custom reports. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetSpecifiedMonthlyCustomReports parameters: - description: Date of the report in the format `YYYY-MM-DD`. @@ -23292,9 +23303,6 @@ paths: x-menu-order: 44 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/notebooks: get: description: 'Get all notebooks. This can also be used to search for notebooks @@ -26820,7 +26828,12 @@ paths: /api/v1/usage/attribution: get: deprecated: true - description: Get usage attribution. + description: 'Get usage attribution. + + **Note:** This endpoint will be fully deprecated on December 1, 2022. + + Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) + for the associated migration guide.' operationId: GetUsageAttribution parameters: - description: 'Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` @@ -26909,9 +26922,6 @@ paths: x-menu-order: 40 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/audit_logs: get: description: 'Get hourly usage for audit logs. diff --git a/examples/v1/usage-metering/GetDailyCustomReports.rb b/examples/v1/usage-metering/GetDailyCustomReports.rb index 4c2da1d5f011..aa039ece0ca0 100644 --- a/examples/v1/usage-metering/GetDailyCustomReports.rb +++ b/examples/v1/usage-metering/GetDailyCustomReports.rb @@ -1,8 +1,5 @@ # Get the list of available daily custom reports returns "OK" response require "datadog_api_client" -DatadogAPIClient::V2.configure do |config| - config.unstable_operations["v1.get_daily_custom_reports".to_sym] = true -end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new p api_instance.get_daily_custom_reports() diff --git a/examples/v1/usage-metering/GetMonthlyCustomReports.rb b/examples/v1/usage-metering/GetMonthlyCustomReports.rb index fef436ae0041..9c453bf9b1a6 100644 --- a/examples/v1/usage-metering/GetMonthlyCustomReports.rb +++ b/examples/v1/usage-metering/GetMonthlyCustomReports.rb @@ -1,8 +1,5 @@ # Get the list of available monthly custom reports returns "OK" response require "datadog_api_client" -DatadogAPIClient::V2.configure do |config| - config.unstable_operations["v1.get_monthly_custom_reports".to_sym] = true -end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new p api_instance.get_monthly_custom_reports() diff --git a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb index c98a5f7ed01f..c8023d1dc35e 100644 --- a/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb +++ b/examples/v1/usage-metering/GetSpecifiedDailyCustomReports.rb @@ -1,8 +1,5 @@ # Get specified daily custom reports returns "OK" response require "datadog_api_client" -DatadogAPIClient::V2.configure do |config| - config.unstable_operations["v1.get_specified_daily_custom_reports".to_sym] = true -end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new p api_instance.get_specified_daily_custom_reports("2022-03-20") diff --git a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb index df903394a85f..fef8de2a249d 100644 --- a/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb +++ b/examples/v1/usage-metering/GetSpecifiedMonthlyCustomReports.rb @@ -1,8 +1,5 @@ # Get specified monthly custom reports returns "OK" response require "datadog_api_client" -DatadogAPIClient::V2.configure do |config| - config.unstable_operations["v1.get_specified_monthly_custom_reports".to_sym] = true -end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new p api_instance.get_specified_monthly_custom_reports("2021-05-01") diff --git a/examples/v1/usage-metering/GetUsageAttribution.rb b/examples/v1/usage-metering/GetUsageAttribution.rb index e5b043be3a80..6fccc18573c0 100644 --- a/examples/v1/usage-metering/GetUsageAttribution.rb +++ b/examples/v1/usage-metering/GetUsageAttribution.rb @@ -1,9 +1,6 @@ # Get usage attribution returns "OK" response require "datadog_api_client" -DatadogAPIClient::V2.configure do |config| - config.unstable_operations["v1.get_usage_attribution".to_sym] = true -end api_instance = DatadogAPIClient::V1::UsageMeteringAPI.new opts = { offset: 0, diff --git a/features/v1/usage_metering.feature b/features/v1/usage_metering.feature index b542fbafbf3a..ef53ffa72848 100644 --- a/features/v1/usage_metering.feature +++ b/features/v1/usage_metering.feature @@ -675,55 +675,48 @@ Feature: Usage Metering @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified daily custom reports returns "Not Found" response - Given operation "GetSpecifiedDailyCustomReports" enabled - And new "GetSpecifiedDailyCustomReports" request + Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @replay-only @team:DataDog/red-zone-revenue-query Scenario: Get specified daily custom reports returns "OK" response - Given operation "GetSpecifiedDailyCustomReports" enabled - And new "GetSpecifiedDailyCustomReports" request + Given new "GetSpecifiedDailyCustomReports" request And request contains "report_id" parameter with value "2022-03-20" When the request is sent Then the response status is 200 OK @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "Bad Request" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "Not Found" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @replay-only @team:DataDog/red-zone-revenue-query Scenario: Get specified monthly custom reports returns "OK" response - Given operation "GetSpecifiedMonthlyCustomReports" enabled - And new "GetSpecifiedMonthlyCustomReports" request + Given new "GetSpecifiedMonthlyCustomReports" request And request contains "report_id" parameter with value "2021-05-01" When the request is sent Then the response status is 200 OK @team:DataDog/red-zone-revenue-query Scenario: Get the list of available daily custom reports returns "OK" response - Given operation "GetDailyCustomReports" enabled - And new "GetDailyCustomReports" request + Given new "GetDailyCustomReports" request When the request is sent Then the response status is 200 OK @team:DataDog/red-zone-revenue-query Scenario: Get the list of available monthly custom reports returns "OK" response - Given operation "GetMonthlyCustomReports" enabled - And new "GetMonthlyCustomReports" request + Given new "GetMonthlyCustomReports" request When the request is sent Then the response status is 200 OK @@ -743,8 +736,7 @@ Feature: Usage Metering @team:DataDog/red-zone-revenue-query Scenario: Get usage attribution returns "OK" response - Given operation "GetUsageAttribution" enabled - And new "GetUsageAttribution" request + Given new "GetUsageAttribution" request And request contains "start_month" parameter with value "{{ timeISO('now - 3d') }}" And request contains "fields" parameter with value "*" And request contains "offset" parameter with value 0 diff --git a/lib/datadog_api_client/configuration.rb b/lib/datadog_api_client/configuration.rb index ff16b51606b4..eebb60d26088 100644 --- a/lib/datadog_api_client/configuration.rb +++ b/lib/datadog_api_client/configuration.rb @@ -158,11 +158,6 @@ def initialize @compress = true @logger = defined?(Rails) ? Rails.logger : Logger.new(STDOUT) @unstable_operations = { - "v1.get_daily_custom_reports": false, - "v1.get_monthly_custom_reports": false, - "v1.get_specified_daily_custom_reports": false, - "v1.get_specified_monthly_custom_reports": false, - "v1.get_usage_attribution": false, "v1.get_slo_history": false, "v1.search_slo": false, "v2.list_events": false, diff --git a/lib/datadog_api_client/v1/api/usage_metering_api.rb b/lib/datadog_api_client/v1/api/usage_metering_api.rb index 8144ff0c4d3a..4df6c3621bb8 100644 --- a/lib/datadog_api_client/v1/api/usage_metering_api.rb +++ b/lib/datadog_api_client/v1/api/usage_metering_api.rb @@ -34,6 +34,8 @@ def get_daily_custom_reports(opts = {}) # Get the list of available daily custom reports. # # Get daily custom reports. + # **Note:** This endpoint will be fully deprecated on December 1, 2022. + # Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. # # @param opts [Hash] the optional parameters # @option opts [Integer] :page_size The number of files to return in the response. `[default=60]`. @@ -42,12 +44,6 @@ def get_daily_custom_reports(opts = {}) # @option opts [UsageSort] :sort The field to sort by: `[computed_on, size, start_date, end_date]`. # @return [Array<(UsageCustomReportsResponse, Integer, Hash)>] UsageCustomReportsResponse data, response status code and response headers def get_daily_custom_reports_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v1.get_daily_custom_reports".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_daily_custom_reports") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_daily_custom_reports")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_daily_custom_reports ...' @@ -353,6 +349,8 @@ def get_monthly_custom_reports(opts = {}) # Get the list of available monthly custom reports. # # Get monthly custom reports. + # **Note:** This endpoint will be fully deprecated on December 1, 2022. + # Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. # # @param opts [Hash] the optional parameters # @option opts [Integer] :page_size The number of files to return in the response `[default=60].` @@ -361,12 +359,6 @@ def get_monthly_custom_reports(opts = {}) # @option opts [UsageSort] :sort The field to sort by: `[computed_on, size, start_date, end_date]`. # @return [Array<(UsageCustomReportsResponse, Integer, Hash)>] UsageCustomReportsResponse data, response status code and response headers def get_monthly_custom_reports_with_http_info(opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v1.get_monthly_custom_reports".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_monthly_custom_reports") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_monthly_custom_reports")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_monthly_custom_reports ...' @@ -546,17 +538,13 @@ def get_specified_daily_custom_reports(report_id, opts = {}) # Get specified daily custom reports. # # Get specified daily custom reports. + # **Note:** This endpoint will be fully deprecated on December 1, 2022. + # Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. # # @param report_id [String] Date of the report in the format `YYYY-MM-DD`. # @param opts [Hash] the optional parameters # @return [Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>] UsageSpecifiedCustomReportsResponse data, response status code and response headers def get_specified_daily_custom_reports_with_http_info(report_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v1.get_specified_daily_custom_reports".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_specified_daily_custom_reports") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_specified_daily_custom_reports")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_daily_custom_reports ...' @@ -617,17 +605,13 @@ def get_specified_monthly_custom_reports(report_id, opts = {}) # Get specified monthly custom reports. # # Get specified monthly custom reports. + # **Note:** This endpoint will be fully deprecated on December 1, 2022. + # Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. # # @param report_id [String] Date of the report in the format `YYYY-MM-DD`. # @param opts [Hash] the optional parameters # @return [Array<(UsageSpecifiedCustomReportsResponse, Integer, Hash)>] UsageSpecifiedCustomReportsResponse data, response status code and response headers def get_specified_monthly_custom_reports_with_http_info(report_id, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v1.get_specified_monthly_custom_reports".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_specified_monthly_custom_reports") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_specified_monthly_custom_reports")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_specified_monthly_custom_reports ...' @@ -757,6 +741,8 @@ def get_usage_attribution(start_month, fields, opts = {}) # Get usage attribution. # # Get usage attribution. + # **Note:** This endpoint will be fully deprecated on December 1, 2022. + # Refer to [Migrating from v1 to v2 of the Usage Attribution API](https://docs.datadoghq.com/account_management/guide/usage-attribution-migration/) for the associated migration guide. # # @param start_month [Time] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago. # @param fields [UsageAttributionSupportedMetrics] Comma-separated list of usage types to return, or `*` for all usage types. @@ -769,12 +755,6 @@ def get_usage_attribution(start_month, fields, opts = {}) # @option opts [Integer] :limit Maximum number of records to be returned. # @return [Array<(UsageAttributionResponse, Integer, Hash)>] UsageAttributionResponse data, response status code and response headers def get_usage_attribution_with_http_info(start_month, fields, opts = {}) - unstable_enabled = @api_client.config.unstable_operations["v1.get_usage_attribution".to_sym] - if unstable_enabled - @api_client.config.logger.warn format("Using unstable operation '%s'", "v1.get_usage_attribution") - else - raise DatadogAPIClient::APIError.new(message: format("Unstable operation '%s' is disabled", "v1.get_usage_attribution")) - end if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UsageMeteringAPI.get_usage_attribution ...'