From 56bf0ff3697af8c1cd1ae6205d25ce78c0082f88 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 28 May 2026 21:10:10 +0000 Subject: [PATCH] Regenerate client from commit b1161bc of spec repo --- .generator/schemas/v2/openapi.yaml | 28 +++++++ .../v2/logs-archives/CreateLogsArchive.java | 2 + .../v2/logs-archives/UpdateLogsArchive.java | 2 + .../v2/model/LogsArchiveAttributes.java | 75 ++++++++++++++++++ .../LogsArchiveCreateRequestAttributes.java | 79 +++++++++++++++++++ .../api/client/v2/api/logs_archives.feature | 10 +-- 6 files changed, 191 insertions(+), 5 deletions(-) diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4d59bfade19..b8785cdd870 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -49957,10 +49957,24 @@ components: If it is set to "false", the tags will be deleted when the logs are sent to the archive. example: false type: boolean + lookup_attributes: + description: An array of attributes to use as lookup keys for the archive. + example: ["trace_id", "user_id"] + items: + description: A lookup attribute name. + type: string + type: array name: description: The archive name. example: Nginx Archive type: string + partitioning_attributes: + description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first. + example: ["service", "status"] + items: + description: A partition attribute name. + type: string + type: array query: description: The archive query/filter. Logs matching this query are included in the archive. example: source:nginx @@ -50016,10 +50030,24 @@ components: If it is set to "false", the tags will be deleted when the logs are sent to the archive. example: false type: boolean + lookup_attributes: + description: An array of attributes to use as lookup keys for the archive. + example: ["trace_id", "user_id"] + items: + description: A lookup attribute name. + type: string + type: array name: description: The archive name. example: Nginx Archive type: string + partitioning_attributes: + description: An array of attributes to use as partition keys for the archive. The attribute used most frequently for querying should be first. + example: ["service", "status"] + items: + description: A partition attribute name. + type: string + type: array query: description: The archive query/filter. Logs matching this query are included in the archive. example: source:nginx diff --git a/examples/v2/logs-archives/CreateLogsArchive.java b/examples/v2/logs-archives/CreateLogsArchive.java index 0da27b9690c..45351b7b8a3 100644 --- a/examples/v2/logs-archives/CreateLogsArchive.java +++ b/examples/v2/logs-archives/CreateLogsArchive.java @@ -37,7 +37,9 @@ public static void main(String[] args) { .storageAccount("account-name") .type(LogsArchiveDestinationAzureType.AZURE))) .includeTags(false) + .lookupAttributes(Arrays.asList("trace_id", "user_id")) .name("Nginx Archive") + .partitioningAttributes(Arrays.asList("service", "status")) .query("source:nginx") .rehydrationMaxScanSizeInGb(100L) .rehydrationTags(Arrays.asList("team:intake", "team:app"))) diff --git a/examples/v2/logs-archives/UpdateLogsArchive.java b/examples/v2/logs-archives/UpdateLogsArchive.java index 9e00f697e00..81da74b352c 100644 --- a/examples/v2/logs-archives/UpdateLogsArchive.java +++ b/examples/v2/logs-archives/UpdateLogsArchive.java @@ -37,7 +37,9 @@ public static void main(String[] args) { .storageAccount("account-name") .type(LogsArchiveDestinationAzureType.AZURE))) .includeTags(false) + .lookupAttributes(Arrays.asList("trace_id", "user_id")) .name("Nginx Archive") + .partitioningAttributes(Arrays.asList("service", "status")) .query("source:nginx") .rehydrationMaxScanSizeInGb(100L) .rehydrationTags(Arrays.asList("team:intake", "team:app"))) diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java index f17c5ecef85..62bab9e112f 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveAttributes.java @@ -25,7 +25,9 @@ LogsArchiveAttributes.JSON_PROPERTY_COMPRESSION_METHOD, LogsArchiveAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveAttributes.JSON_PROPERTY_INCLUDE_TAGS, + LogsArchiveAttributes.JSON_PROPERTY_LOOKUP_ATTRIBUTES, LogsArchiveAttributes.JSON_PROPERTY_NAME, + LogsArchiveAttributes.JSON_PROPERTY_PARTITIONING_ATTRIBUTES, LogsArchiveAttributes.JSON_PROPERTY_QUERY, LogsArchiveAttributes.JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB, LogsArchiveAttributes.JSON_PROPERTY_REHYDRATION_TAGS, @@ -45,9 +47,15 @@ public class LogsArchiveAttributes { public static final String JSON_PROPERTY_INCLUDE_TAGS = "include_tags"; private Boolean includeTags = false; + public static final String JSON_PROPERTY_LOOKUP_ATTRIBUTES = "lookup_attributes"; + private List lookupAttributes = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARTITIONING_ATTRIBUTES = "partitioning_attributes"; + private List partitioningAttributes = null; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -149,6 +157,35 @@ public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } + public LogsArchiveAttributes lookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + return this; + } + + public LogsArchiveAttributes addLookupAttributesItem(String lookupAttributesItem) { + if (this.lookupAttributes == null) { + this.lookupAttributes = new ArrayList<>(); + } + this.lookupAttributes.add(lookupAttributesItem); + return this; + } + + /** + * An array of attributes to use as lookup keys for the archive. + * + * @return lookupAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOOKUP_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLookupAttributes() { + return lookupAttributes; + } + + public void setLookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + } + public LogsArchiveAttributes name(String name) { this.name = name; return this; @@ -169,6 +206,36 @@ public void setName(String name) { this.name = name; } + public LogsArchiveAttributes partitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + return this; + } + + public LogsArchiveAttributes addPartitioningAttributesItem(String partitioningAttributesItem) { + if (this.partitioningAttributes == null) { + this.partitioningAttributes = new ArrayList<>(); + } + this.partitioningAttributes.add(partitioningAttributesItem); + return this; + } + + /** + * An array of attributes to use as partition keys for the archive. The attribute used most + * frequently for querying should be first. + * + * @return partitioningAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTITIONING_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPartitioningAttributes() { + return partitioningAttributes; + } + + public void setPartitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + } + public LogsArchiveAttributes query(String query) { this.query = query; return this; @@ -334,7 +401,9 @@ public boolean equals(Object o) { return Objects.equals(this.compressionMethod, logsArchiveAttributes.compressionMethod) && Objects.equals(this.destination, logsArchiveAttributes.destination) && Objects.equals(this.includeTags, logsArchiveAttributes.includeTags) + && Objects.equals(this.lookupAttributes, logsArchiveAttributes.lookupAttributes) && Objects.equals(this.name, logsArchiveAttributes.name) + && Objects.equals(this.partitioningAttributes, logsArchiveAttributes.partitioningAttributes) && Objects.equals(this.query, logsArchiveAttributes.query) && Objects.equals( this.rehydrationMaxScanSizeInGb, logsArchiveAttributes.rehydrationMaxScanSizeInGb) @@ -349,7 +418,9 @@ public int hashCode() { compressionMethod, destination, includeTags, + lookupAttributes, name, + partitioningAttributes, query, rehydrationMaxScanSizeInGb, rehydrationTags, @@ -364,7 +435,11 @@ public String toString() { sb.append(" compressionMethod: ").append(toIndentedString(compressionMethod)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); + sb.append(" lookupAttributes: ").append(toIndentedString(lookupAttributes)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" partitioningAttributes: ") + .append(toIndentedString(partitioningAttributes)) + .append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" rehydrationMaxScanSizeInGb: ") .append(toIndentedString(rehydrationMaxScanSizeInGb)) diff --git a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java index 852225135df..ca70028d18a 100644 --- a/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java +++ b/src/main/java/com/datadog/api/client/v2/model/LogsArchiveCreateRequestAttributes.java @@ -25,7 +25,9 @@ LogsArchiveCreateRequestAttributes.JSON_PROPERTY_COMPRESSION_METHOD, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_DESTINATION, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_INCLUDE_TAGS, + LogsArchiveCreateRequestAttributes.JSON_PROPERTY_LOOKUP_ATTRIBUTES, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_NAME, + LogsArchiveCreateRequestAttributes.JSON_PROPERTY_PARTITIONING_ATTRIBUTES, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_QUERY, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_MAX_SCAN_SIZE_IN_GB, LogsArchiveCreateRequestAttributes.JSON_PROPERTY_REHYDRATION_TAGS @@ -44,9 +46,15 @@ public class LogsArchiveCreateRequestAttributes { public static final String JSON_PROPERTY_INCLUDE_TAGS = "include_tags"; private Boolean includeTags = false; + public static final String JSON_PROPERTY_LOOKUP_ATTRIBUTES = "lookup_attributes"; + private List lookupAttributes = null; + public static final String JSON_PROPERTY_NAME = "name"; private String name; + public static final String JSON_PROPERTY_PARTITIONING_ATTRIBUTES = "partitioning_attributes"; + private List partitioningAttributes = null; + public static final String JSON_PROPERTY_QUERY = "query"; private String query; @@ -141,6 +149,35 @@ public void setIncludeTags(Boolean includeTags) { this.includeTags = includeTags; } + public LogsArchiveCreateRequestAttributes lookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + return this; + } + + public LogsArchiveCreateRequestAttributes addLookupAttributesItem(String lookupAttributesItem) { + if (this.lookupAttributes == null) { + this.lookupAttributes = new ArrayList<>(); + } + this.lookupAttributes.add(lookupAttributesItem); + return this; + } + + /** + * An array of attributes to use as lookup keys for the archive. + * + * @return lookupAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_LOOKUP_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getLookupAttributes() { + return lookupAttributes; + } + + public void setLookupAttributes(List lookupAttributes) { + this.lookupAttributes = lookupAttributes; + } + public LogsArchiveCreateRequestAttributes name(String name) { this.name = name; return this; @@ -161,6 +198,38 @@ public void setName(String name) { this.name = name; } + public LogsArchiveCreateRequestAttributes partitioningAttributes( + List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + return this; + } + + public LogsArchiveCreateRequestAttributes addPartitioningAttributesItem( + String partitioningAttributesItem) { + if (this.partitioningAttributes == null) { + this.partitioningAttributes = new ArrayList<>(); + } + this.partitioningAttributes.add(partitioningAttributesItem); + return this; + } + + /** + * An array of attributes to use as partition keys for the archive. The attribute used most + * frequently for querying should be first. + * + * @return partitioningAttributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PARTITIONING_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getPartitioningAttributes() { + return partitioningAttributes; + } + + public void setPartitioningAttributes(List partitioningAttributes) { + this.partitioningAttributes = partitioningAttributes; + } + public LogsArchiveCreateRequestAttributes query(String query) { this.query = query; return this; @@ -304,7 +373,11 @@ public boolean equals(Object o) { this.compressionMethod, logsArchiveCreateRequestAttributes.compressionMethod) && Objects.equals(this.destination, logsArchiveCreateRequestAttributes.destination) && Objects.equals(this.includeTags, logsArchiveCreateRequestAttributes.includeTags) + && Objects.equals( + this.lookupAttributes, logsArchiveCreateRequestAttributes.lookupAttributes) && Objects.equals(this.name, logsArchiveCreateRequestAttributes.name) + && Objects.equals( + this.partitioningAttributes, logsArchiveCreateRequestAttributes.partitioningAttributes) && Objects.equals(this.query, logsArchiveCreateRequestAttributes.query) && Objects.equals( this.rehydrationMaxScanSizeInGb, @@ -320,7 +393,9 @@ public int hashCode() { compressionMethod, destination, includeTags, + lookupAttributes, name, + partitioningAttributes, query, rehydrationMaxScanSizeInGb, rehydrationTags, @@ -334,7 +409,11 @@ public String toString() { sb.append(" compressionMethod: ").append(toIndentedString(compressionMethod)).append("\n"); sb.append(" destination: ").append(toIndentedString(destination)).append("\n"); sb.append(" includeTags: ").append(toIndentedString(includeTags)).append("\n"); + sb.append(" lookupAttributes: ").append(toIndentedString(lookupAttributes)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" partitioningAttributes: ") + .append(toIndentedString(partitioningAttributes)) + .append("\n"); sb.append(" query: ").append(toIndentedString(query)).append("\n"); sb.append(" rehydrationMaxScanSizeInGb: ") .append(toIndentedString(rehydrationMaxScanSizeInGb)) diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature b/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature index 4b58769df54..752be13634f 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives.feature @@ -12,14 +12,14 @@ Feature: Logs Archives @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "Bad Request" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding Scenario: Create an archive returns "OK" response Given new "CreateLogsArchive" request - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK @@ -150,7 +150,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Bad Request" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 400 Bad Request @@ -158,7 +158,7 @@ Feature: Logs Archives Scenario: Update an archive returns "Not found" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 404 Not found @@ -166,7 +166,7 @@ Feature: Logs Archives Scenario: Update an archive returns "OK" response Given new "UpdateLogsArchive" request And request contains "archive_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "name": "Nginx Archive", "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} + And body with value {"data": {"attributes": {"compression_method": "GZIP", "destination": {"container": "container-name", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "storage_account": "account-name", "type": "azure"}, "include_tags": false, "lookup_attributes": ["trace_id", "user_id"], "name": "Nginx Archive", "partitioning_attributes": ["service", "status"], "query": "source:nginx", "rehydration_max_scan_size_in_gb": 100, "rehydration_tags": ["team:intake", "team:app"]}, "type": "archives"}} When the request is sent Then the response status is 200 OK