Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99533,6 +99533,18 @@ components:
type: string
x-enum-varnames:
- AMAZON_SECURITY_LAKE
ObservabilityPipelineAnomalyDetection:
description: |-
Anomaly detection settings for the pipeline.
Only applies to `logs` pipelines. Requires Observability Pipelines Worker 2.25 or later.
properties:
enabled:
description: Whether anomaly detection is enabled for the pipeline.
example: true
type: boolean
required:
- enabled
type: object
ObservabilityPipelineAwsAuth:
description: |-
AWS authentication credentials used for accessing AWS services such as S3.
Expand Down Expand Up @@ -100213,12 +100225,20 @@ components:
ObservabilityPipelineConfig:
description: Specifies the pipeline's configuration, including its sources, processors, and destinations.
properties:
anomaly_detection:
$ref: "#/components/schemas/ObservabilityPipelineAnomalyDetection"
destinations:
description: A list of destination components where processed logs are sent.
example: [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}]
items:
$ref: "#/components/schemas/ObservabilityPipelineConfigDestinationItem"
type: array
end_to_end_acknowledgements:
description: |-
Set to `true` to enable end-to-end acknowledgments for the pipeline.
Requires Observability Pipelines Worker 2.14 or later.
example: false
type: boolean
pipeline_type:
$ref: "#/components/schemas/ObservabilityPipelineConfigPipelineType"
processor_groups:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
/*
* 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 com.datadog.api.client.v2.model;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;

/**
* Anomaly detection settings for the pipeline. Only applies to <code>logs</code> pipelines.
* Requires Observability Pipelines Worker 2.25 or later.
*/
@JsonPropertyOrder({ObservabilityPipelineAnomalyDetection.JSON_PROPERTY_ENABLED})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class ObservabilityPipelineAnomalyDetection {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ENABLED = "enabled";
private Boolean enabled;

public ObservabilityPipelineAnomalyDetection() {}

@JsonCreator
public ObservabilityPipelineAnomalyDetection(
@JsonProperty(required = true, value = JSON_PROPERTY_ENABLED) Boolean enabled) {
this.enabled = enabled;
}

public ObservabilityPipelineAnomalyDetection enabled(Boolean enabled) {
this.enabled = enabled;
return this;
}

/**
* Whether anomaly detection is enabled for the pipeline.
*
* @return enabled
*/
@JsonProperty(JSON_PROPERTY_ENABLED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Boolean getEnabled() {
return enabled;
}

public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
*/
private Map<String, Object> additionalProperties;

/**
* Set the additional (undeclared) property with the specified name and value. If the property
* does not already exist, create it otherwise replace it.
*
* @param key The arbitrary key to set
* @param value The associated value
* @return ObservabilityPipelineAnomalyDetection
*/
@JsonAnySetter
public ObservabilityPipelineAnomalyDetection putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}

/**
* Return the additional (undeclared) property.
*
* @return The additional properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}

/**
* Return the additional (undeclared) property with the specified name.
*
* @param key The arbitrary key to get
* @return The specific additional property for the given key
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}

/** Return true if this ObservabilityPipelineAnomalyDetection object is equal to o. */
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObservabilityPipelineAnomalyDetection observabilityPipelineAnomalyDetection =
(ObservabilityPipelineAnomalyDetection) o;
return Objects.equals(this.enabled, observabilityPipelineAnomalyDetection.enabled)
&& Objects.equals(
this.additionalProperties, observabilityPipelineAnomalyDetection.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(enabled, additionalProperties);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObservabilityPipelineAnomalyDetection {\n");
sb.append(" enabled: ").append(toIndentedString(enabled)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
sb.append('}');
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

/** Specifies the pipeline's configuration, including its sources, processors, and destinations. */
@JsonPropertyOrder({
ObservabilityPipelineConfig.JSON_PROPERTY_ANOMALY_DETECTION,
ObservabilityPipelineConfig.JSON_PROPERTY_DESTINATIONS,
ObservabilityPipelineConfig.JSON_PROPERTY_END_TO_END_ACKNOWLEDGEMENTS,
ObservabilityPipelineConfig.JSON_PROPERTY_PIPELINE_TYPE,
ObservabilityPipelineConfig.JSON_PROPERTY_PROCESSOR_GROUPS,
ObservabilityPipelineConfig.JSON_PROPERTY_PROCESSORS,
Expand All @@ -32,9 +34,16 @@
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
public class ObservabilityPipelineConfig {
@JsonIgnore public boolean unparsed = false;
public static final String JSON_PROPERTY_ANOMALY_DETECTION = "anomaly_detection";
private ObservabilityPipelineAnomalyDetection anomalyDetection;

public static final String JSON_PROPERTY_DESTINATIONS = "destinations";
private List<ObservabilityPipelineConfigDestinationItem> destinations = new ArrayList<>();

public static final String JSON_PROPERTY_END_TO_END_ACKNOWLEDGEMENTS =
"end_to_end_acknowledgements";
private Boolean endToEndAcknowledgements;

public static final String JSON_PROPERTY_PIPELINE_TYPE = "pipeline_type";
private ObservabilityPipelineConfigPipelineType pipelineType =
ObservabilityPipelineConfigPipelineType.LOGS;
Expand Down Expand Up @@ -69,6 +78,33 @@ public ObservabilityPipelineConfig(
}
}

public ObservabilityPipelineConfig anomalyDetection(
ObservabilityPipelineAnomalyDetection anomalyDetection) {
this.anomalyDetection = anomalyDetection;
this.unparsed |= anomalyDetection.unparsed;
return this;
}

/**
* Anomaly detection settings for the pipeline. Only applies to <code>logs</code> pipelines.
* Requires Observability Pipelines Worker 2.25 or later.
*
* @return anomalyDetection
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ANOMALY_DETECTION)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ObservabilityPipelineAnomalyDetection getAnomalyDetection() {
return anomalyDetection;
}

public void setAnomalyDetection(ObservabilityPipelineAnomalyDetection anomalyDetection) {
this.anomalyDetection = anomalyDetection;
if (anomalyDetection != null) {
this.unparsed |= anomalyDetection.unparsed;
}
}

public ObservabilityPipelineConfig destinations(
List<ObservabilityPipelineConfigDestinationItem> destinations) {
this.destinations = destinations;
Expand Down Expand Up @@ -105,6 +141,28 @@ public void setDestinations(List<ObservabilityPipelineConfigDestinationItem> des
}
}

public ObservabilityPipelineConfig endToEndAcknowledgements(Boolean endToEndAcknowledgements) {
this.endToEndAcknowledgements = endToEndAcknowledgements;
return this;
}

/**
* Set to <code>true</code> to enable end-to-end acknowledgments for the pipeline. Requires
* Observability Pipelines Worker 2.14 or later.
*
* @return endToEndAcknowledgements
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_END_TO_END_ACKNOWLEDGEMENTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getEndToEndAcknowledgements() {
return endToEndAcknowledgements;
}

public void setEndToEndAcknowledgements(Boolean endToEndAcknowledgements) {
this.endToEndAcknowledgements = endToEndAcknowledgements;
}

public ObservabilityPipelineConfig pipelineType(
ObservabilityPipelineConfigPipelineType pipelineType) {
this.pipelineType = pipelineType;
Expand Down Expand Up @@ -339,7 +397,10 @@ public boolean equals(Object o) {
return false;
}
ObservabilityPipelineConfig observabilityPipelineConfig = (ObservabilityPipelineConfig) o;
return Objects.equals(this.destinations, observabilityPipelineConfig.destinations)
return Objects.equals(this.anomalyDetection, observabilityPipelineConfig.anomalyDetection)
&& Objects.equals(this.destinations, observabilityPipelineConfig.destinations)
&& Objects.equals(
this.endToEndAcknowledgements, observabilityPipelineConfig.endToEndAcknowledgements)
&& Objects.equals(this.pipelineType, observabilityPipelineConfig.pipelineType)
&& Objects.equals(this.processorGroups, observabilityPipelineConfig.processorGroups)
&& Objects.equals(this.processors, observabilityPipelineConfig.processors)
Expand All @@ -353,7 +414,9 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
return Objects.hash(
anomalyDetection,
destinations,
endToEndAcknowledgements,
pipelineType,
processorGroups,
processors,
Expand All @@ -366,7 +429,11 @@ public int hashCode() {
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObservabilityPipelineConfig {\n");
sb.append(" anomalyDetection: ").append(toIndentedString(anomalyDetection)).append("\n");
sb.append(" destinations: ").append(toIndentedString(destinations)).append("\n");
sb.append(" endToEndAcknowledgements: ")
.append(toIndentedString(endToEndAcknowledgements))
.append("\n");
sb.append(" pipelineType: ").append(toIndentedString(pipelineType)).append("\n");
sb.append(" processorGroups: ").append(toIndentedString(processorGroups)).append("\n");
sb.append(" processors: ").append(toIndentedString(processors)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Feature: Observability Pipelines
@generated @skip @team:ddoghq/observability-pipelines
Scenario: Create a new pipeline returns "Conflict" response
Given new "CreatePipeline" request
And body with value {"data": {"attributes": {"config": {"destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "pipeline_type": "logs", "processor_groups": [{"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"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "sources": [{"id": "datadog-agent-source", "type": "datadog_agent"}]}, "name": "Main Observability Pipeline"}, "type": "pipelines"}}
And body with value {"data": {"attributes": {"config": {"anomaly_detection": {"enabled": true}, "destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "end_to_end_acknowledgements": false, "pipeline_type": "logs", "processor_groups": [{"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"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "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

Expand Down Expand Up @@ -123,7 +123,7 @@ Feature: Observability Pipelines
Scenario: Update a pipeline returns "Conflict" response
Given 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": ["my-processor-group"], "type": "datadog_logs"}], "pipeline_type": "logs", "processor_groups": [{"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"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "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": {"anomaly_detection": {"enabled": true}, "destinations": [{"id": "datadog-logs-destination", "inputs": ["my-processor-group"], "type": "datadog_logs"}], "end_to_end_acknowledgements": false, "pipeline_type": "logs", "processor_groups": [{"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"}, {"enabled": true, "field": "message", "id": "json-processor", "include": "*", "type": "parse_json"}]}], "processors": [], "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

Expand Down
Loading