Skip to content
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
4 changes: 2 additions & 2 deletions .generated-info
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"spec_repo_commit": "205813d",
"generated": "2025-08-25 08:41:30.486"
"spec_repo_commit": "c3b2b7d",
"generated": "2025-08-25 10:18:04.330"
}
12 changes: 12 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5123,6 +5123,12 @@ components:
error:
$ref: '#/components/schemas/LogsAPIError'
type: object
LogsAPILimitReachedResponse:
description: Response returned by the Logs API when the max limit has been reached.
properties:
error:
$ref: '#/components/schemas/LogsAPIError'
type: object
LogsArithmeticProcessor:
description: "Use the Arithmetic Processor to add a new attribute (without spaces
or special characters\nin the new attribute name) to a log with the result
Expand Down Expand Up @@ -29444,6 +29450,12 @@ paths:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Forbidden
'422':
content:
application/json:
schema:
$ref: '#/components/schemas/LogsAPILimitReachedResponse'
description: Unprocessable Entity
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Create an index
Expand Down
7 changes: 7 additions & 0 deletions features/v1/logs_indexes.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ Feature: Logs Indexes
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Create an index returns "Unprocessable Entity" response
Given new "CreateLogsIndex" request
And body with value {"daily_limit": 300000000, "daily_limit_reset": {"reset_time": "14:00", "reset_utc_offset": "+02:00"}, "daily_limit_warning_threshold_percentage": 70, "exclusion_filters": [{"filter": {"query": "*", "sample_rate": 1.0}, "name": "payment"}], "filter": {"query": "source:python"}, "name": "main", "num_flex_logs_retention_days": 360, "num_retention_days": 15}
When the request is sent
Then the response status is 422 Unprocessable Entity

@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-core
Scenario: Delete an index returns "Not Found" response
Given new "DeleteLogsIndex" request
Expand Down
1 change: 1 addition & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ def overrides
"v1.log_query_definition_search" => "LogQueryDefinitionSearch",
"v1.logs_api_error" => "LogsAPIError",
"v1.logs_api_error_response" => "LogsAPIErrorResponse",
"v1.logs_api_limit_reached_response" => "LogsAPILimitReachedResponse",
"v1.logs_arithmetic_processor" => "LogsArithmeticProcessor",
"v1.logs_arithmetic_processor_type" => "LogsArithmeticProcessorType",
"v1.logs_array_processor" => "LogsArrayProcessor",
Expand Down
105 changes: 105 additions & 0 deletions lib/datadog_api_client/v1/models/logs_api_limit_reached_response.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
=begin
#Datadog API V1 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: support@datadoghq.com
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V1
# Response returned by the Logs API when the max limit has been reached.
class LogsAPILimitReachedResponse
include BaseGenericModel

# Error returned by the Logs API
attr_accessor :error

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'error' => :'error'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'error' => :'LogsAPIError'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::LogsAPILimitReachedResponse` initialize method"
end

self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

if attributes.key?(:'error')
self.error = attributes[:'error']
end
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
error == o.error &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[error, additional_properties].hash
end
end
end
Loading