From e569bab33b7d3c928db7c3656e493fadcc099b44 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 14 Sep 2026 17:39:11 +0000 Subject: [PATCH] Regenerate client from commit 6f1a6a8 of spec repo --- .generator/schemas/v2/openapi.yaml | 199 +++++++++++++++--- .../v2/model/device_tags_by_source.py | 43 ---- .../list_tags_response_data_attributes.py | 25 +-- .../v2/model/observability_pipeline_config.py | 8 + ...bility_pipeline_config_destination_item.py | 6 +- ...servability_pipeline_config_source_item.py | 7 + ...ine_prometheus_remote_write_destination.py | 164 +++++++++++++++ ..._remote_write_destination_auth_strategy.py | 47 +++++ ...rometheus_remote_write_destination_type.py | 37 ++++ ...pipeline_prometheus_remote_write_source.py | 130 ++++++++++++ ...theus_remote_write_source_auth_strategy.py | 42 ++++ ...ine_prometheus_remote_write_source_type.py | 37 ++++ ...metheus_remote_write_source_valid_token.py | 80 +++++++ src/datadog_api_client/v2/models/__init__.py | 30 ++- 14 files changed, 751 insertions(+), 104 deletions(-) delete mode 100644 src/datadog_api_client/v2/model/device_tags_by_source.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_auth_strategy.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_type.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_auth_strategy.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_type.py create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_valid_token.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 66d2aaa090..2b9cd1976a 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -35651,21 +35651,6 @@ components: format: int64 type: integer type: object - DeviceTagsBySource: - description: Tags associated with a device from a specific source. - properties: - source: - description: The source of the tags. - example: user - type: string - tags: - description: The list of tags for the source. - example: ["tag:test", "tag:testbis"] - items: - description: A tag string in `key:value` format. - type: string - type: array - type: object DevicesListData: description: The devices list data properties: @@ -66483,12 +66468,6 @@ components: ListTagsResponseDataAttributes: description: The definition of ListTagsResponseDataAttributes object. properties: - by_source: - description: The list of device tags grouped by source. - items: - $ref: "#/components/schemas/DeviceTagsBySource" - readOnly: true - type: array tags: description: The list of tags example: ["tag:test", "tag:testbis"] @@ -74919,6 +74898,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineDatabricksZerobusDestination" - $ref: "#/components/schemas/ObservabilityPipelineDatadogMetricsDestination" - $ref: "#/components/schemas/ObservabilityPipelineOpentelemetryMetricsDestination" + - $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestination" - $ref: "#/components/schemas/ObservabilityPipelineSplunkHecMetricsDestination" ObservabilityPipelineConfigPipelineType: default: logs @@ -75018,6 +74998,7 @@ components: - $ref: "#/components/schemas/ObservabilityPipelineSyslogNgSource" - $ref: "#/components/schemas/ObservabilityPipelineWebsocketSource" - $ref: "#/components/schemas/ObservabilityPipelineOpentelemetrySource" + - $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSource" ObservabilityPipelineCrowdStrikeNextGenSiemDestination: description: |- The `crowdstrike_next_gen_siem` destination forwards logs to CrowdStrike Next Gen SIEM. @@ -77913,6 +77894,168 @@ components: type: string x-enum-varnames: - PARSE_XML + ObservabilityPipelinePrometheusRemoteWriteDestination: + description: |- + The `prometheus_remote_write` destination forwards metrics to an endpoint that supports the Prometheus Remote Write protocol. + + **Supported pipeline types:** metrics + properties: + auth_strategy: + $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy" + buffer: + $ref: "#/components/schemas/ObservabilityPipelineBufferOptions" + default_namespace: + description: The default namespace to add as a prefix to metric names that do not already have one. + example: datadog + type: string + endpoint_url_key: + description: |- + Name of the environment variable or secret that holds the Prometheus Remote Write endpoint URL. + Defaults to `DESTINATION_PROMETHEUS_REMOTE_WRITE_ENDPOINT_URL` (prefixed with `DD_OP_` at runtime). + example: PROMETHEUS_REMOTE_WRITE_ENDPOINT_URL + type: string + id: + description: 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). + example: prometheus-remote-write-destination + type: string + inputs: + description: A list of component IDs whose output is used as the `input` for this component. + example: ["metrics-filter-processor"] + items: + description: The ID of a component whose output is used as input for this destination. + type: string + type: array + password_key: + description: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `basic`). + example: PROMETHEUS_REMOTE_WRITE_PASSWORD + type: string + tenant_id: + description: The tenant ID to include with outgoing requests. Used by multi-tenant Prometheus Remote Write receivers. + example: my-tenant + type: string + tls: + $ref: "#/components/schemas/ObservabilityPipelineClientTls" + token_key: + description: Name of the environment variable or secret that holds the bearer token (used when `auth_strategy` is `bearer`). + example: PROMETHEUS_REMOTE_WRITE_TOKEN + type: string + type: + $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteDestinationType" + username_key: + description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `basic`). + example: PROMETHEUS_REMOTE_WRITE_USERNAME + type: string + required: + - id + - type + - inputs + type: object + x-pipeline-types: [metrics] + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy: + description: The authentication strategy to use for outgoing Prometheus Remote Write requests. + enum: + - none + - basic + - bearer + example: basic + type: string + x-enum-varnames: + - NONE + - BASIC + - BEARER + ObservabilityPipelinePrometheusRemoteWriteDestinationType: + default: prometheus_remote_write + description: The destination type. The value should always be `prometheus_remote_write`. + enum: + - prometheus_remote_write + example: prometheus_remote_write + type: string + x-enum-varnames: + - PROMETHEUS_REMOTE_WRITE + ObservabilityPipelinePrometheusRemoteWriteSource: + description: |- + The `prometheus_remote_write` source ingests metrics pushed over the Prometheus Remote Write protocol. + + **Supported pipeline types:** metrics + properties: + address_key: + description: Name of the environment variable or secret that holds the listen address for the Prometheus Remote Write endpoint. + example: PROMETHEUS_REMOTE_WRITE_ADDRESS + type: string + auth_strategy: + $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy" + id: + description: 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). + example: prometheus-remote-write-source + type: string + password_key: + description: Name of the environment variable or secret that holds the password (used when `auth_strategy` is `plain`). + example: PROMETHEUS_REMOTE_WRITE_PASSWORD + type: string + path: + description: The HTTP path on which the source listens for incoming Prometheus Remote Write requests. + example: "/api/v1/write" + type: string + tls: + $ref: "#/components/schemas/ObservabilityPipelineMtlsServerTls" + type: + $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceType" + username_key: + description: Name of the environment variable or secret that holds the username (used when `auth_strategy` is `plain`). + example: PROMETHEUS_REMOTE_WRITE_USERNAME + type: string + valid_tokens: + description: |- + A list of tokens that are accepted for authenticating incoming requests. When set, + the source rejects any request whose token does not match an enabled entry in this list. + items: + $ref: "#/components/schemas/ObservabilityPipelinePrometheusRemoteWriteSourceValidToken" + type: array + required: + - id + - type + - auth_strategy + - path + type: object + x-pipeline-types: [metrics] + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy: + description: HTTP authentication method. + enum: + - none + - plain + example: plain + type: string + x-enum-varnames: + - NONE + - PLAIN + ObservabilityPipelinePrometheusRemoteWriteSourceType: + default: prometheus_remote_write + description: The source type. The value should always be `prometheus_remote_write`. + enum: [prometheus_remote_write] + example: prometheus_remote_write + type: string + x-enum-varnames: + - PROMETHEUS_REMOTE_WRITE + ObservabilityPipelinePrometheusRemoteWriteSourceValidToken: + description: An accepted token used to authenticate incoming Prometheus Remote Write requests. + properties: + enabled: + default: true + description: |- + Indicates whether this token is currently accepted. Disabled tokens are rejected without + being removed from the configuration. + example: true + type: boolean + path_to_token: + $ref: "#/components/schemas/ObservabilityPipelineHttpServerSourceValidTokenPathToToken" + token_key: + description: Name of the environment variable or secret that holds the expected token value. + example: PROMETHEUS_REMOTE_WRITE_TOKEN + pattern: "^[A-Za-z0-9_]+$" + type: string + required: + - token_key + type: object ObservabilityPipelineQuotaProcessor: description: |- The `quota` processor measures logging traffic for logs that match a specified filter. When the configured daily quota is met, the processor can drop or alert. @@ -182907,20 +183050,6 @@ paths: content: application/json: examples: - by_source: - value: - data: - attributes: - by_source: - - source: user - tags: - - "tag:test" - - "tag:testbis" - - source: snmp - tags: - - "device_ip:1.2.3.4" - id: foiwf7rgw38fh - type: tags default: value: data: diff --git a/src/datadog_api_client/v2/model/device_tags_by_source.py b/src/datadog_api_client/v2/model/device_tags_by_source.py deleted file mode 100644 index e0ada7a5c5..0000000000 --- a/src/datadog_api_client/v2/model/device_tags_by_source.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 2019-Present Datadog, Inc. -from __future__ import annotations - -from typing import List, Union - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class DeviceTagsBySource(ModelNormal): - @cached_property - def openapi_types(_): - return { - "source": (str,), - "tags": ([str],), - } - - attribute_map = { - "source": "source", - "tags": "tags", - } - - def __init__(self_, source: Union[str, UnsetType] = unset, tags: Union[List[str], UnsetType] = unset, **kwargs): - """ - Tags associated with a device from a specific source. - - :param source: The source of the tags. - :type source: str, optional - - :param tags: The list of tags for the source. - :type tags: [str], optional - """ - if source is not unset: - kwargs["source"] = source - if tags is not unset: - kwargs["tags"] = tags - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/list_tags_response_data_attributes.py b/src/datadog_api_client/v2/model/list_tags_response_data_attributes.py index 4f518fe8f9..35c7e3b578 100644 --- a/src/datadog_api_client/v2/model/list_tags_response_data_attributes.py +++ b/src/datadog_api_client/v2/model/list_tags_response_data_attributes.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union, TYPE_CHECKING +from typing import List, Union from datadog_api_client.model_utils import ( ModelNormal, @@ -13,45 +13,24 @@ ) -if TYPE_CHECKING: - from datadog_api_client.v2.model.device_tags_by_source import DeviceTagsBySource - - class ListTagsResponseDataAttributes(ModelNormal): @cached_property def openapi_types(_): - from datadog_api_client.v2.model.device_tags_by_source import DeviceTagsBySource - return { - "by_source": ([DeviceTagsBySource],), "tags": ([str],), } attribute_map = { - "by_source": "by_source", "tags": "tags", } - read_only_vars = { - "by_source", - } - def __init__( - self_, - by_source: Union[List[DeviceTagsBySource], UnsetType] = unset, - tags: Union[List[str], UnsetType] = unset, - **kwargs, - ): + def __init__(self_, tags: Union[List[str], UnsetType] = unset, **kwargs): """ The definition of ListTagsResponseDataAttributes object. - :param by_source: The list of device tags grouped by source. - :type by_source: [DeviceTagsBySource], optional - :param tags: The list of tags :type tags: [str], optional """ - if by_source is not unset: - kwargs["by_source"] = by_source if tags is not unset: kwargs["tags"] = tags super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config.py b/src/datadog_api_client/v2/model/observability_pipeline_config.py index 0969d7e226..92f47ca50d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config.py @@ -103,6 +103,9 @@ from datadog_api_client.v2.model.observability_pipeline_opentelemetry_metrics_destination import ( ObservabilityPipelineOpentelemetryMetricsDestination, ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination import ( + ObservabilityPipelinePrometheusRemoteWriteDestination, + ) from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination import ( ObservabilityPipelineSplunkHecMetricsDestination, ) @@ -144,6 +147,9 @@ from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source import ( ObservabilityPipelineOpentelemetrySource, ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source import ( + ObservabilityPipelinePrometheusRemoteWriteSource, + ) class ObservabilityPipelineConfig(ModelNormal): @@ -212,6 +218,7 @@ def __init__( ObservabilityPipelineDatabricksZerobusDestination, ObservabilityPipelineDatadogMetricsDestination, ObservabilityPipelineOpentelemetryMetricsDestination, + ObservabilityPipelinePrometheusRemoteWriteDestination, ObservabilityPipelineSplunkHecMetricsDestination, ] ], @@ -236,6 +243,7 @@ def __init__( ObservabilityPipelineSyslogNgSource, ObservabilityPipelineWebsocketSource, ObservabilityPipelineOpentelemetrySource, + ObservabilityPipelinePrometheusRemoteWriteSource, ] ], pipeline_type: Union[ObservabilityPipelineConfigPipelineType, UnsetType] = unset, diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py index 2753bdefaf..84f2342112 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_destination_item.py @@ -265,7 +265,7 @@ def __init__(self, **kwargs): :param http_client_uri_key: Environment variable name containing the URI of the OTLP HTTP endpoint to send metrics to. :type http_client_uri_key: str, optional - :param default_namespace: Optional default namespace for metrics sent to Splunk HEC. + :param default_namespace: The default namespace to add as a prefix to metric names that do not already have one. :type default_namespace: str, optional :param source: The Splunk source field value for metric events. @@ -359,6 +359,9 @@ def _composed_schemas(_): from datadog_api_client.v2.model.observability_pipeline_opentelemetry_metrics_destination import ( ObservabilityPipelineOpentelemetryMetricsDestination, ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination import ( + ObservabilityPipelinePrometheusRemoteWriteDestination, + ) from datadog_api_client.v2.model.observability_pipeline_splunk_hec_metrics_destination import ( ObservabilityPipelineSplunkHecMetricsDestination, ) @@ -392,6 +395,7 @@ def _composed_schemas(_): ObservabilityPipelineDatabricksZerobusDestination, ObservabilityPipelineDatadogMetricsDestination, ObservabilityPipelineOpentelemetryMetricsDestination, + ObservabilityPipelinePrometheusRemoteWriteDestination, ObservabilityPipelineSplunkHecMetricsDestination, ], } diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py index be34fa159b..f4562e526f 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_source_item.py @@ -114,6 +114,9 @@ def __init__(self, **kwargs): :param http_address_key: Environment variable name containing the HTTP server address for receiving OTLP data. Must be a valid environment variable name (alphanumeric characters and underscores only). :type http_address_key: str, optional + + :param path: The HTTP path on which the source listens for incoming Prometheus Remote Write requests. + :type path: str """ super().__init__(kwargs) @@ -172,6 +175,9 @@ def _composed_schemas(_): from datadog_api_client.v2.model.observability_pipeline_opentelemetry_source import ( ObservabilityPipelineOpentelemetrySource, ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source import ( + ObservabilityPipelinePrometheusRemoteWriteSource, + ) return { "oneOf": [ @@ -193,5 +199,6 @@ def _composed_schemas(_): ObservabilityPipelineSyslogNgSource, ObservabilityPipelineWebsocketSource, ObservabilityPipelineOpentelemetrySource, + ObservabilityPipelinePrometheusRemoteWriteSource, ], } diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination.py new file mode 100644 index 0000000000..0042bb18e4 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination.py @@ -0,0 +1,164 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy, + ) + from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_client_tls import ObservabilityPipelineClientTls + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_type import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationType, + ) + from datadog_api_client.v2.model.observability_pipeline_disk_buffer_options import ( + ObservabilityPipelineDiskBufferOptions, + ) + from datadog_api_client.v2.model.observability_pipeline_memory_buffer_options import ( + ObservabilityPipelineMemoryBufferOptions, + ) + from datadog_api_client.v2.model.observability_pipeline_memory_buffer_size_options import ( + ObservabilityPipelineMemoryBufferSizeOptions, + ) + + +class ObservabilityPipelinePrometheusRemoteWriteDestination(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy, + ) + from datadog_api_client.v2.model.observability_pipeline_buffer_options import ObservabilityPipelineBufferOptions + from datadog_api_client.v2.model.observability_pipeline_client_tls import ObservabilityPipelineClientTls + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_type import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationType, + ) + + return { + "auth_strategy": (ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy,), + "buffer": (ObservabilityPipelineBufferOptions,), + "default_namespace": (str,), + "endpoint_url_key": (str,), + "id": (str,), + "inputs": ([str],), + "password_key": (str,), + "tenant_id": (str,), + "tls": (ObservabilityPipelineClientTls,), + "token_key": (str,), + "type": (ObservabilityPipelinePrometheusRemoteWriteDestinationType,), + "username_key": (str,), + } + + attribute_map = { + "auth_strategy": "auth_strategy", + "buffer": "buffer", + "default_namespace": "default_namespace", + "endpoint_url_key": "endpoint_url_key", + "id": "id", + "inputs": "inputs", + "password_key": "password_key", + "tenant_id": "tenant_id", + "tls": "tls", + "token_key": "token_key", + "type": "type", + "username_key": "username_key", + } + + def __init__( + self_, + id: str, + inputs: List[str], + type: ObservabilityPipelinePrometheusRemoteWriteDestinationType, + auth_strategy: Union[ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy, UnsetType] = unset, + buffer: Union[ + ObservabilityPipelineBufferOptions, + ObservabilityPipelineDiskBufferOptions, + ObservabilityPipelineMemoryBufferOptions, + ObservabilityPipelineMemoryBufferSizeOptions, + UnsetType, + ] = unset, + default_namespace: Union[str, UnsetType] = unset, + endpoint_url_key: Union[str, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, + tenant_id: Union[str, UnsetType] = unset, + tls: Union[ObservabilityPipelineClientTls, UnsetType] = unset, + token_key: Union[str, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + The ``prometheus_remote_write`` destination forwards metrics to an endpoint that supports the Prometheus Remote Write protocol. + + **Supported pipeline types:** metrics + + :param auth_strategy: The authentication strategy to use for outgoing Prometheus Remote Write requests. + :type auth_strategy: ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy, optional + + :param buffer: Configuration for buffer settings on destination components. + :type buffer: ObservabilityPipelineBufferOptions, optional + + :param default_namespace: The default namespace to add as a prefix to metric names that do not already have one. + :type default_namespace: str, optional + + :param endpoint_url_key: Name of the environment variable or secret that holds the Prometheus Remote Write endpoint URL. + Defaults to ``DESTINATION_PROMETHEUS_REMOTE_WRITE_ENDPOINT_URL`` (prefixed with ``DD_OP_`` at runtime). + :type endpoint_url_key: str, optional + + :param id: 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). + :type id: str + + :param inputs: A list of component IDs whose output is used as the ``input`` for this component. + :type inputs: [str] + + :param password_key: Name of the environment variable or secret that holds the password (used when ``auth_strategy`` is ``basic`` ). + :type password_key: str, optional + + :param tenant_id: The tenant ID to include with outgoing requests. Used by multi-tenant Prometheus Remote Write receivers. + :type tenant_id: str, optional + + :param tls: Configuration for enabling TLS encryption between the pipeline component and external services. + :type tls: ObservabilityPipelineClientTls, optional + + :param token_key: Name of the environment variable or secret that holds the bearer token (used when ``auth_strategy`` is ``bearer`` ). + :type token_key: str, optional + + :param type: The destination type. The value should always be ``prometheus_remote_write``. + :type type: ObservabilityPipelinePrometheusRemoteWriteDestinationType + + :param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``basic`` ). + :type username_key: str, optional + """ + if auth_strategy is not unset: + kwargs["auth_strategy"] = auth_strategy + if buffer is not unset: + kwargs["buffer"] = buffer + if default_namespace is not unset: + kwargs["default_namespace"] = default_namespace + if endpoint_url_key is not unset: + kwargs["endpoint_url_key"] = endpoint_url_key + if password_key is not unset: + kwargs["password_key"] = password_key + if tenant_id is not unset: + kwargs["tenant_id"] = tenant_id + if tls is not unset: + kwargs["tls"] = tls + if token_key is not unset: + kwargs["token_key"] = token_key + if username_key is not unset: + kwargs["username_key"] = username_key + super().__init__(kwargs) + + self_.id = id + self_.inputs = inputs + self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_auth_strategy.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_auth_strategy.py new file mode 100644 index 0000000000..198663ff0b --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_auth_strategy.py @@ -0,0 +1,47 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy(ModelSimple): + """ + The authentication strategy to use for outgoing Prometheus Remote Write requests. + + :param value: Must be one of ["none", "basic", "bearer"]. + :type value: str + """ + + allowed_values = { + "none", + "basic", + "bearer", + } + NONE: ClassVar["ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy"] + BASIC: ClassVar["ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy"] + BEARER: ClassVar["ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy.NONE = ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy("none") +) +ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy.BASIC = ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy("basic") +) +ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy.BEARER = ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy("bearer") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_type.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_type.py new file mode 100644 index 0000000000..cc14a19467 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_destination_type.py @@ -0,0 +1,37 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ObservabilityPipelinePrometheusRemoteWriteDestinationType(ModelSimple): + """ + The destination type. The value should always be `prometheus_remote_write`. + + :param value: If omitted defaults to "prometheus_remote_write". Must be one of ["prometheus_remote_write"]. + :type value: str + """ + + allowed_values = { + "prometheus_remote_write", + } + PROMETHEUS_REMOTE_WRITE: ClassVar["ObservabilityPipelinePrometheusRemoteWriteDestinationType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelinePrometheusRemoteWriteDestinationType.PROMETHEUS_REMOTE_WRITE = ( + ObservabilityPipelinePrometheusRemoteWriteDestinationType("prometheus_remote_write") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source.py new file mode 100644 index 0000000000..eafc161fad --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source.py @@ -0,0 +1,130 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy, + ) + from datadog_api_client.v2.model.observability_pipeline_mtls_server_tls import ObservabilityPipelineMtlsServerTls + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_type import ( + ObservabilityPipelinePrometheusRemoteWriteSourceType, + ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_valid_token import ( + ObservabilityPipelinePrometheusRemoteWriteSourceValidToken, + ) + + +class ObservabilityPipelinePrometheusRemoteWriteSource(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy, + ) + from datadog_api_client.v2.model.observability_pipeline_mtls_server_tls import ( + ObservabilityPipelineMtlsServerTls, + ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_type import ( + ObservabilityPipelinePrometheusRemoteWriteSourceType, + ) + from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_valid_token import ( + ObservabilityPipelinePrometheusRemoteWriteSourceValidToken, + ) + + return { + "address_key": (str,), + "auth_strategy": (ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy,), + "id": (str,), + "password_key": (str,), + "path": (str,), + "tls": (ObservabilityPipelineMtlsServerTls,), + "type": (ObservabilityPipelinePrometheusRemoteWriteSourceType,), + "username_key": (str,), + "valid_tokens": ([ObservabilityPipelinePrometheusRemoteWriteSourceValidToken],), + } + + attribute_map = { + "address_key": "address_key", + "auth_strategy": "auth_strategy", + "id": "id", + "password_key": "password_key", + "path": "path", + "tls": "tls", + "type": "type", + "username_key": "username_key", + "valid_tokens": "valid_tokens", + } + + def __init__( + self_, + auth_strategy: ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy, + id: str, + path: str, + type: ObservabilityPipelinePrometheusRemoteWriteSourceType, + address_key: Union[str, UnsetType] = unset, + password_key: Union[str, UnsetType] = unset, + tls: Union[ObservabilityPipelineMtlsServerTls, UnsetType] = unset, + username_key: Union[str, UnsetType] = unset, + valid_tokens: Union[List[ObservabilityPipelinePrometheusRemoteWriteSourceValidToken], UnsetType] = unset, + **kwargs, + ): + """ + The ``prometheus_remote_write`` source ingests metrics pushed over the Prometheus Remote Write protocol. + + **Supported pipeline types:** metrics + + :param address_key: Name of the environment variable or secret that holds the listen address for the Prometheus Remote Write endpoint. + :type address_key: str, optional + + :param auth_strategy: HTTP authentication method. + :type auth_strategy: ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy + + :param id: 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). + :type id: str + + :param password_key: Name of the environment variable or secret that holds the password (used when ``auth_strategy`` is ``plain`` ). + :type password_key: str, optional + + :param path: The HTTP path on which the source listens for incoming Prometheus Remote Write requests. + :type path: str + + :param tls: Configuration for enabling TLS encryption between the pipeline component and external connecting clients. + :type tls: ObservabilityPipelineMtlsServerTls, optional + + :param type: The source type. The value should always be ``prometheus_remote_write``. + :type type: ObservabilityPipelinePrometheusRemoteWriteSourceType + + :param username_key: Name of the environment variable or secret that holds the username (used when ``auth_strategy`` is ``plain`` ). + :type username_key: str, optional + + :param valid_tokens: A list of tokens that are accepted for authenticating incoming requests. When set, + the source rejects any request whose token does not match an enabled entry in this list. + :type valid_tokens: [ObservabilityPipelinePrometheusRemoteWriteSourceValidToken], optional + """ + if address_key is not unset: + kwargs["address_key"] = address_key + if password_key is not unset: + kwargs["password_key"] = password_key + if tls is not unset: + kwargs["tls"] = tls + if username_key is not unset: + kwargs["username_key"] = username_key + if valid_tokens is not unset: + kwargs["valid_tokens"] = valid_tokens + super().__init__(kwargs) + + self_.auth_strategy = auth_strategy + self_.id = id + self_.path = path + self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_auth_strategy.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_auth_strategy.py new file mode 100644 index 0000000000..78c65c3c52 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_auth_strategy.py @@ -0,0 +1,42 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy(ModelSimple): + """ + HTTP authentication method. + + :param value: Must be one of ["none", "plain"]. + :type value: str + """ + + allowed_values = { + "none", + "plain", + } + NONE: ClassVar["ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy"] + PLAIN: ClassVar["ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy.NONE = ( + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy("none") +) +ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy.PLAIN = ( + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy("plain") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_type.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_type.py new file mode 100644 index 0000000000..305aefd82a --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_type.py @@ -0,0 +1,37 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class ObservabilityPipelinePrometheusRemoteWriteSourceType(ModelSimple): + """ + The source type. The value should always be `prometheus_remote_write`. + + :param value: If omitted defaults to "prometheus_remote_write". Must be one of ["prometheus_remote_write"]. + :type value: str + """ + + allowed_values = { + "prometheus_remote_write", + } + PROMETHEUS_REMOTE_WRITE: ClassVar["ObservabilityPipelinePrometheusRemoteWriteSourceType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +ObservabilityPipelinePrometheusRemoteWriteSourceType.PROMETHEUS_REMOTE_WRITE = ( + ObservabilityPipelinePrometheusRemoteWriteSourceType("prometheus_remote_write") +) diff --git a/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_valid_token.py b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_valid_token.py new file mode 100644 index 0000000000..d259244cb6 --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_prometheus_remote_write_source_valid_token.py @@ -0,0 +1,80 @@ +# 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 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token import ( + ObservabilityPipelineHttpServerSourceValidTokenPathToToken, + ) + from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token_header import ( + ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader, + ) + + +class ObservabilityPipelinePrometheusRemoteWriteSourceValidToken(ModelNormal): + validations = { + "token_key": {}, + } + + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_http_server_source_valid_token_path_to_token import ( + ObservabilityPipelineHttpServerSourceValidTokenPathToToken, + ) + + return { + "enabled": (bool,), + "path_to_token": (ObservabilityPipelineHttpServerSourceValidTokenPathToToken,), + "token_key": (str,), + } + + attribute_map = { + "enabled": "enabled", + "path_to_token": "path_to_token", + "token_key": "token_key", + } + + def __init__( + self_, + token_key: str, + enabled: Union[bool, UnsetType] = unset, + path_to_token: Union[ + ObservabilityPipelineHttpServerSourceValidTokenPathToToken, + str, + ObservabilityPipelineHttpServerSourceValidTokenPathToTokenHeader, + UnsetType, + ] = unset, + **kwargs, + ): + """ + An accepted token used to authenticate incoming Prometheus Remote Write requests. + + :param enabled: Indicates whether this token is currently accepted. Disabled tokens are rejected without + being removed from the configuration. + :type enabled: bool, optional + + :param path_to_token: Specifies where the worker extracts the token from in the incoming HTTP request. + This can be either a built-in location ( ``path`` or ``address`` ) or an HTTP header object. + :type path_to_token: ObservabilityPipelineHttpServerSourceValidTokenPathToToken, optional + + :param token_key: Name of the environment variable or secret that holds the expected token value. + :type token_key: str + """ + if enabled is not unset: + kwargs["enabled"] = enabled + if path_to_token is not unset: + kwargs["path_to_token"] = path_to_token + super().__init__(kwargs) + + self_.token_key = token_key diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index c302ef25e6..f4fae0e85a 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2659,7 +2659,6 @@ from datadog_api_client.v2.model.detailed_finding_type import DetailedFindingType from datadog_api_client.v2.model.device_attributes import DeviceAttributes from datadog_api_client.v2.model.device_attributes_interface_statuses import DeviceAttributesInterfaceStatuses -from datadog_api_client.v2.model.device_tags_by_source import DeviceTagsBySource from datadog_api_client.v2.model.devices_list_data import DevicesListData from datadog_api_client.v2.model.dns_metric_key import DnsMetricKey from datadog_api_client.v2.model.domain_allowlist import DomainAllowlist @@ -6505,6 +6504,27 @@ from datadog_api_client.v2.model.observability_pipeline_parse_xml_processor_type import ( ObservabilityPipelineParseXMLProcessorType, ) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination import ( + ObservabilityPipelinePrometheusRemoteWriteDestination, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_destination_type import ( + ObservabilityPipelinePrometheusRemoteWriteDestinationType, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source import ( + ObservabilityPipelinePrometheusRemoteWriteSource, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_auth_strategy import ( + ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_type import ( + ObservabilityPipelinePrometheusRemoteWriteSourceType, +) +from datadog_api_client.v2.model.observability_pipeline_prometheus_remote_write_source_valid_token import ( + ObservabilityPipelinePrometheusRemoteWriteSourceValidToken, +) from datadog_api_client.v2.model.observability_pipeline_quota_processor import ObservabilityPipelineQuotaProcessor from datadog_api_client.v2.model.observability_pipeline_quota_processor_limit import ( ObservabilityPipelineQuotaProcessorLimit, @@ -13505,7 +13525,6 @@ "DetailedFindingType", "DeviceAttributes", "DeviceAttributesInterfaceStatuses", - "DeviceTagsBySource", "DevicesListData", "DnsMetricKey", "DomainAllowlist", @@ -16129,6 +16148,13 @@ "ObservabilityPipelineParseJSONProcessorType", "ObservabilityPipelineParseXMLProcessor", "ObservabilityPipelineParseXMLProcessorType", + "ObservabilityPipelinePrometheusRemoteWriteDestination", + "ObservabilityPipelinePrometheusRemoteWriteDestinationAuthStrategy", + "ObservabilityPipelinePrometheusRemoteWriteDestinationType", + "ObservabilityPipelinePrometheusRemoteWriteSource", + "ObservabilityPipelinePrometheusRemoteWriteSourceAuthStrategy", + "ObservabilityPipelinePrometheusRemoteWriteSourceType", + "ObservabilityPipelinePrometheusRemoteWriteSourceValidToken", "ObservabilityPipelineQuotaProcessor", "ObservabilityPipelineQuotaProcessorLimit", "ObservabilityPipelineQuotaProcessorLimitEnforceType",