diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index e83df8269e5f..ce076d8a80fb 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -43029,6 +43029,7 @@ components: ObservabilityPipelineConfigDestinationItem: description: "A destination for the pipeline." oneOf: + - $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineHttpClientDestination" - $ref: "#/components/schemas/ObservabilityPipelineAmazonOpenSearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineAmazonS3Destination" @@ -43038,7 +43039,6 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineCloudPremDestination" - $ref: "#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogLogsDestination" - - $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestination" - $ref: "#/components/schemas/ObservabilityPipelineGoogleChronicleDestination" - $ref: "#/components/schemas/ObservabilityPipelineGoogleCloudStorageDestination" - $ref: "#/components/schemas/ObservabilityPipelineGooglePubSubDestination" @@ -43640,9 +43640,9 @@ components: type: object ObservabilityPipelineElasticsearchDestination: description: |- - The `elasticsearch` destination writes logs to an Elasticsearch cluster. + The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster. - **Supported pipeline types:** logs + **Supported pipeline types:** logs, metrics properties: api_version: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationApiVersion" @@ -43651,9 +43651,11 @@ components: buffer: $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" bulk_index: - description: The index to write logs to in Elasticsearch. + description: The name of the index to write events to in Elasticsearch. example: logs-index type: string + compression: + $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationCompression" data_stream: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationDataStream" endpoint_url_key: @@ -43664,6 +43666,10 @@ components: description: The unique identifier for this component. example: "elasticsearch-destination" type: string + id_key: + description: The name of the field used as the document ID in Elasticsearch. + example: id + type: string inputs: description: A list of component IDs whose output is used as the `input` for this component. example: ["filter-processor"] @@ -43671,6 +43677,15 @@ components: description: The ID of a component whose output is used as input for this destination. type: string type: array + pipeline: + description: The name of an Elasticsearch ingest pipeline to apply to events before indexing. + example: my-pipeline + type: string + request_retry_partial: + description: When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed. + type: boolean + tls: + $ref: "#/components/schemas/ObservabilityPipelineTls" type: $ref: "#/components/schemas/ObservabilityPipelineElasticsearchDestinationType" required: @@ -43678,7 +43693,7 @@ components: - type - inputs type: object - x-pipeline-types: [logs] + x-pipeline-types: [logs, metrics] ObservabilityPipelineElasticsearchDestinationApiVersion: description: The Elasticsearch API version to use. Set to `auto` to auto-detect. enum: [auto, v6, v7, v8] @@ -43707,18 +43722,35 @@ components: required: - strategy type: object + ObservabilityPipelineElasticsearchDestinationCompression: + description: The compression algorithm applied when sending data to Elasticsearch. + enum: [none, gzip, zlib, zstd, snappy] + example: gzip + type: string + x-enum-varnames: + - NONE + - GZIP + - ZLIB + - ZSTD + - SNAPPY ObservabilityPipelineElasticsearchDestinationDataStream: description: Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. properties: + auto_routing: + description: When `true`, automatically routes events to the appropriate data stream based on the event content. + type: boolean dataset: - description: The data stream dataset for your logs. This groups logs by their source or application. + description: The data stream dataset. This groups events by their source or application. type: string dtype: - description: The data stream type for your logs. This determines how logs are categorized within the data stream. + description: The data stream type. This determines how events are categorized within the data stream. type: string namespace: - description: The data stream namespace for your logs. This separates logs into different environments or domains. + description: The data stream namespace. This separates events into different environments or domains. type: string + sync_fields: + description: When `true`, synchronizes data stream fields with the Elasticsearch index mapping. + type: boolean type: object ObservabilityPipelineElasticsearchDestinationType: default: elasticsearch diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index b38f547854a2..f25b3e6236de 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -3794,6 +3794,7 @@ def overrides "v2.observability_pipeline_elasticsearch_destination" => "ObservabilityPipelineElasticsearchDestination", "v2.observability_pipeline_elasticsearch_destination_api_version" => "ObservabilityPipelineElasticsearchDestinationApiVersion", "v2.observability_pipeline_elasticsearch_destination_auth" => "ObservabilityPipelineElasticsearchDestinationAuth", + "v2.observability_pipeline_elasticsearch_destination_compression" => "ObservabilityPipelineElasticsearchDestinationCompression", "v2.observability_pipeline_elasticsearch_destination_data_stream" => "ObservabilityPipelineElasticsearchDestinationDataStream", "v2.observability_pipeline_elasticsearch_destination_type" => "ObservabilityPipelineElasticsearchDestinationType", "v2.observability_pipeline_enrichment_table_file" => "ObservabilityPipelineEnrichmentTableFile", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb index 7e89379e7a02..e51008deb906 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_config_destination_item.rb @@ -26,6 +26,7 @@ class << self # List of class defined in oneOf (OpenAPI v3) def openapi_one_of [ + :'ObservabilityPipelineElasticsearchDestination', :'ObservabilityPipelineHttpClientDestination', :'ObservabilityPipelineAmazonOpenSearchDestination', :'ObservabilityPipelineAmazonS3Destination', @@ -35,7 +36,6 @@ def openapi_one_of :'ObservabilityPipelineCloudPremDestination', :'ObservabilityPipelineCrowdStrikeNextGenSiemDestination', :'ObservabilityPipelineDatadogLogsDestination', - :'ObservabilityPipelineElasticsearchDestination', :'ObservabilityPipelineGoogleChronicleDestination', :'ObservabilityPipelineGoogleCloudStorageDestination', :'ObservabilityPipelineGooglePubSubDestination', diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination.rb b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination.rb index 612b0ff1eeab..5558811b975d 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination.rb @@ -17,9 +17,9 @@ require 'time' module DatadogAPIClient::V2 - # The `elasticsearch` destination writes logs to an Elasticsearch cluster. + # The `elasticsearch` destination writes logs or metrics to an Elasticsearch cluster. # - # **Supported pipeline types:** logs + # **Supported pipeline types:** logs, metrics class ObservabilityPipelineElasticsearchDestination include BaseGenericModel @@ -33,9 +33,12 @@ class ObservabilityPipelineElasticsearchDestination # Configuration for buffer settings on destination components. attr_accessor :buffer - # The index to write logs to in Elasticsearch. + # The name of the index to write events to in Elasticsearch. attr_accessor :bulk_index + # The compression algorithm applied when sending data to Elasticsearch. + attr_accessor :compression + # Configuration options for writing to Elasticsearch Data Streams instead of a fixed index. attr_accessor :data_stream @@ -45,9 +48,21 @@ class ObservabilityPipelineElasticsearchDestination # The unique identifier for this component. attr_reader :id + # The name of the field used as the document ID in Elasticsearch. + attr_accessor :id_key + # A list of component IDs whose output is used as the `input` for this component. attr_reader :inputs + # The name of an Elasticsearch ingest pipeline to apply to events before indexing. + attr_accessor :pipeline + + # When `true`, retries failed partial bulk requests when some events in a batch fail while others succeed. + attr_accessor :request_retry_partial + + # Configuration for enabling TLS encryption between the pipeline component and external services. + attr_accessor :tls + # The destination type. The value should always be `elasticsearch`. attr_reader :type @@ -61,10 +76,15 @@ def self.attribute_map :'auth' => :'auth', :'buffer' => :'buffer', :'bulk_index' => :'bulk_index', + :'compression' => :'compression', :'data_stream' => :'data_stream', :'endpoint_url_key' => :'endpoint_url_key', :'id' => :'id', + :'id_key' => :'id_key', :'inputs' => :'inputs', + :'pipeline' => :'pipeline', + :'request_retry_partial' => :'request_retry_partial', + :'tls' => :'tls', :'type' => :'type' } end @@ -77,10 +97,15 @@ def self.openapi_types :'auth' => :'ObservabilityPipelineElasticsearchDestinationAuth', :'buffer' => :'ObservabilityPipelineBufferOptions', :'bulk_index' => :'String', + :'compression' => :'ObservabilityPipelineElasticsearchDestinationCompression', :'data_stream' => :'ObservabilityPipelineElasticsearchDestinationDataStream', :'endpoint_url_key' => :'String', :'id' => :'String', + :'id_key' => :'String', :'inputs' => :'Array', + :'pipeline' => :'String', + :'request_retry_partial' => :'Boolean', + :'tls' => :'ObservabilityPipelineTls', :'type' => :'ObservabilityPipelineElasticsearchDestinationType' } end @@ -119,6 +144,10 @@ def initialize(attributes = {}) self.bulk_index = attributes[:'bulk_index'] end + if attributes.key?(:'compression') + self.compression = attributes[:'compression'] + end + if attributes.key?(:'data_stream') self.data_stream = attributes[:'data_stream'] end @@ -131,12 +160,28 @@ def initialize(attributes = {}) self.id = attributes[:'id'] end + if attributes.key?(:'id_key') + self.id_key = attributes[:'id_key'] + end + if attributes.key?(:'inputs') if (value = attributes[:'inputs']).is_a?(Array) self.inputs = value end end + if attributes.key?(:'pipeline') + self.pipeline = attributes[:'pipeline'] + end + + if attributes.key?(:'request_retry_partial') + self.request_retry_partial = attributes[:'request_retry_partial'] + end + + if attributes.key?(:'tls') + self.tls = attributes[:'tls'] + end + if attributes.key?(:'type') self.type = attributes[:'type'] end @@ -212,10 +257,15 @@ def ==(o) auth == o.auth && buffer == o.buffer && bulk_index == o.bulk_index && + compression == o.compression && data_stream == o.data_stream && endpoint_url_key == o.endpoint_url_key && id == o.id && + id_key == o.id_key && inputs == o.inputs && + pipeline == o.pipeline && + request_retry_partial == o.request_retry_partial && + tls == o.tls && type == o.type && additional_properties == o.additional_properties end @@ -224,7 +274,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [api_version, auth, buffer, bulk_index, data_stream, endpoint_url_key, id, inputs, type, additional_properties].hash + [api_version, auth, buffer, bulk_index, compression, data_stream, endpoint_url_key, id, id_key, inputs, pipeline, request_retry_partial, tls, type, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_compression.rb b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_compression.rb new file mode 100644 index 000000000000..382aaeedac70 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_compression.rb @@ -0,0 +1,30 @@ +=begin +#Datadog API V2 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::V2 + # The compression algorithm applied when sending data to Elasticsearch. + class ObservabilityPipelineElasticsearchDestinationCompression + include BaseEnumModel + + NONE = "none".freeze + GZIP = "gzip".freeze + ZLIB = "zlib".freeze + ZSTD = "zstd".freeze + SNAPPY = "snappy".freeze + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_data_stream.rb b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_data_stream.rb index 8bf597f0b45d..4bd04ab93401 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_data_stream.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_elasticsearch_destination_data_stream.rb @@ -21,24 +21,32 @@ module DatadogAPIClient::V2 class ObservabilityPipelineElasticsearchDestinationDataStream include BaseGenericModel - # The data stream dataset for your logs. This groups logs by their source or application. + # When `true`, automatically routes events to the appropriate data stream based on the event content. + attr_accessor :auto_routing + + # The data stream dataset. This groups events by their source or application. attr_accessor :dataset - # The data stream type for your logs. This determines how logs are categorized within the data stream. + # The data stream type. This determines how events are categorized within the data stream. attr_accessor :dtype - # The data stream namespace for your logs. This separates logs into different environments or domains. + # The data stream namespace. This separates events into different environments or domains. attr_accessor :namespace + # When `true`, synchronizes data stream fields with the Elasticsearch index mapping. + attr_accessor :sync_fields + attr_accessor :additional_properties # Attribute mapping from ruby-style variable name to JSON key. # @!visibility private def self.attribute_map { + :'auto_routing' => :'auto_routing', :'dataset' => :'dataset', :'dtype' => :'dtype', - :'namespace' => :'namespace' + :'namespace' => :'namespace', + :'sync_fields' => :'sync_fields' } end @@ -46,9 +54,11 @@ def self.attribute_map # @!visibility private def self.openapi_types { + :'auto_routing' => :'Boolean', :'dataset' => :'String', :'dtype' => :'String', - :'namespace' => :'String' + :'namespace' => :'String', + :'sync_fields' => :'Boolean' } end @@ -70,6 +80,10 @@ def initialize(attributes = {}) end } + if attributes.key?(:'auto_routing') + self.auto_routing = attributes[:'auto_routing'] + end + if attributes.key?(:'dataset') self.dataset = attributes[:'dataset'] end @@ -81,6 +95,10 @@ def initialize(attributes = {}) if attributes.key?(:'namespace') self.namespace = attributes[:'namespace'] end + + if attributes.key?(:'sync_fields') + self.sync_fields = attributes[:'sync_fields'] + end end # Returns the object in the form of hash, with additionalProperties support. @@ -109,9 +127,11 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && + auto_routing == o.auto_routing && dataset == o.dataset && dtype == o.dtype && namespace == o.namespace && + sync_fields == o.sync_fields && additional_properties == o.additional_properties end @@ -119,7 +139,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [dataset, dtype, namespace, additional_properties].hash + [auto_routing, dataset, dtype, namespace, sync_fields, additional_properties].hash end end end