diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index c554255f1343..0fcda4ed1841 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -50232,7 +50232,7 @@ components: example: "fluent-source" type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineFluentBitSourceType" required: @@ -50264,7 +50264,7 @@ components: example: "fluent-source" type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineFluentdSourceType" required: @@ -50865,7 +50865,7 @@ components: example: HTTP_AUTH_PASSWORD type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceType" username_key: @@ -51120,7 +51120,7 @@ components: example: logstash-source type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineLogstashSourceType" required: @@ -51271,6 +51271,29 @@ components: oneOf: - $ref: "#/components/schemas/ObservabilityPipelineGeneratedMetricIncrementByOne" - $ref: "#/components/schemas/ObservabilityPipelineGeneratedMetricIncrementByField" + ObservabilityPipelineMtlsServerTls: + description: Configuration for enabling TLS encryption between the pipeline component and external connecting clients. + properties: + ca_file: + description: Path to the Certificate Authority (CA) file used to validate connecting clients' TLS certificates. + type: string + crt_file: + description: Path to the TLS server certificate file used to used to identify the pipeline component to connecting clients. + example: "/path/to/cert.crt" + type: string + key_file: + description: Path to the private key file associated with the TLS server certificate. + type: string + key_pass_key: + description: Name of the environment variable or secret that holds the passphrase for the private key file. + example: TLS_KEY_PASSPHRASE + type: string + verify_certificate: + description: When `true`, requires client connections to present a valid certificate, enabling mutual TLS authentication. + type: boolean + required: + - crt_file + type: object ObservabilityPipelineNewRelicDestination: description: |- The `new_relic` destination sends logs to the New Relic platform. @@ -51610,7 +51633,7 @@ components: example: opentelemetry-source type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineOpentelemetrySourceType" required: @@ -52238,7 +52261,7 @@ components: mode: $ref: "#/components/schemas/ObservabilityPipelineSyslogSourceMode" tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineRsyslogSourceType" required: @@ -52809,7 +52832,7 @@ components: mode: $ref: "#/components/schemas/ObservabilityPipelineSocketSourceMode" tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" description: TLS configuration. Relevant only when `mode` is `tcp`. type: $ref: "#/components/schemas/ObservabilityPipelineSocketSourceType" @@ -53113,7 +53136,7 @@ components: example: true type: boolean tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineSplunkHecSourceType" required: @@ -53146,7 +53169,7 @@ components: example: splunk-tcp-source type: string tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineSplunkTcpSourceType" required: @@ -53340,7 +53363,7 @@ components: mode: $ref: "#/components/schemas/ObservabilityPipelineSyslogSourceMode" tls: - $ref: "#/components/schemas/ObservabilityPipelineTls" + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" type: $ref: "#/components/schemas/ObservabilityPipelineSyslogNgSourceType" required: diff --git a/lib/datadog_api_client/inflector.rb b/lib/datadog_api_client/inflector.rb index 45d174b12c04..35317d627770 100644 --- a/lib/datadog_api_client/inflector.rb +++ b/lib/datadog_api_client/inflector.rb @@ -4227,6 +4227,7 @@ def overrides "v2.observability_pipeline_metric_tags_processor_rule_mode" => "ObservabilityPipelineMetricTagsProcessorRuleMode", "v2.observability_pipeline_metric_tags_processor_type" => "ObservabilityPipelineMetricTagsProcessorType", "v2.observability_pipeline_metric_value" => "ObservabilityPipelineMetricValue", + "v2.observability_pipeline_mtls_server_tls" => "ObservabilityPipelineMtlsServerTls", "v2.observability_pipeline_new_relic_destination" => "ObservabilityPipelineNewRelicDestination", "v2.observability_pipeline_new_relic_destination_region" => "ObservabilityPipelineNewRelicDestinationRegion", "v2.observability_pipeline_new_relic_destination_type" => "ObservabilityPipelineNewRelicDestinationType", diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_fluent_bit_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_fluent_bit_source.rb index 470d60060058..5c9257ad9fb8 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_fluent_bit_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_fluent_bit_source.rb @@ -29,7 +29,7 @@ class ObservabilityPipelineFluentBitSource # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `fluent_bit`. @@ -54,7 +54,7 @@ def self.openapi_types { :'address_key' => :'String', :'id' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineFluentBitSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_fluentd_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_fluentd_source.rb index ec71db1a9469..c51cf37fa9a9 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_fluentd_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_fluentd_source.rb @@ -29,7 +29,7 @@ class ObservabilityPipelineFluentdSource # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `fluentd. @@ -54,7 +54,7 @@ def self.openapi_types { :'address_key' => :'String', :'id' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineFluentdSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_http_server_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_http_server_source.rb index 2416c612d24d..d3dfcc15de7f 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_http_server_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_http_server_source.rb @@ -41,7 +41,7 @@ class ObservabilityPipelineHttpServerSource # Name of the environment variable or secret that holds the password (used when `auth_strategy` is `plain`). attr_accessor :password_key - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `http_server`. @@ -78,7 +78,7 @@ def self.openapi_types :'decoding' => :'ObservabilityPipelineDecoding', :'id' => :'String', :'password_key' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineHttpServerSourceType', :'username_key' => :'String' } diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_logstash_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_logstash_source.rb index 15b52f5eaaae..bdec33bd58e2 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_logstash_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_logstash_source.rb @@ -29,7 +29,7 @@ class ObservabilityPipelineLogstashSource # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `logstash`. @@ -54,7 +54,7 @@ def self.openapi_types { :'address_key' => :'String', :'id' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineLogstashSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_mtls_server_tls.rb b/lib/datadog_api_client/v2/models/observability_pipeline_mtls_server_tls.rb new file mode 100644 index 000000000000..205617e85b97 --- /dev/null +++ b/lib/datadog_api_client/v2/models/observability_pipeline_mtls_server_tls.rb @@ -0,0 +1,163 @@ +=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 + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. + class ObservabilityPipelineMtlsServerTls + include BaseGenericModel + + # Path to the Certificate Authority (CA) file used to validate connecting clients' TLS certificates. + attr_accessor :ca_file + + # Path to the TLS server certificate file used to used to identify the pipeline component to connecting clients. + attr_reader :crt_file + + # Path to the private key file associated with the TLS server certificate. + attr_accessor :key_file + + # Name of the environment variable or secret that holds the passphrase for the private key file. + attr_accessor :key_pass_key + + # When `true`, requires client connections to present a valid certificate, enabling mutual TLS authentication. + attr_accessor :verify_certificate + + attr_accessor :additional_properties + + # Attribute mapping from ruby-style variable name to JSON key. + # @!visibility private + def self.attribute_map + { + :'ca_file' => :'ca_file', + :'crt_file' => :'crt_file', + :'key_file' => :'key_file', + :'key_pass_key' => :'key_pass_key', + :'verify_certificate' => :'verify_certificate' + } + end + + # Attribute type mapping. + # @!visibility private + def self.openapi_types + { + :'ca_file' => :'String', + :'crt_file' => :'String', + :'key_file' => :'String', + :'key_pass_key' => :'String', + :'verify_certificate' => :'Boolean' + } + 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::V2::ObservabilityPipelineMtlsServerTls` 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?(:'ca_file') + self.ca_file = attributes[:'ca_file'] + end + + if attributes.key?(:'crt_file') + self.crt_file = attributes[:'crt_file'] + end + + if attributes.key?(:'key_file') + self.key_file = attributes[:'key_file'] + end + + if attributes.key?(:'key_pass_key') + self.key_pass_key = attributes[:'key_pass_key'] + end + + if attributes.key?(:'verify_certificate') + self.verify_certificate = attributes[:'verify_certificate'] + end + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + # @!visibility private + def valid? + return false if @crt_file.nil? + true + end + + # Custom attribute writer method with validation + # @param crt_file [Object] Object to be assigned + # @!visibility private + def crt_file=(crt_file) + if crt_file.nil? + fail ArgumentError, 'invalid value for "crt_file", crt_file cannot be nil.' + end + @crt_file = crt_file + 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 && + ca_file == o.ca_file && + crt_file == o.crt_file && + key_file == o.key_file && + key_pass_key == o.key_pass_key && + verify_certificate == o.verify_certificate && + additional_properties == o.additional_properties + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + # @!visibility private + def hash + [ca_file, crt_file, key_file, key_pass_key, verify_certificate, additional_properties].hash + end + end +end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_opentelemetry_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_opentelemetry_source.rb index 6df608ca1081..65de31122295 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_opentelemetry_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_opentelemetry_source.rb @@ -32,7 +32,7 @@ class ObservabilityPipelineOpentelemetrySource # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `opentelemetry`. @@ -59,7 +59,7 @@ def self.openapi_types :'grpc_address_key' => :'String', :'http_address_key' => :'String', :'id' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineOpentelemetrySourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_rsyslog_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_rsyslog_source.rb index bbda5491fb04..17680db7692b 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_rsyslog_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_rsyslog_source.rb @@ -32,7 +32,7 @@ class ObservabilityPipelineRsyslogSource # Protocol used by the syslog source to receive messages. attr_reader :mode - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `rsyslog`. @@ -59,7 +59,7 @@ def self.openapi_types :'address_key' => :'String', :'id' => :'String', :'mode' => :'ObservabilityPipelineSyslogSourceMode', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineRsyslogSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb index 49b0b874d3fa..494d079db903 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_socket_source.rb @@ -35,7 +35,7 @@ class ObservabilityPipelineSocketSource # Protocol used to receive logs. attr_reader :mode - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `socket`. @@ -64,7 +64,7 @@ def self.openapi_types :'framing' => :'ObservabilityPipelineSocketSourceFraming', :'id' => :'String', :'mode' => :'ObservabilityPipelineSocketSourceMode', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineSocketSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_source.rb index c9e70f75ff81..fa9da56f6ddc 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_hec_source.rb @@ -33,7 +33,7 @@ class ObservabilityPipelineSplunkHecSource # This allows downstream components to forward the token to other Splunk HEC destinations. attr_accessor :store_hec_token - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. Always `splunk_hec`. @@ -60,7 +60,7 @@ def self.openapi_types :'address_key' => :'String', :'id' => :'String', :'store_hec_token' => :'Boolean', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineSplunkHecSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_tcp_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_tcp_source.rb index d0ef4902c685..0269f3062bb2 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_splunk_tcp_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_splunk_tcp_source.rb @@ -30,7 +30,7 @@ class ObservabilityPipelineSplunkTcpSource # The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components). attr_reader :id - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. Always `splunk_tcp`. @@ -55,7 +55,7 @@ def self.openapi_types { :'address_key' => :'String', :'id' => :'String', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineSplunkTcpSourceType' } end diff --git a/lib/datadog_api_client/v2/models/observability_pipeline_syslog_ng_source.rb b/lib/datadog_api_client/v2/models/observability_pipeline_syslog_ng_source.rb index 5bc1429127f6..c1407f5b63f8 100644 --- a/lib/datadog_api_client/v2/models/observability_pipeline_syslog_ng_source.rb +++ b/lib/datadog_api_client/v2/models/observability_pipeline_syslog_ng_source.rb @@ -32,7 +32,7 @@ class ObservabilityPipelineSyslogNgSource # Protocol used by the syslog source to receive messages. attr_reader :mode - # Configuration for enabling TLS encryption between the pipeline component and external services. + # Configuration for enabling TLS encryption between the pipeline component and external connecting clients. attr_accessor :tls # The source type. The value should always be `syslog_ng`. @@ -59,7 +59,7 @@ def self.openapi_types :'address_key' => :'String', :'id' => :'String', :'mode' => :'ObservabilityPipelineSyslogSourceMode', - :'tls' => :'ObservabilityPipelineTls', + :'tls' => :'ObservabilityPipelineMtlsServerTls', :'type' => :'ObservabilityPipelineSyslogNgSourceType' } end