Skip to content

Commit f80416f

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add compression_method field to Log Archives (#4042)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent c9375f2 commit f80416f

7 files changed

Lines changed: 53 additions & 5 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41615,6 +41615,8 @@ components:
4161541615
LogsArchiveAttributes:
4161641616
description: The attributes associated with the archive.
4161741617
properties:
41618+
compression_method:
41619+
$ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod"
4161841620
destination:
4161941621
$ref: "#/components/schemas/LogsArchiveDestination"
4162041622
include_tags:
@@ -41652,6 +41654,17 @@ components:
4165241654
- query
4165341655
- destination
4165441656
type: object
41657+
LogsArchiveAttributesCompressionMethod:
41658+
default: GZIP
41659+
description: The type of compression for the archive.
41660+
enum:
41661+
- GZIP
41662+
- ZSTD
41663+
example: GZIP
41664+
type: string
41665+
x-enum-varnames:
41666+
- GZIP
41667+
- ZSTD
4165541668
LogsArchiveCreateRequest:
4165641669
description: The logs archive.
4165741670
properties:
@@ -41661,6 +41674,8 @@ components:
4166141674
LogsArchiveCreateRequestAttributes:
4166241675
description: The attributes associated with the archive.
4166341676
properties:
41677+
compression_method:
41678+
$ref: "#/components/schemas/LogsArchiveAttributesCompressionMethod"
4166441679
destination:
4166541680
$ref: "#/components/schemas/LogsArchiveCreateRequestDestination"
4166641681
include_tags:
@@ -111745,6 +111760,7 @@ paths:
111745111760
value:
111746111761
data:
111747111762
attributes:
111763+
compression_method: GZIP
111748111764
destination:
111749111765
container: container-name
111750111766
storage_account: account-name
@@ -111918,6 +111934,7 @@ paths:
111918111934
value:
111919111935
data:
111920111936
attributes:
111937+
compression_method: GZIP
111921111938
destination:
111922111939
container: container-name
111923111940
storage_account: account-name

features/v2/logs_archives.feature

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ Feature: Logs Archives
1212
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
1313
Scenario: Create an archive returns "Bad Request" response
1414
Given new "CreateLogsArchive" request
15-
And body with value {"data": {"attributes": {"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"}}
15+
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"}}
1616
When the request is sent
1717
Then the response status is 400 Bad Request
1818

1919
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
2020
Scenario: Create an archive returns "OK" response
2121
Given new "CreateLogsArchive" request
22-
And body with value {"data": {"attributes": {"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"}}
22+
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"}}
2323
When the request is sent
2424
Then the response status is 200 OK
2525

@@ -150,23 +150,23 @@ Feature: Logs Archives
150150
Scenario: Update an archive returns "Bad Request" response
151151
Given new "UpdateLogsArchive" request
152152
And request contains "archive_id" parameter from "REPLACE.ME"
153-
And body with value {"data": {"attributes": {"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"}}
153+
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"}}
154154
When the request is sent
155155
Then the response status is 400 Bad Request
156156

157157
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
158158
Scenario: Update an archive returns "Not found" response
159159
Given new "UpdateLogsArchive" request
160160
And request contains "archive_id" parameter from "REPLACE.ME"
161-
And body with value {"data": {"attributes": {"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"}}
161+
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"}}
162162
When the request is sent
163163
Then the response status is 404 Not found
164164

165165
@generated @skip @team:DataDog/logs-backend @team:DataDog/logs-forwarding
166166
Scenario: Update an archive returns "OK" response
167167
Given new "UpdateLogsArchive" request
168168
And request contains "archive_id" parameter from "REPLACE.ME"
169-
And body with value {"data": {"attributes": {"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"}}
169+
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"}}
170170
When the request is sent
171171
Then the response status is 200 OK
172172

services/logs_archives/src/v2/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export {
1313
export { APIErrorResponse } from "./models/APIErrorResponse";
1414
export { LogsArchive } from "./models/LogsArchive";
1515
export { LogsArchiveAttributes } from "./models/LogsArchiveAttributes";
16+
export { LogsArchiveAttributesCompressionMethod } from "./models/LogsArchiveAttributesCompressionMethod";
1617
export { LogsArchiveCreateRequest } from "./models/LogsArchiveCreateRequest";
1718
export { LogsArchiveCreateRequestAttributes } from "./models/LogsArchiveCreateRequestAttributes";
1819
export { LogsArchiveCreateRequestDefinition } from "./models/LogsArchiveCreateRequestDefinition";

services/logs_archives/src/v2/models/LogsArchiveAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3+
import { LogsArchiveAttributesCompressionMethod } from "./LogsArchiveAttributesCompressionMethod";
34
import { LogsArchiveDestination } from "./LogsArchiveDestination";
45
import { LogsArchiveState } from "./LogsArchiveState";
56

67
/**
78
* The attributes associated with the archive.
89
*/
910
export class LogsArchiveAttributes {
11+
/**
12+
* The type of compression for the archive.
13+
*/
14+
"compressionMethod"?: LogsArchiveAttributesCompressionMethod;
1015
/**
1116
* An archive's destination.
1217
*/
@@ -51,6 +56,10 @@ export class LogsArchiveAttributes {
5156
* @ignore
5257
*/
5358
static readonly attributeTypeMap: AttributeTypeMap = {
59+
compressionMethod: {
60+
baseName: "compression_method",
61+
type: "LogsArchiveAttributesCompressionMethod",
62+
},
5463
destination: {
5564
baseName: "destination",
5665
type: "LogsArchiveDestination",
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { UnparsedObject } from "@datadog/datadog-api-client";
2+
3+
/**
4+
* The type of compression for the archive.
5+
*/
6+
export type LogsArchiveAttributesCompressionMethod =
7+
| typeof GZIP
8+
| typeof ZSTD
9+
| UnparsedObject;
10+
export const GZIP = "GZIP";
11+
export const ZSTD = "ZSTD";

services/logs_archives/src/v2/models/LogsArchiveCreateRequestAttributes.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { AttributeTypeMap } from "@datadog/datadog-api-client";
22

3+
import { LogsArchiveAttributesCompressionMethod } from "./LogsArchiveAttributesCompressionMethod";
34
import { LogsArchiveCreateRequestDestination } from "./LogsArchiveCreateRequestDestination";
45

56
/**
67
* The attributes associated with the archive.
78
*/
89
export class LogsArchiveCreateRequestAttributes {
10+
/**
11+
* The type of compression for the archive.
12+
*/
13+
"compressionMethod"?: LogsArchiveAttributesCompressionMethod;
914
/**
1015
* An archive's destination.
1116
*/
@@ -46,6 +51,10 @@ export class LogsArchiveCreateRequestAttributes {
4651
* @ignore
4752
*/
4853
static readonly attributeTypeMap: AttributeTypeMap = {
54+
compressionMethod: {
55+
baseName: "compression_method",
56+
type: "LogsArchiveAttributesCompressionMethod",
57+
},
4958
destination: {
5059
baseName: "destination",
5160
type: "LogsArchiveCreateRequestDestination",

services/logs_archives/src/v2/models/TypingInfo.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ import { RolesResponse } from "./RolesResponse";
3131

3232
export const TypingInfo: ModelTypingInfo = {
3333
enumsMap: {
34+
LogsArchiveAttributesCompressionMethod: ["GZIP", "ZSTD"],
3435
LogsArchiveDestinationAzureType: ["azure"],
3536
LogsArchiveDestinationGCSType: ["gcs"],
3637
LogsArchiveDestinationS3Type: ["s3"],

0 commit comments

Comments
 (0)