diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a02697caa79..8672c66d617 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -51361,10 +51361,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 @@ -51420,10 +51434,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/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java b/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java index 6cff3c53770..26deb3b9f5c 100644 --- a/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java +++ b/src/test/java/com/datadog/api/client/v2/api/LogsArchivesApiTest.java @@ -44,24 +44,19 @@ import com.datadog.api.client.v2.model.LogsArchiveOrderDefinition; import com.datadog.api.client.v2.model.LogsArchives; import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.Arrays; import java.util.List; import org.junit.BeforeClass; import org.junit.Test; -import org.openapitools.jackson.nullable.JsonNullableModule; /** API tests for LogsArchivesApi */ public class LogsArchivesApiTest extends V2APITest { public static final String ARCHIVE_ID = "FOObar"; private static LogsArchivesApi api; - - // ObjectMapper instance configure to not fail when encountering unknown properties - private static ObjectMapper objectMapper = - new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + private static ObjectMapper objectMapper; private final String fixturePrefix = "client/v2/api/logs_archives_fixtures"; private final String apiUriForArchives = "/api/v2/logs/config/archives"; @@ -75,7 +70,7 @@ public String getTracingEndpoint() { @BeforeClass public static void initApi() { api = new LogsArchivesApi(generalApiUnitTestClient); - objectMapper.registerModule(new JsonNullableModule()); + objectMapper = generalApiUnitTestClient.getJSON().getMapper(); } /** diff --git a/src/test/resources/com/datadog/api/client/v1/api/hosts.feature b/src/test/resources/com/datadog/api/client/v1/api/hosts.feature index 7ed533f7b20..56257ab1844 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/hosts.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/hosts.feature @@ -9,20 +9,20 @@ Feature: Hosts And a valid "appKeyAuth" key in the system And an instance of "Hosts" API - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get all hosts for your organization returns "Invalid Parameter Error" response Given new "ListHosts" request When the request is sent Then the response status is 400 Invalid Parameter Error - @integration-only @team:DataDog/core-index + @integration-only @team:DataDog/redapl-hosts Scenario: Get all hosts for your organization returns "OK" response Given new "ListHosts" request And request contains "filter" parameter with value "env:ci" When the request is sent Then the response status is 200 OK - @replay-only @team:DataDog/core-index + @replay-only @team:DataDog/redapl-hosts Scenario: Get all hosts with metadata deserializes successfully Given new "ListHosts" request And request contains "include_hosts_metadata" parameter with value true @@ -35,26 +35,26 @@ Feature: Hosts And the response "host_list[0].meta.agent_checks[0]" is equal to ["ntp","ntp","ntp:d884b5186b651429","OK","",""] And the response "host_list[0].meta.gohai" is equal to "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2711.998\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966892\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986968\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"/vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973940kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}" - @skip-validation @team:DataDog/core-index + @skip-validation @team:DataDog/redapl-hosts Scenario: Get all hosts with metadata for your organization returns "OK" response Given new "ListHosts" request And request contains "include_hosts_metadata" parameter with value true When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get the total number of active hosts returns "Invalid Parameter Error" response Given new "GetHostTotals" request When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get the total number of active hosts returns "OK" response Given new "GetHostTotals" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Mute a host returns "Invalid Parameter Error" response Given new "MuteHost" request And request contains "host_name" parameter from "REPLACE.ME" @@ -62,7 +62,7 @@ Feature: Hosts When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Mute a host returns "OK" response Given new "MuteHost" request And request contains "host_name" parameter from "REPLACE.ME" @@ -70,14 +70,14 @@ Feature: Hosts When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Unmute a host returns "Invalid Parameter Error" response Given new "UnmuteHost" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Invalid Parameter Error - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Unmute a host returns "OK" response Given new "UnmuteHost" request And request contains "host_name" parameter from "REPLACE.ME" diff --git a/src/test/resources/com/datadog/api/client/v1/api/tags.feature b/src/test/resources/com/datadog/api/client/v1/api/tags.feature index d6557ca1882..f0e8881a275 100644 --- a/src/test/resources/com/datadog/api/client/v1/api/tags.feature +++ b/src/test/resources/com/datadog/api/client/v1/api/tags.feature @@ -17,7 +17,7 @@ Feature: Tags And a valid "appKeyAuth" key in the system And an instance of "Tags" API - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Add tags to a host returns "Created" response Given new "CreateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -25,7 +25,7 @@ Feature: Tags When the request is sent Then the response status is 201 Created - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Add tags to a host returns "Not Found" response Given new "CreateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -33,47 +33,47 @@ Feature: Tags When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get All Host Tags returns "Not Found" response Given new "ListHostTags" request When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get All Host Tags returns "OK" response Given new "ListHostTags" request When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get Host Tags returns "Not Found" response Given new "GetHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Get Host Tags returns "OK" response Given new "GetHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Remove host tags returns "Not Found" response Given new "DeleteHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Remove host tags returns "OK" response Given new "DeleteHostTags" request And request contains "host_name" parameter from "REPLACE.ME" When the request is sent Then the response status is 204 OK - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Update host tags returns "Not Found" response Given new "UpdateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" @@ -81,7 +81,7 @@ Feature: Tags When the request is sent Then the response status is 404 Not Found - @generated @skip @team:DataDog/core-index + @generated @skip @team:DataDog/redapl-hosts Scenario: Update host tags returns "OK" response Given new "UpdateHostTags" request And request contains "host_name" parameter from "REPLACE.ME" 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 diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json index e79f6365c41..485ba02a904 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/azure/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"container":"my-container","integration":{"client_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa","tenant_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"},"path":"/path/blou","region":"my-region","storage_account":"storageAccount","type":"azure"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"XVlBzgbaiC","type":"archives"}} +{"data": {"attributes": {"destination": {"container": "my-container", "integration": {"client_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa", "tenant_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "path": "/path/blou", "region": "my-region", "storage_account": "storageAccount", "type": "azure"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "XVlBzgbaiC", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json index 72503048b5f..6acb992384e 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/gcs/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"client_email":"email@email.com","project_id":"aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"},"path":"/path/blou","type":"gcs"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"XVlBzgbaiC","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"client_email": "email@email.com", "project_id": "aaaaaaaa-1a1a-1a1a-1a1a-aaaaaaaaaaaa"}, "path": "/path/blou", "type": "gcs"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "XVlBzgbaiC", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json index 59af2e90e72..885ea4ba549 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/create.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json index 10efbe3e86a..2bff26e7384 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getall.json @@ -1 +1 @@ -{"data":[{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}]} +{"data": [{"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}]} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json index 8167048b343..ad4d0dc5432 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/getbyid.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/blou","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/blou", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "source:tata", "rehydration_tags": ["team:intake", "team:app"], "include_tags": true, "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file diff --git a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json index 5154396e237..5c293121dcb 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json +++ b/src/test/resources/com/datadog/api/client/v2/api/logs_archives_fixtures/s3/out/update.json @@ -1 +1 @@ -{"data":{"attributes":{"destination":{"bucket":"dd-logs-test-datadog-api-client-go","integration":{"account_id":"711111111111","role_name":"DatadogGoClientTestIntegrationRole"},"path":"/path/toto","type":"s3"},"name":"datadog-api-client-go Tests Archive","query":"service:toto"},"id":"FOObar","type":"archives"}} +{"data": {"attributes": {"destination": {"bucket": "dd-logs-test-datadog-api-client-go", "integration": {"account_id": "711111111111", "role_name": "DatadogGoClientTestIntegrationRole"}, "path": "/path/toto", "type": "s3"}, "name": "datadog-api-client-go Tests Archive", "query": "service:toto", "lookup_attributes": [], "partitioning_attributes": []}, "id": "FOObar", "type": "archives"}} \ No newline at end of file