From 9aa50b9c4cf15bd86fa4781c4e03e787f3185795 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 26 Nov 2025 16:30:09 +0000 Subject: [PATCH] Regenerate client from commit c42295c of spec repo --- .generator/schemas/v2/openapi.yaml | 330 +++++++++--------- ...ability_pipeline_add_env_vars_processor.go | 68 ++-- ...rvability_pipeline_add_fields_processor.go | 68 ++-- .../model_observability_pipeline_config.go | 16 +- ...ability_pipeline_config_processor_group.go | 229 ++++++++++++ ...observability_pipeline_custom_processor.go | 68 ++-- ...ability_pipeline_custom_processor_remap.go | 37 +- ...ability_pipeline_datadog_tags_processor.go | 68 ++-- ...observability_pipeline_dedupe_processor.go | 68 ++-- ...ity_pipeline_enrichment_table_processor.go | 68 ++-- ...observability_pipeline_filter_processor.go | 68 ++-- ...ity_pipeline_generate_metrics_processor.go | 130 +++---- ...vability_pipeline_ocsf_mapper_processor.go | 68 ++-- ...rvability_pipeline_parse_grok_processor.go | 68 ++-- ...rvability_pipeline_parse_json_processor.go | 68 ++-- ..._observability_pipeline_quota_processor.go | 101 +++--- ...observability_pipeline_reduce_processor.go | 68 ++-- ...bility_pipeline_remove_fields_processor.go | 68 ++-- ...bility_pipeline_rename_fields_processor.go | 68 ++-- ...observability_pipeline_sample_processor.go | 68 ++-- ...peline_sensitive_data_scanner_processor.go | 68 ++-- ...servability_pipeline_throttle_processor.go | 68 ++-- .../observability-pipelines/CreatePipeline.go | 30 +- .../observability-pipelines/UpdatePipeline.go | 30 +- .../ValidatePipeline.go | 30 +- ...peline_returns_Bad_Request_response.freeze | 2 +- ...pipeline_returns_Bad_Request_response.yaml | 11 +- ..._a_new_pipeline_returns_OK_response.freeze | 2 +- ...te_a_new_pipeline_returns_OK_response.yaml | 8 +- ...pipeline_returns_Not_Found_response.freeze | 2 +- ...lete_a_pipeline_returns_OK_response.freeze | 2 +- ...Delete_a_pipeline_returns_OK_response.yaml | 6 +- ...ecific_pipeline_returns_OK_response.freeze | 2 +- ...specific_pipeline_returns_OK_response.yaml | 8 +- ...elines_returns_Bad_Request_response.freeze | 2 +- ..._List_pipelines_returns_OK_response.freeze | 2 +- ...io_List_pipelines_returns_OK_response.yaml | 66 ++-- ...peline_returns_Bad_Request_response.freeze | 2 +- ...pipeline_returns_Bad_Request_response.yaml | 17 +- ...pipeline_returns_Not_Found_response.freeze | 2 +- ...a_pipeline_returns_Not_Found_response.yaml | 2 +- ...date_a_pipeline_returns_OK_response.freeze | 2 +- ...Update_a_pipeline_returns_OK_response.yaml | 12 +- ...peline_returns_Bad_Request_response.freeze | 2 +- ...pipeline_returns_Bad_Request_response.yaml | 5 +- ...bility_pipeline_returns_OK_response.freeze | 2 +- ...vability_pipeline_returns_OK_response.yaml | 4 +- .../v2/observability_pipelines.feature | 20 +- 48 files changed, 1237 insertions(+), 967 deletions(-) create mode 100644 api/datadogV2/model_observability_pipeline_config_processor_group.go diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 9bceb715496..fc3a210f6f6 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/api/datadogV2/model_observability_pipeline_add_env_vars_processor.go b/api/datadogV2/model_observability_pipeline_add_env_vars_processor.go index d68a8a73f77..c4a106f5b15 100644 --- a/api/datadogV2/model_observability_pipeline_add_env_vars_processor.go +++ b/api/datadogV2/model_observability_pipeline_add_env_vars_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineAddEnvVarsProcessor The `add_env_vars` processor adds environment variable values to log events. type ObservabilityPipelineAddEnvVarsProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The unique identifier for this component. Used to reference this processor in the pipeline. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // The processor type. The value should always be `add_env_vars`. Type ObservabilityPipelineAddEnvVarsProcessorType `json:"type"` // A list of environment variable mappings to apply to log fields. @@ -31,11 +31,11 @@ type ObservabilityPipelineAddEnvVarsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineAddEnvVarsProcessor(id string, include string, inputs []string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor { +func NewObservabilityPipelineAddEnvVarsProcessor(enabled bool, id string, include string, typeVar ObservabilityPipelineAddEnvVarsProcessorType, variables []ObservabilityPipelineAddEnvVarsProcessorVariable) *ObservabilityPipelineAddEnvVarsProcessor { this := ObservabilityPipelineAddEnvVarsProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar this.Variables = variables return &this @@ -51,6 +51,29 @@ func NewObservabilityPipelineAddEnvVarsProcessorWithDefaults() *ObservabilityPip return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineAddEnvVarsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineAddEnvVarsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineAddEnvVarsProcessor) GetId() string { if o == nil { @@ -97,29 +120,6 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineAddEnvVarsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineAddEnvVarsProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineAddEnvVarsProcessor) GetType() ObservabilityPipelineAddEnvVarsProcessorType { if o == nil { @@ -172,9 +172,9 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error) if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type toSerialize["variables"] = o.Variables @@ -187,24 +187,24 @@ func (o ObservabilityPipelineAddEnvVarsProcessor) MarshalJSON() ([]byte, error) // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineAddEnvVarsProcessorType `json:"type"` Variables *[]ObservabilityPipelineAddEnvVarsProcessorVariable `json:"variables"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } @@ -213,15 +213,15 @@ func (o *ObservabilityPipelineAddEnvVarsProcessor) UnmarshalJSON(bytes []byte) ( } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "type", "variables"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "type", "variables"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_add_fields_processor.go b/api/datadogV2/model_observability_pipeline_add_fields_processor.go index 2af0953fc5d..6e1aa3e596e 100644 --- a/api/datadogV2/model_observability_pipeline_add_fields_processor.go +++ b/api/datadogV2/model_observability_pipeline_add_fields_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineAddFieldsProcessor The `add_fields` processor adds static key-value fields to logs. type ObservabilityPipelineAddFieldsProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // A list of static fields (key-value pairs) that is added to each log event processed by this component. Fields []ObservabilityPipelineFieldValue `json:"fields"` // 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). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The processor type. The value should always be `add_fields`. Type ObservabilityPipelineAddFieldsProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -31,12 +31,12 @@ type ObservabilityPipelineAddFieldsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineAddFieldsProcessor(fields []ObservabilityPipelineFieldValue, id string, include string, inputs []string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor { +func NewObservabilityPipelineAddFieldsProcessor(enabled bool, fields []ObservabilityPipelineFieldValue, id string, include string, typeVar ObservabilityPipelineAddFieldsProcessorType) *ObservabilityPipelineAddFieldsProcessor { this := ObservabilityPipelineAddFieldsProcessor{} + this.Enabled = enabled this.Fields = fields this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -51,6 +51,29 @@ func NewObservabilityPipelineAddFieldsProcessorWithDefaults() *ObservabilityPipe return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineAddFieldsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineAddFieldsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetFields returns the Fields field value. func (o *ObservabilityPipelineAddFieldsProcessor) GetFields() []ObservabilityPipelineFieldValue { if o == nil { @@ -120,29 +143,6 @@ func (o *ObservabilityPipelineAddFieldsProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineAddFieldsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineAddFieldsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineAddFieldsProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineAddFieldsProcessor) GetType() ObservabilityPipelineAddFieldsProcessorType { if o == nil { @@ -172,10 +172,10 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["fields"] = o.Fields toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -187,15 +187,18 @@ func (o ObservabilityPipelineAddFieldsProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Fields *[]ObservabilityPipelineFieldValue `json:"fields"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineAddFieldsProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Fields == nil { return fmt.Errorf("required field fields missing") } @@ -205,24 +208,21 @@ func (o *ObservabilityPipelineAddFieldsProcessor) UnmarshalJSON(bytes []byte) (e if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Fields = *all.Fields o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_config.go b/api/datadogV2/model_observability_pipeline_config.go index 411ab08fc3b..83681cf0159 100644 --- a/api/datadogV2/model_observability_pipeline_config.go +++ b/api/datadogV2/model_observability_pipeline_config.go @@ -14,8 +14,8 @@ import ( type ObservabilityPipelineConfig struct { // A list of destination components where processed logs are sent. Destinations []ObservabilityPipelineConfigDestinationItem `json:"destinations"` - // A list of processors that transform or enrich log data. - Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"` + // A list of processor groups that transform or enrich log data. + Processors []ObservabilityPipelineConfigProcessorGroup `json:"processors,omitempty"` // A list of configured data sources for the pipeline. Sources []ObservabilityPipelineConfigSourceItem `json:"sources"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -66,9 +66,9 @@ func (o *ObservabilityPipelineConfig) SetDestinations(v []ObservabilityPipelineC } // GetProcessors returns the Processors field value if set, zero value otherwise. -func (o *ObservabilityPipelineConfig) GetProcessors() []ObservabilityPipelineConfigProcessorItem { +func (o *ObservabilityPipelineConfig) GetProcessors() []ObservabilityPipelineConfigProcessorGroup { if o == nil || o.Processors == nil { - var ret []ObservabilityPipelineConfigProcessorItem + var ret []ObservabilityPipelineConfigProcessorGroup return ret } return o.Processors @@ -76,7 +76,7 @@ func (o *ObservabilityPipelineConfig) GetProcessors() []ObservabilityPipelineCon // GetProcessorsOk returns a tuple with the Processors field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *ObservabilityPipelineConfig) GetProcessorsOk() (*[]ObservabilityPipelineConfigProcessorItem, bool) { +func (o *ObservabilityPipelineConfig) GetProcessorsOk() (*[]ObservabilityPipelineConfigProcessorGroup, bool) { if o == nil || o.Processors == nil { return nil, false } @@ -88,8 +88,8 @@ func (o *ObservabilityPipelineConfig) HasProcessors() bool { return o != nil && o.Processors != nil } -// SetProcessors gets a reference to the given []ObservabilityPipelineConfigProcessorItem and assigns it to the Processors field. -func (o *ObservabilityPipelineConfig) SetProcessors(v []ObservabilityPipelineConfigProcessorItem) { +// SetProcessors gets a reference to the given []ObservabilityPipelineConfigProcessorGroup and assigns it to the Processors field. +func (o *ObservabilityPipelineConfig) SetProcessors(v []ObservabilityPipelineConfigProcessorGroup) { o.Processors = v } @@ -138,7 +138,7 @@ func (o ObservabilityPipelineConfig) MarshalJSON() ([]byte, error) { func (o *ObservabilityPipelineConfig) UnmarshalJSON(bytes []byte) (err error) { all := struct { Destinations *[]ObservabilityPipelineConfigDestinationItem `json:"destinations"` - Processors []ObservabilityPipelineConfigProcessorItem `json:"processors,omitempty"` + Processors []ObservabilityPipelineConfigProcessorGroup `json:"processors,omitempty"` Sources *[]ObservabilityPipelineConfigSourceItem `json:"sources"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { diff --git a/api/datadogV2/model_observability_pipeline_config_processor_group.go b/api/datadogV2/model_observability_pipeline_config_processor_group.go new file mode 100644 index 00000000000..edbcb44a474 --- /dev/null +++ b/api/datadogV2/model_observability_pipeline_config_processor_group.go @@ -0,0 +1,229 @@ +// 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. + +package datadogV2 + +import ( + "fmt" + + "github.com/DataDog/datadog-api-client-go/v2/api/datadog" +) + +// ObservabilityPipelineConfigProcessorGroup A group of processors. +type ObservabilityPipelineConfigProcessorGroup struct { + // Whether this processor group is enabled. + Enabled bool `json:"enabled"` + // The unique identifier for the processor group. + Id string `json:"id"` + // Conditional expression for when this processor group should execute. + Include string `json:"include"` + // A list of component IDs whose output is used as the input for this processor group. + Inputs []string `json:"inputs"` + // Processors applied sequentially within this group. Events flow through each processor in order. + Processors []ObservabilityPipelineConfigProcessorItem `json:"processors"` + // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct + UnparsedObject map[string]interface{} `json:"-"` + AdditionalProperties map[string]interface{} `json:"-"` +} + +// NewObservabilityPipelineConfigProcessorGroup instantiates a new ObservabilityPipelineConfigProcessorGroup object. +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed. +func NewObservabilityPipelineConfigProcessorGroup(enabled bool, id string, include string, inputs []string, processors []ObservabilityPipelineConfigProcessorItem) *ObservabilityPipelineConfigProcessorGroup { + this := ObservabilityPipelineConfigProcessorGroup{} + this.Enabled = enabled + this.Id = id + this.Include = include + this.Inputs = inputs + this.Processors = processors + return &this +} + +// NewObservabilityPipelineConfigProcessorGroupWithDefaults instantiates a new ObservabilityPipelineConfigProcessorGroup object. +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set. +func NewObservabilityPipelineConfigProcessorGroupWithDefaults() *ObservabilityPipelineConfigProcessorGroup { + this := ObservabilityPipelineConfigProcessorGroup{} + return &this +} + +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineConfigProcessorGroup) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineConfigProcessorGroup) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineConfigProcessorGroup) SetEnabled(v bool) { + o.Enabled = v +} + +// GetId returns the Id field value. +func (o *ObservabilityPipelineConfigProcessorGroup) GetId() string { + if o == nil { + var ret string + return ret + } + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineConfigProcessorGroup) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value. +func (o *ObservabilityPipelineConfigProcessorGroup) SetId(v string) { + o.Id = v +} + +// GetInclude returns the Include field value. +func (o *ObservabilityPipelineConfigProcessorGroup) GetInclude() string { + if o == nil { + var ret string + return ret + } + return o.Include +} + +// GetIncludeOk returns a tuple with the Include field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineConfigProcessorGroup) GetIncludeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Include, true +} + +// SetInclude sets field value. +func (o *ObservabilityPipelineConfigProcessorGroup) SetInclude(v string) { + o.Include = v +} + +// GetInputs returns the Inputs field value. +func (o *ObservabilityPipelineConfigProcessorGroup) GetInputs() []string { + if o == nil { + var ret []string + return ret + } + return o.Inputs +} + +// GetInputsOk returns a tuple with the Inputs field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineConfigProcessorGroup) GetInputsOk() (*[]string, bool) { + if o == nil { + return nil, false + } + return &o.Inputs, true +} + +// SetInputs sets field value. +func (o *ObservabilityPipelineConfigProcessorGroup) SetInputs(v []string) { + o.Inputs = v +} + +// GetProcessors returns the Processors field value. +func (o *ObservabilityPipelineConfigProcessorGroup) GetProcessors() []ObservabilityPipelineConfigProcessorItem { + if o == nil { + var ret []ObservabilityPipelineConfigProcessorItem + return ret + } + return o.Processors +} + +// GetProcessorsOk returns a tuple with the Processors field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineConfigProcessorGroup) GetProcessorsOk() (*[]ObservabilityPipelineConfigProcessorItem, bool) { + if o == nil { + return nil, false + } + return &o.Processors, true +} + +// SetProcessors sets field value. +func (o *ObservabilityPipelineConfigProcessorGroup) SetProcessors(v []ObservabilityPipelineConfigProcessorItem) { + o.Processors = v +} + +// MarshalJSON serializes the struct using spec logic. +func (o ObservabilityPipelineConfigProcessorGroup) MarshalJSON() ([]byte, error) { + toSerialize := map[string]interface{}{} + if o.UnparsedObject != nil { + return datadog.Marshal(o.UnparsedObject) + } + toSerialize["enabled"] = o.Enabled + toSerialize["id"] = o.Id + toSerialize["include"] = o.Include + toSerialize["inputs"] = o.Inputs + toSerialize["processors"] = o.Processors + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + return datadog.Marshal(toSerialize) +} + +// UnmarshalJSON deserializes the given payload. +func (o *ObservabilityPipelineConfigProcessorGroup) UnmarshalJSON(bytes []byte) (err error) { + all := struct { + Enabled *bool `json:"enabled"` + Id *string `json:"id"` + Include *string `json:"include"` + Inputs *[]string `json:"inputs"` + Processors *[]ObservabilityPipelineConfigProcessorItem `json:"processors"` + }{} + if err = datadog.Unmarshal(bytes, &all); err != nil { + return datadog.Unmarshal(bytes, &o.UnparsedObject) + } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } + if all.Id == nil { + return fmt.Errorf("required field id missing") + } + if all.Include == nil { + return fmt.Errorf("required field include missing") + } + if all.Inputs == nil { + return fmt.Errorf("required field inputs missing") + } + if all.Processors == nil { + return fmt.Errorf("required field processors missing") + } + additionalProperties := make(map[string]interface{}) + if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "inputs", "processors"}) + } else { + return err + } + o.Enabled = *all.Enabled + o.Id = *all.Id + o.Include = *all.Include + o.Inputs = *all.Inputs + o.Processors = *all.Processors + + if len(additionalProperties) > 0 { + o.AdditionalProperties = additionalProperties + } + + return nil +} diff --git a/api/datadogV2/model_observability_pipeline_custom_processor.go b/api/datadogV2/model_observability_pipeline_custom_processor.go index be1c9e600fa..14699e091f2 100644 --- a/api/datadogV2/model_observability_pipeline_custom_processor.go +++ b/api/datadogV2/model_observability_pipeline_custom_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineCustomProcessor The `custom_processor` processor transforms events using [Vector Remap Language (VRL)](https://vector.dev/docs/reference/vrl/) scripts with advanced filtering capabilities. type ObservabilityPipelineCustomProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The unique identifier for this processor. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. This field should always be set to `*` for the custom_processor processor. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // Array of VRL remap rules. Remaps []ObservabilityPipelineCustomProcessorRemap `json:"remaps"` // The processor type. The value should always be `custom_processor`. @@ -31,11 +31,11 @@ type ObservabilityPipelineCustomProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineCustomProcessor(id string, include string, inputs []string, remaps []ObservabilityPipelineCustomProcessorRemap, typeVar ObservabilityPipelineCustomProcessorType) *ObservabilityPipelineCustomProcessor { +func NewObservabilityPipelineCustomProcessor(enabled bool, id string, include string, remaps []ObservabilityPipelineCustomProcessorRemap, typeVar ObservabilityPipelineCustomProcessorType) *ObservabilityPipelineCustomProcessor { this := ObservabilityPipelineCustomProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Remaps = remaps this.Type = typeVar return &this @@ -53,6 +53,29 @@ func NewObservabilityPipelineCustomProcessorWithDefaults() *ObservabilityPipelin return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineCustomProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineCustomProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineCustomProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineCustomProcessor) GetId() string { if o == nil { @@ -99,29 +122,6 @@ func (o *ObservabilityPipelineCustomProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineCustomProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineCustomProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineCustomProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetRemaps returns the Remaps field value. func (o *ObservabilityPipelineCustomProcessor) GetRemaps() []ObservabilityPipelineCustomProcessorRemap { if o == nil { @@ -174,9 +174,9 @@ func (o ObservabilityPipelineCustomProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["remaps"] = o.Remaps toSerialize["type"] = o.Type @@ -189,24 +189,24 @@ func (o ObservabilityPipelineCustomProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineCustomProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Remaps *[]ObservabilityPipelineCustomProcessorRemap `json:"remaps"` Type *ObservabilityPipelineCustomProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Remaps == nil { return fmt.Errorf("required field remaps missing") } @@ -215,15 +215,15 @@ func (o *ObservabilityPipelineCustomProcessor) UnmarshalJSON(bytes []byte) (err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "remaps", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "remaps", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Remaps = *all.Remaps if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_custom_processor_remap.go b/api/datadogV2/model_observability_pipeline_custom_processor_remap.go index 7935d12e8d6..447a9227148 100644 --- a/api/datadogV2/model_observability_pipeline_custom_processor_remap.go +++ b/api/datadogV2/model_observability_pipeline_custom_processor_remap.go @@ -15,7 +15,7 @@ type ObservabilityPipelineCustomProcessorRemap struct { // Whether to drop events that caused errors during processing. DropOnError bool `json:"drop_on_error"` // Whether this remap rule is enabled. - Enabled bool `json:"enabled"` + Enabled *bool `json:"enabled,omitempty"` // A Datadog search query used to filter events for this specific remap rule. Include string `json:"include"` // A descriptive name for this remap rule. @@ -31,10 +31,9 @@ type ObservabilityPipelineCustomProcessorRemap struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineCustomProcessorRemap(dropOnError bool, enabled bool, include string, name string, source string) *ObservabilityPipelineCustomProcessorRemap { +func NewObservabilityPipelineCustomProcessorRemap(dropOnError bool, include string, name string, source string) *ObservabilityPipelineCustomProcessorRemap { this := ObservabilityPipelineCustomProcessorRemap{} this.DropOnError = dropOnError - this.Enabled = enabled this.Include = include this.Name = name this.Source = source @@ -72,27 +71,32 @@ func (o *ObservabilityPipelineCustomProcessorRemap) SetDropOnError(v bool) { o.DropOnError = v } -// GetEnabled returns the Enabled field value. +// GetEnabled returns the Enabled field value if set, zero value otherwise. func (o *ObservabilityPipelineCustomProcessorRemap) GetEnabled() bool { - if o == nil { + if o == nil || o.Enabled == nil { var ret bool return ret } - return o.Enabled + return *o.Enabled } -// GetEnabledOk returns a tuple with the Enabled field value +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ObservabilityPipelineCustomProcessorRemap) GetEnabledOk() (*bool, bool) { - if o == nil { + if o == nil || o.Enabled == nil { return nil, false } - return &o.Enabled, true + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *ObservabilityPipelineCustomProcessorRemap) HasEnabled() bool { + return o != nil && o.Enabled != nil } -// SetEnabled sets field value. +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. func (o *ObservabilityPipelineCustomProcessorRemap) SetEnabled(v bool) { - o.Enabled = v + o.Enabled = &v } // GetInclude returns the Include field value. @@ -171,7 +175,9 @@ func (o ObservabilityPipelineCustomProcessorRemap) MarshalJSON() ([]byte, error) return datadog.Marshal(o.UnparsedObject) } toSerialize["drop_on_error"] = o.DropOnError - toSerialize["enabled"] = o.Enabled + if o.Enabled != nil { + toSerialize["enabled"] = o.Enabled + } toSerialize["include"] = o.Include toSerialize["name"] = o.Name toSerialize["source"] = o.Source @@ -186,7 +192,7 @@ func (o ObservabilityPipelineCustomProcessorRemap) MarshalJSON() ([]byte, error) func (o *ObservabilityPipelineCustomProcessorRemap) UnmarshalJSON(bytes []byte) (err error) { all := struct { DropOnError *bool `json:"drop_on_error"` - Enabled *bool `json:"enabled"` + Enabled *bool `json:"enabled,omitempty"` Include *string `json:"include"` Name *string `json:"name"` Source *string `json:"source"` @@ -197,9 +203,6 @@ func (o *ObservabilityPipelineCustomProcessorRemap) UnmarshalJSON(bytes []byte) if all.DropOnError == nil { return fmt.Errorf("required field drop_on_error missing") } - if all.Enabled == nil { - return fmt.Errorf("required field enabled missing") - } if all.Include == nil { return fmt.Errorf("required field include missing") } @@ -216,7 +219,7 @@ func (o *ObservabilityPipelineCustomProcessorRemap) UnmarshalJSON(bytes []byte) return err } o.DropOnError = *all.DropOnError - o.Enabled = *all.Enabled + o.Enabled = all.Enabled o.Include = *all.Include o.Name = *all.Name o.Source = *all.Source diff --git a/api/datadogV2/model_observability_pipeline_datadog_tags_processor.go b/api/datadogV2/model_observability_pipeline_datadog_tags_processor.go index caa0c674067..00df29460d6 100644 --- a/api/datadogV2/model_observability_pipeline_datadog_tags_processor.go +++ b/api/datadogV2/model_observability_pipeline_datadog_tags_processor.go @@ -14,12 +14,12 @@ import ( type ObservabilityPipelineDatadogTagsProcessor struct { // The action to take on tags with matching keys. Action ObservabilityPipelineDatadogTagsProcessorAction `json:"action"` + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // 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). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // A list of tag keys. Keys []string `json:"keys"` // The processing mode. @@ -35,12 +35,12 @@ type ObservabilityPipelineDatadogTagsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineDatadogTagsProcessor(action ObservabilityPipelineDatadogTagsProcessorAction, id string, include string, inputs []string, keys []string, mode ObservabilityPipelineDatadogTagsProcessorMode, typeVar ObservabilityPipelineDatadogTagsProcessorType) *ObservabilityPipelineDatadogTagsProcessor { +func NewObservabilityPipelineDatadogTagsProcessor(action ObservabilityPipelineDatadogTagsProcessorAction, enabled bool, id string, include string, keys []string, mode ObservabilityPipelineDatadogTagsProcessorMode, typeVar ObservabilityPipelineDatadogTagsProcessorType) *ObservabilityPipelineDatadogTagsProcessor { this := ObservabilityPipelineDatadogTagsProcessor{} this.Action = action + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Keys = keys this.Mode = mode this.Type = typeVar @@ -80,6 +80,29 @@ func (o *ObservabilityPipelineDatadogTagsProcessor) SetAction(v ObservabilityPip o.Action = v } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineDatadogTagsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineDatadogTagsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineDatadogTagsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineDatadogTagsProcessor) GetId() string { if o == nil { @@ -126,29 +149,6 @@ func (o *ObservabilityPipelineDatadogTagsProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineDatadogTagsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineDatadogTagsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineDatadogTagsProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetKeys returns the Keys field value. func (o *ObservabilityPipelineDatadogTagsProcessor) GetKeys() []string { if o == nil { @@ -225,9 +225,9 @@ func (o ObservabilityPipelineDatadogTagsProcessor) MarshalJSON() ([]byte, error) return datadog.Marshal(o.UnparsedObject) } toSerialize["action"] = o.Action + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["keys"] = o.Keys toSerialize["mode"] = o.Mode toSerialize["type"] = o.Type @@ -242,9 +242,9 @@ func (o ObservabilityPipelineDatadogTagsProcessor) MarshalJSON() ([]byte, error) func (o *ObservabilityPipelineDatadogTagsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { Action *ObservabilityPipelineDatadogTagsProcessorAction `json:"action"` + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Keys *[]string `json:"keys"` Mode *ObservabilityPipelineDatadogTagsProcessorMode `json:"mode"` Type *ObservabilityPipelineDatadogTagsProcessorType `json:"type"` @@ -255,15 +255,15 @@ func (o *ObservabilityPipelineDatadogTagsProcessor) UnmarshalJSON(bytes []byte) if all.Action == nil { return fmt.Errorf("required field action missing") } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Keys == nil { return fmt.Errorf("required field keys missing") } @@ -275,7 +275,7 @@ func (o *ObservabilityPipelineDatadogTagsProcessor) UnmarshalJSON(bytes []byte) } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"action", "id", "include", "inputs", "keys", "mode", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"action", "enabled", "id", "include", "keys", "mode", "type"}) } else { return err } @@ -286,9 +286,9 @@ func (o *ObservabilityPipelineDatadogTagsProcessor) UnmarshalJSON(bytes []byte) } else { o.Action = *all.Action } + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Keys = *all.Keys if !all.Mode.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_dedupe_processor.go b/api/datadogV2/model_observability_pipeline_dedupe_processor.go index 44edec85184..e5c0f0f4cc5 100644 --- a/api/datadogV2/model_observability_pipeline_dedupe_processor.go +++ b/api/datadogV2/model_observability_pipeline_dedupe_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineDedupeProcessor The `dedupe` processor removes duplicate fields in log events. type ObservabilityPipelineDedupeProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // A list of log field paths to check for duplicates. Fields []string `json:"fields"` // The unique identifier for this processor. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // The deduplication mode to apply to the fields. Mode ObservabilityPipelineDedupeProcessorMode `json:"mode"` // The processor type. The value should always be `dedupe`. @@ -33,12 +33,12 @@ type ObservabilityPipelineDedupeProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineDedupeProcessor(fields []string, id string, include string, inputs []string, mode ObservabilityPipelineDedupeProcessorMode, typeVar ObservabilityPipelineDedupeProcessorType) *ObservabilityPipelineDedupeProcessor { +func NewObservabilityPipelineDedupeProcessor(enabled bool, fields []string, id string, include string, mode ObservabilityPipelineDedupeProcessorMode, typeVar ObservabilityPipelineDedupeProcessorType) *ObservabilityPipelineDedupeProcessor { this := ObservabilityPipelineDedupeProcessor{} + this.Enabled = enabled this.Fields = fields this.Id = id this.Include = include - this.Inputs = inputs this.Mode = mode this.Type = typeVar return &this @@ -54,6 +54,29 @@ func NewObservabilityPipelineDedupeProcessorWithDefaults() *ObservabilityPipelin return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineDedupeProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineDedupeProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineDedupeProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetFields returns the Fields field value. func (o *ObservabilityPipelineDedupeProcessor) GetFields() []string { if o == nil { @@ -123,29 +146,6 @@ func (o *ObservabilityPipelineDedupeProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineDedupeProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineDedupeProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineDedupeProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetMode returns the Mode field value. func (o *ObservabilityPipelineDedupeProcessor) GetMode() ObservabilityPipelineDedupeProcessorMode { if o == nil { @@ -198,10 +198,10 @@ func (o ObservabilityPipelineDedupeProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["fields"] = o.Fields toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["mode"] = o.Mode toSerialize["type"] = o.Type @@ -214,16 +214,19 @@ func (o ObservabilityPipelineDedupeProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineDedupeProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Fields *[]string `json:"fields"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Mode *ObservabilityPipelineDedupeProcessorMode `json:"mode"` Type *ObservabilityPipelineDedupeProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Fields == nil { return fmt.Errorf("required field fields missing") } @@ -233,9 +236,6 @@ func (o *ObservabilityPipelineDedupeProcessor) UnmarshalJSON(bytes []byte) (err if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Mode == nil { return fmt.Errorf("required field mode missing") } @@ -244,16 +244,16 @@ func (o *ObservabilityPipelineDedupeProcessor) UnmarshalJSON(bytes []byte) (err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "mode", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "mode", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Fields = *all.Fields o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Mode.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_enrichment_table_processor.go b/api/datadogV2/model_observability_pipeline_enrichment_table_processor.go index 9aaf7fae2bd..15a69fa895f 100644 --- a/api/datadogV2/model_observability_pipeline_enrichment_table_processor.go +++ b/api/datadogV2/model_observability_pipeline_enrichment_table_processor.go @@ -12,6 +12,8 @@ import ( // ObservabilityPipelineEnrichmentTableProcessor The `enrichment_table` processor enriches logs using a static CSV file or GeoIP database. type ObservabilityPipelineEnrichmentTableProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // Defines a static enrichment table loaded from a CSV file. File *ObservabilityPipelineEnrichmentTableFile `json:"file,omitempty"` // Uses a GeoIP database to enrich logs based on an IP field. @@ -20,8 +22,6 @@ type ObservabilityPipelineEnrichmentTableProcessor struct { Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // Path where enrichment results should be stored in the log. Target string `json:"target"` // The processor type. The value should always be `enrichment_table`. @@ -35,11 +35,11 @@ type ObservabilityPipelineEnrichmentTableProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineEnrichmentTableProcessor(id string, include string, inputs []string, target string, typeVar ObservabilityPipelineEnrichmentTableProcessorType) *ObservabilityPipelineEnrichmentTableProcessor { +func NewObservabilityPipelineEnrichmentTableProcessor(enabled bool, id string, include string, target string, typeVar ObservabilityPipelineEnrichmentTableProcessorType) *ObservabilityPipelineEnrichmentTableProcessor { this := ObservabilityPipelineEnrichmentTableProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Target = target this.Type = typeVar return &this @@ -55,6 +55,29 @@ func NewObservabilityPipelineEnrichmentTableProcessorWithDefaults() *Observabili return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineEnrichmentTableProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineEnrichmentTableProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineEnrichmentTableProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetFile returns the File field value if set, zero value otherwise. func (o *ObservabilityPipelineEnrichmentTableProcessor) GetFile() ObservabilityPipelineEnrichmentTableFile { if o == nil || o.File == nil { @@ -157,29 +180,6 @@ func (o *ObservabilityPipelineEnrichmentTableProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineEnrichmentTableProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineEnrichmentTableProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineEnrichmentTableProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetTarget returns the Target field value. func (o *ObservabilityPipelineEnrichmentTableProcessor) GetTarget() string { if o == nil { @@ -232,6 +232,7 @@ func (o ObservabilityPipelineEnrichmentTableProcessor) MarshalJSON() ([]byte, er if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled if o.File != nil { toSerialize["file"] = o.File } @@ -240,7 +241,6 @@ func (o ObservabilityPipelineEnrichmentTableProcessor) MarshalJSON() ([]byte, er } toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["target"] = o.Target toSerialize["type"] = o.Type @@ -253,26 +253,26 @@ func (o ObservabilityPipelineEnrichmentTableProcessor) MarshalJSON() ([]byte, er // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineEnrichmentTableProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` File *ObservabilityPipelineEnrichmentTableFile `json:"file,omitempty"` Geoip *ObservabilityPipelineEnrichmentTableGeoIp `json:"geoip,omitempty"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Target *string `json:"target"` Type *ObservabilityPipelineEnrichmentTableProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Target == nil { return fmt.Errorf("required field target missing") } @@ -281,12 +281,13 @@ func (o *ObservabilityPipelineEnrichmentTableProcessor) UnmarshalJSON(bytes []by } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"file", "geoip", "id", "include", "inputs", "target", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "file", "geoip", "id", "include", "target", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled if all.File != nil && all.File.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true } @@ -297,7 +298,6 @@ func (o *ObservabilityPipelineEnrichmentTableProcessor) UnmarshalJSON(bytes []by o.Geoip = all.Geoip o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Target = *all.Target if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_filter_processor.go b/api/datadogV2/model_observability_pipeline_filter_processor.go index b3124f5daa2..a4698b9dd92 100644 --- a/api/datadogV2/model_observability_pipeline_filter_processor.go +++ b/api/datadogV2/model_observability_pipeline_filter_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineFilterProcessor 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. type ObservabilityPipelineFilterProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // 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). Id string `json:"id"` // 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. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The processor type. The value should always be `filter`. Type ObservabilityPipelineFilterProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -29,11 +29,11 @@ type ObservabilityPipelineFilterProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineFilterProcessor(id string, include string, inputs []string, typeVar ObservabilityPipelineFilterProcessorType) *ObservabilityPipelineFilterProcessor { +func NewObservabilityPipelineFilterProcessor(enabled bool, id string, include string, typeVar ObservabilityPipelineFilterProcessorType) *ObservabilityPipelineFilterProcessor { this := ObservabilityPipelineFilterProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -48,6 +48,29 @@ func NewObservabilityPipelineFilterProcessorWithDefaults() *ObservabilityPipelin return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineFilterProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineFilterProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineFilterProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineFilterProcessor) GetId() string { if o == nil { @@ -94,29 +117,6 @@ func (o *ObservabilityPipelineFilterProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineFilterProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineFilterProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineFilterProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineFilterProcessor) GetType() ObservabilityPipelineFilterProcessorType { if o == nil { @@ -146,9 +146,9 @@ func (o ObservabilityPipelineFilterProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -160,37 +160,37 @@ func (o ObservabilityPipelineFilterProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineFilterProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineFilterProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_generate_metrics_processor.go b/api/datadogV2/model_observability_pipeline_generate_metrics_processor.go index ee7dc179d9b..7044daedcfa 100644 --- a/api/datadogV2/model_observability_pipeline_generate_metrics_processor.go +++ b/api/datadogV2/model_observability_pipeline_generate_metrics_processor.go @@ -13,14 +13,14 @@ import ( // ObservabilityPipelineGenerateMetricsProcessor 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. type ObservabilityPipelineGenerateMetricsProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The unique identifier for this component. Used to reference this component in other parts of the pipeline. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. - Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this processor. - Inputs []string `json:"inputs"` + Include *string `json:"include,omitempty"` // Configuration for generating individual metrics. - Metrics []ObservabilityPipelineGeneratedMetric `json:"metrics"` + Metrics []ObservabilityPipelineGeneratedMetric `json:"metrics,omitempty"` // The processor type. Always `generate_datadog_metrics`. Type ObservabilityPipelineGenerateMetricsProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -32,12 +32,10 @@ type ObservabilityPipelineGenerateMetricsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineGenerateMetricsProcessor(id string, include string, inputs []string, metrics []ObservabilityPipelineGeneratedMetric, typeVar ObservabilityPipelineGenerateMetricsProcessorType) *ObservabilityPipelineGenerateMetricsProcessor { +func NewObservabilityPipelineGenerateMetricsProcessor(enabled bool, id string, typeVar ObservabilityPipelineGenerateMetricsProcessorType) *ObservabilityPipelineGenerateMetricsProcessor { this := ObservabilityPipelineGenerateMetricsProcessor{} + this.Enabled = enabled this.Id = id - this.Include = include - this.Inputs = inputs - this.Metrics = metrics this.Type = typeVar return &this } @@ -52,6 +50,29 @@ func NewObservabilityPipelineGenerateMetricsProcessorWithDefaults() *Observabili return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineGenerateMetricsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineGenerateMetricsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineGenerateMetricsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineGenerateMetricsProcessor) GetId() string { if o == nil { @@ -75,71 +96,58 @@ func (o *ObservabilityPipelineGenerateMetricsProcessor) SetId(v string) { o.Id = v } -// GetInclude returns the Include field value. +// GetInclude returns the Include field value if set, zero value otherwise. func (o *ObservabilityPipelineGenerateMetricsProcessor) GetInclude() string { - if o == nil { + if o == nil || o.Include == nil { var ret string return ret } - return o.Include + return *o.Include } -// GetIncludeOk returns a tuple with the Include field value +// GetIncludeOk returns a tuple with the Include field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ObservabilityPipelineGenerateMetricsProcessor) GetIncludeOk() (*string, bool) { - if o == nil { + if o == nil || o.Include == nil { return nil, false } - return &o.Include, true -} - -// SetInclude sets field value. -func (o *ObservabilityPipelineGenerateMetricsProcessor) SetInclude(v string) { - o.Include = v -} - -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineGenerateMetricsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs + return o.Include, true } -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineGenerateMetricsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true +// HasInclude returns a boolean if a field has been set. +func (o *ObservabilityPipelineGenerateMetricsProcessor) HasInclude() bool { + return o != nil && o.Include != nil } -// SetInputs sets field value. -func (o *ObservabilityPipelineGenerateMetricsProcessor) SetInputs(v []string) { - o.Inputs = v +// SetInclude gets a reference to the given string and assigns it to the Include field. +func (o *ObservabilityPipelineGenerateMetricsProcessor) SetInclude(v string) { + o.Include = &v } -// GetMetrics returns the Metrics field value. +// GetMetrics returns the Metrics field value if set, zero value otherwise. func (o *ObservabilityPipelineGenerateMetricsProcessor) GetMetrics() []ObservabilityPipelineGeneratedMetric { - if o == nil { + if o == nil || o.Metrics == nil { var ret []ObservabilityPipelineGeneratedMetric return ret } return o.Metrics } -// GetMetricsOk returns a tuple with the Metrics field value +// GetMetricsOk returns a tuple with the Metrics field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ObservabilityPipelineGenerateMetricsProcessor) GetMetricsOk() (*[]ObservabilityPipelineGeneratedMetric, bool) { - if o == nil { + if o == nil || o.Metrics == nil { return nil, false } return &o.Metrics, true } -// SetMetrics sets field value. +// HasMetrics returns a boolean if a field has been set. +func (o *ObservabilityPipelineGenerateMetricsProcessor) HasMetrics() bool { + return o != nil && o.Metrics != nil +} + +// SetMetrics gets a reference to the given []ObservabilityPipelineGeneratedMetric and assigns it to the Metrics field. func (o *ObservabilityPipelineGenerateMetricsProcessor) SetMetrics(v []ObservabilityPipelineGeneratedMetric) { o.Metrics = v } @@ -173,10 +181,14 @@ func (o ObservabilityPipelineGenerateMetricsProcessor) MarshalJSON() ([]byte, er if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id - toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs - toSerialize["metrics"] = o.Metrics + if o.Include != nil { + toSerialize["include"] = o.Include + } + if o.Metrics != nil { + toSerialize["metrics"] = o.Metrics + } toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -188,42 +200,36 @@ func (o ObservabilityPipelineGenerateMetricsProcessor) MarshalJSON() ([]byte, er // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineGenerateMetricsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` - Include *string `json:"include"` - Inputs *[]string `json:"inputs"` - Metrics *[]ObservabilityPipelineGeneratedMetric `json:"metrics"` + Include *string `json:"include,omitempty"` + Metrics []ObservabilityPipelineGeneratedMetric `json:"metrics,omitempty"` Type *ObservabilityPipelineGenerateMetricsProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } - if all.Include == nil { - return fmt.Errorf("required field include missing") - } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } - if all.Metrics == nil { - return fmt.Errorf("required field metrics missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "metrics", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "metrics", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id - o.Include = *all.Include - o.Inputs = *all.Inputs - o.Metrics = *all.Metrics + o.Include = all.Include + o.Metrics = all.Metrics if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_ocsf_mapper_processor.go b/api/datadogV2/model_observability_pipeline_ocsf_mapper_processor.go index ea9a7efc05b..8bfd012422f 100644 --- a/api/datadogV2/model_observability_pipeline_ocsf_mapper_processor.go +++ b/api/datadogV2/model_observability_pipeline_ocsf_mapper_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineOcsfMapperProcessor The `ocsf_mapper` processor transforms logs into the OCSF schema using a predefined mapping configuration. type ObservabilityPipelineOcsfMapperProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The unique identifier for this component. Used to reference this component in other parts of the pipeline. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this processor. - Inputs []string `json:"inputs"` // A list of mapping rules to convert events to the OCSF format. Mappings []ObservabilityPipelineOcsfMapperProcessorMapping `json:"mappings"` // The processor type. The value should always be `ocsf_mapper`. @@ -31,11 +31,11 @@ type ObservabilityPipelineOcsfMapperProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineOcsfMapperProcessor(id string, include string, inputs []string, mappings []ObservabilityPipelineOcsfMapperProcessorMapping, typeVar ObservabilityPipelineOcsfMapperProcessorType) *ObservabilityPipelineOcsfMapperProcessor { +func NewObservabilityPipelineOcsfMapperProcessor(enabled bool, id string, include string, mappings []ObservabilityPipelineOcsfMapperProcessorMapping, typeVar ObservabilityPipelineOcsfMapperProcessorType) *ObservabilityPipelineOcsfMapperProcessor { this := ObservabilityPipelineOcsfMapperProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Mappings = mappings this.Type = typeVar return &this @@ -51,6 +51,29 @@ func NewObservabilityPipelineOcsfMapperProcessorWithDefaults() *ObservabilityPip return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineOcsfMapperProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineOcsfMapperProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineOcsfMapperProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineOcsfMapperProcessor) GetId() string { if o == nil { @@ -97,29 +120,6 @@ func (o *ObservabilityPipelineOcsfMapperProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineOcsfMapperProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineOcsfMapperProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineOcsfMapperProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetMappings returns the Mappings field value. func (o *ObservabilityPipelineOcsfMapperProcessor) GetMappings() []ObservabilityPipelineOcsfMapperProcessorMapping { if o == nil { @@ -172,9 +172,9 @@ func (o ObservabilityPipelineOcsfMapperProcessor) MarshalJSON() ([]byte, error) if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["mappings"] = o.Mappings toSerialize["type"] = o.Type @@ -187,24 +187,24 @@ func (o ObservabilityPipelineOcsfMapperProcessor) MarshalJSON() ([]byte, error) // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineOcsfMapperProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Mappings *[]ObservabilityPipelineOcsfMapperProcessorMapping `json:"mappings"` Type *ObservabilityPipelineOcsfMapperProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Mappings == nil { return fmt.Errorf("required field mappings missing") } @@ -213,15 +213,15 @@ func (o *ObservabilityPipelineOcsfMapperProcessor) UnmarshalJSON(bytes []byte) ( } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "mappings", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "mappings", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Mappings = *all.Mappings if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_parse_grok_processor.go b/api/datadogV2/model_observability_pipeline_parse_grok_processor.go index 3ae69dffb36..23e39722d32 100644 --- a/api/datadogV2/model_observability_pipeline_parse_grok_processor.go +++ b/api/datadogV2/model_observability_pipeline_parse_grok_processor.go @@ -14,12 +14,12 @@ import ( type ObservabilityPipelineParseGrokProcessor struct { // If set to `true`, disables the default Grok rules provided by Datadog. DisableLibraryRules *bool `json:"disable_library_rules,omitempty"` + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // A unique identifier for this processor. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The list of Grok parsing rules. If multiple matching rules are provided, they are evaluated in order. The first successful match is applied. Rules []ObservabilityPipelineParseGrokProcessorRule `json:"rules"` // The processor type. The value should always be `parse_grok`. @@ -33,13 +33,13 @@ type ObservabilityPipelineParseGrokProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineParseGrokProcessor(id string, include string, inputs []string, rules []ObservabilityPipelineParseGrokProcessorRule, typeVar ObservabilityPipelineParseGrokProcessorType) *ObservabilityPipelineParseGrokProcessor { +func NewObservabilityPipelineParseGrokProcessor(enabled bool, id string, include string, rules []ObservabilityPipelineParseGrokProcessorRule, typeVar ObservabilityPipelineParseGrokProcessorType) *ObservabilityPipelineParseGrokProcessor { this := ObservabilityPipelineParseGrokProcessor{} var disableLibraryRules bool = false this.DisableLibraryRules = &disableLibraryRules + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Rules = rules this.Type = typeVar return &this @@ -85,6 +85,29 @@ func (o *ObservabilityPipelineParseGrokProcessor) SetDisableLibraryRules(v bool) o.DisableLibraryRules = &v } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineParseGrokProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineParseGrokProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineParseGrokProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineParseGrokProcessor) GetId() string { if o == nil { @@ -131,29 +154,6 @@ func (o *ObservabilityPipelineParseGrokProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineParseGrokProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineParseGrokProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineParseGrokProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetRules returns the Rules field value. func (o *ObservabilityPipelineParseGrokProcessor) GetRules() []ObservabilityPipelineParseGrokProcessorRule { if o == nil { @@ -209,9 +209,9 @@ func (o ObservabilityPipelineParseGrokProcessor) MarshalJSON() ([]byte, error) { if o.DisableLibraryRules != nil { toSerialize["disable_library_rules"] = o.DisableLibraryRules } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["rules"] = o.Rules toSerialize["type"] = o.Type @@ -225,24 +225,24 @@ func (o ObservabilityPipelineParseGrokProcessor) MarshalJSON() ([]byte, error) { func (o *ObservabilityPipelineParseGrokProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { DisableLibraryRules *bool `json:"disable_library_rules,omitempty"` + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Rules *[]ObservabilityPipelineParseGrokProcessorRule `json:"rules"` Type *ObservabilityPipelineParseGrokProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Rules == nil { return fmt.Errorf("required field rules missing") } @@ -251,16 +251,16 @@ func (o *ObservabilityPipelineParseGrokProcessor) UnmarshalJSON(bytes []byte) (e } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"disable_library_rules", "id", "include", "inputs", "rules", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"disable_library_rules", "enabled", "id", "include", "rules", "type"}) } else { return err } hasInvalidField := false o.DisableLibraryRules = all.DisableLibraryRules + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Rules = *all.Rules if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_parse_json_processor.go b/api/datadogV2/model_observability_pipeline_parse_json_processor.go index e84945c1e43..1ff3027968f 100644 --- a/api/datadogV2/model_observability_pipeline_parse_json_processor.go +++ b/api/datadogV2/model_observability_pipeline_parse_json_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineParseJSONProcessor 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. type ObservabilityPipelineParseJSONProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The name of the log field that contains a JSON string. Field string `json:"field"` // A unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The processor type. The value should always be `parse_json`. Type ObservabilityPipelineParseJSONProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -31,12 +31,12 @@ type ObservabilityPipelineParseJSONProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineParseJSONProcessor(field string, id string, include string, inputs []string, typeVar ObservabilityPipelineParseJSONProcessorType) *ObservabilityPipelineParseJSONProcessor { +func NewObservabilityPipelineParseJSONProcessor(enabled bool, field string, id string, include string, typeVar ObservabilityPipelineParseJSONProcessorType) *ObservabilityPipelineParseJSONProcessor { this := ObservabilityPipelineParseJSONProcessor{} + this.Enabled = enabled this.Field = field this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -51,6 +51,29 @@ func NewObservabilityPipelineParseJSONProcessorWithDefaults() *ObservabilityPipe return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineParseJSONProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineParseJSONProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineParseJSONProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetField returns the Field field value. func (o *ObservabilityPipelineParseJSONProcessor) GetField() string { if o == nil { @@ -120,29 +143,6 @@ func (o *ObservabilityPipelineParseJSONProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineParseJSONProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineParseJSONProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineParseJSONProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineParseJSONProcessor) GetType() ObservabilityPipelineParseJSONProcessorType { if o == nil { @@ -172,10 +172,10 @@ func (o ObservabilityPipelineParseJSONProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["field"] = o.Field toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -187,15 +187,18 @@ func (o ObservabilityPipelineParseJSONProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineParseJSONProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Field *string `json:"field"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineParseJSONProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Field == nil { return fmt.Errorf("required field field missing") } @@ -205,24 +208,21 @@ func (o *ObservabilityPipelineParseJSONProcessor) UnmarshalJSON(bytes []byte) (e if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"field", "id", "include", "inputs", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "field", "id", "include", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Field = *all.Field o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_quota_processor.go b/api/datadogV2/model_observability_pipeline_quota_processor.go index c682a671a0b..1914e4e30eb 100644 --- a/api/datadogV2/model_observability_pipeline_quota_processor.go +++ b/api/datadogV2/model_observability_pipeline_quota_processor.go @@ -13,15 +13,15 @@ import ( // ObservabilityPipelineQuotaProcessor 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. type ObservabilityPipelineQuotaProcessor struct { // 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. - DropEvents bool `json:"drop_events"` + DropEvents *bool `json:"drop_events,omitempty"` + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // 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). Id string `json:"id"` // If `true`, the processor skips quota checks when partition fields are missing from the logs. IgnoreWhenMissingPartitions *bool `json:"ignore_when_missing_partitions,omitempty"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The maximum amount of data or number of events allowed before the quota is enforced. Can be specified in bytes or events. Limit ObservabilityPipelineQuotaProcessorLimit `json:"limit"` // Name of the quota. @@ -46,12 +46,11 @@ type ObservabilityPipelineQuotaProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineQuotaProcessor(dropEvents bool, id string, include string, inputs []string, limit ObservabilityPipelineQuotaProcessorLimit, name string, typeVar ObservabilityPipelineQuotaProcessorType) *ObservabilityPipelineQuotaProcessor { +func NewObservabilityPipelineQuotaProcessor(enabled bool, id string, include string, limit ObservabilityPipelineQuotaProcessorLimit, name string, typeVar ObservabilityPipelineQuotaProcessorType) *ObservabilityPipelineQuotaProcessor { this := ObservabilityPipelineQuotaProcessor{} - this.DropEvents = dropEvents + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Limit = limit this.Name = name this.Type = typeVar @@ -68,27 +67,55 @@ func NewObservabilityPipelineQuotaProcessorWithDefaults() *ObservabilityPipeline return &this } -// GetDropEvents returns the DropEvents field value. +// GetDropEvents returns the DropEvents field value if set, zero value otherwise. func (o *ObservabilityPipelineQuotaProcessor) GetDropEvents() bool { - if o == nil { + if o == nil || o.DropEvents == nil { var ret bool return ret } - return o.DropEvents + return *o.DropEvents } -// GetDropEventsOk returns a tuple with the DropEvents field value +// GetDropEventsOk returns a tuple with the DropEvents field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *ObservabilityPipelineQuotaProcessor) GetDropEventsOk() (*bool, bool) { - if o == nil { + if o == nil || o.DropEvents == nil { return nil, false } - return &o.DropEvents, true + return o.DropEvents, true } -// SetDropEvents sets field value. +// HasDropEvents returns a boolean if a field has been set. +func (o *ObservabilityPipelineQuotaProcessor) HasDropEvents() bool { + return o != nil && o.DropEvents != nil +} + +// SetDropEvents gets a reference to the given bool and assigns it to the DropEvents field. func (o *ObservabilityPipelineQuotaProcessor) SetDropEvents(v bool) { - o.DropEvents = v + o.DropEvents = &v +} + +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineQuotaProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineQuotaProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineQuotaProcessor) SetEnabled(v bool) { + o.Enabled = v } // GetId returns the Id field value. @@ -165,29 +192,6 @@ func (o *ObservabilityPipelineQuotaProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineQuotaProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineQuotaProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineQuotaProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetLimit returns the Limit field value. func (o *ObservabilityPipelineQuotaProcessor) GetLimit() ObservabilityPipelineQuotaProcessorLimit { if o == nil { @@ -347,13 +351,15 @@ func (o ObservabilityPipelineQuotaProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } - toSerialize["drop_events"] = o.DropEvents + if o.DropEvents != nil { + toSerialize["drop_events"] = o.DropEvents + } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id if o.IgnoreWhenMissingPartitions != nil { toSerialize["ignore_when_missing_partitions"] = o.IgnoreWhenMissingPartitions } toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["limit"] = o.Limit toSerialize["name"] = o.Name if o.OverflowAction != nil { @@ -376,11 +382,11 @@ func (o ObservabilityPipelineQuotaProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineQuotaProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { - DropEvents *bool `json:"drop_events"` + DropEvents *bool `json:"drop_events,omitempty"` + Enabled *bool `json:"enabled"` Id *string `json:"id"` IgnoreWhenMissingPartitions *bool `json:"ignore_when_missing_partitions,omitempty"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Limit *ObservabilityPipelineQuotaProcessorLimit `json:"limit"` Name *string `json:"name"` OverflowAction *ObservabilityPipelineQuotaProcessorOverflowAction `json:"overflow_action,omitempty"` @@ -391,8 +397,8 @@ func (o *ObservabilityPipelineQuotaProcessor) UnmarshalJSON(bytes []byte) (err e if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } - if all.DropEvents == nil { - return fmt.Errorf("required field drop_events missing") + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") } if all.Id == nil { return fmt.Errorf("required field id missing") @@ -400,9 +406,6 @@ func (o *ObservabilityPipelineQuotaProcessor) UnmarshalJSON(bytes []byte) (err e if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Limit == nil { return fmt.Errorf("required field limit missing") } @@ -414,17 +417,17 @@ func (o *ObservabilityPipelineQuotaProcessor) UnmarshalJSON(bytes []byte) (err e } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"drop_events", "id", "ignore_when_missing_partitions", "include", "inputs", "limit", "name", "overflow_action", "overrides", "partition_fields", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"drop_events", "enabled", "id", "ignore_when_missing_partitions", "include", "limit", "name", "overflow_action", "overrides", "partition_fields", "type"}) } else { return err } hasInvalidField := false - o.DropEvents = *all.DropEvents + o.DropEvents = all.DropEvents + o.Enabled = *all.Enabled o.Id = *all.Id o.IgnoreWhenMissingPartitions = all.IgnoreWhenMissingPartitions o.Include = *all.Include - o.Inputs = *all.Inputs if all.Limit.UnparsedObject != nil && o.UnparsedObject == nil { hasInvalidField = true } diff --git a/api/datadogV2/model_observability_pipeline_reduce_processor.go b/api/datadogV2/model_observability_pipeline_reduce_processor.go index 1e93f48e941..0f7fcd5301f 100644 --- a/api/datadogV2/model_observability_pipeline_reduce_processor.go +++ b/api/datadogV2/model_observability_pipeline_reduce_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineReduceProcessor The `reduce` processor aggregates and merges logs based on matching keys and merge strategies. type ObservabilityPipelineReduceProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // A list of fields used to group log events for merging. GroupBy []string `json:"group_by"` // The unique identifier for this processor. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // List of merge strategies defining how values from grouped events should be combined. MergeStrategies []ObservabilityPipelineReduceProcessorMergeStrategy `json:"merge_strategies"` // The processor type. The value should always be `reduce`. @@ -33,12 +33,12 @@ type ObservabilityPipelineReduceProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineReduceProcessor(groupBy []string, id string, include string, inputs []string, mergeStrategies []ObservabilityPipelineReduceProcessorMergeStrategy, typeVar ObservabilityPipelineReduceProcessorType) *ObservabilityPipelineReduceProcessor { +func NewObservabilityPipelineReduceProcessor(enabled bool, groupBy []string, id string, include string, mergeStrategies []ObservabilityPipelineReduceProcessorMergeStrategy, typeVar ObservabilityPipelineReduceProcessorType) *ObservabilityPipelineReduceProcessor { this := ObservabilityPipelineReduceProcessor{} + this.Enabled = enabled this.GroupBy = groupBy this.Id = id this.Include = include - this.Inputs = inputs this.MergeStrategies = mergeStrategies this.Type = typeVar return &this @@ -54,6 +54,29 @@ func NewObservabilityPipelineReduceProcessorWithDefaults() *ObservabilityPipelin return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineReduceProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineReduceProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineReduceProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetGroupBy returns the GroupBy field value. func (o *ObservabilityPipelineReduceProcessor) GetGroupBy() []string { if o == nil { @@ -123,29 +146,6 @@ func (o *ObservabilityPipelineReduceProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineReduceProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineReduceProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineReduceProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetMergeStrategies returns the MergeStrategies field value. func (o *ObservabilityPipelineReduceProcessor) GetMergeStrategies() []ObservabilityPipelineReduceProcessorMergeStrategy { if o == nil { @@ -198,10 +198,10 @@ func (o ObservabilityPipelineReduceProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["group_by"] = o.GroupBy toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["merge_strategies"] = o.MergeStrategies toSerialize["type"] = o.Type @@ -214,16 +214,19 @@ func (o ObservabilityPipelineReduceProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineReduceProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` GroupBy *[]string `json:"group_by"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` MergeStrategies *[]ObservabilityPipelineReduceProcessorMergeStrategy `json:"merge_strategies"` Type *ObservabilityPipelineReduceProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.GroupBy == nil { return fmt.Errorf("required field group_by missing") } @@ -233,9 +236,6 @@ func (o *ObservabilityPipelineReduceProcessor) UnmarshalJSON(bytes []byte) (err if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.MergeStrategies == nil { return fmt.Errorf("required field merge_strategies missing") } @@ -244,16 +244,16 @@ func (o *ObservabilityPipelineReduceProcessor) UnmarshalJSON(bytes []byte) (err } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"group_by", "id", "include", "inputs", "merge_strategies", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "group_by", "id", "include", "merge_strategies", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.GroupBy = *all.GroupBy o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.MergeStrategies = *all.MergeStrategies if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_remove_fields_processor.go b/api/datadogV2/model_observability_pipeline_remove_fields_processor.go index ef671521f04..eab7b5eb753 100644 --- a/api/datadogV2/model_observability_pipeline_remove_fields_processor.go +++ b/api/datadogV2/model_observability_pipeline_remove_fields_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineRemoveFieldsProcessor The `remove_fields` processor deletes specified fields from logs. type ObservabilityPipelineRemoveFieldsProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // A list of field names to be removed from each log event. Fields []string `json:"fields"` // The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // The `PipelineRemoveFieldsProcessor` `inputs`. - Inputs []string `json:"inputs"` // The processor type. The value should always be `remove_fields`. Type ObservabilityPipelineRemoveFieldsProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -31,12 +31,12 @@ type ObservabilityPipelineRemoveFieldsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineRemoveFieldsProcessor(fields []string, id string, include string, inputs []string, typeVar ObservabilityPipelineRemoveFieldsProcessorType) *ObservabilityPipelineRemoveFieldsProcessor { +func NewObservabilityPipelineRemoveFieldsProcessor(enabled bool, fields []string, id string, include string, typeVar ObservabilityPipelineRemoveFieldsProcessorType) *ObservabilityPipelineRemoveFieldsProcessor { this := ObservabilityPipelineRemoveFieldsProcessor{} + this.Enabled = enabled this.Fields = fields this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -51,6 +51,29 @@ func NewObservabilityPipelineRemoveFieldsProcessorWithDefaults() *ObservabilityP return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineRemoveFieldsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineRemoveFieldsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineRemoveFieldsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetFields returns the Fields field value. func (o *ObservabilityPipelineRemoveFieldsProcessor) GetFields() []string { if o == nil { @@ -120,29 +143,6 @@ func (o *ObservabilityPipelineRemoveFieldsProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineRemoveFieldsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineRemoveFieldsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineRemoveFieldsProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineRemoveFieldsProcessor) GetType() ObservabilityPipelineRemoveFieldsProcessorType { if o == nil { @@ -172,10 +172,10 @@ func (o ObservabilityPipelineRemoveFieldsProcessor) MarshalJSON() ([]byte, error if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["fields"] = o.Fields toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -187,15 +187,18 @@ func (o ObservabilityPipelineRemoveFieldsProcessor) MarshalJSON() ([]byte, error // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineRemoveFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Fields *[]string `json:"fields"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineRemoveFieldsProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Fields == nil { return fmt.Errorf("required field fields missing") } @@ -205,24 +208,21 @@ func (o *ObservabilityPipelineRemoveFieldsProcessor) UnmarshalJSON(bytes []byte) if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Fields = *all.Fields o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_rename_fields_processor.go b/api/datadogV2/model_observability_pipeline_rename_fields_processor.go index 0409e19af35..0814c80d4b5 100644 --- a/api/datadogV2/model_observability_pipeline_rename_fields_processor.go +++ b/api/datadogV2/model_observability_pipeline_rename_fields_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineRenameFieldsProcessor The `rename_fields` processor changes field names. type ObservabilityPipelineRenameFieldsProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // 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. Fields []ObservabilityPipelineRenameFieldsProcessorField `json:"fields"` // A unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The processor type. The value should always be `rename_fields`. Type ObservabilityPipelineRenameFieldsProcessorType `json:"type"` // UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct @@ -31,12 +31,12 @@ type ObservabilityPipelineRenameFieldsProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineRenameFieldsProcessor(fields []ObservabilityPipelineRenameFieldsProcessorField, id string, include string, inputs []string, typeVar ObservabilityPipelineRenameFieldsProcessorType) *ObservabilityPipelineRenameFieldsProcessor { +func NewObservabilityPipelineRenameFieldsProcessor(enabled bool, fields []ObservabilityPipelineRenameFieldsProcessorField, id string, include string, typeVar ObservabilityPipelineRenameFieldsProcessorType) *ObservabilityPipelineRenameFieldsProcessor { this := ObservabilityPipelineRenameFieldsProcessor{} + this.Enabled = enabled this.Fields = fields this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -51,6 +51,29 @@ func NewObservabilityPipelineRenameFieldsProcessorWithDefaults() *ObservabilityP return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineRenameFieldsProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineRenameFieldsProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineRenameFieldsProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetFields returns the Fields field value. func (o *ObservabilityPipelineRenameFieldsProcessor) GetFields() []ObservabilityPipelineRenameFieldsProcessorField { if o == nil { @@ -120,29 +143,6 @@ func (o *ObservabilityPipelineRenameFieldsProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineRenameFieldsProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineRenameFieldsProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineRenameFieldsProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetType returns the Type field value. func (o *ObservabilityPipelineRenameFieldsProcessor) GetType() ObservabilityPipelineRenameFieldsProcessorType { if o == nil { @@ -172,10 +172,10 @@ func (o ObservabilityPipelineRenameFieldsProcessor) MarshalJSON() ([]byte, error if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["fields"] = o.Fields toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["type"] = o.Type for key, value := range o.AdditionalProperties { @@ -187,15 +187,18 @@ func (o ObservabilityPipelineRenameFieldsProcessor) MarshalJSON() ([]byte, error // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineRenameFieldsProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Fields *[]ObservabilityPipelineRenameFieldsProcessorField `json:"fields"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Type *ObservabilityPipelineRenameFieldsProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Fields == nil { return fmt.Errorf("required field fields missing") } @@ -205,24 +208,21 @@ func (o *ObservabilityPipelineRenameFieldsProcessor) UnmarshalJSON(bytes []byte) if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"fields", "id", "include", "inputs", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "fields", "id", "include", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Fields = *all.Fields o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs if !all.Type.IsValid() { hasInvalidField = true } else { diff --git a/api/datadogV2/model_observability_pipeline_sample_processor.go b/api/datadogV2/model_observability_pipeline_sample_processor.go index 9c230f6976a..b5170694c67 100644 --- a/api/datadogV2/model_observability_pipeline_sample_processor.go +++ b/api/datadogV2/model_observability_pipeline_sample_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineSampleProcessor The `sample` processor allows probabilistic sampling of logs at a fixed rate. type ObservabilityPipelineSampleProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // 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). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // The percentage of logs to sample. Percentage *float64 `json:"percentage,omitempty"` // Number of events to sample (1 in N). @@ -33,11 +33,11 @@ type ObservabilityPipelineSampleProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineSampleProcessor(id string, include string, inputs []string, typeVar ObservabilityPipelineSampleProcessorType) *ObservabilityPipelineSampleProcessor { +func NewObservabilityPipelineSampleProcessor(enabled bool, id string, include string, typeVar ObservabilityPipelineSampleProcessorType) *ObservabilityPipelineSampleProcessor { this := ObservabilityPipelineSampleProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Type = typeVar return &this } @@ -52,6 +52,29 @@ func NewObservabilityPipelineSampleProcessorWithDefaults() *ObservabilityPipelin return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineSampleProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineSampleProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineSampleProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineSampleProcessor) GetId() string { if o == nil { @@ -98,29 +121,6 @@ func (o *ObservabilityPipelineSampleProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineSampleProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineSampleProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineSampleProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetPercentage returns the Percentage field value if set, zero value otherwise. func (o *ObservabilityPipelineSampleProcessor) GetPercentage() float64 { if o == nil || o.Percentage == nil { @@ -206,9 +206,9 @@ func (o ObservabilityPipelineSampleProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs if o.Percentage != nil { toSerialize["percentage"] = o.Percentage } @@ -226,9 +226,9 @@ func (o ObservabilityPipelineSampleProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineSampleProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Percentage *float64 `json:"percentage,omitempty"` Rate *int64 `json:"rate,omitempty"` Type *ObservabilityPipelineSampleProcessorType `json:"type"` @@ -236,29 +236,29 @@ func (o *ObservabilityPipelineSampleProcessor) UnmarshalJSON(bytes []byte) (err if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Type == nil { return fmt.Errorf("required field type missing") } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "percentage", "rate", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "percentage", "rate", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Percentage = all.Percentage o.Rate = all.Rate if !all.Type.IsValid() { diff --git a/api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor.go b/api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor.go index 7d828c85171..5bbd58f374f 100644 --- a/api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor.go +++ b/api/datadogV2/model_observability_pipeline_sensitive_data_scanner_processor.go @@ -12,12 +12,12 @@ import ( // ObservabilityPipelineSensitiveDataScannerProcessor The `sensitive_data_scanner` processor detects and optionally redacts sensitive data in log events. type ObservabilityPipelineSensitiveDataScannerProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // The unique identifier for this component. Used to reference this component in other parts of the pipeline (e.g., as input to downstream components). Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the `input` for this component. - Inputs []string `json:"inputs"` // A list of rules for identifying and acting on sensitive data patterns. Rules []ObservabilityPipelineSensitiveDataScannerProcessorRule `json:"rules"` // The processor type. The value should always be `sensitive_data_scanner`. @@ -31,11 +31,11 @@ type ObservabilityPipelineSensitiveDataScannerProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineSensitiveDataScannerProcessor(id string, include string, inputs []string, rules []ObservabilityPipelineSensitiveDataScannerProcessorRule, typeVar ObservabilityPipelineSensitiveDataScannerProcessorType) *ObservabilityPipelineSensitiveDataScannerProcessor { +func NewObservabilityPipelineSensitiveDataScannerProcessor(enabled bool, id string, include string, rules []ObservabilityPipelineSensitiveDataScannerProcessorRule, typeVar ObservabilityPipelineSensitiveDataScannerProcessorType) *ObservabilityPipelineSensitiveDataScannerProcessor { this := ObservabilityPipelineSensitiveDataScannerProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Rules = rules this.Type = typeVar return &this @@ -51,6 +51,29 @@ func NewObservabilityPipelineSensitiveDataScannerProcessorWithDefaults() *Observ return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineSensitiveDataScannerProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetId returns the Id field value. func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetId() string { if o == nil { @@ -97,29 +120,6 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessor) SetInclude(v string o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineSensitiveDataScannerProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetRules returns the Rules field value. func (o *ObservabilityPipelineSensitiveDataScannerProcessor) GetRules() []ObservabilityPipelineSensitiveDataScannerProcessorRule { if o == nil { @@ -172,9 +172,9 @@ func (o ObservabilityPipelineSensitiveDataScannerProcessor) MarshalJSON() ([]byt if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["rules"] = o.Rules toSerialize["type"] = o.Type @@ -187,24 +187,24 @@ func (o ObservabilityPipelineSensitiveDataScannerProcessor) MarshalJSON() ([]byt // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineSensitiveDataScannerProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Rules *[]ObservabilityPipelineSensitiveDataScannerProcessorRule `json:"rules"` Type *ObservabilityPipelineSensitiveDataScannerProcessorType `json:"type"` }{} if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Rules == nil { return fmt.Errorf("required field rules missing") } @@ -213,15 +213,15 @@ func (o *ObservabilityPipelineSensitiveDataScannerProcessor) UnmarshalJSON(bytes } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"id", "include", "inputs", "rules", "type"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "id", "include", "rules", "type"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Rules = *all.Rules if !all.Type.IsValid() { hasInvalidField = true diff --git a/api/datadogV2/model_observability_pipeline_throttle_processor.go b/api/datadogV2/model_observability_pipeline_throttle_processor.go index 289b01c7c87..2625fdcba6b 100644 --- a/api/datadogV2/model_observability_pipeline_throttle_processor.go +++ b/api/datadogV2/model_observability_pipeline_throttle_processor.go @@ -12,14 +12,14 @@ import ( // ObservabilityPipelineThrottleProcessor The `throttle` processor limits the number of events that pass through over a given time window. type ObservabilityPipelineThrottleProcessor struct { + // Whether this processor is enabled. + Enabled bool `json:"enabled"` // Optional list of fields used to group events before the threshold has been reached. GroupBy []string `json:"group_by,omitempty"` // The unique identifier for this processor. Id string `json:"id"` // A Datadog search query used to determine which logs this processor targets. Include string `json:"include"` - // A list of component IDs whose output is used as the input for this processor. - Inputs []string `json:"inputs"` // the number of events allowed in a given time window. Events sent after the threshold has been reached, are dropped. Threshold int64 `json:"threshold"` // The processor type. The value should always be `throttle`. @@ -35,11 +35,11 @@ type ObservabilityPipelineThrottleProcessor struct { // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed. -func NewObservabilityPipelineThrottleProcessor(id string, include string, inputs []string, threshold int64, typeVar ObservabilityPipelineThrottleProcessorType, window float64) *ObservabilityPipelineThrottleProcessor { +func NewObservabilityPipelineThrottleProcessor(enabled bool, id string, include string, threshold int64, typeVar ObservabilityPipelineThrottleProcessorType, window float64) *ObservabilityPipelineThrottleProcessor { this := ObservabilityPipelineThrottleProcessor{} + this.Enabled = enabled this.Id = id this.Include = include - this.Inputs = inputs this.Threshold = threshold this.Type = typeVar this.Window = window @@ -56,6 +56,29 @@ func NewObservabilityPipelineThrottleProcessorWithDefaults() *ObservabilityPipel return &this } +// GetEnabled returns the Enabled field value. +func (o *ObservabilityPipelineThrottleProcessor) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *ObservabilityPipelineThrottleProcessor) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value. +func (o *ObservabilityPipelineThrottleProcessor) SetEnabled(v bool) { + o.Enabled = v +} + // GetGroupBy returns the GroupBy field value if set, zero value otherwise. func (o *ObservabilityPipelineThrottleProcessor) GetGroupBy() []string { if o == nil || o.GroupBy == nil { @@ -130,29 +153,6 @@ func (o *ObservabilityPipelineThrottleProcessor) SetInclude(v string) { o.Include = v } -// GetInputs returns the Inputs field value. -func (o *ObservabilityPipelineThrottleProcessor) GetInputs() []string { - if o == nil { - var ret []string - return ret - } - return o.Inputs -} - -// GetInputsOk returns a tuple with the Inputs field value -// and a boolean to check if the value has been set. -func (o *ObservabilityPipelineThrottleProcessor) GetInputsOk() (*[]string, bool) { - if o == nil { - return nil, false - } - return &o.Inputs, true -} - -// SetInputs sets field value. -func (o *ObservabilityPipelineThrottleProcessor) SetInputs(v []string) { - o.Inputs = v -} - // GetThreshold returns the Threshold field value. func (o *ObservabilityPipelineThrottleProcessor) GetThreshold() int64 { if o == nil { @@ -228,12 +228,12 @@ func (o ObservabilityPipelineThrottleProcessor) MarshalJSON() ([]byte, error) { if o.UnparsedObject != nil { return datadog.Marshal(o.UnparsedObject) } + toSerialize["enabled"] = o.Enabled if o.GroupBy != nil { toSerialize["group_by"] = o.GroupBy } toSerialize["id"] = o.Id toSerialize["include"] = o.Include - toSerialize["inputs"] = o.Inputs toSerialize["threshold"] = o.Threshold toSerialize["type"] = o.Type toSerialize["window"] = o.Window @@ -247,10 +247,10 @@ func (o ObservabilityPipelineThrottleProcessor) MarshalJSON() ([]byte, error) { // UnmarshalJSON deserializes the given payload. func (o *ObservabilityPipelineThrottleProcessor) UnmarshalJSON(bytes []byte) (err error) { all := struct { + Enabled *bool `json:"enabled"` GroupBy []string `json:"group_by,omitempty"` Id *string `json:"id"` Include *string `json:"include"` - Inputs *[]string `json:"inputs"` Threshold *int64 `json:"threshold"` Type *ObservabilityPipelineThrottleProcessorType `json:"type"` Window *float64 `json:"window"` @@ -258,15 +258,15 @@ func (o *ObservabilityPipelineThrottleProcessor) UnmarshalJSON(bytes []byte) (er if err = datadog.Unmarshal(bytes, &all); err != nil { return datadog.Unmarshal(bytes, &o.UnparsedObject) } + if all.Enabled == nil { + return fmt.Errorf("required field enabled missing") + } if all.Id == nil { return fmt.Errorf("required field id missing") } if all.Include == nil { return fmt.Errorf("required field include missing") } - if all.Inputs == nil { - return fmt.Errorf("required field inputs missing") - } if all.Threshold == nil { return fmt.Errorf("required field threshold missing") } @@ -278,16 +278,16 @@ func (o *ObservabilityPipelineThrottleProcessor) UnmarshalJSON(bytes []byte) (er } additionalProperties := make(map[string]interface{}) if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil { - datadog.DeleteKeys(additionalProperties, &[]string{"group_by", "id", "include", "inputs", "threshold", "type", "window"}) + datadog.DeleteKeys(additionalProperties, &[]string{"enabled", "group_by", "id", "include", "threshold", "type", "window"}) } else { return err } hasInvalidField := false + o.Enabled = *all.Enabled o.GroupBy = all.GroupBy o.Id = *all.Id o.Include = *all.Include - o.Inputs = *all.Inputs o.Threshold = *all.Threshold if !all.Type.IsValid() { hasInvalidField = true diff --git a/examples/v2/observability-pipelines/CreatePipeline.go b/examples/v2/observability-pipelines/CreatePipeline.go index 6e2db8542a1..8244ab7f6cf 100644 --- a/examples/v2/observability-pipelines/CreatePipeline.go +++ b/examples/v2/observability-pipelines/CreatePipeline.go @@ -22,21 +22,29 @@ func main() { ObservabilityPipelineDatadogLogsDestination: &datadogV2.ObservabilityPipelineDatadogLogsDestination{ Id: "datadog-logs-destination", Inputs: []string{ - "filter-processor", + "my-processor-group", }, Type: datadogV2.OBSERVABILITYPIPELINEDATADOGLOGSDESTINATIONTYPE_DATADOG_LOGS, }}, }, - Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ - datadogV2.ObservabilityPipelineConfigProcessorItem{ - ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ - Id: "filter-processor", - Include: "service:my-service", - Inputs: []string{ - "datadog-agent-source", - }, - Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, - }}, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorGroup{ + { + Enabled: true, + Id: "my-processor-group", + Include: "service:my-service", + Inputs: []string{ + "datadog-agent-source", + }, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ + datadogV2.ObservabilityPipelineConfigProcessorItem{ + ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ + Enabled: true, + Id: "filter-processor", + Include: "status:error", + Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, + }}, + }, + }, }, Sources: []datadogV2.ObservabilityPipelineConfigSourceItem{ datadogV2.ObservabilityPipelineConfigSourceItem{ diff --git a/examples/v2/observability-pipelines/UpdatePipeline.go b/examples/v2/observability-pipelines/UpdatePipeline.go index d24b67b9985..6923e55a562 100644 --- a/examples/v2/observability-pipelines/UpdatePipeline.go +++ b/examples/v2/observability-pipelines/UpdatePipeline.go @@ -25,21 +25,29 @@ func main() { ObservabilityPipelineDatadogLogsDestination: &datadogV2.ObservabilityPipelineDatadogLogsDestination{ Id: "updated-datadog-logs-destination-id", Inputs: []string{ - "filter-processor", + "my-processor-group", }, Type: datadogV2.OBSERVABILITYPIPELINEDATADOGLOGSDESTINATIONTYPE_DATADOG_LOGS, }}, }, - Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ - datadogV2.ObservabilityPipelineConfigProcessorItem{ - ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ - Id: "filter-processor", - Include: "service:my-service", - Inputs: []string{ - "datadog-agent-source", - }, - Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, - }}, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorGroup{ + { + Enabled: true, + Id: "my-processor-group", + Include: "service:my-service", + Inputs: []string{ + "datadog-agent-source", + }, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ + datadogV2.ObservabilityPipelineConfigProcessorItem{ + ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ + Enabled: true, + Id: "filter-processor", + Include: "status:error", + Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, + }}, + }, + }, }, Sources: []datadogV2.ObservabilityPipelineConfigSourceItem{ datadogV2.ObservabilityPipelineConfigSourceItem{ diff --git a/examples/v2/observability-pipelines/ValidatePipeline.go b/examples/v2/observability-pipelines/ValidatePipeline.go index 5a4e820a186..ec4b0e1675c 100644 --- a/examples/v2/observability-pipelines/ValidatePipeline.go +++ b/examples/v2/observability-pipelines/ValidatePipeline.go @@ -22,21 +22,29 @@ func main() { ObservabilityPipelineDatadogLogsDestination: &datadogV2.ObservabilityPipelineDatadogLogsDestination{ Id: "datadog-logs-destination", Inputs: []string{ - "filter-processor", + "my-processor-group", }, Type: datadogV2.OBSERVABILITYPIPELINEDATADOGLOGSDESTINATIONTYPE_DATADOG_LOGS, }}, }, - Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ - datadogV2.ObservabilityPipelineConfigProcessorItem{ - ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ - Id: "filter-processor", - Include: "service:my-service", - Inputs: []string{ - "datadog-agent-source", - }, - Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, - }}, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorGroup{ + { + Enabled: true, + Id: "my-processor-group", + Include: "service:my-service", + Inputs: []string{ + "datadog-agent-source", + }, + Processors: []datadogV2.ObservabilityPipelineConfigProcessorItem{ + datadogV2.ObservabilityPipelineConfigProcessorItem{ + ObservabilityPipelineFilterProcessor: &datadogV2.ObservabilityPipelineFilterProcessor{ + Enabled: true, + Id: "filter-processor", + Include: "status:error", + Type: datadogV2.OBSERVABILITYPIPELINEFILTERPROCESSORTYPE_FILTER, + }}, + }, + }, }, Sources: []datadogV2.ObservabilityPipelineConfigSourceItem{ datadogV2.ObservabilityPipelineConfigSourceItem{ diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.freeze index 71a6a094850..c9a3812ad6f 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:21.625Z \ No newline at end of file +2025-11-26T16:03:26.936Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.yaml index 4ba2262dd3c..1aca83ebc0b 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_Bad_Request_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -12,10 +12,11 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"errors":[{"title":"Component with ID filter-processor is an unknown component","meta":{"message":"Component - with ID filter-processor is an unknown component"}},{"title":"The following - components are unused: [datadog-agent-source unknown-processor]","meta":{"message":"The - following components are unused: [datadog-agent-source unknown-processor]"}}]} + body: '{"errors":[{"title":"Component with ID my-processor-group is an unknown + component","meta":{"message":"Component with ID my-processor-group is an unknown + component"}},{"title":"The following components are unused: [datadog-agent-source + unknown-processor]","meta":{"message":"The following components are unused: + [datadog-agent-source unknown-processor]"}}]} ' code: 400 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.freeze index a6261e736fd..c95d315fed6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:23.837Z \ No newline at end of file +2025-11-26T16:03:27.483Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.yaml index 39630e0f89e..b2d93f14b02 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Create_a_new_pipeline_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -12,8 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"d891e45c-21fa-11f0-96dc-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}}} + body: '{"data":{"id":"7231fee6-cae1-11f0-a2c3-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}}} ' code: 201 @@ -30,7 +30,7 @@ interactions: - '*/*' id: 1 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/d891e45c-21fa-11f0-96dc-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/7231fee6-cae1-11f0-a2c3-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_Not_Found_response.freeze index 033a0755d0b..0c75345fb89 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_Not_Found_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:25.292Z \ No newline at end of file +2025-11-26T16:03:29.108Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.freeze index 9cbc728e003..48d506876c6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:26.847Z \ No newline at end of file +2025-11-26T16:03:29.684Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.yaml index f00ee3d80d0..a78bb34eec6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Delete_a_pipeline_returns_OK_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"da5f2218-21fa-11f0-96de-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"73822ece-cae1-11f0-a2c5-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -30,7 +30,7 @@ interactions: - '*/*' id: 1 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/da5f2218-21fa-11f0-96de-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/73822ece-cae1-11f0-a2c5-da7ad0900002 response: body: '' code: 204 @@ -47,7 +47,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/da5f2218-21fa-11f0-96de-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/73822ece-cae1-11f0-a2c5-da7ad0900002 response: body: '{"errors":[{"title":"Resource Not Found"}]} diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.freeze index f863fd1ac2d..55c24212d8c 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:29.196Z \ No newline at end of file +2025-11-26T16:03:32.309Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.yaml index f7e17836cf5..09bdfef9263 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Get_a_specific_pipeline_returns_OK_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"dbbff3d0-21fa-11f0-96e0-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"750ea1f0-cae1-11f0-a2c7-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -30,9 +30,9 @@ interactions: - application/json id: 1 method: GET - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/dbbff3d0-21fa-11f0-96e0-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/750ea1f0-cae1-11f0-a2c7-da7ad0900002 response: - body: '{"data":{"id":"dbbff3d0-21fa-11f0-96e0-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"750ea1f0-cae1-11f0-a2c7-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -50,7 +50,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/dbbff3d0-21fa-11f0-96e0-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/750ea1f0-cae1-11f0-a2c7-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_Bad_Request_response.freeze index 3a7978da8a7..e56bb9cfbd4 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:31.769Z \ No newline at end of file +2025-11-26T16:03:35.391Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.freeze index 4c9f3cfcbc3..a879a77baf6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:32.322Z \ No newline at end of file +2025-11-26T16:03:35.904Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.yaml index ea124d4905b..a766ce7ebdc 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_List_pipelines_returns_OK_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"dd87c652-21fa-11f0-96e2-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"77329f9a-cae1-11f0-a2c9-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -32,32 +32,42 @@ interactions: method: GET url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":[{"id":"8d85d864-0f09-11f0-9711-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"3f339054-10ab-11f0-88a2-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"b8c068de-10ab-11f0-88a8-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"32e2f90a-1139-11f0-8501-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"67e79020-1139-11f0-98d1-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"30966e06-113a-11f0-98e1-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"3e3f9382-138f-11f0-8cf0-da7ad0900002","type":"pipelines","attributes":{"name":"test - pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"service:my-service","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","tls":{"crt_file":"/path/to/cert.crt"},"type":"datadog_agent"}]}}},{"id":"42159650-138f-11f0-a2aa-da7ad0900002","type":"pipelines","attributes":{"name":"test - pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"service:my-service","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","tls":{"crt_file":"/path/to/cert.crt"},"type":"datadog_agent"}]}}},{"id":"6cc001f8-1392-11f0-9e35-da7ad0900002","type":"pipelines","attributes":{"name":"agent - with tls","config":{"destinations":[{"id":"destination-1","inputs":["source-with-tls"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"source-with-tls","tls":{"ca_file":"/etc/certs/ca.crt","crt_file":"/etc/certs/agent.crt","key_file":"/etc/certs/agent.key"},"type":"datadog_agent"}]}}},{"id":"bdf5078e-139d-11f0-8e4f-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"e67402d2-139d-11f0-8e51-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"e9849f22-139d-11f0-8e53-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"f9845bb0-139d-11f0-b101-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"2ebd82ca-139e-11f0-b103-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"31ba5a34-139e-11f0-8e55-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"3aa802c2-139e-11f0-8e57-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"7b3daaf8-139e-11f0-8e59-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"7e72d32e-139e-11f0-8e5b-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"818a8728-139e-11f0-8e5d-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"bed86e88-139e-11f0-8e5f-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"c202b050-139e-11f0-b107-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"c5111084-139e-11f0-8e61-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"e01ae6de-139e-11f0-8e63-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"e33ad356-139e-11f0-b109-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"e6783e78-139e-11f0-b10b-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"04407bfa-139f-11f0-8e65-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"126be958-139f-11f0-8e67-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"97607354-139f-11f0-8e6b-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"305f9a88-13a2-11f0-8dd9-da7ad0900002","type":"pipelines","attributes":{"name":"parse-json-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"env:parse","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"45669120-13a2-11f0-8ddb-da7ad0900002","type":"pipelines","attributes":{"name":"parse-json-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"env:parse","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"c00f7548-13a4-11f0-9315-da7ad0900002","type":"pipelines","attributes":{"name":"test - pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"service:my-service","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"c07cf206-13a6-11f0-949d-da7ad0900002","type":"pipelines","attributes":{"name":"test - pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"service:my-service","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"8ff06e36-13ad-11f0-8243-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"8ff1a508-13ad-11f0-b934-da7ad0900002","type":"pipelines","attributes":{"name":"agent - with tls","config":{"destinations":[{"id":"destination-1","inputs":["source-with-tls"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"source-with-tls","tls":{"crt_file":"/etc/certs/agent.crt","key_file":"/etc/certs/agent.key"},"type":"datadog_agent"}]}}},{"id":"8ff38a08-13ad-11f0-8245-da7ad0900002","type":"pipelines","attributes":{"name":"parse-json-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"env:parse","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"8ff54f0a-13ad-11f0-8247-da7ad0900002","type":"pipelines","attributes":{"name":"kafka - pipeline","config":{"destinations":[{"id":"destination-1","inputs":["kafka-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"group_id":"consumer-group-1","id":"kafka-source-1","sasl":{"mechanism":"PLAIN"},"tls":{"ca_file":"","crt_file":"/path/to/kafka.crt"},"topics":["topic-a","topic-b"],"type":"kafka"}]}}},{"id":"f814235e-13ad-11f0-b942-da7ad0900002","type":"pipelines","attributes":{"name":"agent - with tls","config":{"destinations":[{"id":"destination-1","inputs":["source-with-tls"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"source-with-tls","tls":{"crt_file":"/etc/certs/agent.crt","key_file":"/etc/certs/agent.key"},"type":"datadog_agent"}]}}},{"id":"5b1a9314-13ce-11f0-a9de-da7ad0900002","type":"pipelines","attributes":{"name":"rename-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["rename-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"destination":"new.field","preserve_source":true,"source":"old.field"}],"id":"rename-1","include":"*","inputs":["source-1"],"type":"rename_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"1e356802-1419-11f0-8834-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"14156a86-142b-11f0-96f3-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"a5280a06-143a-11f0-aac4-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"5005f6c2-1481-11f0-8faa-da7ad0900002","type":"pipelines","attributes":{"name":"remove-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["remove-1"],"type":"datadog_logs"}],"processors":[{"fields":["temp.debug","internal.trace_id"],"id":"remove-1","include":"*","inputs":["source-1"],"type":"remove_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"9c1776c0-14d7-11f0-87c9-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"b1e4c58c-1501-11f0-b0bd-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"43a8a4cc-15c3-11f0-b111-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"45042a58-15c3-11f0-b113-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"f9de3956-15cc-11f0-ac43-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"b3efaa52-1693-11f0-89e0-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"24c83620-1696-11f0-89e6-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}},{"id":"5d2875d6-17a2-11f0-9bd1-da7ad0900002","type":"pipelines","attributes":{"name":"Main - Observability Pipeline","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"}]}}}],"meta":{"totalCount":128}} + body: '{"data":[{"id":"79e292e4-7eed-11f0-ae9a-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"95f5859a-7eed-11f0-b11e-da7ad0900002","type":"pipelines","attributes":{"name":"remove-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["remove-1"],"type":"datadog_logs"}],"processors":[{"fields":["temp.debug","internal.trace_id"],"id":"remove-1","include":"*","inputs":["source-1"],"type":"remove_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"befe717c-7eed-11f0-b142-da7ad0900002","type":"pipelines","attributes":{"name":"sentinel-pipeline","config":{"destinations":[{"client_id":"a1b2c3d4-5678-90ab-cdef-1234567890ab","dcr_immutable_id":"dcr-uuid-1234","id":"sentinel-dest-1","inputs":["source-1"],"table":"CustomLogsTable","tenant_id":"abcdef12-3456-7890-abcd-ef1234567890","type":"microsoft_sentinel"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"cde707bc-7eed-11f0-b14e-da7ad0900002","type":"pipelines","attributes":{"name":"reduce + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["reduce-1"],"type":"datadog_logs"}],"processors":[{"group_by":["log.user.id","log.device.id"],"id":"reduce-1","include":"env:prod","inputs":["source-1"],"merge_strategies":[{"path":"log.user.roles","strategy":"flat_unique"},{"path":"log.error.messages","strategy":"concat"},{"path":"log.count","strategy":"sum"},{"path":"log.status","strategy":"retain"}],"type":"reduce"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"d48b3778-7eed-11f0-b156-da7ad0900002","type":"pipelines","attributes":{"name":"chronicle + pipeline","config":{"destinations":[{"auth":{"credentials_file":"/secrets/gcp.json"},"customer_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","encoding":"json","id":"chronicle-dest-1","inputs":["source-1"],"log_type":"nginx_logs","type":"google_chronicle"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"a7b4ba96-7f09-11f0-b21f-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"02f9b5d4-7f17-11f0-b042-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"92b580a6-7f4c-11f0-b432-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"1dbda0ee-7f51-11f0-9018-da7ad0900002","type":"pipelines","attributes":{"name":"firehose + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["firehose-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"auth":{"assume_role":"arn:aws:iam::123456789012:role/ExampleRole","external_id":"external-id-123","session_name":"firehose-session"},"id":"firehose-source-1","tls":{"crt_file":"/path/to/firehose.crt"},"type":"amazon_data_firehose"}]}}},{"id":"23e99d42-7f51-11f0-901c-da7ad0900002","type":"pipelines","attributes":{"name":"dedupe + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["dedupe-ignore"],"type":"datadog_logs"}],"processors":[{"fields":["log.message","log.tags"],"id":"dedupe-match","include":"*","inputs":["source-1"],"mode":"match","type":"dedupe"},{"fields":["log.source","log.context"],"id":"dedupe-ignore","include":"*","inputs":["dedupe-match"],"mode":"ignore","type":"dedupe"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"2686dd3a-7f51-11f0-844e-da7ad0900002","type":"pipelines","attributes":{"name":"throttle + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["throttle-grouped"],"type":"datadog_logs"}],"processors":[{"id":"throttle-global","include":"*","inputs":["source-1"],"threshold":1000,"type":"throttle","window":60},{"group_by":["log.user.id","log.level"],"id":"throttle-grouped","include":"*","inputs":["throttle-global"],"threshold":100,"type":"throttle","window":10}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"342f7956-7f51-11f0-9026-da7ad0900002","type":"pipelines","attributes":{"name":"amazon + opensearch pipeline","config":{"destinations":[{"auth":{"assume_role":"arn:aws:iam::123456789012:role/example-role","aws_region":"us-east-1","external_id":"external-id-123","session_name":"aos-session","strategy":"aws"},"bulk_index":"logs-datastream","id":"aos-dest-1","inputs":["source-1"],"type":"amazon_opensearch"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"43159012-7f52-11f0-916f-da7ad0900002","type":"pipelines","attributes":{"name":"test + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["parser-1"],"type":"datadog_logs"}],"processors":[{"field":"message","id":"parser-1","include":"service:my-service","inputs":["source-1"],"type":"parse_json"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"d8b76f78-7fb6-11f0-9f78-da7ad0900002","type":"pipelines","attributes":{"name":"sds-full-test","config":{"destinations":[{"id":"sink","inputs":["sds-1"],"type":"datadog_logs"}],"processors":[{"id":"sds-1","include":"*","inputs":["source-a"],"rules":[{"keyword_options":{"keywords":["secret","token"],"proximity":4},"name":"Redact + with Exclude","on_match":{"action":"redact","options":{"replace":"[REDACTED]"}},"pattern":{"options":{"rule":"\\bsecret-[a-z0-9]+\\b"},"type":"custom"},"scope":{"options":{"fields":["not_this_field"]},"target":"exclude"},"tags":["confidential","mask"]},{"name":"Library + Hash","on_match":{"action":"hash"},"pattern":{"options":{"id":"ip_address","use_recommended_keywords":true},"type":"library"},"scope":{"target":"all"},"tags":["pii"]},{"name":"Partial + Default Scope","on_match":{"action":"partial_redact","options":{"characters":3,"direction":"first"}},"pattern":{"options":{"rule":"user\\d{3,}"},"type":"custom"},"scope":{"options":{"fields":["this_field_only"]},"target":"include"},"tags":["user","pii"]}],"type":"sensitive_data_scanner"}],"sources":[{"id":"source-a","type":"datadog_agent"}]}}},{"id":"e2b4e2ee-7fb6-11f0-9f7e-da7ad0900002","type":"pipelines","attributes":{"name":"dedupe + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["dedupe-ignore"],"type":"datadog_logs"}],"processors":[{"fields":["log.message","log.tags"],"id":"dedupe-match","include":"*","inputs":["source-1"],"mode":"match","type":"dedupe"},{"fields":["log.source","log.context"],"id":"dedupe-ignore","include":"*","inputs":["dedupe-match"],"mode":"ignore","type":"dedupe"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"034843c0-7fb7-11f0-9eb6-da7ad0900002","type":"pipelines","attributes":{"name":"remap-vrl-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["remap-processor-1"],"type":"datadog_logs"}],"processors":[{"id":"remap-processor-1","include":"*","inputs":["source-1"],"remaps":[{"drop_on_error":false,"enabled":true,"include":"service:web","name":"Parse + JSON from message","source":". = parse_json!(string!(.message))"},{"drop_on_error":true,"enabled":true,"include":"env:prod","name":"Add + timestamp","source":".timestamp = now()"}],"type":"custom_processor"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"3ccd875c-7fd2-11f0-b6d7-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"6b30d2f0-7fd9-11f0-af48-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"fcf10236-7fdf-11f0-8692-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"a58467e6-8015-11f0-9924-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"bb15a8a4-8015-11f0-a7c1-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"05889c3a-801a-11f0-a7d5-da7ad0900002","type":"pipelines","attributes":{"name":"sample-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["sample-2"],"type":"datadog_logs"}],"processors":[{"id":"sample-1","include":"*","inputs":["source-1"],"rate":10,"type":"sample"},{"id":"sample-2","include":"*","inputs":["sample-1"],"percentage":4.99,"type":"sample"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"0a28d246-801a-11f0-8394-da7ad0900002","type":"pipelines","attributes":{"name":"http-server-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["http-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"auth_strategy":"plain","decoding":"json","id":"http-source-1","tls":{"ca_file":"/etc/ssl/certs/ca.crt","crt_file":"/etc/ssl/certs/http.crt","key_file":"/etc/ssl/private/http.key"},"type":"http_server"}]}}},{"id":"2eb40eaa-801a-11f0-83a6-da7ad0900002","type":"pipelines","attributes":{"name":"logstash + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["logstash-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"logstash-source-1","tls":{"crt_file":"/path/to/logstash.crt"},"type":"logstash"}]}}},{"id":"4c6ad8b6-801a-11f0-83b4-da7ad0900002","type":"pipelines","attributes":{"name":"socket-pipeline-udp","config":{"destinations":[{"id":"destination-1","inputs":["socket-source-2"],"type":"datadog_logs"}],"processors":[],"sources":[{"framing":{"delimiter":"|","method":"character_delimited"},"id":"socket-source-2","mode":"udp","type":"socket"}]}}},{"id":"4f07b526-801a-11f0-83b6-da7ad0900002","type":"pipelines","attributes":{"name":"socket-destination-pipeline","config":{"destinations":[{"encoding":"json","framing":{"method":"newline_delimited"},"id":"socket-dest-1","inputs":["source-1"],"mode":"tcp","tls":{"ca_file":"/etc/ssl/certs/ca.crt","crt_file":"/etc/ssl/certs/socket.crt","key_file":"/etc/ssl/private/socket.key"},"type":"socket"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"cc14120c-807f-11f0-b4a4-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"42a10830-8080-11f0-b4b6-da7ad0900002","type":"pipelines","attributes":{"name":"http-server-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["http-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"auth_strategy":"plain","decoding":"json","id":"http-source-1","tls":{"ca_file":"/etc/ssl/certs/ca.crt","crt_file":"/etc/ssl/certs/http.crt","key_file":"/etc/ssl/private/http.key"},"type":"http_server"}]}}},{"id":"455121dc-8080-11f0-b4b8-da7ad0900002","type":"pipelines","attributes":{"name":"splunk-hec-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["splunk-hec-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"splunk-hec-source-1","tls":{"ca_file":"/etc/ssl/certs/ca.crt","crt_file":"/etc/ssl/certs/splunk.crt","key_file":"/etc/ssl/private/splunk.key"},"type":"splunk_hec"}]}}},{"id":"49d9a396-8080-11f0-98a3-da7ad0900002","type":"pipelines","attributes":{"name":"gcs-destination-pipeline","config":{"destinations":[{"acl":"project-private","auth":{"credentials_file":"/var/secrets/gcp-creds.json"},"bucket":"my-gcs-bucket","id":"gcs-destination-1","inputs":["source-1"],"key_prefix":"logs/","metadata":[{"name":"environment","value":"production"},{"name":"team","value":"platform"}],"storage_class":"NEARLINE","type":"google_cloud_storage"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"4a9d5098-8080-11f0-b4bc-da7ad0900002","type":"pipelines","attributes":{"name":"splunk-hec-destination-pipeline","config":{"destinations":[{"auto_extract_timestamp":true,"encoding":"json","id":"splunk-hec-1","index":"main","inputs":["source-1"],"sourcetype":"custom_sourcetype","type":"splunk_hec"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"4b5b9238-8080-11f0-98a5-da7ad0900002","type":"pipelines","attributes":{"name":"sumo + pipeline","config":{"destinations":[{"encoding":"json","header_custom_fields":[{"name":"X-Sumo-Category","value":"my-app-logs"},{"name":"X-Custom-Header","value":"debug=true"}],"header_host_name":"host-123","header_source_category":"source-category","header_source_name":"source-name","id":"sumo-dest-1","inputs":["source-1"],"type":"sumo_logic"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"4fd012a8-8080-11f0-98a9-da7ad0900002","type":"pipelines","attributes":{"name":"rsyslog-dest-pipeline","config":{"destinations":[{"id":"rsyslog-destination-1","inputs":["source-1"],"keepalive":60000,"tls":{"crt_file":"/etc/certs/rsyslog.crt"},"type":"rsyslog"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"6d48f746-8080-11f0-98b7-da7ad0900002","type":"pipelines","attributes":{"name":"chronicle + pipeline","config":{"destinations":[{"auth":{"credentials_file":"/secrets/gcp.json"},"customer_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","encoding":"json","id":"chronicle-dest-1","inputs":["source-1"],"log_type":"nginx_logs","type":"google_chronicle"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"73a20eca-8080-11f0-98b9-da7ad0900002","type":"pipelines","attributes":{"name":"opensearch + pipeline","config":{"destinations":[{"bulk_index":"logs-datastream","id":"opensearch-dest-1","inputs":["source-1"],"type":"opensearch"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"5e6dae8c-80bd-11f0-a213-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"5f6fbb72-80bd-11f0-a215-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"e7857b20-80de-11f0-a262-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"579ccd4c-80e3-11f0-a296-da7ad0900002","type":"pipelines","attributes":{"name":"syslogng-source-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["syslogng-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"syslogng-source-1","mode":"udp","tls":{"crt_file":"/etc/certs/syslogng.crt"},"type":"syslog_ng"}]}}},{"id":"58505402-80e3-11f0-a298-da7ad0900002","type":"pipelines","attributes":{"name":"rsyslog-dest-pipeline","config":{"destinations":[{"id":"rsyslog-destination-1","inputs":["source-1"],"keepalive":60000,"tls":{"crt_file":"/etc/certs/rsyslog.crt"},"type":"rsyslog"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"64a3e372-80e3-11f0-a2a6-da7ad0900002","type":"pipelines","attributes":{"name":"firehose + pipeline","config":{"destinations":[{"id":"destination-1","inputs":["firehose-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"auth":{"assume_role":"arn:aws:iam::123456789012:role/ExampleRole","external_id":"external-id-123","session_name":"firehose-session"},"id":"firehose-source-1","tls":{"crt_file":"/path/to/firehose.crt"},"type":"amazon_data_firehose"}]}}},{"id":"92751474-80e3-11f0-a2d0-da7ad0900002","type":"pipelines","attributes":{"name":"amazon + s3 pipeline (minimal)","config":{"destinations":[{"bucket":"my-logs-bucket","id":"s3-dest-basic-1","inputs":["source-1"],"key_prefix":"logs/","region":"us-east-1","storage_class":"STANDARD","type":"amazon_s3"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"2ae24eb0-8149-11f0-baea-da7ad0900002","type":"pipelines","attributes":{"name":"quota-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["quota-1"],"type":"datadog_logs"}],"processors":[{"drop_events":true,"id":"quota-1","ignore_when_missing_partitions":true,"include":"*","inputs":["source-1"],"limit":{"enforce":"events","limit":1000},"name":"limitByHostAndEnv","overrides":[{"fields":[{"name":"env","value":"prod"},{"name":"host","value":"*"}],"limit":{"enforce":"events","limit":500}},{"fields":[{"name":"env","value":"*"},{"name":"host","value":"localhost"}],"limit":{"enforce":"bytes","limit":300}}],"partition_fields":["host","env"],"type":"quota"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"2d5cca94-8149-11f0-baec-da7ad0900002","type":"pipelines","attributes":{"name":"add-fields-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["add-fields-1"],"type":"datadog_logs"}],"processors":[{"fields":[{"name":"custom.field","value":"hello-world"},{"name":"env","value":"prod"}],"id":"add-fields-1","include":"*","inputs":["source-1"],"type":"add_fields"}],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"31a26406-8149-11f0-9918-da7ad0900002","type":"pipelines","attributes":{"name":"fluent-pipeline","config":{"destinations":[{"id":"destination-1","inputs":["fluent-source-1"],"type":"datadog_logs"}],"processors":[],"sources":[{"id":"fluent-source-1","tls":{"ca_file":"/etc/ssl/certs/ca.crt","crt_file":"/etc/ssl/certs/fluent.crt","key_file":"/etc/ssl/private/fluent.key"},"type":"fluentd"}]}}},{"id":"47a53594-8149-11f0-9926-da7ad0900002","type":"pipelines","attributes":{"name":"syslogng-dest-pipeline","config":{"destinations":[{"id":"syslogng-destination-1","inputs":["source-1"],"keepalive":45000,"tls":{"crt_file":"/etc/certs/syslogng.crt"},"type":"syslog_ng"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"65424c18-8149-11f0-bb0a-da7ad0900002","type":"pipelines","attributes":{"name":"sentinelone + pipeline","config":{"destinations":[{"id":"sentinelone-dest-1","inputs":["source-1"],"region":"us","type":"sentinel_one"}],"processors":[],"sources":[{"id":"source-1","type":"datadog_agent"}]}}},{"id":"72abaaca-8149-11f0-9940-da7ad0900002","type":"pipelines","attributes":{"name":"socket-pipeline-udp","config":{"destinations":[{"id":"destination-1","inputs":["socket-source-2"],"type":"datadog_logs"}],"processors":[],"sources":[{"framing":{"delimiter":"|","method":"character_delimited"},"id":"socket-source-2","mode":"udp","type":"socket"}]}}},{"id":"4b51d94c-8165-11f0-ab16-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}},{"id":"d9ab0514-81a7-11f0-b0f7-da7ad0900002","type":"pipelines","attributes":{"name":"Main + Observability Pipeline","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"}]}}}],"meta":{"totalCount":440}} ' code: 200 @@ -74,7 +84,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/dd87c652-21fa-11f0-96e2-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/77329f9a-cae1-11f0-a2c9-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.freeze index a8aa863f11e..5020f3fdc84 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:34.672Z \ No newline at end of file +2025-11-26T16:03:39.454Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.yaml index b3fd0e6a75d..13ccff195b7 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Bad_Request_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"deeea5f6-21fa-11f0-96e4-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"794d71d8-cae1-11f0-a2cb-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -33,12 +33,13 @@ interactions: - application/json id: 1 method: PUT - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/deeea5f6-21fa-11f0-96e4-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/794d71d8-cae1-11f0-a2cb-da7ad0900002 response: - body: '{"errors":[{"title":"Component with ID filter-processor is an unknown component","meta":{"message":"Component - with ID filter-processor is an unknown component"}},{"title":"The following - components are unused: [datadog-agent-source unknown-processor]","meta":{"message":"The - following components are unused: [datadog-agent-source unknown-processor]"}}]} + body: '{"errors":[{"title":"Component with ID my-processor-group is an unknown + component","meta":{"message":"Component with ID my-processor-group is an unknown + component"}},{"title":"The following components are unused: [datadog-agent-source + unknown-processor]","meta":{"message":"The following components are unused: + [datadog-agent-source unknown-processor]"}}]} ' code: 400 @@ -55,7 +56,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/deeea5f6-21fa-11f0-96e4-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/794d71d8-cae1-11f0-a2cb-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.freeze index 81821e325e0..eb2e354e0e6 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:36.564Z \ No newline at end of file +2025-11-26T16:03:41.901Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.yaml index 7f365575c2d..a31b88b9228 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_Not_Found_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.freeze index 8195f92c72e..d4844244d85 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:36.987Z \ No newline at end of file +2025-11-26T16:03:42.435Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.yaml index 10e5252f5ad..79e60ddb183 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Update_a_pipeline_returns_OK_response.yaml @@ -12,7 +12,7 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines response: - body: '{"data":{"id":"e04d5230-21fa-11f0-96e6-da7ad0900002","type":"pipelines","attributes":{"name":"Main + body: '{"data":{"id":"7b1707f4-cae1-11f0-a2cd-da7ad0900002","type":"pipelines","attributes":{"name":"Main Observability Pipeline","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"}]}}}} ' @@ -24,7 +24,7 @@ interactions: status: 201 Created - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -33,10 +33,10 @@ interactions: - application/json id: 1 method: PUT - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/e04d5230-21fa-11f0-96e6-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/7b1707f4-cae1-11f0-a2cd-da7ad0900002 response: - body: '{"data":{"id":"e04d5230-21fa-11f0-96e6-da7ad0900002","type":"pipelines","attributes":{"name":"Updated - Pipeline Name","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"}]}}}} + body: '{"data":{"id":"7b1707f4-cae1-11f0-a2cd-da7ad0900002","type":"pipelines","attributes":{"name":"Updated + Pipeline Name","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"}]}}}} ' code: 200 @@ -53,7 +53,7 @@ interactions: - '*/*' id: 2 method: DELETE - url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/e04d5230-21fa-11f0-96e6-da7ad0900002 + url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/7b1707f4-cae1-11f0-a2cd-da7ad0900002 response: body: '' code: 204 diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.freeze index f19e635b279..462334cc245 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:39.236Z \ No newline at end of file +2025-11-26T16:03:45.970Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.yaml index 5343219f7ac..da530a6502f 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_Bad_Request_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -12,7 +12,8 @@ interactions: method: POST url: https://api.datadoghq.com/api/v2/remote_config/products/obs_pipelines/pipelines/validate response: - body: '{"errors":[{"title":"Field ''include'' is required","meta":{"field":"include","id":"filter-processor","message":"Field + body: '{"errors":[{"title":"Field ''include'' is required","meta":{"field":"include","id":"my-processor-group","message":"Field + ''include'' is required"}},{"title":"Field ''include'' is required","meta":{"field":"include","id":"filter-processor","message":"Field ''include'' is required"}}]} ' diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.freeze b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.freeze index c2e1e3c7367..1d4961eb3dc 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.freeze +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.freeze @@ -1 +1 @@ -2025-04-25T17:29:39.613Z \ No newline at end of file +2025-11-26T16:03:46.484Z \ No newline at end of file diff --git a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.yaml b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.yaml index 0b27a77f300..4c58d2e3a3e 100644 --- a/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.yaml +++ b/tests/scenarios/cassettes/TestScenarios/v2/Feature_Observability_Pipelines/Scenario_Validate_an_observability_pipeline_returns_OK_response.yaml @@ -1,7 +1,7 @@ interactions: - request: body: | - {"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"}} + {"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"}} form: {} headers: Accept: @@ -19,6 +19,6 @@ interactions: duration: 0ms headers: Content-Type: - - application/json + - application/vnd.api+json status: 200 OK version: 2 diff --git a/tests/scenarios/features/v2/observability_pipelines.feature b/tests/scenarios/features/v2/observability_pipelines.feature index c7149b1e4fa..c2a2e39f7ca 100644 --- a/tests/scenarios/features/v2/observability_pipelines.feature +++ b/tests/scenarios/features/v2/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,19 +149,19 @@ 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" And the response "errors[0].meta.field" is equal to "include" - And the response "errors[0].meta.id" is equal to "filter-processor" + And the response "errors[0].meta.id" is equal to "my-processor-group" And the response "errors[0].meta.message" is equal to "Field 'include' is required" @team:DataDog/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