diff --git a/.apigentools-info b/.apigentools-info index 5d10c75af675..9645d7f76f30 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-27 15:08:50.488939", - "spec_repo_commit": "61dc4c3e" + "regenerated": "2023-12-28 18:22:58.398305", + "spec_repo_commit": "42c21a14" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2023-12-27 15:08:50.504687", - "spec_repo_commit": "61dc4c3e" + "regenerated": "2023-12-28 18:22:58.412796", + "spec_repo_commit": "42c21a14" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index d82fcbde8531..28bd958fa667 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -22984,7 +22984,9 @@ paths: x-codegen-request-body-name: body /api/v1/downtime: get: - description: Get all scheduled downtimes. + deprecated: true + description: Get all scheduled downtimes. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. operationId: ListDowntimes parameters: - description: Only return downtimes that are active when the request is made. @@ -23025,7 +23027,9 @@ paths: tags: - Downtimes post: - description: Schedule a downtime. + deprecated: true + description: Schedule a downtime. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. operationId: CreateDowntime requestBody: content: @@ -23066,7 +23070,11 @@ paths: x-codegen-request-body-name: body /api/v1/downtime/cancel/by_scope: post: - description: Delete all downtimes that match the scope of `X`. + deprecated: true + description: Delete all downtimes that match the scope of `X`. **Note:** This + only interacts with Downtimes created using v1 endpoints. This endpoint has + been deprecated and will not be replaced. Please use v2 endpoints to find + and cancel downtimes. operationId: CancelDowntimesByScope requestBody: content: @@ -23113,7 +23121,9 @@ paths: x-codegen-request-body-name: body /api/v1/downtime/{downtime_id}: delete: - description: Cancel a downtime. + deprecated: true + description: Cancel a downtime. **Note:** This endpoint has been deprecated. + Please use v2 endpoints. operationId: CancelDowntime parameters: - description: ID of the downtime to cancel. @@ -23150,7 +23160,9 @@ paths: tags: - Downtimes get: - description: Get downtime detail by `downtime_id`. + deprecated: true + description: Get downtime detail by `downtime_id`. **Note:** This endpoint has + been deprecated. Please use v2 endpoints. operationId: GetDowntime parameters: - description: ID of the downtime to fetch. @@ -23191,7 +23203,9 @@ paths: tags: - Downtimes put: - description: Update a single downtime by `downtime_id`. + deprecated: true + description: Update a single downtime by `downtime_id`. **Note:** This endpoint + has been deprecated. Please use v2 endpoints. operationId: UpdateDowntime parameters: - description: ID of the downtime to update. @@ -27176,7 +27190,9 @@ paths: x-codegen-request-body-name: body /api/v1/monitor/{monitor_id}/downtimes: get: - description: Get all active downtimes for the specified monitor. + deprecated: true + description: Get all active v1 downtimes for the specified monitor. **Note:** + This endpoint has been deprecated. Please use v2 endpoints. operationId: ListMonitorDowntimes parameters: - description: The id of the monitor diff --git a/lib/datadog_api_client/v1/api/downtimes_api.rb b/lib/datadog_api_client/v1/api/downtimes_api.rb index 68618c0612e0..27314a9725b5 100644 --- a/lib/datadog_api_client/v1/api/downtimes_api.rb +++ b/lib/datadog_api_client/v1/api/downtimes_api.rb @@ -33,12 +33,15 @@ def cancel_downtime(downtime_id, opts = {}) # Cancel a downtime. # - # Cancel a downtime. + # Cancel a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param downtime_id [Integer] ID of the downtime to cancel. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers def cancel_downtime_with_http_info(downtime_id, opts = {}) + warn "[DEPRECATION] `CancelDowntime` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtime ...' @@ -98,12 +101,15 @@ def cancel_downtimes_by_scope(body, opts = {}) # Cancel downtimes by scope. # - # Delete all downtimes that match the scope of `X`. + # Delete all downtimes that match the scope of `X`. **Note:** This only interacts with Downtimes created using v1 endpoints. This endpoint has been deprecated and will not be replaced. Please use v2 endpoints to find and cancel downtimes. + # + # @deprecated This API is deprecated. # # @param body [CancelDowntimesByScopeRequest] Scope to cancel downtimes for. # @param opts [Hash] the optional parameters # @return [Array<(CanceledDowntimesIds, Integer, Hash)>] CanceledDowntimesIds data, response status code and response headers def cancel_downtimes_by_scope_with_http_info(body, opts = {}) + warn "[DEPRECATION] `CancelDowntimesByScope` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.cancel_downtimes_by_scope ...' @@ -165,12 +171,15 @@ def create_downtime(body, opts = {}) # Schedule a downtime. # - # Schedule a downtime. + # Schedule a downtime. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param body [Downtime] Schedule a downtime request body. # @param opts [Hash] the optional parameters # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers def create_downtime_with_http_info(body, opts = {}) + warn "[DEPRECATION] `CreateDowntime` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.create_downtime ...' @@ -232,12 +241,15 @@ def get_downtime(downtime_id, opts = {}) # Get a downtime. # - # Get downtime detail by `downtime_id`. + # Get downtime detail by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param downtime_id [Integer] ID of the downtime to fetch. # @param opts [Hash] the optional parameters # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers def get_downtime_with_http_info(downtime_id, opts = {}) + warn "[DEPRECATION] `GetDowntime` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.get_downtime ...' @@ -297,13 +309,16 @@ def list_downtimes(opts = {}) # Get all downtimes. # - # Get all scheduled downtimes. + # Get all scheduled downtimes. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param opts [Hash] the optional parameters # @option opts [Boolean] :current_only Only return downtimes that are active when the request is made. # @option opts [Boolean] :with_creator Return creator information. # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def list_downtimes_with_http_info(opts = {}) + warn "[DEPRECATION] `ListDowntimes` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.list_downtimes ...' @@ -361,12 +376,15 @@ def list_monitor_downtimes(monitor_id, opts = {}) # Get active downtimes for a monitor. # - # Get all active downtimes for the specified monitor. + # Get all active v1 downtimes for the specified monitor. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param monitor_id [Integer] The id of the monitor # @param opts [Hash] the optional parameters # @return [Array<(Array, Integer, Hash)>] Array data, response status code and response headers def list_monitor_downtimes_with_http_info(monitor_id, opts = {}) + warn "[DEPRECATION] `ListMonitorDowntimes` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.list_monitor_downtimes ...' @@ -426,13 +444,16 @@ def update_downtime(downtime_id, body, opts = {}) # Update a downtime. # - # Update a single downtime by `downtime_id`. + # Update a single downtime by `downtime_id`. **Note:** This endpoint has been deprecated. Please use v2 endpoints. + # + # @deprecated This API is deprecated. # # @param downtime_id [Integer] ID of the downtime to update. # @param body [Downtime] Update a downtime request body. # @param opts [Hash] the optional parameters # @return [Array<(Downtime, Integer, Hash)>] Downtime data, response status code and response headers def update_downtime_with_http_info(downtime_id, body, opts = {}) + warn "[DEPRECATION] `UpdateDowntime` is deprecated." if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DowntimesAPI.update_downtime ...'