From cb46fc80c5005dcaf1005de0a4496efe46d9fdd2 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 24 Nov 2025 16:14:38 +0000 Subject: [PATCH] Regenerate client from commit 7d1dff0 of spec repo --- .generator/schemas/v2/openapi.yaml | 330 +++++++++--------- docs/datadog_api_client.v2.model.rst | 7 + .../observability-pipelines/CreatePipeline.py | 19 +- .../observability-pipelines/UpdatePipeline.py | 19 +- .../ValidatePipeline.py | 19 +- ...ability_pipeline_add_env_vars_processor.py | 14 +- ...rvability_pipeline_add_fields_processor.py | 14 +- .../v2/model/observability_pipeline_config.py | 83 +---- ...ability_pipeline_config_processor_group.py | 140 ++++++++ ...vability_pipeline_config_processor_item.py | 10 +- ...observability_pipeline_custom_processor.py | 14 +- ...ability_pipeline_custom_processor_remap.py | 18 +- ...ability_pipeline_datadog_tags_processor.py | 14 +- ...observability_pipeline_dedupe_processor.py | 14 +- ...ity_pipeline_enrichment_table_processor.py | 16 +- ...observability_pipeline_filter_processor.py | 18 +- ...ity_pipeline_generate_metrics_processor.py | 32 +- ...vability_pipeline_ocsf_mapper_processor.py | 14 +- ...rvability_pipeline_parse_grok_processor.py | 14 +- ...rvability_pipeline_parse_json_processor.py | 16 +- .../observability_pipeline_quota_processor.py | 21 +- ...observability_pipeline_reduce_processor.py | 14 +- ...bility_pipeline_remove_fields_processor.py | 14 +- ...bility_pipeline_rename_fields_processor.py | 14 +- ...observability_pipeline_sample_processor.py | 16 +- ...peline_sensitive_data_scanner_processor.py | 14 +- ...servability_pipeline_throttle_processor.py | 14 +- src/datadog_api_client/v2/models/__init__.py | 4 + .../features/observability_pipelines.feature | 18 +- 29 files changed, 539 insertions(+), 415 deletions(-) create mode 100644 src/datadog_api_client/v2/model/observability_pipeline_config_processor_group.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb71549..fc3a210f6f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -33549,6 +33549,10 @@ components: description: The `add_env_vars` processor adds environment variable values to log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this processor in the pipeline. @@ -33559,14 +33563,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineAddEnvVarsProcessorType' variables: @@ -33578,8 +33574,8 @@ components: - id - type - include - - inputs - variables + - enabled type: object ObservabilityPipelineAddEnvVarsProcessorType: default: add_env_vars @@ -33608,6 +33604,10 @@ components: ObservabilityPipelineAddFieldsProcessor: description: The `add_fields` processor adds static key-value fields to logs. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of static fields (key-value pairs) that is added to each log event processed by this component. @@ -33625,14 +33625,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineAddFieldsProcessorType' required: @@ -33640,7 +33632,7 @@ components: - type - include - fields - - inputs + - enabled type: object ObservabilityPipelineAddFieldsProcessorType: default: add_fields @@ -33943,15 +33935,20 @@ components: $ref: '#/components/schemas/ObservabilityPipelineConfigDestinationItem' type: array processors: - description: A list of processors that transform or enrich log data. + description: A list of processor groups that transform or enrich log data. example: - - id: filter-processor + - enabled: true + id: my-processor-group include: service:my-service inputs: - datadog-agent-source - type: filter + processors: + - enabled: true + id: filter-processor + include: status:error + type: filter items: - $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorItem' + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorGroup' type: array sources: description: A list of configured data sources for the pipeline. @@ -33987,6 +33984,68 @@ components: - $ref: '#/components/schemas/ObservabilityPipelineAmazonSecurityLakeDestination' - $ref: '#/components/schemas/ObservabilityPipelineCrowdStrikeNextGenSiemDestination' - $ref: '#/components/schemas/ObservabilityPipelineGooglePubSubDestination' + ObservabilityPipelineConfigProcessorGroup: + description: A group of processors. + example: + id: my-processor-group + include: service:my-service + inputs: + - datadog-agent-source + processors: + - fields: + - name: env + value: prod + id: add-fields-processor + include: '*' + type: add_fields + - id: filter-processor + include: status:error + type: filter + properties: + enabled: + description: Whether this processor group is enabled. + example: true + type: boolean + id: + description: The unique identifier for the processor group. + example: grouped-processors + type: string + include: + description: Conditional expression for when this processor group should + execute. + example: service:my-service + type: string + inputs: + description: A list of component IDs whose output is used as the input for + this processor group. + example: + - datadog-agent-source + items: + type: string + type: array + processors: + description: Processors applied sequentially within this group. Events flow + through each processor in order. + example: + - fields: + - name: env + value: prod + id: add-fields-processor + include: '*' + type: add_fields + - id: filter-processor + include: status:error + type: filter + items: + $ref: '#/components/schemas/ObservabilityPipelineConfigProcessorItem' + type: array + required: + - id + - include + - inputs + - processors + - enabled + type: object ObservabilityPipelineConfigProcessorItem: description: A processor for the pipeline. oneOf: @@ -34104,6 +34163,10 @@ components: Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with advanced filtering capabilities. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this processor. example: remap-vrl-processor @@ -34115,14 +34178,6 @@ components: processor. example: '*' type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - datadog-agent-source - items: - type: string - type: array remaps: description: Array of VRL remap rules. items: @@ -34136,7 +34191,7 @@ components: - type - include - remaps - - inputs + - enabled type: object ObservabilityPipelineCustomProcessorRemap: description: Defines a single VRL remap rule with its own filtering and transformation @@ -34167,7 +34222,6 @@ components: - include - name - source - - enabled - drop_on_error type: object ObservabilityPipelineCustomProcessorType: @@ -34276,6 +34330,10 @@ components: properties: action: $ref: '#/components/schemas/ObservabilityPipelineDatadogTagsProcessorAction' + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -34287,14 +34345,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array keys: description: A list of tag keys. example: @@ -34315,7 +34365,7 @@ components: - mode - action - keys - - inputs + - enabled type: object ObservabilityPipelineDatadogTagsProcessorAction: description: The action to take on tags with matching keys. @@ -34361,6 +34411,10 @@ components: ObservabilityPipelineDedupeProcessor: description: The `dedupe` processor removes duplicate fields in log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of log field paths to check for duplicates. example: @@ -34378,14 +34432,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - parse-json-processor - items: - type: string - type: array mode: $ref: '#/components/schemas/ObservabilityPipelineDedupeProcessorMode' type: @@ -34394,9 +34440,9 @@ components: - id - type - include - - inputs - fields - mode + - enabled type: object ObservabilityPipelineDedupeProcessorMode: description: The deduplication mode to apply to the fields. @@ -34602,6 +34648,10 @@ components: description: The `enrichment_table` processor enriches logs using a static CSV file or GeoIP database. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean file: $ref: '#/components/schemas/ObservabilityPipelineEnrichmentTableFile' geoip: @@ -34615,14 +34665,6 @@ components: targets. example: source:my-source type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - add-fields-processor - items: - type: string - type: array target: description: Path where enrichment results should be stored in the log. example: enriched.geoip @@ -34633,8 +34675,8 @@ components: - id - type - include - - inputs - target + - enabled type: object ObservabilityPipelineEnrichmentTableProcessorType: default: enrichment_table @@ -34665,6 +34707,10 @@ components: on a Datadog search query. Logs that match the `include` query are passed through; others are discarded. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -34677,21 +34723,13 @@ components: components; others are dropped. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineFilterProcessorType' required: - id - type - include - - inputs + - enabled type: object ObservabilityPipelineFilterProcessorType: default: filter @@ -34771,6 +34809,10 @@ components: Metrics can be counters, gauges, or distributions and optionally grouped by log fields.' properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline. @@ -34781,14 +34823,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this processor. - example: - - source-id - items: - type: string - type: array metrics: description: Configuration for generating individual metrics. items: @@ -34799,9 +34833,7 @@ components: required: - id - type - - inputs - - include - - metrics + - enabled type: object ObservabilityPipelineGenerateMetricsProcessorType: default: generate_datadog_metrics @@ -35398,6 +35430,10 @@ components: description: The `ocsf_mapper` processor transforms logs into the OCSF schema using a predefined mapping configuration. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline. @@ -35408,14 +35444,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this processor. - example: - - filter-processor - items: - type: string - type: array mappings: description: A list of mapping rules to convert events to the OCSF format. items: @@ -35427,8 +35455,8 @@ components: - id - type - include - - inputs - mappings + - enabled type: object ObservabilityPipelineOcsfMapperProcessorMapping: description: Defines how specific events are transformed to OCSF using a mapping @@ -35533,6 +35561,10 @@ components: by Datadog. example: true type: boolean + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: A unique identifier for this processor. example: parse-grok-processor @@ -35542,14 +35574,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array rules: description: The list of Grok parsing rules. If multiple matching rules are provided, they are evaluated in order. The first successful match @@ -35563,8 +35587,8 @@ components: - id - type - include - - inputs - rules + - enabled type: object ObservabilityPipelineParseGrokProcessorRule: description: 'A Grok parsing rule used in the `parse_grok` processor. Each rule @@ -35649,6 +35673,10 @@ components: and flattens it into the event. This is useful when logs contain embedded JSON as a string. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean field: description: The name of the log field that contains a JSON string. example: message @@ -35664,14 +35692,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineParseJSONProcessorType' required: @@ -35679,7 +35699,7 @@ components: - type - include - field - - inputs + - enabled type: object ObservabilityPipelineParseJSONProcessorType: default: parse_json @@ -35712,6 +35732,10 @@ components: the filter query continue through the pipeline. example: false type: boolean + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -35727,14 +35751,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array limit: $ref: '#/components/schemas/ObservabilityPipelineQuotaProcessorLimit' name: @@ -35764,9 +35780,8 @@ components: - type - include - name - - drop_events - limit - - inputs + - enabled type: object ObservabilityPipelineQuotaProcessorLimit: description: The maximum amount of data or number of events allowed before the @@ -35842,6 +35857,10 @@ components: description: The `reduce` processor aggregates and merges logs based on matching keys and merge strategies. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean group_by: description: A list of fields used to group log events for merging. example: @@ -35859,14 +35878,6 @@ components: targets. example: env:prod type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - parse-json-processor - items: - type: string - type: array merge_strategies: description: List of merge strategies defining how values from grouped events should be combined. @@ -35879,9 +35890,9 @@ components: - id - type - include - - inputs - group_by - merge_strategies + - enabled type: object ObservabilityPipelineReduceProcessorMergeStrategy: description: Defines how a specific field should be merged across grouped events. @@ -35938,6 +35949,10 @@ components: ObservabilityPipelineRemoveFieldsProcessor: description: The `remove_fields` processor deletes specified fields from logs. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of field names to be removed from each log event. example: @@ -35957,13 +35972,6 @@ components: targets. example: service:my-service type: string - inputs: - description: The `PipelineRemoveFieldsProcessor` `inputs`. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineRemoveFieldsProcessorType' required: @@ -35971,7 +35979,7 @@ components: - type - include - fields - - inputs + - enabled type: object ObservabilityPipelineRemoveFieldsProcessorType: default: remove_fields @@ -35985,6 +35993,10 @@ components: ObservabilityPipelineRenameFieldsProcessor: description: The `rename_fields` processor changes field names. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean fields: description: A list of rename rules specifying which fields to rename in the event, what to rename them to, and whether to preserve the original @@ -36003,14 +36015,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array type: $ref: '#/components/schemas/ObservabilityPipelineRenameFieldsProcessorType' required: @@ -36018,7 +36022,7 @@ components: - type - include - fields - - inputs + - enabled type: object ObservabilityPipelineRenameFieldsProcessorField: description: Defines how to rename a field in log events. @@ -36124,6 +36128,10 @@ components: description: The `sample` processor allows probabilistic sampling of logs at a fixed rate. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` @@ -36135,14 +36143,6 @@ components: targets. example: service:my-service type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - datadog-agent-source - items: - type: string - type: array percentage: description: The percentage of logs to sample. example: 10.0 @@ -36160,7 +36160,7 @@ components: - id - type - include - - inputs + - enabled type: object ObservabilityPipelineSampleProcessorType: default: sample @@ -36175,6 +36175,10 @@ components: description: The `sensitive_data_scanner` processor detects and optionally redacts sensitive data in log events. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean id: description: The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream @@ -36186,14 +36190,6 @@ components: targets. example: source:prod type: string - inputs: - description: A list of component IDs whose output is used as the `input` - for this component. - example: - - parse-json-processor - items: - type: string - type: array rules: description: A list of rules for identifying and acting on sensitive data patterns. @@ -36206,8 +36202,8 @@ components: - id - type - include - - inputs - rules + - enabled type: object ObservabilityPipelineSensitiveDataScannerProcessorAction: description: Defines what action to take when sensitive data is matched. @@ -37168,6 +37164,10 @@ components: description: The `throttle` processor limits the number of events that pass through over a given time window. properties: + enabled: + description: Whether this processor is enabled. + example: true + type: boolean group_by: description: Optional list of fields used to group events before the threshold has been reached. @@ -37185,14 +37185,6 @@ components: targets. example: env:prod type: string - inputs: - description: A list of component IDs whose output is used as the input for - this processor. - example: - - datadog-agent-source - items: - type: string - type: array threshold: description: the number of events allowed in a given time window. Events sent after the threshold has been reached, are dropped. @@ -37210,9 +37202,9 @@ components: - id - type - include - - inputs - threshold - window + - enabled type: object ObservabilityPipelineThrottleProcessorType: default: throttle diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 60fdfd49e2..5ed62fd0e6 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -14823,6 +14823,13 @@ datadog\_api\_client.v2.model.observability\_pipeline\_config\_destination\_item :members: :show-inheritance: +datadog\_api\_client.v2.model.observability\_pipeline\_config\_processor\_group module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.observability_pipeline_config_processor_group + :members: + :show-inheritance: + datadog\_api\_client.v2.model.observability\_pipeline\_config\_processor\_item module ------------------------------------------------------------------------------------- diff --git a/examples/v2/observability-pipelines/CreatePipeline.py b/examples/v2/observability-pipelines/CreatePipeline.py index a6303525e7..87b50b26c0 100644 --- a/examples/v2/observability-pipelines/CreatePipeline.py +++ b/examples/v2/observability-pipelines/CreatePipeline.py @@ -5,6 +5,9 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( ObservabilityPipelineDatadogAgentSource, @@ -33,19 +36,27 @@ ObservabilityPipelineDatadogLogsDestination( id="datadog-logs-destination", inputs=[ - "filter-processor", + "my-processor-group", ], type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS, ), ], processors=[ - ObservabilityPipelineFilterProcessor( - id="filter-processor", + ObservabilityPipelineConfigProcessorGroup( + enabled=True, + id="my-processor-group", include="service:my-service", inputs=[ "datadog-agent-source", ], - type=ObservabilityPipelineFilterProcessorType.FILTER, + processors=[ + ObservabilityPipelineFilterProcessor( + enabled=True, + id="filter-processor", + include="status:error", + type=ObservabilityPipelineFilterProcessorType.FILTER, + ), + ], ), ], sources=[ diff --git a/examples/v2/observability-pipelines/UpdatePipeline.py b/examples/v2/observability-pipelines/UpdatePipeline.py index 9d036b867c..c8e05195fa 100644 --- a/examples/v2/observability-pipelines/UpdatePipeline.py +++ b/examples/v2/observability-pipelines/UpdatePipeline.py @@ -7,6 +7,9 @@ from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi from datadog_api_client.v2.model.observability_pipeline import ObservabilityPipeline from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) from datadog_api_client.v2.model.observability_pipeline_data import ObservabilityPipelineData from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( @@ -37,19 +40,27 @@ ObservabilityPipelineDatadogLogsDestination( id="updated-datadog-logs-destination-id", inputs=[ - "filter-processor", + "my-processor-group", ], type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS, ), ], processors=[ - ObservabilityPipelineFilterProcessor( - id="filter-processor", + ObservabilityPipelineConfigProcessorGroup( + enabled=True, + id="my-processor-group", include="service:my-service", inputs=[ "datadog-agent-source", ], - type=ObservabilityPipelineFilterProcessorType.FILTER, + processors=[ + ObservabilityPipelineFilterProcessor( + enabled=True, + id="filter-processor", + include="status:error", + type=ObservabilityPipelineFilterProcessorType.FILTER, + ), + ], ), ], sources=[ diff --git a/examples/v2/observability-pipelines/ValidatePipeline.py b/examples/v2/observability-pipelines/ValidatePipeline.py index 31cd6775b3..a55d4a6368 100644 --- a/examples/v2/observability-pipelines/ValidatePipeline.py +++ b/examples/v2/observability-pipelines/ValidatePipeline.py @@ -5,6 +5,9 @@ from datadog_api_client import ApiClient, Configuration from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi from datadog_api_client.v2.model.observability_pipeline_config import ObservabilityPipelineConfig +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) from datadog_api_client.v2.model.observability_pipeline_data_attributes import ObservabilityPipelineDataAttributes from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( ObservabilityPipelineDatadogAgentSource, @@ -33,19 +36,27 @@ ObservabilityPipelineDatadogLogsDestination( id="datadog-logs-destination", inputs=[ - "filter-processor", + "my-processor-group", ], type=ObservabilityPipelineDatadogLogsDestinationType.DATADOG_LOGS, ), ], processors=[ - ObservabilityPipelineFilterProcessor( - id="filter-processor", + ObservabilityPipelineConfigProcessorGroup( + enabled=True, + id="my-processor-group", include="service:my-service", inputs=[ "datadog-agent-source", ], - type=ObservabilityPipelineFilterProcessorType.FILTER, + processors=[ + ObservabilityPipelineFilterProcessor( + enabled=True, + id="filter-processor", + include="status:error", + type=ObservabilityPipelineFilterProcessorType.FILTER, + ), + ], ), ], sources=[ diff --git a/src/datadog_api_client/v2/model/observability_pipeline_add_env_vars_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_add_env_vars_processor.py index ab11ebe286..879b74ebce 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_add_env_vars_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_add_env_vars_processor.py @@ -31,26 +31,26 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineAddEnvVarsProcessorType,), "variables": ([ObservabilityPipelineAddEnvVarsProcessorVariable],), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", "variables": "variables", } def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], type: ObservabilityPipelineAddEnvVarsProcessorType, variables: List[ObservabilityPipelineAddEnvVarsProcessorVariable], **kwargs, @@ -58,15 +58,15 @@ def __init__( """ The ``add_env_vars`` processor adds environment variable values to log events. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this processor in the pipeline. :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param type: The processor type. The value should always be ``add_env_vars``. :type type: ObservabilityPipelineAddEnvVarsProcessorType @@ -75,8 +75,8 @@ def __init__( """ super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.type = type self_.variables = variables diff --git a/src/datadog_api_client/v2/model/observability_pipeline_add_fields_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_add_fields_processor.py index 023b7a6d57..229c27128d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_add_fields_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_add_fields_processor.py @@ -27,33 +27,36 @@ def openapi_types(_): ) return { + "enabled": (bool,), "fields": ([ObservabilityPipelineFieldValue],), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineAddFieldsProcessorType,), } attribute_map = { + "enabled": "enabled", "fields": "fields", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", } def __init__( self_, + enabled: bool, fields: List[ObservabilityPipelineFieldValue], id: str, include: str, - inputs: List[str], type: ObservabilityPipelineAddFieldsProcessorType, **kwargs, ): """ The ``add_fields`` processor adds static key-value fields to logs. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param fields: A list of static fields (key-value pairs) that is added to each log event processed by this component. :type fields: [ObservabilityPipelineFieldValue] @@ -63,16 +66,13 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param type: The processor type. The value should always be ``add_fields``. :type type: ObservabilityPipelineAddFieldsProcessorType """ super().__init__(kwargs) + self_.enabled = enabled self_.fields = fields self_.id = id self_.include = include - self_.inputs = inputs self_.type = type 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 e612d38a2c..48cf842a5d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config.py @@ -17,8 +17,8 @@ from datadog_api_client.v2.model.observability_pipeline_config_destination_item import ( ObservabilityPipelineConfigDestinationItem, ) - from datadog_api_client.v2.model.observability_pipeline_config_processor_item import ( - ObservabilityPipelineConfigProcessorItem, + from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, ) from datadog_api_client.v2.model.observability_pipeline_config_source_item import ( ObservabilityPipelineConfigSourceItem, @@ -76,48 +76,6 @@ from datadog_api_client.v2.model.observability_pipeline_google_pub_sub_destination import ( ObservabilityPipelineGooglePubSubDestination, ) - from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor - from datadog_api_client.v2.model.observability_pipeline_parse_json_processor import ( - ObservabilityPipelineParseJSONProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_quota_processor import ObservabilityPipelineQuotaProcessor - from datadog_api_client.v2.model.observability_pipeline_add_fields_processor import ( - ObservabilityPipelineAddFieldsProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_remove_fields_processor import ( - ObservabilityPipelineRemoveFieldsProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_rename_fields_processor import ( - ObservabilityPipelineRenameFieldsProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_generate_metrics_processor import ( - ObservabilityPipelineGenerateMetricsProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_sample_processor import ObservabilityPipelineSampleProcessor - from datadog_api_client.v2.model.observability_pipeline_parse_grok_processor import ( - ObservabilityPipelineParseGrokProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_sensitive_data_scanner_processor import ( - ObservabilityPipelineSensitiveDataScannerProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_ocsf_mapper_processor import ( - ObservabilityPipelineOcsfMapperProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_add_env_vars_processor import ( - ObservabilityPipelineAddEnvVarsProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_dedupe_processor import ObservabilityPipelineDedupeProcessor - from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor import ( - ObservabilityPipelineEnrichmentTableProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_reduce_processor import ObservabilityPipelineReduceProcessor - from datadog_api_client.v2.model.observability_pipeline_throttle_processor import ( - ObservabilityPipelineThrottleProcessor, - ) - from datadog_api_client.v2.model.observability_pipeline_custom_processor import ObservabilityPipelineCustomProcessor - from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor import ( - ObservabilityPipelineDatadogTagsProcessor, - ) from datadog_api_client.v2.model.observability_pipeline_kafka_source import ObservabilityPipelineKafkaSource from datadog_api_client.v2.model.observability_pipeline_datadog_agent_source import ( ObservabilityPipelineDatadogAgentSource, @@ -160,8 +118,8 @@ def openapi_types(_): from datadog_api_client.v2.model.observability_pipeline_config_destination_item import ( ObservabilityPipelineConfigDestinationItem, ) - from datadog_api_client.v2.model.observability_pipeline_config_processor_item import ( - ObservabilityPipelineConfigProcessorItem, + from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, ) from datadog_api_client.v2.model.observability_pipeline_config_source_item import ( ObservabilityPipelineConfigSourceItem, @@ -169,7 +127,7 @@ def openapi_types(_): return { "destinations": ([ObservabilityPipelineConfigDestinationItem],), - "processors": ([ObservabilityPipelineConfigProcessorItem],), + "processors": ([ObservabilityPipelineConfigProcessorGroup],), "sources": ([ObservabilityPipelineConfigSourceItem],), } @@ -226,32 +184,7 @@ def __init__( ObservabilityPipelineSocketSource, ] ], - processors: Union[ - List[ - Union[ - ObservabilityPipelineConfigProcessorItem, - ObservabilityPipelineFilterProcessor, - ObservabilityPipelineParseJSONProcessor, - ObservabilityPipelineQuotaProcessor, - ObservabilityPipelineAddFieldsProcessor, - ObservabilityPipelineRemoveFieldsProcessor, - ObservabilityPipelineRenameFieldsProcessor, - ObservabilityPipelineGenerateMetricsProcessor, - ObservabilityPipelineSampleProcessor, - ObservabilityPipelineParseGrokProcessor, - ObservabilityPipelineSensitiveDataScannerProcessor, - ObservabilityPipelineOcsfMapperProcessor, - ObservabilityPipelineAddEnvVarsProcessor, - ObservabilityPipelineDedupeProcessor, - ObservabilityPipelineEnrichmentTableProcessor, - ObservabilityPipelineReduceProcessor, - ObservabilityPipelineThrottleProcessor, - ObservabilityPipelineCustomProcessor, - ObservabilityPipelineDatadogTagsProcessor, - ] - ], - UnsetType, - ] = unset, + processors: Union[List[ObservabilityPipelineConfigProcessorGroup], UnsetType] = unset, **kwargs, ): """ @@ -260,8 +193,8 @@ def __init__( :param destinations: A list of destination components where processed logs are sent. :type destinations: [ObservabilityPipelineConfigDestinationItem] - :param processors: A list of processors that transform or enrich log data. - :type processors: [ObservabilityPipelineConfigProcessorItem], optional + :param processors: A list of processor groups that transform or enrich log data. + :type processors: [ObservabilityPipelineConfigProcessorGroup], optional :param sources: A list of configured data sources for the pipeline. :type sources: [ObservabilityPipelineConfigSourceItem] diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_group.py b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_group.py new file mode 100644 index 0000000000..badfa9c4bb --- /dev/null +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_group.py @@ -0,0 +1,140 @@ +# 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, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.observability_pipeline_config_processor_item import ( + ObservabilityPipelineConfigProcessorItem, + ) + from datadog_api_client.v2.model.observability_pipeline_filter_processor import ObservabilityPipelineFilterProcessor + from datadog_api_client.v2.model.observability_pipeline_parse_json_processor import ( + ObservabilityPipelineParseJSONProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_quota_processor import ObservabilityPipelineQuotaProcessor + from datadog_api_client.v2.model.observability_pipeline_add_fields_processor import ( + ObservabilityPipelineAddFieldsProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_remove_fields_processor import ( + ObservabilityPipelineRemoveFieldsProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_rename_fields_processor import ( + ObservabilityPipelineRenameFieldsProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_generate_metrics_processor import ( + ObservabilityPipelineGenerateMetricsProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_sample_processor import ObservabilityPipelineSampleProcessor + from datadog_api_client.v2.model.observability_pipeline_parse_grok_processor import ( + ObservabilityPipelineParseGrokProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_sensitive_data_scanner_processor import ( + ObservabilityPipelineSensitiveDataScannerProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_ocsf_mapper_processor import ( + ObservabilityPipelineOcsfMapperProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_add_env_vars_processor import ( + ObservabilityPipelineAddEnvVarsProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_dedupe_processor import ObservabilityPipelineDedupeProcessor + from datadog_api_client.v2.model.observability_pipeline_enrichment_table_processor import ( + ObservabilityPipelineEnrichmentTableProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_reduce_processor import ObservabilityPipelineReduceProcessor + from datadog_api_client.v2.model.observability_pipeline_throttle_processor import ( + ObservabilityPipelineThrottleProcessor, + ) + from datadog_api_client.v2.model.observability_pipeline_custom_processor import ObservabilityPipelineCustomProcessor + from datadog_api_client.v2.model.observability_pipeline_datadog_tags_processor import ( + ObservabilityPipelineDatadogTagsProcessor, + ) + + +class ObservabilityPipelineConfigProcessorGroup(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.observability_pipeline_config_processor_item import ( + ObservabilityPipelineConfigProcessorItem, + ) + + return { + "enabled": (bool,), + "id": (str,), + "include": (str,), + "inputs": ([str],), + "processors": ([ObservabilityPipelineConfigProcessorItem],), + } + + attribute_map = { + "enabled": "enabled", + "id": "id", + "include": "include", + "inputs": "inputs", + "processors": "processors", + } + + def __init__( + self_, + enabled: bool, + id: str, + include: str, + inputs: List[str], + processors: List[ + Union[ + ObservabilityPipelineConfigProcessorItem, + ObservabilityPipelineFilterProcessor, + ObservabilityPipelineParseJSONProcessor, + ObservabilityPipelineQuotaProcessor, + ObservabilityPipelineAddFieldsProcessor, + ObservabilityPipelineRemoveFieldsProcessor, + ObservabilityPipelineRenameFieldsProcessor, + ObservabilityPipelineGenerateMetricsProcessor, + ObservabilityPipelineSampleProcessor, + ObservabilityPipelineParseGrokProcessor, + ObservabilityPipelineSensitiveDataScannerProcessor, + ObservabilityPipelineOcsfMapperProcessor, + ObservabilityPipelineAddEnvVarsProcessor, + ObservabilityPipelineDedupeProcessor, + ObservabilityPipelineEnrichmentTableProcessor, + ObservabilityPipelineReduceProcessor, + ObservabilityPipelineThrottleProcessor, + ObservabilityPipelineCustomProcessor, + ObservabilityPipelineDatadogTagsProcessor, + ] + ], + **kwargs, + ): + """ + A group of processors. + + :param enabled: Whether this processor group is enabled. + :type enabled: bool + + :param id: The unique identifier for the processor group. + :type id: str + + :param include: Conditional expression for when this processor group should execute. + :type include: str + + :param inputs: A list of component IDs whose output is used as the input for this processor group. + :type inputs: [str] + + :param processors: Processors applied sequentially within this group. Events flow through each processor in order. + :type processors: [ObservabilityPipelineConfigProcessorItem] + """ + super().__init__(kwargs) + + self_.enabled = enabled + self_.id = id + self_.include = include + self_.inputs = inputs + self_.processors = processors diff --git a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py index 7c57096d1a..fc1d8480e7 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_config_processor_item.py @@ -15,15 +15,15 @@ def __init__(self, **kwargs): """ A processor for the pipeline. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the `input` to downstream components). :type id: str :param include: A Datadog search query used to determine which logs should pass through the filter. Logs that match this query continue to downstream components; others are dropped. :type include: str - :param inputs: A list of component IDs whose output is used as the `input` for this component. - :type inputs: [str] - :param type: The processor type. The value should always be `filter`. :type type: ObservabilityPipelineFilterProcessorType @@ -31,7 +31,7 @@ def __init__(self, **kwargs): :type field: str :param drop_events: If set to `true`, logs that matched the quota filter and sent after the quota has been met are dropped; only logs that did not match the filter query continue through the pipeline. - :type drop_events: bool + :type drop_events: bool, optional :param ignore_when_missing_partitions: If `true`, the processor skips quota checks when partition fields are missing from the logs. :type ignore_when_missing_partitions: bool, optional @@ -58,7 +58,7 @@ def __init__(self, **kwargs): :type fields: [ObservabilityPipelineFieldValue] :param metrics: Configuration for generating individual metrics. - :type metrics: [ObservabilityPipelineGeneratedMetric] + :type metrics: [ObservabilityPipelineGeneratedMetric], optional :param percentage: The percentage of logs to sample. :type percentage: float, optional diff --git a/src/datadog_api_client/v2/model/observability_pipeline_custom_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_custom_processor.py index 214d511ebc..4219ae2d87 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_custom_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_custom_processor.py @@ -37,25 +37,25 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "remaps": ([ObservabilityPipelineCustomProcessorRemap],), "type": (ObservabilityPipelineCustomProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "remaps": "remaps", "type": "type", } def __init__( self_, + enabled: bool, id: str, - inputs: List[str], remaps: List[ObservabilityPipelineCustomProcessorRemap], type: ObservabilityPipelineCustomProcessorType, **kwargs, @@ -63,15 +63,15 @@ def __init__( """ The ``custom_processor`` processor transforms events using `Vector Remap Language (VRL) `_ scripts with advanced filtering capabilities. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this processor. :type id: str :param include: A Datadog search query used to determine which logs this processor targets. This field should always be set to ``*`` for the custom_processor processor. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param remaps: Array of VRL remap rules. :type remaps: [ObservabilityPipelineCustomProcessorRemap] @@ -81,8 +81,8 @@ def __init__( super().__init__(kwargs) include = kwargs.get("include", "*") + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.remaps = remaps self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_custom_processor_remap.py b/src/datadog_api_client/v2/model/observability_pipeline_custom_processor_remap.py index ab063499f6..601b381d70 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_custom_processor_remap.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_custom_processor_remap.py @@ -3,10 +3,13 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations +from typing import Union from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) @@ -29,7 +32,15 @@ def openapi_types(_): "source": "source", } - def __init__(self_, drop_on_error: bool, enabled: bool, include: str, name: str, source: str, **kwargs): + def __init__( + self_, + drop_on_error: bool, + include: str, + name: str, + source: str, + enabled: Union[bool, UnsetType] = unset, + **kwargs, + ): """ Defines a single VRL remap rule with its own filtering and transformation logic. @@ -37,7 +48,7 @@ def __init__(self_, drop_on_error: bool, enabled: bool, include: str, name: str, :type drop_on_error: bool :param enabled: Whether this remap rule is enabled. - :type enabled: bool + :type enabled: bool, optional :param include: A Datadog search query used to filter events for this specific remap rule. :type include: str @@ -48,10 +59,11 @@ def __init__(self_, drop_on_error: bool, enabled: bool, include: str, name: str, :param source: The VRL script source code that defines the processing logic. :type source: str """ + if enabled is not unset: + kwargs["enabled"] = enabled super().__init__(kwargs) self_.drop_on_error = drop_on_error - self_.enabled = enabled self_.include = include self_.name = name self_.source = source diff --git a/src/datadog_api_client/v2/model/observability_pipeline_datadog_tags_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_datadog_tags_processor.py index 23cedc4d69..8864ee8c29 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_datadog_tags_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_datadog_tags_processor.py @@ -38,9 +38,9 @@ def openapi_types(_): return { "action": (ObservabilityPipelineDatadogTagsProcessorAction,), + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "keys": ([str],), "mode": (ObservabilityPipelineDatadogTagsProcessorMode,), "type": (ObservabilityPipelineDatadogTagsProcessorType,), @@ -48,9 +48,9 @@ def openapi_types(_): attribute_map = { "action": "action", + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "keys": "keys", "mode": "mode", "type": "type", @@ -59,9 +59,9 @@ def openapi_types(_): def __init__( self_, action: ObservabilityPipelineDatadogTagsProcessorAction, + enabled: bool, id: str, include: str, - inputs: List[str], keys: List[str], mode: ObservabilityPipelineDatadogTagsProcessorMode, type: ObservabilityPipelineDatadogTagsProcessorType, @@ -73,15 +73,15 @@ def __init__( :param action: The action to take on tags with matching keys. :type action: ObservabilityPipelineDatadogTagsProcessorAction + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the ``input`` to downstream components). :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param keys: A list of tag keys. :type keys: [str] @@ -94,9 +94,9 @@ def __init__( super().__init__(kwargs) self_.action = action + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.keys = keys self_.mode = mode self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_dedupe_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_dedupe_processor.py index 9021940cfc..e4abb6a8ff 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_dedupe_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_dedupe_processor.py @@ -31,29 +31,29 @@ def openapi_types(_): ) return { + "enabled": (bool,), "fields": ([str],), "id": (str,), "include": (str,), - "inputs": ([str],), "mode": (ObservabilityPipelineDedupeProcessorMode,), "type": (ObservabilityPipelineDedupeProcessorType,), } attribute_map = { + "enabled": "enabled", "fields": "fields", "id": "id", "include": "include", - "inputs": "inputs", "mode": "mode", "type": "type", } def __init__( self_, + enabled: bool, fields: List[str], id: str, include: str, - inputs: List[str], mode: ObservabilityPipelineDedupeProcessorMode, type: ObservabilityPipelineDedupeProcessorType, **kwargs, @@ -61,6 +61,9 @@ def __init__( """ The ``dedupe`` processor removes duplicate fields in log events. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param fields: A list of log field paths to check for duplicates. :type fields: [str] @@ -70,9 +73,6 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param mode: The deduplication mode to apply to the fields. :type mode: ObservabilityPipelineDedupeProcessorMode @@ -81,9 +81,9 @@ def __init__( """ super().__init__(kwargs) + self_.enabled = enabled self_.fields = fields self_.id = id self_.include = include - self_.inputs = inputs self_.mode = mode self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py index 480f484822..2bc18bd802 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_enrichment_table_processor.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union, TYPE_CHECKING +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -39,30 +39,30 @@ def openapi_types(_): ) return { + "enabled": (bool,), "file": (ObservabilityPipelineEnrichmentTableFile,), "geoip": (ObservabilityPipelineEnrichmentTableGeoIp,), "id": (str,), "include": (str,), - "inputs": ([str],), "target": (str,), "type": (ObservabilityPipelineEnrichmentTableProcessorType,), } attribute_map = { + "enabled": "enabled", "file": "file", "geoip": "geoip", "id": "id", "include": "include", - "inputs": "inputs", "target": "target", "type": "type", } def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], target: str, type: ObservabilityPipelineEnrichmentTableProcessorType, file: Union[ObservabilityPipelineEnrichmentTableFile, UnsetType] = unset, @@ -72,6 +72,9 @@ def __init__( """ The ``enrichment_table`` processor enriches logs using a static CSV file or GeoIP database. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param file: Defines a static enrichment table loaded from a CSV file. :type file: ObservabilityPipelineEnrichmentTableFile, optional @@ -84,9 +87,6 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param target: Path where enrichment results should be stored in the log. :type target: str @@ -99,8 +99,8 @@ def __init__( kwargs["geoip"] = geoip super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.target = target self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_filter_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_filter_processor.py index d7ada2fb81..30a2bfed16 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_filter_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_filter_processor.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -25,40 +25,38 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineFilterProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", } - def __init__( - self_, id: str, include: str, inputs: List[str], type: ObservabilityPipelineFilterProcessorType, **kwargs - ): + def __init__(self_, enabled: bool, id: str, include: str, type: ObservabilityPipelineFilterProcessorType, **kwargs): """ The ``filter`` processor allows conditional processing of logs based on a Datadog search query. Logs that match the ``include`` query are passed through; others are discarded. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the ``input`` to downstream components). :type id: str :param include: A Datadog search query used to determine which logs should pass through the filter. Logs that match this query continue to downstream components; others are dropped. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param type: The processor type. The value should always be ``filter``. :type type: ObservabilityPipelineFilterProcessorType """ super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_generate_metrics_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_generate_metrics_processor.py index b0eee92908..058f6e5d68 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_generate_metrics_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_generate_metrics_processor.py @@ -3,11 +3,13 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import List, Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) @@ -29,53 +31,55 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "metrics": ([ObservabilityPipelineGeneratedMetric],), "type": (ObservabilityPipelineGenerateMetricsProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "metrics": "metrics", "type": "type", } def __init__( self_, + enabled: bool, id: str, - include: str, - inputs: List[str], - metrics: List[ObservabilityPipelineGeneratedMetric], type: ObservabilityPipelineGenerateMetricsProcessorType, + include: Union[str, UnsetType] = unset, + metrics: Union[List[ObservabilityPipelineGeneratedMetric], UnsetType] = unset, **kwargs, ): """ The ``generate_datadog_metrics`` processor creates custom metrics from logs and sends them to Datadog. Metrics can be counters, gauges, or distributions and optionally grouped by log fields. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline. :type id: str :param include: A Datadog search query used to determine which logs this processor targets. - :type include: str - - :param inputs: A list of component IDs whose output is used as the ``input`` for this processor. - :type inputs: [str] + :type include: str, optional :param metrics: Configuration for generating individual metrics. - :type metrics: [ObservabilityPipelineGeneratedMetric] + :type metrics: [ObservabilityPipelineGeneratedMetric], optional :param type: The processor type. Always ``generate_datadog_metrics``. :type type: ObservabilityPipelineGenerateMetricsProcessorType """ + if include is not unset: + kwargs["include"] = include + if metrics is not unset: + kwargs["metrics"] = metrics super().__init__(kwargs) + self_.enabled = enabled self_.id = id - self_.include = include - self_.inputs = inputs - self_.metrics = metrics self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_ocsf_mapper_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_ocsf_mapper_processor.py index 7917f1c81e..e49bde37ec 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_ocsf_mapper_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_ocsf_mapper_processor.py @@ -31,26 +31,26 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "mappings": ([ObservabilityPipelineOcsfMapperProcessorMapping],), "type": (ObservabilityPipelineOcsfMapperProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "mappings": "mappings", "type": "type", } def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], mappings: List[ObservabilityPipelineOcsfMapperProcessorMapping], type: ObservabilityPipelineOcsfMapperProcessorType, **kwargs, @@ -58,15 +58,15 @@ def __init__( """ The ``ocsf_mapper`` processor transforms logs into the OCSF schema using a predefined mapping configuration. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline. :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this processor. - :type inputs: [str] - :param mappings: A list of mapping rules to convert events to the OCSF format. :type mappings: [ObservabilityPipelineOcsfMapperProcessorMapping] @@ -75,8 +75,8 @@ def __init__( """ super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.mappings = mappings self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_parse_grok_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_parse_grok_processor.py index c7b2f65cfc..a527670797 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_parse_grok_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_parse_grok_processor.py @@ -34,27 +34,27 @@ def openapi_types(_): return { "disable_library_rules": (bool,), + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "rules": ([ObservabilityPipelineParseGrokProcessorRule],), "type": (ObservabilityPipelineParseGrokProcessorType,), } attribute_map = { "disable_library_rules": "disable_library_rules", + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "rules": "rules", "type": "type", } def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], rules: List[ObservabilityPipelineParseGrokProcessorRule], type: ObservabilityPipelineParseGrokProcessorType, disable_library_rules: Union[bool, UnsetType] = unset, @@ -66,15 +66,15 @@ def __init__( :param disable_library_rules: If set to ``true`` , disables the default Grok rules provided by Datadog. :type disable_library_rules: bool, optional + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: A unique identifier for this processor. :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param rules: The list of Grok parsing rules. If multiple matching rules are provided, they are evaluated in order. The first successful match is applied. :type rules: [ObservabilityPipelineParseGrokProcessorRule] @@ -85,8 +85,8 @@ def __init__( kwargs["disable_library_rules"] = disable_library_rules super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.rules = rules self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_parse_json_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_parse_json_processor.py index ec3357b625..7325c2f261 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_parse_json_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_parse_json_processor.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, TYPE_CHECKING +from typing import TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -25,33 +25,36 @@ def openapi_types(_): ) return { + "enabled": (bool,), "field": (str,), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineParseJSONProcessorType,), } attribute_map = { + "enabled": "enabled", "field": "field", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", } def __init__( self_, + enabled: bool, field: str, id: str, include: str, - inputs: List[str], type: ObservabilityPipelineParseJSONProcessorType, **kwargs, ): """ The ``parse_json`` processor extracts JSON from a specified field and flattens it into the event. This is useful when logs contain embedded JSON as a string. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param field: The name of the log field that contains a JSON string. :type field: str @@ -61,16 +64,13 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param type: The processor type. The value should always be ``parse_json``. :type type: ObservabilityPipelineParseJSONProcessorType """ super().__init__(kwargs) + self_.enabled = enabled self_.field = field self_.id = id self_.include = include - self_.inputs = inputs self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_quota_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_quota_processor.py index aa4be5a8ca..e4801029c9 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_quota_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_quota_processor.py @@ -46,10 +46,10 @@ def openapi_types(_): return { "drop_events": (bool,), + "enabled": (bool,), "id": (str,), "ignore_when_missing_partitions": (bool,), "include": (str,), - "inputs": ([str],), "limit": (ObservabilityPipelineQuotaProcessorLimit,), "name": (str,), "overflow_action": (ObservabilityPipelineQuotaProcessorOverflowAction,), @@ -60,10 +60,10 @@ def openapi_types(_): attribute_map = { "drop_events": "drop_events", + "enabled": "enabled", "id": "id", "ignore_when_missing_partitions": "ignore_when_missing_partitions", "include": "include", - "inputs": "inputs", "limit": "limit", "name": "name", "overflow_action": "overflow_action", @@ -74,13 +74,13 @@ def openapi_types(_): def __init__( self_, - drop_events: bool, + enabled: bool, id: str, include: str, - inputs: List[str], limit: ObservabilityPipelineQuotaProcessorLimit, name: str, type: ObservabilityPipelineQuotaProcessorType, + drop_events: Union[bool, UnsetType] = unset, ignore_when_missing_partitions: Union[bool, UnsetType] = unset, overflow_action: Union[ObservabilityPipelineQuotaProcessorOverflowAction, UnsetType] = unset, overrides: Union[List[ObservabilityPipelineQuotaProcessorOverride], UnsetType] = unset, @@ -91,7 +91,10 @@ def __init__( 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. :param drop_events: If set to ``true`` , logs that matched the quota filter and sent after the quota has been met are dropped; only logs that did not match the filter query continue through the pipeline. - :type drop_events: bool + :type drop_events: bool, optional + + :param enabled: Whether this processor is enabled. + :type enabled: bool :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the ``input`` to downstream components). :type id: str @@ -102,9 +105,6 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param limit: The maximum amount of data or number of events allowed before the quota is enforced. Can be specified in bytes or events. :type limit: ObservabilityPipelineQuotaProcessorLimit @@ -127,6 +127,8 @@ def __init__( :param type: The processor type. The value should always be ``quota``. :type type: ObservabilityPipelineQuotaProcessorType """ + if drop_events is not unset: + kwargs["drop_events"] = drop_events if ignore_when_missing_partitions is not unset: kwargs["ignore_when_missing_partitions"] = ignore_when_missing_partitions if overflow_action is not unset: @@ -137,10 +139,9 @@ def __init__( kwargs["partition_fields"] = partition_fields super().__init__(kwargs) - self_.drop_events = drop_events + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.limit = limit self_.name = name self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_reduce_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_reduce_processor.py index bcddc2844d..210ebd9f3d 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_reduce_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_reduce_processor.py @@ -31,29 +31,29 @@ def openapi_types(_): ) return { + "enabled": (bool,), "group_by": ([str],), "id": (str,), "include": (str,), - "inputs": ([str],), "merge_strategies": ([ObservabilityPipelineReduceProcessorMergeStrategy],), "type": (ObservabilityPipelineReduceProcessorType,), } attribute_map = { + "enabled": "enabled", "group_by": "group_by", "id": "id", "include": "include", - "inputs": "inputs", "merge_strategies": "merge_strategies", "type": "type", } def __init__( self_, + enabled: bool, group_by: List[str], id: str, include: str, - inputs: List[str], merge_strategies: List[ObservabilityPipelineReduceProcessorMergeStrategy], type: ObservabilityPipelineReduceProcessorType, **kwargs, @@ -61,6 +61,9 @@ def __init__( """ The ``reduce`` processor aggregates and merges logs based on matching keys and merge strategies. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param group_by: A list of fields used to group log events for merging. :type group_by: [str] @@ -70,9 +73,6 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param merge_strategies: List of merge strategies defining how values from grouped events should be combined. :type merge_strategies: [ObservabilityPipelineReduceProcessorMergeStrategy] @@ -81,9 +81,9 @@ def __init__( """ super().__init__(kwargs) + self_.enabled = enabled self_.group_by = group_by self_.id = id self_.include = include - self_.inputs = inputs self_.merge_strategies = merge_strategies self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_remove_fields_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_remove_fields_processor.py index c8a0d89bc0..ace4d0d308 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_remove_fields_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_remove_fields_processor.py @@ -25,33 +25,36 @@ def openapi_types(_): ) return { + "enabled": (bool,), "fields": ([str],), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineRemoveFieldsProcessorType,), } attribute_map = { + "enabled": "enabled", "fields": "fields", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", } def __init__( self_, + enabled: bool, fields: List[str], id: str, include: str, - inputs: List[str], type: ObservabilityPipelineRemoveFieldsProcessorType, **kwargs, ): """ The ``remove_fields`` processor deletes specified fields from logs. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param fields: A list of field names to be removed from each log event. :type fields: [str] @@ -61,16 +64,13 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: The ``PipelineRemoveFieldsProcessor`` ``inputs``. - :type inputs: [str] - :param type: The processor type. The value should always be ``remove_fields``. :type type: ObservabilityPipelineRemoveFieldsProcessorType """ super().__init__(kwargs) + self_.enabled = enabled self_.fields = fields self_.id = id self_.include = include - self_.inputs = inputs self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_rename_fields_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_rename_fields_processor.py index ae737aceb1..a9c84cf492 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_rename_fields_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_rename_fields_processor.py @@ -31,33 +31,36 @@ def openapi_types(_): ) return { + "enabled": (bool,), "fields": ([ObservabilityPipelineRenameFieldsProcessorField],), "id": (str,), "include": (str,), - "inputs": ([str],), "type": (ObservabilityPipelineRenameFieldsProcessorType,), } attribute_map = { + "enabled": "enabled", "fields": "fields", "id": "id", "include": "include", - "inputs": "inputs", "type": "type", } def __init__( self_, + enabled: bool, fields: List[ObservabilityPipelineRenameFieldsProcessorField], id: str, include: str, - inputs: List[str], type: ObservabilityPipelineRenameFieldsProcessorType, **kwargs, ): """ The ``rename_fields`` processor changes field names. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param fields: A list of rename rules specifying which fields to rename in the event, what to rename them to, and whether to preserve the original fields. :type fields: [ObservabilityPipelineRenameFieldsProcessorField] @@ -67,16 +70,13 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param type: The processor type. The value should always be ``rename_fields``. :type type: ObservabilityPipelineRenameFieldsProcessorType """ super().__init__(kwargs) + self_.enabled = enabled self_.fields = fields self_.id = id self_.include = include - self_.inputs = inputs self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_sample_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_sample_processor.py index e6f16ce99d..5d4a3bd479 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_sample_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_sample_processor.py @@ -3,7 +3,7 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations -from typing import List, Union, TYPE_CHECKING +from typing import Union, TYPE_CHECKING from datadog_api_client.model_utils import ( ModelNormal, @@ -33,18 +33,18 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "percentage": (float,), "rate": (int,), "type": (ObservabilityPipelineSampleProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "percentage": "percentage", "rate": "rate", "type": "type", @@ -52,9 +52,9 @@ def openapi_types(_): def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], type: ObservabilityPipelineSampleProcessorType, percentage: Union[float, UnsetType] = unset, rate: Union[int, UnsetType] = unset, @@ -63,15 +63,15 @@ def __init__( """ The ``sample`` processor allows probabilistic sampling of logs at a fixed rate. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (for example, as the ``input`` to downstream components). :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param percentage: The percentage of logs to sample. :type percentage: float, optional @@ -87,7 +87,7 @@ def __init__( kwargs["rate"] = rate super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_sensitive_data_scanner_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_sensitive_data_scanner_processor.py index 9d78e97932..a6a755aa76 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_sensitive_data_scanner_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_sensitive_data_scanner_processor.py @@ -31,26 +31,26 @@ def openapi_types(_): ) return { + "enabled": (bool,), "id": (str,), "include": (str,), - "inputs": ([str],), "rules": ([ObservabilityPipelineSensitiveDataScannerProcessorRule],), "type": (ObservabilityPipelineSensitiveDataScannerProcessorType,), } attribute_map = { + "enabled": "enabled", "id": "id", "include": "include", - "inputs": "inputs", "rules": "rules", "type": "type", } def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], rules: List[ObservabilityPipelineSensitiveDataScannerProcessorRule], type: ObservabilityPipelineSensitiveDataScannerProcessorType, **kwargs, @@ -58,15 +58,15 @@ def __init__( """ The ``sensitive_data_scanner`` processor detects and optionally redacts sensitive data in log events. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param id: The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). :type id: str :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the ``input`` for this component. - :type inputs: [str] - :param rules: A list of rules for identifying and acting on sensitive data patterns. :type rules: [ObservabilityPipelineSensitiveDataScannerProcessorRule] @@ -75,8 +75,8 @@ def __init__( """ super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.rules = rules self_.type = type diff --git a/src/datadog_api_client/v2/model/observability_pipeline_throttle_processor.py b/src/datadog_api_client/v2/model/observability_pipeline_throttle_processor.py index aeaa56e6cb..14c7c559e7 100644 --- a/src/datadog_api_client/v2/model/observability_pipeline_throttle_processor.py +++ b/src/datadog_api_client/v2/model/observability_pipeline_throttle_processor.py @@ -27,20 +27,20 @@ def openapi_types(_): ) return { + "enabled": (bool,), "group_by": ([str],), "id": (str,), "include": (str,), - "inputs": ([str],), "threshold": (int,), "type": (ObservabilityPipelineThrottleProcessorType,), "window": (float,), } attribute_map = { + "enabled": "enabled", "group_by": "group_by", "id": "id", "include": "include", - "inputs": "inputs", "threshold": "threshold", "type": "type", "window": "window", @@ -48,9 +48,9 @@ def openapi_types(_): def __init__( self_, + enabled: bool, id: str, include: str, - inputs: List[str], threshold: int, type: ObservabilityPipelineThrottleProcessorType, window: float, @@ -60,6 +60,9 @@ def __init__( """ The ``throttle`` processor limits the number of events that pass through over a given time window. + :param enabled: Whether this processor is enabled. + :type enabled: bool + :param group_by: Optional list of fields used to group events before the threshold has been reached. :type group_by: [str], optional @@ -69,9 +72,6 @@ def __init__( :param include: A Datadog search query used to determine which logs this processor targets. :type include: str - :param inputs: A list of component IDs whose output is used as the input for this processor. - :type inputs: [str] - :param threshold: the number of events allowed in a given time window. Events sent after the threshold has been reached, are dropped. :type threshold: int @@ -85,9 +85,9 @@ def __init__( kwargs["group_by"] = group_by super().__init__(kwargs) + self_.enabled = enabled self_.id = id self_.include = include - self_.inputs = inputs self_.threshold = threshold self_.type = type self_.window = window diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 9cece11cff..6f2757bec1 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -2820,6 +2820,9 @@ from datadog_api_client.v2.model.observability_pipeline_config_destination_item import ( ObservabilityPipelineConfigDestinationItem, ) +from datadog_api_client.v2.model.observability_pipeline_config_processor_group import ( + ObservabilityPipelineConfigProcessorGroup, +) from datadog_api_client.v2.model.observability_pipeline_config_processor_item import ( ObservabilityPipelineConfigProcessorItem, ) @@ -7068,6 +7071,7 @@ "ObservabilityPipelineAwsAuth", "ObservabilityPipelineConfig", "ObservabilityPipelineConfigDestinationItem", + "ObservabilityPipelineConfigProcessorGroup", "ObservabilityPipelineConfigProcessorItem", "ObservabilityPipelineConfigSourceItem", "ObservabilityPipelineCrowdStrikeNextGenSiemDestination", diff --git a/tests/v2/features/observability_pipelines.feature b/tests/v2/features/observability_pipelines.feature index c7149b1e4f..895e0dc7db 100644 --- a/tests/v2/features/observability_pipelines.feature +++ b/tests/v2/features/observability_pipelines.feature @@ -12,7 +12,7 @@ Feature: Observability Pipelines Scenario: Create a new pipeline returns "Bad Request" response Given operation "CreatePipeline" enabled And new "CreatePipeline" request - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} When the request is sent Then the response status is 400 Bad Request @@ -20,7 +20,7 @@ Feature: Observability Pipelines Scenario: Create a new pipeline returns "Conflict" response Given operation "CreatePipeline" enabled And new "CreatePipeline" request - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} When the request is sent Then the response status is 409 Conflict @@ -28,7 +28,7 @@ Feature: Observability Pipelines Scenario: Create a new pipeline returns "OK" response Given operation "CreatePipeline" enabled And new "CreatePipeline" request - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} When the request is sent Then the response status is 201 OK And the response "data" has field "id" @@ -106,7 +106,7 @@ Feature: Observability Pipelines And new "UpdatePipeline" request And there is a valid "pipeline" in the system And request contains "pipeline_id" parameter from "pipeline.data.id" - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "unknown-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} When the request is sent Then the response status is 400 Bad Request @@ -115,7 +115,7 @@ Feature: Observability Pipelines Given operation "UpdatePipeline" enabled And new "UpdatePipeline" request And request contains "pipeline_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} When the request is sent Then the response status is 409 Conflict @@ -124,7 +124,7 @@ Feature: Observability Pipelines Given operation "UpdatePipeline" enabled And new "UpdatePipeline" request And request contains "pipeline_id" parameter with value "3fa85f64-5717-4562-b3fc-2c963f66afa6" - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} When the request is sent Then the response status is 404 Not Found @@ -134,7 +134,7 @@ Feature: Observability Pipelines And there is a valid "pipeline" in the system And new "UpdatePipeline" request And request contains "pipeline_id" parameter from "pipeline.data.id" - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "updated-datadog-logs-destination-id", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Updated Pipeline Name"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "updated-datadog-logs-destination-id", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Updated Pipeline Name"}, "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "type": "pipelines"}} When the request is sent Then the response status is 200 OK And the response "data" has field "id" @@ -149,7 +149,7 @@ Feature: Observability Pipelines Scenario: Validate an observability pipeline returns "Bad Request" response Given operation "ValidatePipeline" enabled And new "ValidatePipeline" request - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} When the request is sent Then the response status is 400 Bad Request And the response "errors[0].title" is equal to "Field 'include' is required" @@ -161,7 +161,7 @@ Feature: Observability Pipelines Scenario: Validate an observability pipeline returns "OK" response Given operation "ValidatePipeline" enabled And new "ValidatePipeline" request - And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["filter-processor"], "type": "datadog_logs"}], "processors": [{"id": "filter-processor", "include": "service:my-service", "inputs": ["datadog-agent-source"], "type": "filter"}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} + And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "processors": [{"enabled": true, "id": "my-processor-group", "include": "service:my-service", "inputs": ["datadog-agent-source"], "processors": [{"enabled": true, "id": "filter-processor", "include": "status:error", "type": "filter"}]}], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}} When the request is sent Then the response status is 200 OK And the response "errors" has length 0